/* Tighten layout for narrow mobile (<=460px) */
@media (max-width: 460px) {
  /* Containers inside hero */
  #home .mx-auto.max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  /* Hero typography */
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.15 !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  }
  .hero-subtitle {
    font-size: 1.05rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  }
  /* Buttons */
  .btn-primary,
  .btn-secondary {
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }
  .hero-buttons {
    gap: 0.5rem;
  }
  /* Stats visibility boost */
  .stats-card {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
  }
  .stats-card .text-lg {
    font-size: 1.5rem !important;
  }
  .stats-card .text-sm {
    font-size: 0.95rem !important;
  }
  .stats-card .text-xs {
    font-size: 0.85rem !important;
  }
  .stats-card .text-white,
  .stats-card .text-white\/80,
  .stats-card .text-white\/60 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }
  /* Reduce spacing below hero */
  .stats-grid {
    margin: 1.25rem 0 !important;
  }
  /* Shorter hero to bring CTA into view */
  #home .h-\[80vh\] {
    height: 68vh !important;
  }
  /* Make scroll cue more prominent */
  .scroll-cue {
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    font-size: 0.95rem;
    z-index: 30;
  }
}
/* Style CSS untuk Mix Typ 2 Website */
/* File ini berisi semua styling yang dipindahkan dari file HTML */
/* Optimized for performance - Critical styles only */

/* Fonts are loaded via <link> in HTML and controlled with --app-font to avoid FOUC */
/* Ensure consistent typography across ALL pages by defining a global default */
:root {
  /* Primary app font stack (Poppins first, then safe fallbacks) */
  --app-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  /* Standardized font weights */
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
}
/* Compact, responsive logo grid */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  align-items: center;
  justify-items: center;
}
/* Fixed 5x5 grid styles are defined for large screens inside the media query below */
.logo-cell {
  height: 72px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(203, 213, 225, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-cell img {
  max-height: 40px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.logo-cell:hover img {
  filter: grayscale(0%);
  transform: translateY(-2px);
}

/* Scoped override: Mitra Strategis Kami uses transparent, borderless tiles
   to match the style of "Pemerintah Daerah" and "Regulator" sections */
#mitra .logo-grid .logo-cell {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
#mitra .logo-grid .logo-cell img {
  /* Match visual size to government tiles */
  max-height: 64px;
  max-width: 170px;
}

/* Collapsible grid: clamp height on small screens to avoid tall sections */
.collapsible-grid {
  overflow: hidden;
}
.collapsible-grid[data-collapsed="true"] {
  max-height: 180px;
}
@media (min-width: 1024px) {
  /* Do not collapse on large screens */
  .collapsible-grid[data-collapsed="true"] {
    max-height: none;
  }
  /* Fixed partner grid: 5 columns on lg+ */
  .logo-grid.fixed-5x5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Ghost button for toggling grid */
.btn-ghost {
  appearance: none;
  border: 1px solid rgba(203, 213, 225, 0.7);
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.btn-ghost:hover {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.9);
}
.btn-ghost[aria-expanded="true"]::after {
  content: " ▲";
  font-size: 0.8em;
}
.btn-ghost[aria-expanded="false"]::after {
  content: " ▼";
  font-size: 0.8em;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Apply the global app font to the root element so all children inherit it */
  font-family: var(
    --app-font,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif
  );
}

/* Micro FOIT: prevent system font flash while Poppins loads (max 3s) */
/* Stabilize first paint: never hide body during font loading */
.fonts-loading body {
  visibility: visible !important;
}
.fonts-loaded body {
  visibility: visible !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(
    --app-font,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif
  );
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-attachment: fixed;
  /* Prevent horizontal scroll on mobile/desktop */
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  /* Improve readability when user zooms */
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.6;
  color: #1e293b;
  font-weight: var(--fw-normal);
  /* Consistent numeral rendering across components */
  font-variant-numeric: tabular-nums lining-nums;
  /* Smooth font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings and semantic text defaults for consistent look */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(
    --app-font,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif
  );
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

p,
li,
dd,
dt,
small,
label,
input,
textarea,
button {
  font-family: var(
    --app-font,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif
  );
  font-weight: var(--fw-normal);
}

strong,
b {
  font-weight: var(--fw-semibold);
}

/* No-loader mode: content visible immediately */
body:not(.loaded) main,
body:not(.loaded) section:not(header):not(#home),
body:not(.loaded) footer {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Hero section always visible - never hidden during loading */
body:not(.loaded) section#home {
  visibility: visible !important;
  opacity: 1 !important;
}

/* Keep fadeIn available but not required for visibility */
body.loaded main,
body.loaded section:not(header):not(#home),
body.loaded footer {
  visibility: visible;
  opacity: 1;
}

/* Hero section (#home) - NO animation, immediate visibility */
body.loaded section#home,
body:not(.loaded) section#home,
section#home {
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
  transform: translateY(0px) !important;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CRITICAL: Prevent ALL animations from affecting header AND hero */
body.loaded header,
body.loaded #siteHeader,
body.loaded .header-no-animation,
body header,
body #siteHeader,
body .header-no-animation,
body.loaded section#home,
body section#home,
section#home {
  animation: none !important;
  transform: translateY(0px) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Loading performance optimizations */
/* Prevent layout shifts during loading */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}

img[data-src] {
  opacity: 0;
}

img[data-src].loaded {
  opacity: 1;
}

/* Critical layout styles to prevent CLS */
.hero-section {
  min-height: 100vh;
  will-change: transform;
}

/* Header - COMPLETELY ISOLATED from animations */
header,
#siteHeader,
.header-no-animation {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0px) !important;
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  overflow: visible !important; /* Allow mobile menu to overflow */
}

/* Prevent ANY animation on header and children */
header *,
#siteHeader *,
.header-no-animation * {
  animation: none !important;
  transform: none !important;
}

/* Exception: Mobile menu needs to be able to show/hide */
#mobileMenu,
#mobileMenu * {
  animation: unset !important;
  transform: unset !important;
}

/* Subtle header style change on scroll (paired with JS) */
#siteHeader.header-scrolled {
  background: linear-gradient(
    135deg,
    rgba(48, 48, 131, 0.95) 0%,
    #2a2a6b 50%,
    rgba(48, 48, 131, 0.95) 100%
  ) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: saturate(1.1) blur(6px);
}

/* Header nav active state (desktop) */
.nav-link {
  will-change: background-color, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.nav-link.is-active {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.nav-link.is-active .active-underline {
  width: 100% !important;
  left: 0 !important;
  opacity: 1 !important;
  transform: scaleX(1) !important;
}
.nav-link.is-active > span {
  color: #fff;
}

/* Faster underline transition for instant feedback */
.active-underline {
  will-change: transform, width;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Header nav active state (mobile drawer) */
#mobileMenu .nav-link.is-active {
  background-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  transform: scale(1.02);
  transition: all 0.15s ease;
}

#mobileMenu .nav-link {
  transition: all 0.15s ease;
}

/* Mobile menu drawer - OPTIMIZED VERSION (faster transitions) */
#mobileMenu {
  transition: opacity 0.15s ease;
  pointer-events: auto;
}

#mobileMenu.hidden {
  display: none;
  pointer-events: none;
}

/* Ensure mobile menu links are clickable and have proper touch target */
#mobileMenu a {
  cursor: pointer !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  display: block;
  min-height: 44px; /* Minimum touch target size for mobile */
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation; /* Improve touch responsiveness */
}

#mobileMenu a:hover,
#mobileMenu a:focus {
  background-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

#mobileMenu a:active {
  background-color: rgba(255, 255, 255, 0.25) !important;
  transform: scale(0.98);
  transition: all 0.1s ease;
}

/* Enhanced visibility for CTA buttons in mobile menu */
/* Button Konsultasi - Mobile Menu - Enhanced Hover Effect */
#mobileMenu a[href*="konsultasi"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#mobileMenu a[href*="konsultasi"]:hover,
#mobileMenu a[href*="konsultasi"]:active {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 12px 28px -8px rgba(255, 255, 255, 0.4),
    0 8px 16px -6px rgba(59, 130, 246, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
  filter: brightness(1.15) !important;
  background-color: #ffffff !important;
}

/* Ripple effect untuk button Konsultasi */
#mobileMenu a[href*="konsultasi"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.3) 0%,
    rgba(255, 255, 255, 0.2) 70%
  );
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

#mobileMenu a[href*="konsultasi"]:hover::before,
#mobileMenu a[href*="konsultasi"]:active::before {
  width: 350px;
  height: 350px;
}

/* Pastikan konten button tetap di atas ripple effect */
#mobileMenu a[href*="konsultasi"] > span {
  position: relative;
  z-index: 1;
}

/* Animasi untuk icon WhatsApp */
#mobileMenu a[href*="konsultasi"]:hover svg,
#mobileMenu a[href*="konsultasi"]:active svg {
  transform: rotate(15deg) scale(1.15);
  transition: transform 0.3s ease;
}

/* Enhanced effect untuk button Voucher Hotspot juga agar konsisten */
#mobileMenu a[href*="airlink.id"]:hover,
#mobileMenu a[href*="airlink.id"]:active {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 12px 28px -8px rgba(251, 191, 36, 0.5),
    0 8px 16px -6px rgba(245, 158, 11, 0.4), 0 0 0 3px rgba(251, 191, 36, 0.3) !important;
  filter: brightness(1.1) !important;
}

#mobileMenu a[href*="airlink.id"]:hover svg,
#mobileMenu a[href*="airlink.id"]:active svg {
  transform: rotate(-10deg) scale(1.15);
  transition: transform 0.3s ease;
}

/* Desktop fallback: ensure header nav/cta visible on >=1024px even if Tailwind utilities are late */
@media (min-width: 1024px) {
  .desktop-nav,
  .desktop-cta {
    display: flex !important;
  }

  /* Enhanced hover effect for desktop CTA Konsultasi button */
  .desktop-cta a[href*="konsultasi"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .desktop-cta a[href*="konsultasi"]:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 28px -8px rgba(255, 255, 255, 0.4),
      0 8px 16px -6px rgba(59, 130, 246, 0.3),
      0 0 0 2px rgba(255, 255, 255, 0.2);
    filter: brightness(1.15);
  }

  .desktop-cta a[href*="konsultasi"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(59, 130, 246, 0.3) 0%,
      rgba(255, 255, 255, 0.2) 70%
    );
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
    z-index: 0;
  }

  .desktop-cta a[href*="konsultasi"]:hover::before {
    width: 300px;
    height: 300px;
  }

  .desktop-cta a[href*="konsultasi"] > span {
    position: relative;
    z-index: 1;
  }

  .desktop-cta a[href*="konsultasi"]:hover svg {
    transform: rotate(15deg) scale(1.15);
    transition: transform 0.3s ease;
  }

  /* Enhanced effect for desktop Voucher Hotspot button */
  .desktop-cta a[href*="airlink.id"]:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 28px -8px rgba(251, 191, 36, 0.5),
      0 8px 16px -6px rgba(245, 158, 11, 0.4), 0 0 0 2px rgba(251, 191, 36, 0.3);
    filter: brightness(1.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .desktop-cta a[href*="airlink.id"]:hover svg {
    transform: rotate(-10deg) scale(1.15);
    transition: transform 0.3s ease;
  }
}

/* Apply font immediately - prevent FOUT */
html,
body,
*,
body.fonts-loaded {
  font-family: var(
    --app-font,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif
  );
}

/* During pre-init freeze, disable transitions/animations and ensure content is visible */
.pre-init *,
.pre-init *::before,
.pre-init *::after {
  transition: none !important;
  animation: none !important;
}
.pre-init .reveal,
.pre-init .reveal-left,
.pre-init .reveal-right,
.pre-init .reveal-stagger,
.pre-init .reveal-stagger > * {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* Responsive loading improvements: loader removed; keep section intentionally empty */

/* Global responsive media defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
video,
iframe {
  max-width: 100%;
}

/* Fluid typography helpers */
.fluid-h1 {
  font-size: clamp(1.75rem, 2.5vw + 1.25rem, 4.25rem);
  line-height: 1.1;
}
.fluid-subtitle {
  font-size: clamp(1rem, 0.7vw + 0.8rem, 1.25rem);
}

/* Fluid iframe height respecting viewport */
.fluid-iframe {
  width: 100% !important;
  height: min(70vh, 600px) !important;
}

/* Clamp overflow for common containers to eliminate right-side white space */
header,
main,
footer,
section {
  overflow-x: clip;
}

/* Ensure hero section decorative elements don't cause horizontal scroll */
#home {
  overflow: hidden;
}

/* Hero background and overlay tuning */
#home .hero-bg {
  object-position: 40% 50%; /* favor left/center for text area */
}

@media (min-width: 1024px) {
  #home .hero-bg {
    object-position: 45% 50%;
  }
}

#home .hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(48, 48, 131, 0.8) 0%,
    rgba(48, 48, 131, 0.65) 55%,
    rgba(251, 191, 36, 0.5) 100%
  );
  pointer-events: none;
}

/* Use small viewport height to avoid mobile URL bar jump */
#home {
  min-height: 100svh;
}

/* Consistent header color (matches brand gradient in HTML classes) */
#siteHeader {
  background: linear-gradient(
    90deg,
    #303083 0%,
    #2a2a6b 50%,
    rgba(48, 48, 131, 0.95) 100%
  );
}

/* When scrolled, keep same palette but add subtle blur and shadow */
.header-scrolled {
  background: linear-gradient(
    90deg,
    #303083 0%,
    #2a2a6b 50%,
    rgba(48, 48, 131, 0.95) 100%
  ) !important;
  backdrop-filter: saturate(120%) blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Ensure emoji rendering */
.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji", "Android Emoji", "EmojiSymbols";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Enhanced reveal on scroll with staggered animations */
/* Default to visible to avoid flicker. JS may add .reveal-ready on body to enable animations */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-visible {
  opacity: 1;
  transform: none;
}
body.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
}
body.reveal-ready .reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal variants for different directions */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-left.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-right.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered reveal for grid items */
/* Stagger: visible by default; enable only when body.reveal-ready is present */
.reveal-stagger > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.reveal-ready .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
}
body.reveal-ready .reveal-stagger.reveal-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.reveal-visible > *:nth-child(1) {
  transition-delay: 0.05s;
}
.reveal-stagger.reveal-visible > *:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal-stagger.reveal-visible > *:nth-child(3) {
  transition-delay: 0.15s;
}
.reveal-stagger.reveal-visible > *:nth-child(4) {
  transition-delay: 0.2s;
}
.reveal-stagger.reveal-visible > *:nth-child(5) {
  transition-delay: 0.25s;
}
.reveal-stagger.reveal-visible > *:nth-child(6) {
  transition-delay: 0.3s;
}

/* Fallback: ensure content is visible if JavaScript fails */
.no-js .reveal-stagger > * {
  opacity: 1;
  transform: translateY(0);
}

/* Gradient text class untuk layanan utama */
.gradient-title {
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}

/* Text shadow class untuk subtitle */
.text-shadow-blue {
  text-shadow: 0 2px 10px rgba(30, 64, 175, 0.3);
}

/* Box shadow class untuk service icons */
.service-icon-shadow {
  box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
}

/* Enhanced hover effects for stats cards */
.stats-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.stats-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Enhanced button hover effects */
.btn-primary:hover {
  animation: gentleFloat 2s ease-in-out infinite;
}

.btn-secondary:hover {
  backdrop-filter: blur(20px);
}

/* Responsive enhancements */
@media (max-width: 640px) {
  /* Hero container tighten */
  #home .mx-auto.max-w-7xl {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  /* Use fluid clamp so judul tidak kebesaran di mobile lebar/sempit */
  .hero-title {
    font-size: clamp(1.7rem, 4.5vw + 0.9rem, 2.2rem) !important;
  }
  .hero-subtitle {
    font-size: clamp(0.95rem, 2.1vw + 0.65rem, 1.1rem) !important;
  }
  /* Compact hero CTA spacing */
  .hero-buttons {
    gap: 0.5rem;
  }
  .btn-primary,
  .btn-secondary {
    padding: 0.6rem 1rem;
  }

  .stats-card {
    min-height: auto;
  }

  .stats-card .relative.z-10 {
    text-align: left;
  }

  /* Ensure buttons don't break on small screens */
  .btn-primary,
  .btn-secondary {
    min-width: auto;
    width: 100%;
    justify-content: center;
  }

  /* Mobile typography adjustments */
  h1 {
    line-height: 1.2 !important;
  }
  /* Allow long words/URLs to wrap safely */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  a,
  span,
  button {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  /* Ensure buttons don't overflow viewport */
  .btn-primary,
  .btn-secondary {
    white-space: normal;
  }
  /* Use small viewport unit to avoid URL bar issues on mobile */
  #home .h-\[80vh\] {
    height: 72svh !important;
  }
  /* Respect notches/status bar */
  .hero-content {
    padding-top: calc(env(safe-area-inset-top, 0px) + 0.25rem);
  }
}

/* Extra small devices or high-zoom mobile (<=400px logical width) */
@media (max-width: 400px) {
  #siteHeader .h-20 {
    height: 64px;
  }
  nav a {
    font-size: 0.85rem;
  }
  .hero-title {
    font-size: 1.75rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
  }
  .btn-primary,
  .btn-secondary {
    padding: 0.6rem 0.9rem;
  }
  .stats-card {
    padding: 1rem;
  }
  .about .container,
  .container {
    padding: 0 0.75rem;
  }
  /* Tighten global section side padding for tiny devices */
  section,
  header,
  footer {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Extra-safe mobile scaling for high zoom (<=420px) */
@media (max-width: 420px) {
  html {
    font-size: 15px;
  }
  /* Reduce hero height to avoid fold clipping */
  #home .h-\[80vh\] {
    height: 68vh !important;
  }
  /* Tighten gaps */
  .stats-grid,
  .services-grid {
    gap: 1rem;
  }
  /* Tighter side padding on global containers */
  .mx-auto.max-w-7xl {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  /* Buttons a bit smaller */
  .btn-primary,
  .btn-secondary {
    font-size: 0.95rem;
  }
  /* Make hero button group tighter */
  .hero-buttons {
    gap: 0.5rem;
  }
  /* Ensure stats numbers remain large enough */
  .stats-card .text-lg {
    font-size: 1.4rem !important;
  }
  /* Compact stats paddings */
  .stats-card {
    padding: 0.9rem 0.9rem !important;
  }
}

/* Ultra-small screens and high zoom (<=380px) */
@media (max-width: 380px) {
  html {
    font-size: 14px;
  }
  /* Header */
  #siteHeader .h-20 {
    height: 56px;
  }
  #siteHeader img.w-\[160px\] {
    width: 120px;
  }
  /* Hero */
  #home .h-\[80vh\] {
    height: 64vh !important;
  }
  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  }
  .hero-subtitle {
    font-size: 1rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }
  /* Buttons */
  .btn-primary,
  .btn-secondary {
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
  }
  /* Cards */
  .stats-card {
    padding: 0.65rem;
  }
  .stats-grid,
  .services-grid {
    gap: 0.75rem;
  }
  /* Containers */
  .container,
  .about .container {
    padding: 0 0.5rem;
  }
  /* Prevent grid children from forcing overflow */
  .services-grid,
  .stats-grid {
    grid-auto-columns: 1fr;
  }
  .services-grid > *,
  .stats-grid > * {
    min-width: 0;
  }
  /* Scroll cue smaller */
  .scroll-cue {
    bottom: 8px;
    font-size: 0.9rem;
  }
  /* FAQ sizes */
  .faq .section-header h2 {
    font-size: 1.6rem;
  }
  .faq .section-header p {
    font-size: 0.95rem;
  }
  .faq-question {
    min-height: 44px;
    padding: 0.9rem 1rem;
  }
  .faq-question h3 {
    font-size: 1rem;
  }
  .faq-answer p {
    font-size: 0.95rem;
  }
  /* Floating WhatsApp injected via JS */
  a[aria-label="WhatsApp Chat"] {
    width: 44px !important;
    height: 44px !important;
    right: 12px !important;
    bottom: 12px !important;
  }
}

/* Very small screens (<=340px) */
@media (max-width: 340px) {
  html {
    font-size: 13px;
  }
  .hero-title {
    font-size: 1.55rem !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  }
  .scroll-cue {
    display: none;
  }
  .stats-card .text-lg {
    font-size: 1.25rem !important;
  }
  .stats-card {
    padding: 0.6rem;
  }
  /* Hard clamp on decorative blobs that might overflow */
  .pointer-events-none {
    max-width: 100%;
    overflow: hidden;
  }
  /* Extra-short hero on ultra-small screens */
  #home .h-\[80vh\] {
    height: 62vh !important;
  }
}

/* Devices with short height (landscape phones/small viewports) */
@media (max-height: 640px) and (max-width: 820px) {
  #home .h-\[80vh\] {
    height: 62vh !important;
  }
  .hero-title {
    font-size: clamp(1.5rem, 3.3vw + 0.9rem, 2rem) !important;
  }
  .hero-subtitle {
    font-size: clamp(0.9rem, 1.8vw + 0.6rem, 1.05rem) !important;
  }
  .hero-buttons {
    gap: 0.45rem;
  }
  .stats-grid {
    margin: 1rem 0 !important;
  }
}

/* Edge micro screens (<=320px) */
@media (max-width: 320px) {
  html {
    font-size: 12.5px;
  }
  .btn-primary,
  .btn-secondary {
    padding: 0.5rem 0.75rem;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .stats-card {
    min-height: 140px;
  }
}

@media (min-width: 769px) {
  .stats-card {
    min-height: 160px;
  }
}

/* CSS Animation for floating dots */

/* Iframe border reset */
.iframe-borderless {
  border: 0;
}
/* Scroll cue styles */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  opacity: 0.9;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.scroll-cue .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
}
.scroll-cue:hover .chev {
  animation: bounceDown 1.6s infinite;
}
@keyframes bounceDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* About Section Styles - Transplanted from Type 1 */
.about {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg width="120" height="120" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="60" y="60" width="2" height="2" fill="%23303083" fill-opacity="0.04"/><rect x="30" y="30" width="1" height="1" fill="%23fbbf24" fill-opacity="0.03"/><rect x="90" y="90" width="1" height="1" fill="%23fbbf24" fill-opacity="0.03"/></svg>');
  pointer-events: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.about-text h2 {
  color: #111827;
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.about-text > p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: #4b5563;
  line-height: 1.6;
}

.about-cards {
  display: grid;
  gap: 1.5rem;
}

.about-card {
  background-color: #f9fafb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border-left: 4px solid #303083;
  /* Respons lebih cepat & halus */
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
  transform: translateZ(0);
  cursor: pointer;
}

.about-card:hover {
  transform: translateY(-12px) scale(1.03) translateZ(0);
  box-shadow: 0 24px 56px rgba(30, 64, 175, 0.18);
  border-left-color: #303083;
  background-color: #ffffff;
}

.about-card h4 {
  color: #303083;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card:hover h4 {
  color: #1e40af;
}

.about-card p {
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Responsive for about section */
@media (max-width: 768px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .container {
    padding: 0 1rem;
  }

  .about {
    padding: 4rem 0;
  }

  .about-text h2 {
    font-size: 1.875rem;
  }

  .about-text > p {
    font-size: 1rem;
  }
}

/* FAQ Section - BRAND COLORS UPGRADED */
.faq {
  padding: 6rem 0;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #fbbf24 100%);
  position: relative;
  overflow: hidden;
  contain: layout style;
}

/* Animated background pattern with brand colors */
.faq::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg width="80" height="80" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="40" r="2" fill="%23ffffff" fill-opacity="0.15"/><circle cx="20" cy="20" r="1" fill="%23fbbf24" fill-opacity="0.2"/><circle cx="60" cy="60" r="1" fill="%23fbbf24" fill-opacity="0.2"/></svg>');
  pointer-events: none;
}

.faq .section-header h2,
.faq .section-header p {
  color: #ffffff;
  position: relative;
  z-index: 2;
}

/* Ensure FAQ header texts are perfectly centered */
.faq .section-header {
  text-align: center;
  max-width: 980px;
  margin: 0 auto 2rem;
}

.faq .section-header h2 {
  text-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.faq .section-header p {
  font-size: 1.125rem;
  opacity: 0.9;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.faq-item {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 2px solid rgba(30, 64, 175, 0.1);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.faq-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #1e40af 0%, #fbbf24 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.faq-item:hover::before,
.faq-item.active::before {
  transform: scaleY(1);
}

.faq-item:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 16px 48px rgba(30, 64, 175, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.25s ease;
  position: relative;
  min-height: 52px;
  border-radius: 0.75rem;
}

.faq-question:focus-visible {
  outline: 3px solid rgba(30, 64, 175, 0.5);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.12);
}

.faq-question:hover {
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.03) 0%,
    rgba(251, 191, 36, 0.03) 100%
  );
}

.faq-question h3 {
  margin: 0;
  color: #1f2937;
  font-size: 1.2rem;
  font-weight: 600;
  transition: color 0.3s ease;
  flex: 1;
}

.faq-question:hover h3 {
  color: #1e40af;
}

/* Normalize the toggle icon size for a neat layout */
.faq-question i,
.faq-question .faq-icon,
.faq-item .faq-icon {
  color: #1e40af;
  width: 20px;
  height: 20px;
  font-size: 1rem;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease,
    box-shadow 0.25s ease;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.1) 0%,
    rgba(251, 191, 36, 0.1) 100%
  );
  border: 1px solid rgba(30, 64, 175, 0.2);
  flex-shrink: 0;
}
.faq-question:hover i {
  box-shadow: 0 4px 10px rgba(30, 64, 175, 0.15);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg) translateZ(0);
  /* Dominan oranye saat state UP - profesional & nyaman */
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #ffffff;
  /* Pertahankan border untuk penegasan visual */
  border: 1px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.28),
    0 1px 4px rgba(30, 64, 175, 0.1);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease, padding 0.32s ease;
  background: linear-gradient(
    135deg,
    rgba(30, 64, 175, 0.02) 0%,
    rgba(251, 191, 36, 0.02) 100%
  );
  border-top: 1px solid rgba(30, 64, 175, 0.05);
  will-change: max-height;
}

/* Improve mobile spacing for FAQ */
@media (max-width: 480px) {
  .faq-question {
    padding: 1rem 1.125rem;
  }
  .faq-answer p {
    line-height: 1.6;
  }
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.25rem;
  max-height: 320px;
}

.faq-answer p {
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.7;
  padding-top: 0.75rem;
}

/* Map pins and labels styling with enhanced visibility */
.map-pin {
  transition: all 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.map-pin:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

/* Ensure labels are always visible and properly positioned */
.map-label {
  min-width: max-content;
  pointer-events: none;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(30, 64, 175, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  font-weight: 600;
}

/* Special styling for Slawi label to ensure maximum visibility */
.slawi-label {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.95),
    rgba(245, 158, 11, 0.95)
  ) !important;
  border: 2px solid rgba(251, 191, 36, 0.8) !important;
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.3) !important;
  backdrop-filter: blur(16px);
  font-weight: 700;
  color: rgba(92, 58, 0, 1) !important;
}

/* Enhanced pin visibility */
.enhanced-pin {
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
  transform: scale(1.1);
}

/* Responsive adjustments for map labels */
@media (max-width: 768px) {
  .map-label {
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .slawi-label {
    font-size: 0.8rem !important;
    padding: 0.6rem 1rem !important;
  }

  /* Adjust pin sizes for mobile */
  .map-pin-dot {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  .map-pin-dot .inner-dot {
    width: 0.6rem !important;
    height: 0.6rem !important;
  }
}

/* Add a strong glow effect for better visibility */
.map-pin-container:hover .map-label {
  box-shadow: 0 16px 48px rgba(30, 64, 175, 0.2) !important;
}

.map-pin-container:hover .slawi-label {
  box-shadow: 0 16px 48px rgba(251, 191, 36, 0.4) !important;
}

/* FAQ Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

/* Default: jangan tampilkan animasi sampai container terlihat */
.faq-item {
  animation: none;
  animation-fill-mode: both;
}

/* Tampilkan animasi hanya ketika container sudah reveal-visible */
.faq-container.reveal-visible .faq-item {
  animation: slideDown 0.5s ease-out;
}
.faq-container.reveal-visible .faq-item:nth-child(1) {
  animation-delay: 0.1s;
}
.faq-container.reveal-visible .faq-item:nth-child(2) {
  animation-delay: 0.2s;
}
.faq-container.reveal-visible .faq-item:nth-child(3) {
  animation-delay: 0.3s;
}
.faq-container.reveal-visible .faq-item:nth-child(4) {
  animation-delay: 0.4s;
}
.faq-container.reveal-visible .faq-item:nth-child(5) {
  animation-delay: 0.5s;
}
.faq-container.reveal-visible .faq-item:nth-child(6) {
  animation-delay: 0.6s;
}
.faq-container.reveal-visible .faq-item:nth-child(7) {
  animation-delay: 0.7s;
}
.faq-container.reveal-visible .faq-item:nth-child(8) {
  animation-delay: 0.8s;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .faq-item {
    animation: none !important;
  }
  .faq-answer {
    transition: none !important;
  }
  .faq-question i {
    transition: none !important;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Watermark utility (apply to a section container) */
.section-watermark {
  position: relative;
}
/* Removed watermark for cleaner design */

/* Marquee for partners */
/* Starfield background (for Layanan section) */
.stars-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 140px 140px;
  opacity: 0.25;
  animation: driftStars 60s linear infinite;
}
.stars-layer.fast {
  background-size: 100px 100px;
  opacity: 0.35;
  animation-duration: 35s;
}
/* tiny white dots as stars */
.stars-layer {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><circle cx="10" cy="10" r="1.2" fill="white" fill-opacity="0.75"/><circle cx="60" cy="30" r="1" fill="white" fill-opacity="0.6"/><circle cx="90" cy="15" r="1.4" fill="white" fill-opacity="0.8"/><circle cx="25" cy="70" r="1" fill="white" fill-opacity="0.65"/><circle cx="80" cy="80" r="1.2" fill="white" fill-opacity="0.75"/><circle cx="40" cy="45" r="0.9" fill="white" fill-opacity="0.55"/><circle cx="15" cy="100" r="1.1" fill="white" fill-opacity="0.7"/><circle cx="105" cy="60" r="1.3" fill="white" fill-opacity="0.8"/></svg>');
}
@keyframes driftStars {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -240px 240px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stars-layer {
    animation: none;
  }
}

/* Lazy render for sections below the fold */
.lazy-section {
  content-visibility: auto;
  contain-intrinsic-size: 1000px 800px;
}
.marquee {
  position: relative;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Auto-sliding animations */
.slide-left {
  animation: slideLeft 20s linear infinite;
}
.slide-left-slow {
  animation: slideLeft 30s linear infinite;
}
.slide-left-fast {
  animation: slideLeft 15s linear infinite;
}

@keyframes slideLeft {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}
/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .slide-left,
  .slide-left-slow,
  .slide-left-fast,
  .stats-slide {
    animation: none !important;
  }
}

/* Mobile-only: disable sliding/marquee and use static grids in Mitra section */
@media (max-width: 640px) {
  /* Kill any auto-slide/marquee animations inside #mitra on mobile */
  #mitra .marquee-track,
  #mitra .slide-left,
  #mitra .slide-left-slow,
  #mitra .slide-left-fast {
    animation: none !important;
    transform: none !important;
  }
  #mitra .marquee {
    overflow: hidden !important;
  }

  /* Convert horizontal scrolling logo rows to a simple grid on mobile */
  #mitra .grid.grid-flow-col {
    grid-auto-flow: row !important; /* stack rows instead of columns */
    grid-auto-columns: unset !important; /* remove auto column sizing */
    grid-template-columns: repeat(
      2,
      minmax(0, 1fr)
    ) !important; /* 2 cols on mobile */
    overflow-x: visible !important; /* remove horizontal scroll */
    scroll-snap-type: none !important; /* disable snap behavior */
    justify-items: center !important; /* center items like desktop */
  }
  /* Children that used min-width for horizontal snapping should shrink */
  #mitra .grid.grid-flow-col > .snap-start,
  #mitra .grid.grid-flow-col > * {
    min-width: 0 !important;
  }

  /* Trust indicators card tightening: consistent padding and icon size on mobile */
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] .w-16.h-16 {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] .w-8.h-8 {
    width: 1.75rem !important;
    height: 1.75rem !important;
  }
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] .p-6 {
    padding: 1rem !important;
  }

  /* Stack Regulator & Institusi Pemerintah logos vertically on mobile */
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(160px"] {
    grid-template-columns: 1fr !important;
  }

  /* Stack Trust indicators (1000+ Pelanggan, 100+ Mitra, 11+ Tahun) vertically on mobile */
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] {
    grid-template-columns: 1fr !important;
    justify-items: stretch !important; /* make cards fill available width */
  }
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] > .snap-start,
  #mitra .grid.grid-flow-col[class*="auto-cols-[minmax(260px"] > * {
    width: 100% !important; /* ensure full-width cards */
    min-width: 0 !important; /* prevent leftover min-width from utility */
  }

  /* Contact section: stop horizontal scroll/slide, use static grid */
  #kontak .grid.grid-flow-col {
    grid-auto-flow: row !important;
    grid-auto-columns: unset !important;
    grid-template-columns: 1fr !important; /* single column on small screens */
    overflow-x: visible !important;
    scroll-snap-type: none !important;
    justify-items: stretch !important;
  }
  #kontak .grid.grid-flow-col > .snap-start,
  #kontak .grid.grid-flow-col > * {
    min-width: 0 !important;
  }
  /* If any marquee/slide classes exist here, ensure disabled on mobile */
  #kontak .marquee-track,
  #kontak .slide-left,
  #kontak .slide-left-slow,
  #kontak .slide-left-fast {
    animation: none !important;
    transform: none !important;
  }
}

/* Floating animation */
.float-left {
  animation: floatLeft 8s ease-in-out infinite;
}
.float-left-delayed {
  animation: floatLeft 8s ease-in-out infinite 2s;
}
.float-left-fast {
  animation: floatLeft 6s ease-in-out infinite;
}

@keyframes floatLeft {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-20px);
  }
}

/* Continuous slide for stats */
.stats-slide {
  animation: statsSlide 25s linear infinite;
}

@keyframes statsSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-30px);
  }
}

/* Accordion */
.accordion-item {
  border-bottom: 0;
}
.accordion-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
}
.accordion-button:hover {
  background-color: rgba(241, 245, 249, 0.6);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
  will-change: max-height;
}
.accordion-item.active .accordion-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* Mobile Header Center Alignment - IMPROVED & PROFESSIONAL */
@media (max-width: 767px) {
  /* Logo centered, hamburger on the right */
  #siteHeader #headerContainer,
  #siteHeader .flex.items-center.justify-between {
    justify-content: center !important;
    position: relative;
    flex-direction: row !important;
    gap: 0 !important;
  }

  /* Logo stays centered */
  #siteHeader #logoLink,
  #siteHeader .flex.items-center.justify-between > a[href="#home"] {
    margin: 0 auto;
    flex-shrink: 0;
    order: 0;
  }

  /* Logo responsive sizing */
  #siteHeader #logoLink img,
  #siteHeader .flex.items-center.justify-between > a[href="#home"] img {
    width: 140px !important;
    max-width: 140px !important;
    height: auto;
  }

  /* Hamburger button positioned absolutely to the right */
  #siteHeader #mobileMenuBtn,
  #siteHeader .flex.items-center.justify-between > button#mobileMenuBtn {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10;
    order: 2;
  }

  /* Ensure proper header height on mobile */
  #siteHeader #headerContainer,
  #siteHeader .flex.items-center.justify-between {
    min-height: 70px;
    height: auto;
    padding: 0.75rem 0;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    min-height: 48px;
  }
  .faq-answer {
    padding: 0 1.25rem;
  }
}

/* Hamburger & Mobile Menu - SIMPLIFIED (no complex animations) */
/* Remove all complex hamburger icon transforms and mobile menu animations */
/* The simple toggle in JS is sufficient for reliable functionality */

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

/* Testimoni: force purple heading color */
#testimoni h2 {
  color: #303083 !important;
}

/* Paket: match heading and badge to purple brand */
#paket h2 {
  color: #303083 !important;
}
#paket .text-brand {
  color: #303083 !important;
}
#paket .rounded-full.bg-brand {
  background-color: #303083 !important;
}
/* Ensure the badge text 'Pilihan Paket' is purple */
#paket .inline-flex.items-center.gap-2 span {
  color: #303083 !important;
}
/* Ensure the small dot inside the badge is purple */
#paket .w-2.h-2.rounded-full {
  background: #303083 !important;
  background-image: none !important;
}

/* Coverage: match heading and badge to same purple */
#coverage h2 {
  color: #303083 !important;
}
#coverage .text-brand {
  color: #303083 !important;
}

/* Mitra & Partner: unify purple color and tidy heading spacing */
#mitra h2 {
  color: #303083 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.01em;
  word-spacing: 0.02em;
}
#mitra .text-brand {
  color: #303083 !important;
}
#mitra .rounded-full.bg-brand {
  background-color: #303083 !important;
}
#mitra .w-2.h-2.rounded-full {
  background: #303083 !important;
  background-image: none !important;
}

/* --- Partner logos tidy layout helpers --- */
.logo-img {
  max-height: 4rem; /* 64px */
  max-width: 170px;
  width: auto;
  height: auto;
}
@media (min-width: 1024px) {
  .logo-img {
    max-height: 5rem; /* 80px pada layar besar */
    max-width: 200px;
  }
}
.logo-tile {
  transform: none !important; /* matikan efek scale agar grid rapi */
}
.logo-tile:hover {
  transform: none !important;
}

/* Kontak & Lokasi: unify purple color (badge + heading) */
#kontak h2 {
  color: #303083 !important;
}
#kontak .text-brand {
  color: #303083 !important;
}
#kontak .rounded-full.bg-brand {
  background-color: #303083 !important;
}
#kontak .w-2.h-2.rounded-full {
  background: #303083 !important;
  background-image: none !important;
}
#coverage .rounded-full.bg-brand {
  background-color: #303083 !important;
}
#coverage .w-2.h-2.rounded-full {
  background: #303083 !important;
  background-image: none !important;
}

/* ===== ENHANCED RESPONSIVE HERO SECTION ===== */

/* Responsive Hero Grid Layout */
@media (min-width: 1024px) {
  .hero-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: center;
  }
}

/* Hero Stats Cards - Enhanced Responsive Design */
.hero-stats-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-stats-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive Typography for Hero */
@media (max-width: 640px) {
  .hero-title-responsive {
    font-size: 2rem;
    line-height: 1.2;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .hero-title-responsive {
    font-size: 2.5rem;
    line-height: 1.1;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-title-responsive {
    font-size: 3.5rem;
    line-height: 1.1;
  }
}

@media (min-width: 1025px) {
  .hero-title-responsive {
    font-size: 4rem;
    line-height: 1.1;
  }
}

@media (min-width: 1280px) {
  .hero-title-responsive {
    font-size: 4.5rem;
    line-height: 1.1;
  }
}

/* Hero Buttons Enhanced */
.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.hero-button-primary,
.hero-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.hero-button-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e40af;
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

.hero-button-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 15px 40px rgba(251, 191, 36, 0.4);
}

.hero-button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-button-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px) scale(1.05);
}

@media (min-width: 640px) {
  .hero-button-primary,
  .hero-button-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
  }
}

/* ===== ENHANCED RESPONSIVE HERO SECTION - DESKTOP & MOBILE FOCUSED ===== */

/* Desktop Specific Styles */
@media (min-width: 1024px) {
  #home .lg\:col-span-7 h1 {
    font-size: 3.5rem;
    line-height: 1.1;
  }

  #home .lg\:col-span-5 .space-y-6 > div:first-child {
    min-height: 200px;
  }
}

@media (min-width: 1280px) {
  #home .lg\:col-span-7 h1 {
    font-size: 4rem;
  }
}

@media (min-width: 1536px) {
  #home .lg\:col-span-7 h1 {
    font-size: 4.5rem;
  }
}

/* Mobile Specific Styles */
@media (max-width: 1023px) {
  #home {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  #home .space-y-8 {
    gap: 1.5rem;
  }

  #home h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

@media (max-width: 640px) {
  #home h1 {
    font-size: 2rem;
    line-height: 1.1;
  }

  #home .space-y-4 > a {
    width: 100%;
    max-width: 20rem;
    margin: 0 auto;
  }

  #home .grid-cols-2 {
    gap: 0.75rem;
  }

  #home .grid-cols-2 > div {
    padding: 1rem;
  }
}

/* Ensure proper backdrop blur */
@supports (backdrop-filter: blur(12px)) {
  #home .backdrop-blur-lg {
    backdrop-filter: blur(12px);
  }
}

@supports not (backdrop-filter: blur(12px)) {
  #home .backdrop-blur-lg {
    background-color: rgba(255, 255, 255, 0.15);
  }
}

/* Enhanced hover effects for desktop */
@media (min-width: 1024px) {
  #home .hover\:scale-105:hover {
    transform: scale(1.05) translateY(-4px);
  }

  #home .hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }
}

/* Mobile touch optimization */
@media (max-width: 1023px) {
  #home .hover\:scale-105:hover {
    transform: none;
  }

  #home .group:active {
    transform: scale(0.98);
  }
}

/* Typography optimization for readability */
#home .text-transparent.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Progress bar animation */
#home .transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure content is always visible */
#home .min-h-\[calc\(100vh-80px\)\] {
  min-height: calc(100vh - 80px);
}

/* Safe area for mobile devices */
@media (max-width: 640px) {
  #home {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* ===== ADDITIONAL RESPONSIVE ENHANCEMENTS ===== */

/* Prevent horizontal overflow */
#home {
  overflow-x: hidden;
}

/* Ensure CTA buttons are properly sized */
#home .space-y-4 a,
#home .flex.gap-6 a {
  min-height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile button full width with max constraints */
@media (max-width: 640px) {
  #home .space-y-4 a {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Ensure stats cards have consistent heights */
#home .space-y-6 > div,
#home .space-y-4 > div {
  min-height: fit-content;
}

/* Desktop stats card enhancements */
@media (min-width: 1024px) {
  #home .lg\:col-span-5 .space-y-6 > div:first-child {
    min-height: 180px;
  }

  #home .lg\:col-span-5 .grid-cols-2 > div {
    min-height: 160px;
  }
}

/* Mobile stats optimization */
@media (max-width: 1023px) {
  #home .grid-cols-2 > div {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Smooth animations for better UX */
#home * {
  transition-property: transform, opacity, background-color, border-color, color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Performance optimization - reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #home *,
  #home .animate-pulse,
  #home .animate-bounce {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #home .hover\:scale-105:hover,
  #home .group:hover {
    transform: none !important;
  }
}

/* Ensure Layanan grid is 1x1 on mobile and 2x2 on >=640px */
.services-2x2 {
  display: grid;
  grid-template-columns: 1fr; /* 1 kolom di mobile */
  gap: 1.75rem; /* sedikit lebih renggang di mobile */
  grid-auto-rows: 1fr; /* baris setara tinggi */
}
@media (min-width: 640px) {
  /* >= sm */
  .services-2x2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem;
  }
}
@media (min-width: 768px) {
  /* >= md */
  .services-2x2 {
    gap: 2.75rem;
  }
}
@media (min-width: 1024px) {
  /* >= lg */
  .services-2x2 {
    gap: 3.75rem; /* beri ruang lebih agar antar-kartu tidak terlihat terlalu rapat */
  }
}
@media (min-width: 1280px) {
  /* >= xl */
  .services-2x2 {
    gap: 4.25rem; /* lebih lega di layar sangat lebar */
  }
}

/* Tanpa menambah class baru di HTML: paksa pembungkus kartu dan kartu putih mengisi tinggi */
#layanan .services-2x2 > .group > div {
  /* gradient border wrapper */
  height: 100%;
}
#layanan .services-2x2 > .group > div > div {
  /* white card */
  height: 100%;
  min-height: 220px; /* sedikit lebih kecil agar efisien */
  display: flex;
  flex-direction: column;
  justify-content: center; /* konten selalu di tengah secara vertikal */
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  transform-origin: center;
}

/* Naikkan tinggi minimum di layar lebih lebar agar tampak lebih "lega" */
@media (min-width: 640px) {
  #layanan .services-2x2 > .group > div > div {
    min-height: 260px;
  }
}
@media (min-width: 1024px) {
  #layanan .services-2x2 > .group > div > div {
    min-height: 300px;
  }
}

/* Kurangi skala hover agar tidak terlalu agresif dan tetap rapi di grid */
#layanan .services-2x2 > .group > div > div:hover {
  transform: translateY(-6px) scale(1.02) !important;
}

/* Enhanced CTA Button Animations - Desktop & Mobile */
/* Button Konsultasi - Desktop */
.desktop-cta a[href*="konsultasi"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-cta a[href*="konsultasi"]:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3),
    0 8px 10px -6px rgba(59, 130, 246, 0.2);
  filter: brightness(1.1);
}

.desktop-cta a[href*="konsultasi"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.desktop-cta a[href*="konsultasi"]:hover::before {
  width: 300px;
  height: 300px;
}

.desktop-cta a[href*="konsultasi"] > * {
  position: relative;
  z-index: 1;
}

/* Button Konsultasi - Mobile */
#mobileMenu a[href*="konsultasi"] {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu a[href*="konsultasi"]:hover,
#mobileMenu a[href*="konsultasi"]:active {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3),
    0 8px 10px -6px rgba(59, 130, 246, 0.2);
  filter: brightness(1.1);
}

#mobileMenu a[href*="konsultasi"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

#mobileMenu a[href*="konsultasi"]:hover::before,
#mobileMenu a[href*="konsultasi"]:active::before {
  width: 300px;
  height: 300px;
}

#mobileMenu a[href*="konsultasi"] > * {
  position: relative;
  z-index: 1;
}

/* Smooth animation untuk icon WhatsApp di dalam button */
.desktop-cta a[href*="konsultasi"]:hover svg,
#mobileMenu a[href*="konsultasi"]:hover svg,
#mobileMenu a[href*="konsultasi"]:active svg {
  transform: rotate(15deg) scale(1.1);
  transition: transform 0.3s ease;
}
