/* ==========================================================================
   🌟 NECTAR CHRONICLES & HISTORY COMPONENT STYLES (history.css)
   ========================================================================== */

/* ─── BRANDING LOGIC & VARIABLES ─── */
:root {
  --primary: #284469;          /* Royal Navy Nectar */
  --primary-deep: #1e3554;
  --accent: #FEC763;           /* Academic Gold */
  --academic-cream: #fdfdfb;   
  --academic-border: #d4cfc3;  /* Traditional Fine Line */
  --text-main: #1e3554;        /* Deep Slate */
  --text-muted: #475569;
  --white: #ffffff;
  --radius-nectar: 8px;        
}

/* ─── GLOBAL RESET FOR HISTORY PAGE ─── */
body { 
  background-color: var(--academic-cream); 
  color: var(--text-main); 
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', system-ui, sans-serif; 
  -webkit-font-smoothing: antialiased; 
}

/* ─── NAVBAR GLASSMORPHISM ─── */
nav {
  background-color: rgba(40, 68, 105, 0.95); /* Sedikit transparan agar blur bekerja */
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
  color: var(--white); 
  padding: 0 5%; 
  height: 75px;
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  position: fixed; 
  width: 100%; 
  top: 0; 
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-logo { height: 50px; width: 50px; object-fit: contain; border-radius: 50%; border: 1.5px solid var(--accent); }
.brand-text h1 { font-family: 'Montserrat', serif; font-size: 1.35rem; font-weight: 700; margin: 0; letter-spacing: 0.5px; color: var(--white); }
.brand-text p { font-size: 0.72rem; color: var(--accent); margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.nav-links { display: flex; list-style: none; gap: 24px; align-items: center; margin: 0; padding: 0; }
.nav-links a { color: #f1f5f9; text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-btn { background: transparent; border: 1px solid var(--accent) !important; color: var(--accent) !important; padding: 6px 16px; border-radius: 4px; font-weight: 600; }
.nav-btn:hover { background: var(--accent); color: var(--primary) !important; }

/* ─── HAMBURGER ─── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: var(--white); border-radius: 2px; }

/* ─── MAIN CONTAINER ─── */
.container { max-width: 850px; margin: 110px auto 60px; padding: 0 20px; box-sizing: border-box; }

/* ─── MANAGEMENT BOARD (4th Gen Active Board) ─── */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.board-card {
    background: #ffffff;
    border: 1px solid var(--academic-border);
    padding: 30px 20px;
    border-radius: var(--radius-nectar);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.board-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.board-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(30, 53, 84, 0.05);
    border-color: var(--primary);
}

.board-card:hover::before { opacity: 1; }

/* Menyatukan pengaturan Avatar yang sebelumnya terduplikasi */
.board-avatar {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: #f4f6f8;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.2rem;
    border: 3px solid var(--accent);
    object-fit: cover;
    overflow: hidden; /* Memastikan foto melingkar rapi */
    transition: transform 0.3s ease;
}

.board-card:hover .board-avatar { transform: scale(1.05); }

/* ─── PIONEER ARCHIVES (Alumni Cards & Testimonials) ─── */
.alumni-card {
    background: #ffffff;
    border: 1px solid var(--academic-border);
    padding: 28px;
    border-radius: var(--radius-nectar);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeInSlide 0.4s ease forwards;
}

.alumni-card:hover {
    box-shadow: 0 8px 20px rgba(30, 53, 84, 0.06);
    border-color: var(--primary);
}

.alumni-quote {
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
    position: relative;
    text-align: justify;
}

/* ─── INTERACTIVE FILTER CHIPS ─── */
.chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.chip-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--academic-border);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    outline: none;
}

.chip-btn:hover { background: rgba(40, 68, 105, 0.04); border-color: var(--primary); }

.chip-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(40, 68, 105, 0.15);
}

/* ─── MODAL INPUT FORM STYLES ─── */
#alumniModal input,
#alumniModal select,
#alumniModal textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--academic-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

#alumniModal input:focus,
#alumniModal select:focus,
#alumniModal textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(40, 68, 105, 0.1);
}

/* ─── FOOTER ACADEMIC SEAL ─── */
footer { 
  background: var(--primary); 
  color: var(--white); 
  padding: 45px 5% 35px; 
  text-align: center; 
  border-top: 3px solid var(--accent); 
}
footer h3 { font-family: 'Montserrat', serif; font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; letter-spacing: 0.5px; }
.institution-sub { font-size: 0.85rem; color: #cbd5e1; opacity: 0.8; margin: 0; }
.footer-seal { width: 35px; height: 1px; background: var(--accent); margin: 20px auto; }
.copyright-text { font-size: 0.78rem; color: #94a3b8; opacity: 0.6; margin: 0; }

/* ─── ANIMATIONS ─── */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   📱 MOBILE RESPONSIVE (MAX-WIDTH: 900px)
   ========================================================================== */
@media (max-width: 900px) {
    .container { 
        margin-top: 95px; /* Mengurangi ruang kosong berlebih di atas pada HP */
        padding: 0 15px; 
    }
    
    .board-grid { 
        grid-template-columns: 1fr; /* Memaksa card menjadi 1 kolom vertikal */
        gap: 15px;
    }
    
    .hamburger { 
        display: flex; /* BUG FIXED: Kurung tutup sebelumnya hilang di sini */
    } 
    
    .nav-links {
        display: none; /* Disembunyikan secara default untuk HP (memerlukan toggle JS) */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 75px;
        left: 0;
        background: var(--primary);
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    /* Peningkatan UX: Membungkus tombol filter daripada meregangkannya 100% */
    .chip-container { 
        justify-content: center; 
    }
    
    .chip-btn { 
        flex: 1 1 auto; /* Tombol akan menyesuaikan lebar secara proporsional */
        text-align: center; 
        padding: 10px; 
        font-size: 0.85rem;
    }

    /* Memperkecil avatar sedikit di layar kecil agar tidak memakan ruang */
    .board-avatar {
        width: 75px; 
        height: 75px;
    }
}
/* ─── EMBLEM PHILOSOPHY CARD ─── */
.emblem-card {
    background: white; 
    border: 1px solid var(--academic-border); 
    border-radius: var(--radius-nectar); 
    padding: 30px; 
    display: flex; 
    gap: 30px; 
    align-items: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    box-sizing: border-box; /* Mencegah padding memecahkan lebar */
    width: 100%; /* Memaksa kotak tidak melebihi layar */
}

.emblem-img-wrapper {
    flex: 1; /* Di desktop, dia mengambil proporsi 1 */
    display: flex;
    justify-content: center;
}

.emblem-text-wrapper {
    flex: 2; /* Di desktop, teks mengambil proporsi lebih besar (2) */
}

.emblem-img {
    width: 100%;
    max-width: 230px; 
    height: auto; 
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 33, 71, 0.15));
}

/* ==========================================================================
   📱 MOBILE RESPONSIVE (MAX-WIDTH: 900px)
   ========================================================================== */
@media (max-width: 900px) {
    .container { 
        margin-top: 95px; 
        padding: 0 15px; 
    }
    
    .board-grid { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }
    
    /* 🍔 Hamburger Aktif */
    .hamburger { 
        display: flex; 
        z-index: 1001; /* Pastikan selalu di atas menu */
    } 
    
    /* Navigasi Mobile Tersembunyi Default */
    .nav-links {
        display: none; /* Hilang saat awal */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 75px;
        left: 0;
        background: var(--primary);
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        text-align: center;
    }

    /* Muncul saat tombol Hamburger diklik (Ditambah class 'active' via JS) */
    .nav-links.active {
        display: flex !important; /* Paksa tampil saat hamburger diklik */
    }

    .nav-links li {
        width: 100%;
        padding: 10px 0;
    }

    /* Chip Filter */
    .chip-container { 
        justify-content: center; 
    }
    
    .chip-btn { 
        flex: 1 1 auto; 
        text-align: center; 
        padding: 10px; 
        font-size: 0.85rem;
    }

    .board-avatar {
        width: 75px; 
        height: 75px;
    }

    /* 🛡️ PERBAIKAN LOGO PHILOSOPHY 🛡️ */
    .emblem-card {
        flex-direction: column;
        padding: 20px 15px;
        gap: 15px;
    }

    .emblem-img-wrapper, .emblem-text-wrapper {
        flex: unset; 
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* Paksa logo berada di tengah */
    }

    .emblem-img {
        max-width: 100px !important; /* BESI PENGEKANG: Paksa lebar maksimal 100px di HP */
        width: auto; /* Biarkan tinggi menyesuaikan proporsional */
        height: auto;
    }

    .emblem-card p {
        text-align: justify;
        font-size: 0.9rem;
    }
}
