/* Portal Kota Madiun — responsive & UI polish */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

img,
svg,
video,
iframe,
rssapp-imageboard {
  max-width: 100%;
}

.imgs img,
.portfolio-inner-sl .imgs img,
.single-blog-inner .imgs img,
.single-services-dv .imgs .mn {
  max-width: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.btn,
.sm-btns,
.read-more {
  min-height: 44px;
}

.sec-title h1,
.sec-title h2,
.tag1 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Header ---------- */
@media (max-width: 1199px) {
  .header-style-3 {
    top: 12px;
  }

  .v3.main-navbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .v3.main-navbar .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 991px) {
  .header-style-3 {
    top: 0;
    position: relative;
    z-index: 1030;
  }

  .main-responsive-nav .logo img {
    max-height: 48px;
    width: auto;
  }

  .mean-container a.meanmenu-reveal {
    padding: 12px;
  }
}

/* ---------- Banner ---------- */
.banner-area-wrap-v3 {
  background-position: center top;
}

@media (max-width: 1199px) {
  .banner-area-wrap-v3 {
    height: auto;
    min-height: 520px;
    padding-top: 180px;
    padding-bottom: 80px;
    margin: 12px;
  }
}

@media (max-width: 991px) {
  .banner-area-wrap-v3 {
    min-height: 42vh;
    height: 380px;
    padding-top: 0;
    padding-bottom: 0;
    margin: 8px;
    border-radius: 14px;
    background-position: center;
  }

  .banner-area-wrap-v3 .container-fluid {
    padding-left: 16px;
  }
}

@media (max-width: 575px) {
  .banner-area-wrap-v3 {
    height: 260px;
    min-height: 220px;
    margin: 8px 8px 0;
    border-radius: 12px;
  }

  .pt-120,
  .pb-120,
  .px-120 {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .mt-50,
  .mb-50 {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
  }

  .tag1 {
    font-size: 28px !important;
    line-height: 1.25 !important;
  }
}

/* ---------- About ---------- */
.left-images-about img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .left-images-about .inner {
    text-align: center;
  }

  .right-content-about {
    text-align: left;
  }

  .right-content-about .btn {
    width: 100%;
  }
}

/* ---------- Jelajah slider ---------- */
.similar-title {
  gap: 12px;
  flex-wrap: wrap;
}

.similar-title h1 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  margin: 0;
}

.slider-btns-simi {
  display: inline-flex !important;
  gap: 8px;
}

.slider-btns-simi .sm-btns {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, #10b1ab -0.02%, #fbd826 100.06%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.similar-slider-wrap {
  overflow: hidden;
}

.similar-slider-wrap .slick-list,
.similar-slider-wrap .slick-track {
  overflow: hidden;
}

.similar-slider-wrap .single,
.similar-slider-wrap .slick-slide {
  height: auto;
}

.similar-slider-wrap .slick-slide {
  overflow: visible;
}

.similar-slider-wrap .portfolio-inner-sl {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.similar-slider-wrap .portfolio-inner-sl .go-hidden {
  z-index: 4;
}

.similar-slider-wrap .portfolio-inner-sl .imgs {
  position: relative;
  z-index: 2;
  padding-top: 0;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 280px;
  overflow: hidden;
  border-radius: 16px;
  background: #eef6f5;
}

.similar-slider-wrap .portfolio-inner-sl .imgs img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  max-width: none;
  transition: height 0.35s ease, border-radius 0.35s ease;
}

.similar-slider-wrap .portfolio-inner-sl .imgs img.img-fallback {
  object-fit: contain;
  padding: 20px;
}

.similar-slider-wrap .portfolio-inner-sl .hidden-cont {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: 84px;
  padding: 16px 18px 18px;
  border-radius: 0 0 16px 16px;
  background: #f4f4f4;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.similar-slider-wrap .portfolio-inner-sl .hidden-cont h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
  padding-bottom: 0;
}

.similar-slider-wrap .portfolio-inner-sl .hidden-cont .btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  line-height: 44px;
  font-size: 24px;
}

@media (hover: hover) and (min-width: 992px) {
  .similar-slider-wrap .portfolio-inner-sl:hover .imgs,
  .similar-slider-wrap .portfolio-inner-sl:focus-within .imgs {
    z-index: 2;
    background: transparent;
  }

  .similar-slider-wrap .portfolio-inner-sl:hover .imgs img,
  .similar-slider-wrap .portfolio-inner-sl:focus-within .imgs img {
    height: calc(100% - 84px);
    border-radius: 16px 16px 36px 36px;
  }

  .similar-slider-wrap .portfolio-inner-sl:hover .hidden-cont,
  .similar-slider-wrap .portfolio-inner-sl:focus-within .hidden-cont {
    opacity: 1;
  }
}

@media (hover: none), (max-width: 991px) {
  .similar-slider-wrap .portfolio-inner-sl .imgs {
    background: transparent;
  }

  .similar-slider-wrap .portfolio-inner-sl .imgs img {
    height: calc(100% - 84px);
    border-radius: 16px 16px 36px 36px;
  }

  .similar-slider-wrap .portfolio-inner-sl .hidden-cont {
    opacity: 1;
  }
}

@media (max-width: 575px) {
  .similar-slider-wrap .portfolio-inner-sl .imgs {
    max-height: 220px;
  }
}

/* ---------- News cards ---------- */
.single-blog-inner.v3 .conts h2 {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  line-height: 1.35;
  padding-top: 10px;
}

.single-blog-inner.v3 .conts h2 a {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.single-blog-inner.v3 .conts .author {
  flex-wrap: wrap;
  gap: 8px;
}

.single-blog-inner.v3 .imgs {
  padding-top: 62%;
}

.single-blog-inner.v3.smaller .imgs {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .single-blog-inner.v3 {
    max-width: 100%;
  }

  .single-blog-inner.v3 .imgs {
    padding-top: 58%;
  }
}

@media (max-width: 767px) {
  .single-blog-inner.v3.smaller .d-sm-flex {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
  }

  .single-blog-inner.v3.smaller .imgs {
    width: 100% !important;
    padding-top: 56% !important;
  }

  .single-blog-inner.v3.smaller .conts {
    padding-left: 0 !important;
    padding-top: 12px !important;
  }

  .single-blog-inner.v3 .conts .meta li {
    padding-right: 12px;
  }

  .single-blog-inner.v3 .conts .author .read-more {
    font-size: 15px;
  }
}

/* ---------- Service cards ---------- */
.our-services-sec [class*="col-"] > a {
  display: block;
  height: 100%;
}

.single-services-dv {
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.single-services-dv:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(6, 97, 94, 0.14);
}

.single-services-dv .cont p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}

@media (max-width: 575px) {
  .single-services-dv .imgs {
    padding-bottom: 180px;
  }

  .single-services-dv .cont {
    padding: 18px 18px 22px;
  }
}

/* ---------- Pelayanan cards ---------- */
.how-work-inner-v3 {
  height: 100%;
}

@media (max-width: 575px) {
  .how-work-inner-v3 {
    padding: 22px 18px;
  }

  .how-work-inner-v3 .d-sm-flex {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
}

/* ---------- Map overlay ---------- */
.mapouter {
  display: block !important;
  width: 100%;
}

.map-cta {
  position: absolute;
  left: 48px;
  bottom: 48px;
  z-index: 10;
}

@media (max-width: 767px) {
  .mapouter {
    height: 240px !important;
  }

  .map-cta {
    left: 16px;
    right: 16px;
    bottom: 20px;
  }

  .map-cta .btn {
    width: 100%;
  }
}

/* ---------- Footer ---------- */
@media (max-width: 767px) {
  .newsletter-form .d-md-flex {
    gap: 16px;
  }

  .newsletter-form .left-content h2 {
    font-size: 1.4rem;
  }

  .newslttr-grp {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .newslttr-grp .form-control,
  .newslttr-grp .btn {
    width: 100%;
    border-radius: 10px;
  }

  .footers .ftr-widget h2 {
    font-size: 1.15rem;
  }
}

/* ---------- Contact / widgets ---------- */
rssapp-imageboard {
  display: block;
  width: 100%;
  overflow: hidden;
}

#gpr-kominfo-widget-container {
  display: block;
  width: 100%;
  min-height: 320px;
  overflow: visible;
}

.contact-us-pg .card {
  border-radius: 16px;
}

/* ---------- Mobile quick action ---------- */
.mobile-quick-cta {
  display: none;
}

@media (max-width: 991px) {
  .mobile-quick-cta {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1040;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, #10b1ab -0.02%, #fbd826 100.06%);
    color: #fff;
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(6, 97, 94, 0.28);
    text-decoration: none;
  }

  .mobile-quick-cta:hover,
  .mobile-quick-cta:focus {
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .single-services-dv,
  .portfolio-inner-sl .imgs img {
    transition: none;
  }
}
