/* ============================================
   MAHATAMA - CORE CSS (SHARED / GLOBAL ONLY)
   Politeknik Islam Mahatama
   ------------------------------------------------
   File ini HANYA berisi bagian yang dipakai di
   SEMUA halaman: reset, variabel warna, header,
   navigasi (termasuk dropdown), hero dasar, dan
   footer.

   Style khusus tiap halaman (profil, visi-misi,
   prodi, pmb, faq, siakad, dashboard, dll) TIDAK
   ada di sini lagi — sudah dipindah ke <style>
   masing-masing file HTML.
   ============================================ */

:root {
    --mahatama-dark: #232323;
    --mahatama-orange: #E87722;
    --mahatama-green: #1A6B1A;
    --mahatama-light: #f4f6f9;
    --mahatama-light-bg: #f9f9f9;
    --text-dark: #333;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.text-center { text-align: center; }
.icon-orange { color: var(--mahatama-orange); }
.icon-green  { color: var(--mahatama-green); }

.mahatama-container-full {
    width: 100%;
    overflow-x: clip;
    background-color: var(--mahatama-light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   1. HEADER
   ============================================ */

.mahatama-header {
    background-color: rgba(0, 0, 0, 0.652);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--mahatama-green);
    width: 100%;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mahatama-header .logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-logo { height: 50px; width: auto; }

.mahatama-header .logo-text {
    color: var(--mahatama-orange);
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ============================================
   2. NAVIGATION
   ============================================ */

.mahatama-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    background-color: transparent;
    padding: 0;
    width: auto;
    position: relative;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-item i { font-size: 1rem; }
.nav-item.green-link i { color: var(--mahatama-green); }
.nav-item.orange-link i { color: var(--mahatama-orange); }
.nav-item:hover { background-color: rgba(255,255,255,0.1); }
.nav-item.active-page { background-color: rgba(255,255,255,0.05); }

/* Hamburger - hidden desktop */
.menu-toggle, .menu-close {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover, .menu-close:hover { background-color: rgba(255,255,255,0.2); }
.menu-close { width: 100%; margin-bottom: 12px; }

/* Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 998;
}

.nav-overlay.show { display: block; }

/* ============================================
   3. HERO - UNIFIED (base, dipakai semua sub-page)
   ============================================ */

/* Base hero (default: sub-page, 350px) */
.mahatama-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://poltek.mahatama.co.id/wp-content/uploads/2026/06/WhatsApp-Image-2026-06-18-at-14.07.56.jpeg') center/cover no-repeat;
    height: 350px;
    margin-top: -80px;
    padding-top: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    color: white;
}

/* Modifier: full screen (beranda) */
.mahatama-hero.hero-full {
    height: 100vh;
    min-height: 500px;
}

/* Judul hero (sub-pages: FAQ, PMB, Profil, Prodi, dll) */
.hero-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--mahatama-orange);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero-title p {
    color: #ccc;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA box (beranda) */
.cta-box {
    text-align: center;
    background: rgba(0,0,0,0.75);
    padding: 40px 50px;
    border-radius: 8px;
    color: white;
    border-bottom: 4px solid var(--mahatama-orange);
    max-width: 700px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cta-box h1 { font-size: 2.6rem; margin-bottom: 15px; color: white; font-weight: 700; }
.cta-box p { font-size: 1.15rem; color: #eee; font-weight: 400; }

/* ============================================
   4. FOOTER
   ============================================ */

.mahatama-footer { background-color: #121212; color: #ffffff; padding: 60px 20px 0; width: 100%; border-top: 1px solid var(--mahatama-green); border-bottom: 1px solid var(--mahatama-green); }
.footer-content { display: flex; justify-content: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 40px; }
.footer-box { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 12px; border-bottom: 4px solid var(--mahatama-orange); box-shadow: 0 4px 20px rgba(0,0,0,0.3); min-width: 320px; flex: 1; max-width: 400px; display: flex; flex-direction: column; align-items: center; }
.footer-box h3 { text-align: center; font-size: 1.4rem; margin-bottom: 20px; color: var(--mahatama-orange); }
.footer-wrapper p { margin: 12px 0; display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.footer-wrapper p a { color: #ffffff; text-decoration: none; transition: color 0.3s ease; }
.footer-wrapper p a:hover { color: var(--mahatama-orange); text-decoration: underline; }
.footer-copyright { text-align: center; color: #ffffff; margin-top: 40px; padding: 20px; border-top: 1px solid #333; font-size: 0.85rem; }

/* ============================================
   5. NAV DROPDOWN (Tentang & Pendidikan)
   ============================================ */

.nav-dropdown { position: relative; }

.dropdown-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    justify-content: flex-start;
}

.dropdown-arrow {
    font-size: 0.65rem;
    margin-left: auto;
    transition: transform 0.25s ease;
}

.nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
    display: none;
    flex-direction: column;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.dropdown-link i { font-size: 0.95rem; color: var(--mahatama-green); }
.dropdown-link:hover { background-color: rgba(255,255,255,0.1); }
.dropdown-link.active-page { background-color: rgba(255,255,255,0.08); }

@media (min-width: 992px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #1a1a1a;
        min-width: 230px;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        padding: 8px;
        z-index: 100;
        margin-top: 6px;
        border: 1px solid rgba(255,255,255,0.08);
    }

    .dropdown-link { padding: 10px 12px; }

    .nav-dropdown.open .dropdown-menu { display: flex; }
    .nav-dropdown.open .dropdown-arrow { transform: rotate(180deg); }
}

@media (max-width: 991px) {
    .nav-dropdown { width: 100%; }

    .dropdown-menu {
        padding-left: 18px;
        margin-top: 4px;
        border-left: 2px solid rgba(255,255,255,0.1);
    }

    .nav-dropdown.open .dropdown-menu { display: flex; gap: 4px; }

    .dropdown-link { padding: 10px 12px; margin-bottom: 4px; }

    .nav-dropdown.open-active .dropdown-menu { display: flex; gap: 4px; }
    .nav-dropdown.open-active .dropdown-arrow { transform: rotate(180deg); }
}

/* ============================================
   6. RESPONSIVE (header/nav/hero/footer only)
   ============================================ */

@media (max-width: 991px) {
    .menu-toggle { display: inline-flex !important; z-index: 1002; }
    .menu-toggle.hidden-toggle { display: none !important; }
    .mahatama-nav { position: fixed; top: 0; right: 0; bottom: 0; width: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; background-color: var(--mahatama-dark); padding: 0; gap: 0; box-shadow: -8px 0 24px rgba(0,0,0,0.25); transition: width 0.3s ease, padding 0.3s ease; z-index: 999; overflow: hidden; }
    .mahatama-nav.open { width: 280px; padding: 20px; gap: 16px; overflow-y: auto; }
    .mahatama-nav.collapsed { width: 0; padding: 0; pointer-events: none; }
    .menu-close { display: inline-flex !important; }
    .nav-item { width: 100%; padding: 12px 16px; font-size: 0.95rem; margin-bottom: 8px; border-radius: 10px; }
    .nav-item.active-page { background-color: rgba(255,255,255,0.08); border-left: 4px solid var(--mahatama-orange); }

    /* Hero */
    .mahatama-hero { height: 280px; }
    .mahatama-hero.hero-full { height: 100vh; }
    .hero-title h1 { font-size: 2rem; }
    .cta-box { padding: 35px 20px; }
    .cta-box h1 { font-size: 1.8rem; }
    .cta-box p { font-size: 0.95rem; }

    /* Footer */
    .footer-box { min-width: 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    .mahatama-header .logo-text { font-size: 0.95rem; }
    .hero-title h1 { font-size: 1.8rem; }
    .hero-title p { font-size: 0.95rem; }
    .cta-box { padding: 30px 15px; }
    .cta-box h1 { font-size: 1.5rem; }
}