/* ==========================================================================
   HEADER
   ========================================================================== */

.antonify-header {
    position: fixed;
    top: 0;
    z-index: 999;

    width: 100%;

    background: rgba(255, 255, 255, 0.92);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    transition: var(--transition-premium);
}

.antonify-header.is-scrolled {
    box-shadow: var(--shadow-premium);
}

.header-wrapper {
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);

    transition: var(--transition-premium);
}

.antonify-header.is-scrolled .header-wrapper {
    min-height: 80px;
}

.antonify-header.is-not-home {
  background: var(--color-white) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ==========================================================================
   LOGO
   ========================================================================== */

.header-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.antonify-header .header-logo img {
    display: block;

    height: 52px;
    width: auto;

    transition: var(--transition-premium);
}

.antonify-header.is-scrolled .header-logo img {
    height: 46px;
}


/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.header-nav {
    flex: 1;

    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ==========================================================================
   NAV LINK
   ========================================================================== */

.nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 14px 20px;

    border-radius: var(--radius-md);

    color: var(--color-text-soft);

    font-size: 0.95rem;
    font-weight: 500;

    overflow: hidden;

    transition: var(--transition-premium);

    isolation: isolate;
}


/* Floating Pill Background */
.nav-link::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            135deg,
            rgba(99, 102, 241, 0.10),
            rgba(67, 56, 202, 0.06)
        );

    transform: scale(0.75);

    opacity: 0;

    filter: blur(8px);

    transition: var(--transition-premium);

    z-index: -2;
}


/* Glass Layer */
.nav-link::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    border: 1px solid transparent;

    background: rgba(255,255,255,0.75);

    opacity: 0;

    transform: scale(0.92);

    transition: var(--transition-premium);

    z-index: -1;
}


/* ==========================================================================
   HOVER EFFECT
   ========================================================================== */

.nav-link:hover {
    color: var(--color-primary);

    transform: translateY(-2px);
}

.nav-link:hover::before {
    opacity: 1;

    transform: scale(1);

    filter: blur(0);
}

.nav-link:hover::after {
    opacity: 1;

    transform: scale(1);

    border-color: rgba(99, 102, 241, 0.12);
}


/* ==========================================================================
   ACTIVE MENU
   ========================================================================== */

.nav-link.active {
    color: var(--color-primary);

    background: var(--color-surface-soft);
}

.nav-link.active::before,
.nav-link.active::after {
    opacity: 1;

    transform: scale(1);

    filter: blur(0);
}


/* ==========================================================================
   PREMIUM SHIMMER EFFECT
   ========================================================================== */

.nav-link span {
    position: relative;

    z-index: 2;
}

.nav-link span::after {
    content: "";

    position: absolute;

    top: 50%;
    left: -120%;

    width: 40%;
    height: 180%;

    transform:
        translateY(-50%)
        skewX(-25deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.65),
            transparent
        );

    opacity: 0;

    transition: none;
}

.nav-link:hover span::after {
    opacity: 1;

    animation: navShimmer 0.8s ease;
}


/* ==========================================================================
   CTA
   ========================================================================== */

.header-action {
    display: flex;
    align-items: center;

    flex-shrink: 0;
}

.header-action .btn {
    padding: 14px 28px;
}


/* ==========================================================================
   ANIMATION
   ========================================================================== */

@keyframes navShimmer {
    from {
        left: -120%;
    }

    to {
        left: 150%;
    }
}


/* ==========================================================================
   MOBILE & TABLET RESPONSIVE (UPDATED)
   ========================================================================== */

@media screen and (max-width: 992px) {
    /* Mengurangi tinggi header agar tidak terlalu memakan layar */
    .header-wrapper {
        min-height: 72px; 
    }

    /* 1. Mengecilkan Logo (Dari 52px/40px menjadi 32px) */
    .header-logo img {
        height: 42px !important; 
    }
    
    .antonify-header.is-scrolled .header-logo img {
        height: 36px !important; /* Sedikit lebih kecil saat di-scroll */
    }

    /* 2. Menghilangkan Message Toggle di Mobile */
    .message-toggle {
        display: none !important; 
    }

    /* Menyembunyikan menu navigasi desktop & tombol aksi (CTA) */
    .header-nav,
    .header-action .btn {
        display: none;
    }
    
    /* Menampilkan tombol hamburger menu (Mobile Toggle) */
    .mobile-toggle {
        display: flex;
    }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (HP Layar Kecil)
   ========================================================================== */
@media screen and (max-width: 576px) {
    /* Mengecilkan logo lebih jauh untuk HP dengan layar sempit */
    .header-logo img {
        height: 28px; 
    }
    
    .antonify-header.is-scrolled .header-logo img {
        height: 24px;
    }
}

/* ========================================
   THEME TOGGLE
======================================== */

.theme-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--color-text);
    background:
        rgba(255,255,255,.72);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border:
        1px solid rgba(99,102,241,.08);

    transition: var(--transition-premium);
}


.theme-toggle:hover {
    color: var(--color-primary);
    transform:
        translateY(-2px);
    box-shadow:
        0 10px 24px rgba(67,56,202,.08);
    border-color:
        rgba(99,102,241,.18);
}

.theme-toggle-inner {
    position: relative;
    width: 20px;
    height: 20px;
    display: block;
}


.theme-toggle:active {

    transform:
        translateY(0)
        scale(.96);
}


/* Icon */

.theme-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: all 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efek elastis / bouncy */
    width: 20px;
    height: 20px;
}


/* ========================================
   MESSAGE TOGGLE
======================================== */

.message-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--color-text-soft);

    background:
        rgba(255,255,255,.72);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border:
        1px solid rgba(99,102,241,.08);

    transition: var(--transition-premium);
}

.message-toggle-inner {
    position: relative;
    width: 20px;
    height: 20px;
    display: block;
}

.message-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: all 0.55s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efek elastis / bouncy */
}

.message-toggle svg {

    width: 20px;
    height: 20px;

    transition: var(--transition-premium);
}

.message-toggle:hover {

    color: var(--color-primary);

    transform: translateY(-2px);

    border-color:
        rgba(99,102,241,.18);

    box-shadow:
        0 10px 24px rgba(67,56,202,.08);
}

.message-toggle:hover svg {

    transform: translateY(-1px);
}

.message-toggle:active {

    transform:
        translateY(0)
        scale(.96);
}

/* ==========================================================================
   PREMIUM MOBILE TOGGLE & DRAWER SYSTEM (FIXED STICKY)
   ========================================================================== */

.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

/* 1. Ubah transform-origin menjadi center */
.mobile-toggle .line {
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    border-radius: var(--radius-full);
    transition: var(--transition-premium);
    transform-origin: center; /* Perbaikan ada di baris ini */
}

/* 2. Translasi Y yang presisi ke tengah, baru diputar */
/* Karena tinggi container 18px dan tinggi garis 2px, 
   jarak antara garis atas dan bawah adalah 16px. 
   Setengah dari 16px adalah 8px.
*/
.mobile-toggle.is-active .line-top {
    transform: translateY(8px) rotate(45deg); 
    background-color: var(--color-primary);
}

.mobile-toggle.is-active .line-mid {
    opacity: 0;
    transform: scaleX(0); /* Animasi mengecil ke tengah tetap dipertahankan */
}

.mobile-toggle.is-active .line-bot {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-primary);
}

/* Panel Drawer Menu Samping */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: -10px 0 40px -15px rgba(15, 23, 42, 0.15);
    padding: 120px var(--gutter) 40px var(--gutter);
    transition: var(--transition-premium);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.is-open {
    right: 0;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.mobile-nav-link {
    display: block;
    padding: 14px 20px;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-soft);
    border-radius: var(--radius-md);
    transition: var(--transition-premium);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--color-primary);
    background: var(--color-surface-soft);
    padding-left: 28px;
}

.mobile-cta-wrapper {
    margin-top: var(--space-md);
    padding: 0 10px;
}

@media screen and (max-width: 992px) {
    .header-nav,
    .header-action .btn {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
}