/* ============================================================
   MAIN.CSS — GLOBAL STYLES (digunakan di seluruh website)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&amp;display=swap');

/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #F5F5F5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #800000;
    transition: color 0.3s;
}
a:hover {
    color: #b22222;
}

/* ---------- CONTAINER ---------- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- HEADER ---------- */
.site-header {
    background-color: #fff;
    padding: 22px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* --- Layout header asli (tetap dipertahankan) --- */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between; /* layout asli, tidak diubah */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 50px; /* jarak asli antara logo dan menu */
    flex-shrink: 0;     /* logo tidak mengecil */
}
.logo img {
    height: 60px;
    width: auto;
}
.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: #13294b;
    letter-spacing: 1px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ---------- NAVIGATION ---------- */
.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 50px; /* jarak antar menu asli */
}
.main-nav a {
    color: #222;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
    color: #b22222;
}

/* ---------- DESKTOP DROPDOWN ---------- */
.menu-item {
    position: relative;
}

.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
    padding: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}
.main-nav .menu-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.main-nav .submenu li {
    width: 100%;
}
.main-nav .submenu li a {
    display: block;
    padding: 12px 18px;
    color: #333;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    transition: background 0.2s, color 0.2s, padding 0.2s, border 0.2s;
}
.main-nav .submenu li a:hover {
    background: #f5f5f5;
    color: #800000;
}

/* ==========================
   ACTIVE SUBMENU (diperbaiki)
   ========================== */
.main-nav .submenu li a.active-submenu {
    color: #800000 !important;
    font-weight: 700;
    background: #fafafa;
    border-left: 4px solid #800000;
    padding-left: 18px;
    transition: 0.25s;
}
.main-nav .submenu li a.active-submenu:hover {
    color: #800000;
    background: #efefef;
}

/* ---------- FOOTER (korporat biru) ---------- */
.site-footer {
    background: #10294f;
    color: #fff;
    padding: 50px 0 30px;
    border-top: none;
    margin-top: auto;
}

/* ---------- FOOTER LAYOUT ---------- */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.footer-column {
    flex: 1;
}

.footer-column.left {
    text-align: left;
}

.footer-column.right {
    text-align: right;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.footer-column p {
    margin-bottom: 10px;
    color: rgba(255,255,255,.9);
    font-size: 16px;
}

.footer-bottom p {
    color: rgba(255,255,255,.8);
    font-size: 14px;
}

.site-footer p,
.site-footer a {
    color: rgba(255, 255, 255, 0.85);
}
.site-footer a:hover {
    color: #fff;
}

/* ---------- HAMBURGER (tombol mobile) ---------- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 3001;
    margin-left: auto;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #800000;
    margin: 5px auto;
    transition: 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------- MOBILE MENU (sidebar) ---------- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 80px 20px 20px;
    transition: 0.3s ease;
    z-index: 2000;
}
.mobile-menu.show {
    right: 0;
}

.mobile-menu > a {
    padding: 16px 0;
    font-size: 17px;
    font-weight: 400;
    color: #13294b;
}

.mobile-group {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}
.mobile-title {
    font-size: 18px;
    font-weight: 400;
    color: #13294b;
}
.mobile-sub-title {
    padding: 10px 0 10px 16px;
    font-size: 15px;
    font-weight: 400;
    color: #3d4a63;
    border-left: 2px solid #d9d9d9;
    display: block;
}
.mobile-sub {
    display: block;
    padding: 8px 0 8px 24px;
    font-size: 14px;
    color: #666;
    white-space: normal;
    line-height: 1.6;
    border-left: 3px solid #ececec;
}
.mobile-children {
    display: none;
}
.mobile-children.show {
    display: block;
}
.mobile-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-arrow {
    font-size: 10px;
    color: #888;
    transition: 0.3s;
}
.mobile-toggle.active .mobile-arrow {
    transform: rotate(90deg);
}
.mobile-menu a.active-mobile {
    background: #800000;
    color: #fff;
    display: block;
    margin-left: -20px;
    margin-right: -20px;
    padding: 18px 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 0;
    border-bottom: none;
}

/* ==========================
   ACTIVE MOBILE GROUP (diperbaiki)
   ========================== */
.mobile-title.active-mobile-group {
    color: #800000;
    font-weight: 700;
}

.mobile-title.active-mobile-group .mobile-arrow {
    color: #800000;
}

/* ---------- COOKIE CONSENT ---------- */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 9999;
    text-align: left;
}
.cookie-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 350px;
}
.cookie-box p {
    margin-bottom: 15px;
    color: #333;
    font-size: 14px;
}
.cookie-actions {
    display: flex;
    gap: 10px;
}
.cookie-actions button {
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
}
#acceptCookies {
    background: #6d0a0a;
    color: #fff;
}
#rejectCookies {
    background: #ddd;
}

/* ---------- UTILITY ---------- */
.text-center {
    text-align: center;
}
.mt-20 {
    margin-top: 20px;
}
.mb-20 {
    margin-bottom: 20px;
}

.footer-tagline {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 8px;
}
.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.15);
}

/* ================================================================
   REVISI RESPONSIVE HEADER – BERTINGKAT, TANPA MENGUBAH LAYOUT ASLI
   ================================================================
   - Desktop besar (≥1500px) : tidak ada perubahan (gunakan style default).
   - 1366–1499px             : container header 92%, margin logo 40px,
                               gap menu 40px, font 12px, logo 54px.
   - 1200–1365px             : container header 94%, margin logo 30px,
                               gap menu 30px, font 11px, logo 48px.
   - 1100–1199px             : container header 96%, margin logo 20px,
                               gap menu 20px, font 10px, logo 42px.
   - <1100px                 : aktifkan hamburger (mobile).

   Semua perubahan hanya pada .site-header .container, logo, nav, dan padding.
   Layout .header-flex tetap menggunakan justify-content: space-between.
   ================================================================ */

/* ---------- 1366px – 1499px ---------- */
@media (max-width: 1499px) and (min-width: 1366px) {
    .site-header .container {
        width: 92%;
        max-width: 1400px; /* lebih lebar dari container standar */
    }

    .site-header {
        padding: 20px 0;
    }

    .logo {
        margin-right: 40px; /* kurangi jarak logo ke menu */
    }
    .logo img {
        height: 54px;
    }
    .logo-text {
        font-size: 14px;
        letter-spacing: 0.8px;
    }

    .main-nav > ul {
        gap: 40px;
    }
    .main-nav a {
        font-size: 12px;
        letter-spacing: 0.8px;
    }
}

/* ---------- 1200px – 1365px ---------- */
@media (max-width: 1365px) and (min-width: 1200px) {
    .site-header .container {
        width: 94%;
        max-width: 1450px;
    }

    .site-header {
        padding: 16px 0;
    }

    .logo {
        margin-right: 30px;
        gap: 10px;
    }
    .logo img {
        height: 48px;
    }
    .logo-text {
        font-size: 13px;
        letter-spacing: 0.6px;
        max-width: 140px;   /* mencegah logo-text terlalu panjang */
        white-space: normal;
        line-height: 1.2;
    }

    .main-nav > ul {
        gap: 30px;
    }
    .main-nav a {
        font-size: 11px;
        letter-spacing: 0.6px;
    }
}

/* ---------- 1100px – 1199px ---------- */
@media (max-width: 1199px) and (min-width: 1100px) {
    .site-header .container {
        width: 96%;
        max-width: 100%;
    }

    .site-header {
        padding: 12px 0;
    }

    .logo {
        margin-right: 20px;
        gap: 8px;
    }
    .logo img {
        height: 42px;
    }
    .logo-text {
        font-size: 11px;
        letter-spacing: 0.4px;
        max-width: 120px;
        white-space: normal;
        line-height: 1.2;
    }

    .main-nav > ul {
        gap: 20px;
    }
    .main-nav a {
        font-size: 10px;
        letter-spacing: 0.4px;
    }
}

/* ---------- MOBILE (<1100px) ---------- */
@media (max-width: 1099px) {
    .container {
        width: 100%;
        padding: 0 16px;
    }

    .main-nav > ul {
        display: none;
    }
    .hamburger {
        display: block;
    }

    /* Kembalikan header ke layout mobile yang aman */
    .header-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .logo {
        margin-right: 0;      /* reset margin untuk mobile */
        gap: 10px;
        flex-shrink: 0;
    }
    .logo img {
        height: 40px;
    }
    .logo-text {
        font-size: 12px;
        line-height: 1.2;
        max-width: 120px;
        white-space: normal;
        text-transform: uppercase;
    }

    .site-header {
        padding: 10px 0;
    }

    /* Footer mobile */
    .site-footer {
        padding: 30px 0 20px;
    }
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    .footer-column.right {
        text-align: left;
    }
    .footer-column h3 {
        font-size: 20px;
    }
    .footer-bottom {
        border-top: 1px solid rgba(255,255,255,.15);
        margin-top: 40px;
        padding-top: 20px;
    }
}