:root {
  --primary: #0d56c4;
  --primary-dark: #083f92;
  --soft: #f4f6f9;
  --text: #2f3441;
  --muted: #7b8190;
  --card: #ffffff;
  --line: #e7eaf0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: #f6f7fb;
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.home-main-shell {
  display: flex;
  flex-direction: column;
}

.home-main-shell .home-main-footer {
  margin-top: auto;
}

body.home-page,
body.home-page main.home-main-shell {
  width: 100%;
  max-width: 100%;
}

body.home-page main.home-main-shell {
  overflow-x: clip;
}

a {
  text-decoration: none;
}

.topbar {
  font-size: 12px;
  background: #fff;
  border-bottom: 1px solid #eef0f4;
  color: #6c7484;
}

.navbar-brand img {
  height: 44px;
}

.main-nav {
  background: var(--primary);
}

.main-nav .nav-link,
.main-nav .navbar-brand,
.main-nav .navbar-toggler {
  color: #fff !important;
}

.navbar.bg-white {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833,52,65,0.86%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.1' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.bg-white .navbar-toggler {
  border-color: #d6deea;
}

.navbar.bg-white .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 86, 196, 0.18);
}

body.home-page .home-main-shell img,
body.home-page .home-main-shell svg,
body.home-page .home-main-shell video,
body.home-page .home-main-shell canvas {
  max-width: 100%;
}

.hero {
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.08),
      transparent 30%
    ),
    radial-gradient(
      circle at 75% 30%,
      rgba(255, 255, 255, 0.06),
      transparent 22%
    ),
    linear-gradient(
      135deg,
      var(--primary-dark) 0%,
      var(--primary) 50%,
      var(--primary-dark) 100%
    );
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 180px 180px;
  opacity: 0.35;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero .carousel-caption {
  left: 8%;
  right: auto;
  bottom: 10%;
  max-width: min(80%, 760px);
}

#homeHeroCarousel.carousel-fade .carousel-item {
  transition: opacity 0.9s ease-in-out;
}

.hero-caption-glass {
  background: rgba(8, 24, 52, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}

.hero-title-small {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 68px;
  line-height: 0.9;
  font-weight: 900;
  font-style: italic;
  color: #d6f0ff;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.hero-subtitle {
  max-width: 430px;
  color: #dbe8ff;
}

.contact-badges .badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.hero-person-wrap {
  position: relative;
  min-height: 460px;
}

.hero-red-shape {
  position: absolute;
  right: 40px;
  bottom: -60px;
  width: 280px;
  height: 430px;
  background: linear-gradient(180deg, #ff2d2d, #d41010);
  border-radius: 180px 180px 0 0;
  transform: rotate(24deg);
  opacity: 0.95;
}

.hero-white-shape {
  position: absolute;
  right: 74px;
  bottom: -44px;
  width: 235px;
  height: 385px;
  background: #fff;
  border-radius: 160px 160px 0 0;
  transform: rotate(24deg);
}

.hero-person {
  position: absolute;
  right: 58px;
  bottom: 0;
  width: 320px;
  max-width: 80%;
  z-index: 3;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.22));
}

.hero-name-badge {
  position: absolute;
  right: 85px;
  bottom: 24px;
  z-index: 4;
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  text-align: center;
  min-width: 140px;
}

.floating-wa {
  position: fixed;
  left: 10px;
  bottom: 20px;
  z-index: 50;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.welcome-card {
  background: #fff;
  border-radius: 1rem;
  margin-top: -1px;
  padding: 18px 22px 22px;
  box-shadow: 0 10px 25px rgba(14, 30, 67, 0.05);
}

.mini-domain {
  display: inline-block;
  background: #fff;
  color: #7d8798;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08);
  margin-top: -18px;
  position: relative;
  z-index: 5;
}

.quick-card,
.org-card,
.service-card,
.umkm-card,
.unit-card,
.news-side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(31, 45, 61, 0.04);
}

.quick-card {
  text-align: center;
  padding: 18px 10px;
  height: 100%;
}

.quick-card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 12%, #ffffff 88%);
  color: var(--primary);
  border-radius: 14px;
  margin: 0 auto 10px;
  font-size: 20px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary);
}

.section-kicker {
  font-size: 12px;
  color: #8a93a3;
  margin-bottom: 6px;
}

.rounded-32 {
  border-radius: 32px;
}

.btn-primary-custom {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 13px;
  font-weight: 600;
}

.btn-primary-custom i,
.btn-primary-custom em {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.btn-primary-custom em {
  margin: 0 !important;
}

.btn-primary-custom:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.facilities {
  background: #f3f4f6;
  padding: 56px 0 0;
}

.photo-strip img {
  height: 140px;
  width: 100%;
  object-fit: cover;
}

.blue-panel {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.blue-card {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  height: 100%;
}

.stats-pill {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  display: inline-block;
  margin: 0.15rem;
  font-size: 13px;
}

.blue-card .table-profile {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  overflow: hidden;
}

.table-profile td,
.table-profile th {
  color: #1f2d45;
  font-size: 13px;
  padding: 6px 10px;
  border-color: #d4dceb;
  background: transparent;
}

.org-card,
.service-card,
.unit-card {
  padding: 18px;
}

.org-card .small-circle,
.unit-card .small-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff5ff;
  color: var(--primary);
  font-size: 18px;
  margin: 0 auto 10px;
}

.image-box img,
.umkm-card img,
.news-main img,
.news-side-card img,
.village-head img {
  width: 100%;
  object-fit: cover;
}

.image-box img {
  height: 280px;
  border-radius: 18px;
}

.umkm-card {
  overflow: hidden;
  text-align: center;
  padding-bottom: 16px;
}

.umkm-card img {
  height: 180px;
}

.service-card {
  padding: 0;
  overflow: hidden;
}

.service-card .service-top {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 22px 18px 18px;
  text-align: center;
  min-height: 110px;
}

.service-card .service-bottom {
  padding: 14px 16px 18px;
  text-align: center;
}

.news-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  overflow: hidden;
}

.breadcrumb-mini {
  font-size: 12px;
  color: #8992a0;
  padding: 14px 0;
}

.news-main .main-image {
  height: 320px;
  border-radius: 8px;
}

.news-side-card {
  padding: 8px;
}

.news-side-card img {
  height: 72px;
  border-radius: 8px;
}

footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #eef3ff;
  padding: 40px 0;
  margin-top: auto;
}

footer h6 {
  color: #fff;
  margin-bottom: 14px;
}

.social a {
  color: #eef3ff;
  margin-right: 12px;
}

.image-box .theme-placeholder {
  width: 100%;
  height: 280px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.muted {
  color: #7d8798;
}

@media (max-width: 991.98px) {
  .hero-title {
    font-size: 54px;
  }

  .hero-person-wrap {
    min-height: 360px;
    margin-top: 30px;
  }

  .hero-red-shape {
    right: 10px;
    width: 220px;
    height: 340px;
  }

  .hero-white-shape {
    right: 35px;
    width: 190px;
    height: 300px;
  }

  .hero-person {
    right: 25px;
    width: 250px;
  }

  .hero-name-badge {
    right: 40px;
  }
}

@media (max-width: 767.98px) {
  .topbar {
    display: none;
  }

  .hero {
    padding-top: 28px;
  }

  .hero .carousel-caption {
    left: 12px;
    right: 12px;
    bottom: 14px;
    max-width: none;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-person-wrap {
    min-height: 300px;
  }

  .hero-red-shape {
    width: 170px;
    height: 250px;
    right: 20px;
    bottom: -20px;
  }

  .hero-white-shape {
    width: 145px;
    height: 220px;
    right: 38px;
    bottom: -10px;
  }

  .hero-person {
    width: 180px;
    right: 28px;
  }

  .hero-name-badge {
    font-size: 11px;
    padding: 8px 14px;
    min-width: auto;
    right: 32px;
  }

  .section-title {
    font-size: 28px;
  }

  .image-box img {
    height: 220px;
  }

  .image-box .theme-placeholder {
    height: 220px;
  }

  .news-main .main-image {
    height: 220px;
  }

  .photo-strip {
    overflow: hidden;
  }

  .photo-strip .row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .photo-strip .row::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .photo-strip .row > [class*="col-"] {
    flex: 0 0 52vw;
    width: 52vw;
    max-width: none;
  }

  .photo-strip img {
    height: 132px;
    display: block;
  }

  .service-card .service-bottom .btn-primary-custom {
    font-size: 12px;
  }

  .floating-wa {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .navbar.bg-white .navbar-brand {
    max-width: calc(100% - 64px);
    min-width: 0;
  }

  .navbar.bg-white .navbar-brand .text-muted {
    min-width: 0;
  }

  .navbar.bg-white .navbar-brand .text-muted .fw-bold {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-nav .navbar-collapse {
    overflow-x: clip;
    padding: 0.35rem 0.8rem 0.85rem;
  }

  .main-nav .navbar-nav {
    gap: 0 !important;
    width: 100%;
  }

  .main-nav .nav-item {
    width: 100%;
  }

  .main-nav .nav-link {
    border-bottom: 0;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0.72rem 0.2rem;
    white-space: normal;
  }

  body.home-page.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
  }

  body.home-page .modal {
    padding-right: 0 !important;
  }
}
