/* ================= GLOBAL ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #991A02;
    color: white;
    line-height: 1.6;
}

/* ================= NAVBAR (Optimized) ================= */
.navbar {
    background-color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Pushes Logo Left, Buttons Right */
    align-items: center;
    padding: 0 2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background-color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo-img {
    height: 80px;
    transition: height 0.3s ease;
}

.navbar.scrolled .logo-img {
    height: 70px;
}

.nav-buttons {
    display: flex;
    gap: 20px;
    margin-left: auto; /* Force-pins buttons to the right */
}

.nav-btn {
    text-decoration: none;
    color: #991A02;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar.scrolled .nav-btn {
    color: #991A02;
}

/* Hover effect on the default Red Background */
.nav-btn:hover {
    background-color: rgba(52, 50, 50, 0.2);
    color: #991A02;
}

.nav-btn.active {
    background-color: #991A02;
    color: white;
}

.navbar.scrolled .nav-btn.active {
    background-color: #991A02;
    color: white;
}
/* ================= TEAM CONTENT ================= */
.team-section {
    padding: 140px 8% 80px;
}

.tier {
    margin-bottom: 100px;
}

.tier-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #ffcece;
    border-left: 5px solid white;
    padding-left: 15px;
}

/* --- 1. FOUNDERS CARDS --- */
.leadership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.large-bio-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* The Frame */
.bio-img-frame {
    width: 100%;
    height: 350px;
    overflow: hidden;
    /* Clips the zoom */
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* The Image Zoom */
.bio-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* Trigger Zoom on Card Hover */
.large-bio-card:hover .bio-img-frame img {
    transform: scale(1.1);
    /* Zooms in 10% */
}

.bio-content {
    padding: 30px;
}

/* Bio Expansion Logic */
.full-bio {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    /* Smooth slide animation */
    font-size: 0.95rem;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* When the JS adds the 'expanded' class, show the text */
.large-bio-card.expanded .full-bio {
    max-height: 800px;
    /* Big enough to fit all text */
}

/* Button Styling */
.read-more {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: white;
    padding: 10px 24px;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    /* Rounded pill shape */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more:hover {
    background: white;
    color: #991A02;
    border-color: white;
}

/* --- 2. DIRECTORS & MANAGEMENT CARDS --- */
.directors-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.manager-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: white;
    color: #991A02;
    border-radius: 15px;
    overflow: hidden;
    /* Important for the border radius */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.manager-img-frame {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Clips the zoom */
    border-right: 4px solid #f0f0f0;
    /* Subtle border between img and text */
}

.manager-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.manager-card:hover .manager-img-frame img {
    transform: scale(1.1);
}

.manager-info {
    padding: 25px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.manager-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.manager-info .role {
    color: #991A02;
    opacity: 0.7;
    font-weight: 700;
    margin-bottom: 10px;
}

/* --- TIER 3: HOD TEXT CARDS (WITH HOVER REVEAL) --- */
.hod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.hod-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    /* Keeps the bio contained */
}

.hod-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    border-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hod-card h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: white;
    transition: transform 0.3s ease;
}

.hod-card .role {
    font-size: 0.85rem;
    color: #ffcece;
    font-weight: 500;
    transition: transform 0.3s ease;
}

/* THE BIO TEXT (HIDDEN BY DEFAULT) */
.hod-bio {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 15px;
    opacity: 0;
    max-height: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

/* HOVER STATE: Reveal Bio */
.hod-card:hover .hod-bio {
    opacity: 1;
    max-height: 100px;
    /* Allows the text to expand */
    transform: translateY(0);
}

/* Optional: Slight lift for the title to make room */
.hod-card:hover h4,
.hod-card:hover .role {
    transform: translateY(-5px);
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: 1fr;
    }

    .manager-card {
        grid-template-columns: 1fr;
    }

    .manager-img-frame {
        height: 280px;
        border-right: none;
        border-bottom: 4px solid #f0f0f0;
    }
}

/* ================= MOBILE MENU STYLES ================= */
.hamburger {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 3000;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: #991A02;
    transition: 0.3s;
}

/* Transitions hamburger to 'X' when active */
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    backdrop-filter: blur(20px);
    left: 0;
    height: 100vh;
    width: 80vw;
    max-width: 320px;
    background-color: rgb(48, 47, 47, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    padding-left: 2rem;
    transform: translateX(-100%); /* Start hidden off-screen */
    transition: transform 0.5s ease;
    z-index: 2500;
}

.mobile-menu.open {
    transform: translateX(0); /* Slide in */
}

.mobile-menu a {
    color: white;
    font-size: 1.4rem;
    text-decoration: none;
}

/* ================= MEDIA QUERIES ================= */
@media (max-width: 768px) {
    .nav-buttons {
        display: none; /* Hide desktop links */
    }

    .hamburger {
        display: flex; /* Show hamburger */
    }
}