/* =============================================
   FONT DECLARATION
   ============================================= */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   CUSTOM PROPERTIES
   ============================================= */
:root {
    --hdr-green:         #7dc02f;
    --hdr-green-dark:    #6aab28;
    --hdr-green-hover:   rgba(0, 0, 0, 0.12);
    --hdr-white:         #ffffff;
    --hdr-text:          #2d2d2d;
    --hdr-muted:         #666666;
    --hdr-border:        #e8e8e8;
    --hdr-topbar-h:      76px;
    --hdr-navbar-h:      48px;
    --hdr-total-h:       124px;   /* topbar + navbar */
    --hdr-mobile-h:      60px;
}

/* =============================================
   BODY PADDING — kompensasi header fixed
   ============================================= */
body {
    padding-top: var(--hdr-total-h);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body {
        padding-top: var(--hdr-mobile-h);
    }
}

/* =============================================
   HEADER WRAPPER
   ============================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* =============================================
   BARIS 1 — TOP BAR (Putih)
   ============================================= */
.hdr-topbar {
    background: var(--hdr-white);
    border-bottom: 1px solid var(--hdr-border);
    height: var(--hdr-topbar-h);
}

.hdr-topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* --- Logo ---------------------------------- */
.hdr-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.hdr-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.hdr-logo-text {
    font-size: 14px;
    color: var(--hdr-muted);
    line-height: 1.25;
    white-space: nowrap;
}

.hdr-logo-text strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: var(--hdr-green);
    letter-spacing: -0.2px;
}

/* --- Info Kontak --------------------------- */
.hdr-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.hdr-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--hdr-muted);
    white-space: nowrap;
}

.hdr-info-item a {
    color: var(--hdr-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hdr-info-item a:hover {
    color: var(--hdr-green);
}

.hdr-info-icon {
    width: 14px;
    height: 14px;
    color: var(--hdr-green);
    flex-shrink: 0;
}

/* --- Search Bar ---------------------------- */
.hdr-search {
    display: flex;
    align-items: center;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    width: 220px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hdr-search:focus-within {
    border-color: var(--hdr-green);
    box-shadow: 0 0 0 3px rgba(125, 192, 47, 0.18);
    background: var(--hdr-white);
}

.hdr-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 10px 9px 16px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--hdr-text);
    outline: none;
    min-width: 0;
}

.hdr-search-input::placeholder {
    color: #b0b0b0;
}

/* Hapus ikon bawaan browser di input search */
.hdr-search-input::-webkit-search-decoration,
.hdr-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.hdr-search-btn {
    border: none;
    background: transparent;
    padding: 9px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #aaa;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.hdr-search-btn:hover {
    color: var(--hdr-green);
}

.hdr-search-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* --- Social Icons -------------------------- */
.hdr-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hdr-social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.hdr-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--hdr-green);
    color: var(--hdr-white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hdr-social-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.hdr-social-btn:hover .hdr-social-icon {
    background: var(--hdr-green-dark);
    transform: translateY(-2px);
}

.hdr-social-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--hdr-text);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* --- Hamburger (mobile only) --------------- */
.hdr-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1.5px solid var(--hdr-border);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    flex-shrink: 0;
    margin-left: auto;
    transition: border-color 0.2s ease;
}

.hdr-mobile-toggle:hover {
    border-color: var(--hdr-green);
}

.hdr-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--hdr-text);
    border-radius: 999px;
    position: relative;
    transition: background 0.25s ease;
}

.hdr-toggle-bar::before,
.hdr-toggle-bar::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: var(--hdr-text);
    border-radius: 999px;
    transition: transform 0.25s ease, top 0.25s ease, bottom 0.25s ease;
}

.hdr-toggle-bar::before { top: -6px; }
.hdr-toggle-bar::after  { bottom: -6px; }

.hdr-mobile-toggle.is-open .hdr-toggle-bar          { background: transparent; }
.hdr-mobile-toggle.is-open .hdr-toggle-bar::before  { top: 0;    transform: rotate(45deg); }
.hdr-mobile-toggle.is-open .hdr-toggle-bar::after   { bottom: 0; transform: rotate(-45deg); }

/* =============================================
   BARIS 2 — NAV BAR (Hijau)
   ============================================= */
.hdr-navbar {
    background: var(--hdr-green);
    height: var(--hdr-navbar-h);
}

.hdr-navbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-nav {
    display: flex;
    align-items: stretch;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.hdr-nav li {
    display: flex;
    align-items: stretch;
}

.hdr-nav li a {
    display: flex;
    align-items: center;
    padding: 0 22px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--hdr-white);
    letter-spacing: 0.2px;
    white-space: nowrap;
    position: relative;
    transition: background 0.2s ease;
}

/* Garis bawah aktif/hover */
.hdr-nav li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--hdr-white);
    border-radius: 3px 3px 0 0;
    transition: width 0.25s ease;
}

.hdr-nav li a:hover {
    background: var(--hdr-green-hover);
}

.hdr-nav li a:hover::after,
.hdr-nav li a.is-active::after {
    width: calc(100% - 20px);
}

.hdr-nav li a.is-active {
    background: rgba(0, 0, 0, 0.15);
}

/* =============================================
   OVERLAY
   ============================================= */
.hdr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9997;
}

.hdr-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   DRAWER MOBILE
   ============================================= */
.hdr-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 88vw);
    height: 100dvh;
    background: var(--hdr-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

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

.hdr-drawer-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Header drawer */
.hdr-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--hdr-green);
    flex-shrink: 0;
}

.hdr-drawer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--hdr-white);
    font-weight: 700;
    font-size: 15px;
}

.hdr-drawer-logo img {
    border-radius: 6px;
    background: var(--hdr-white);
    padding: 2px;
}

.hdr-drawer-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hdr-white);
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.hdr-drawer-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

.hdr-drawer-close svg {
    width: 22px;
    height: 22px;
}

/* Search dalam drawer */
.hdr-drawer-search {
    display: flex;
    align-items: center;
    margin: 14px 16px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.hdr-drawer-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--hdr-text);
    outline: none;
}

.hdr-drawer-search input::-webkit-search-decoration,
.hdr-drawer-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.hdr-drawer-search button {
    border: none;
    background: var(--hdr-green);
    color: var(--hdr-white);
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.hdr-drawer-search button:hover {
    background: var(--hdr-green-dark);
}

.hdr-drawer-search button svg {
    width: 15px;
    height: 15px;
}

/* Nav links dalam drawer */
.hdr-drawer-nav {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    flex: 1;
}

.hdr-drawer-nav li a {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--hdr-text);
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.hdr-drawer-nav li a:hover,
.hdr-drawer-nav li a[aria-current="page"] {
    background: #f0f9e8;
    color: var(--hdr-green);
    padding-left: 28px;
}

/* Medsos dalam drawer */
.hdr-drawer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 16px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.hdr-drawer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hdr-green);
    color: var(--hdr-white);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hdr-drawer-socials a:hover {
    background: var(--hdr-green-dark);
    transform: translateY(-2px);
}

.hdr-drawer-socials svg {
    width: 20px;
    height: 20px;
}

/* Footer CTA dalam drawer */
.hdr-drawer-footer {
    padding: 14px 16px 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.hdr-drawer-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: #25D366;
    color: var(--hdr-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.hdr-drawer-footer a:hover {
    background: #1eb855;
}

body.hdr-no-scroll {
    overflow: hidden;
}

/* =============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================= */
@media (max-width: 1024px) {
    .hdr-info {
        display: none;
    }

    .hdr-search {
        width: 180px;
    }

    .hdr-social-label {
        display: none;
    }

    .hdr-nav li a {
        padding: 0 16px;
        font-size: 14px;
    }
}

/* =============================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================= */
@media (max-width: 768px) {
    :root {
        --hdr-topbar-h: 60px;
        --hdr-total-h:  60px;
    }

    .hdr-topbar {
        height: 60px;
    }

    /* Sembunyikan elemen yang tidak perlu di mobile */
    .hdr-info,
    .hdr-search,
    .hdr-socials {
        display: none;
    }

    /* Tampilkan tombol hamburger */
    .hdr-mobile-toggle {
        display: flex;
    }

    /* Logo sedikit lebih kecil */
    .hdr-logo-img {
        width: 38px;
        height: 38px;
    }

    .hdr-logo-text {
        font-size: 13px;
    }

    .hdr-logo-text strong {
        font-size: 15px;
    }

    /* Sembunyikan navbar hijau — ada di drawer */
    .hdr-navbar {
        display: none;
    }
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .hdr-drawer,
    .hdr-overlay,
    .hdr-nav li a::after,
    .hdr-social-icon,
    .hdr-search {
        transition: none !important;
    }
}
