/*
Theme Name: Akademis Theme
Theme URI: https://akademis.id
Author: Akademis Team
Author URI: https://akademis.id
Description: Custom theme for Akademis based on Astra child theme
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: astra
Text Domain: akademis
*/

/* FULL WIDTH + NO PADDING khusus route /insight/* */
body.insight-route .site-content,
body.insight-route #content,
body.insight-route .ast-container,
body.insight-route .content-area,
body.insight-route .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Kadang Astra kasih padding-top ke konten */
body.insight-route .site-content {
  padding-top: 0 !important;
}

/* HANDLE SCROLLING FOR INSIGHT ROUTE
   Disable global scroll on html/body and enable scroll only inside .landing-root
   This removes the long outer scrollbar and keeps the inner (short) scrollbar. */
html:has(body.insight-route),
body.insight-route {
  height: 100vh !important;
  overflow: hidden !important;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}

/* Hide native scrollbar visuals for WebKit when on insight route */
html:has(body.insight-route)::-webkit-scrollbar,
body.insight-route::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body.insight-route .landing-root {
  height: 100vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

body.admin-bar .landing-root .sticky,
body.admin-bar .landing-root .fixed {
  top: 32px; /* tinggi admin bar desktop */
}
@media (max-width: 782px) {
  body.admin-bar .landing-root .sticky,
  body.admin-bar .landing-root .fixed {
    top: 46px; /* admin bar mobile */
  }
}

body { 
  background: #fff;
}
.landing-root { background: #fff; }

/* Global desktop density: keep non-landing pages close to 90% zoom. */
@media (min-width: 1024px) {
  body {
    overflow-x: hidden;
  }

  body:not(:has(.landing-root)) > #page {
    width: 111.111111%;
    transform-origin: top left;
    zoom: 0.9;
  }

  body:has(.landing-root) > #page {
    width: 100%;
    zoom: 1;
  }
}

/* Sembunyikan default header bawaan Astra pada halaman landing/custom */
body:has(.landing-root) header#masthead,
body.insight-route header#masthead {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

.nav-link {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px; /* Atur jarak garis bawah dengan teks */
  left: 0;
  width: 100%;
  height: 2px; /* Tebal garis bawah */
  background-color: #016e8d; /* Warna garis bawah */
}

/* FULL WIDTH + NO PADDING khusus route /insight/* */
body.insight-route .site-content,
body.insight-route #content,
body.insight-route .ast-container,
body.insight-route .content-area,
body.insight-route .site-main {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Kadang Astra kasih padding-top ke konten */
body.insight-route .site-content {
  padding-top: 0 !important;
}

/* ===================================
   PERUSAHAAN PAGE - FULL WIDTH
   =================================== */
body.perusahaan-page .site-content,
body.perusahaan-page #content,
body.perusahaan-page .ast-container,
body.perusahaan-page .content-area,
body.perusahaan-page .site-main,
body.perusahaan-page .entry-content {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

body.perusahaan-page .site-content {
  padding-top: 0 !important;
}

/* Force sections full viewport width */
body.perusahaan-page section {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

@media (min-width: 1024px) {
  body:not(:has(.landing-root)).perusahaan-page section,
  body:not(:has(.landing-root)) > #page .w-screen,
  body:not(:has(.landing-root)) > #page .akademis-cta-panel,
  body:not(:has(.landing-root)) > #page .akademis-footer {
    left: auto !important;
    right: auto !important;
    width: 111.111111vw !important;
    max-width: 111.111111vw !important;
    margin-left: calc(-55.555556vw + 50%) !important;
    margin-right: calc(-55.555556vw + 50%) !important;
  }

  body:has(.landing-root) > #page .w-screen,
  body:has(.landing-root) > #page .akademis-cta-panel,
  body:has(.landing-root) > #page .akademis-footer {
    left: auto !important;
    right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
}

