/* ABOUT PAGE SPECIFIC STYLES */

main {
    padding-top: 180px; /* Space for the floating header */
}

/* =====================================================
   RESTORED ABOUT HERO STYLE
===================================================== */

/* =====================================================
   SERVER-SAFE ABOUT HERO FIX
===================================================== */

/* =====================================================
   HOSTINGER-SAFE GLASS PORTAL DESIGN
===================================================== */

#about-hero {
    padding: 160px 8% 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero-container-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 60px;
}

.hero-text-side { flex: 1; }

.hero-portal-side {
    flex: 0 0 480px; /* FORCES the portal to stay at 480px width */
}

/* THE GLASS CARD */
.video-portal-card {
    width: 100%;
    cursor: pointer;
    text-align: center;
}

.portal-glass-frame {
    width: 100%;
    aspect-ratio: 16 / 9; /* FORCES 16:9 shape even if image is huge */
    position: relative;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden; /* Clips giant images to the frame */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    transition: 0.5s cubic-bezier(.22,1,.36,1);
}

.portal-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents squashing */
    opacity: 0.7;
    transition: 0.5s;
}

.video-portal-card:hover .portal-glass-frame {
    transform: translateY(-10px) scale(1.02);
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.1);
}

.video-portal-card:hover .portal-image { opacity: 1; }

/* THE PLAY BUTTON UI */
.portal-play-wrap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px; height: 70px;
}

.play-circle-glow {
    position: absolute; inset: 0;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 25px #38bdf8;
    animation: playPulse 2s infinite;
}

.play-triangle {
    position: relative;
    color: #fff;
    font-size: 22px;
    line-height: 70px;
    z-index: 2;
}

.watch-label {
    display: block;
    margin-top: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #38bdf8;
    font-weight: 700;
}

/* =====================================================
   FULL SCREEN CINEMA MODE
===================================================== */
.cinema-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
}
.cinema-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(30px); }
.cinema-content { position: relative; width: 90%; max-width: 1100px; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); }
.cinema-player { width: 100%; display: block; }
.cinema-close { position: absolute; top: 20px; right: 20px; background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 24px; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; z-index: 10; transition: 0.3s; }
.cinema-close:hover { background: #38bdf8; color: #000; }

@keyframes playPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* RESPONSIVE */
@media (max-width: 1150px) {
    .hero-container-main { flex-direction: column; text-align: center; }
    .hero-portal-side { flex: 0 0 auto; width: 100%; max-width: 450px; }
}

/* =====================================================
   REDESIGNED HISTORY SECTION (Exhibit Frame Look)
===================================================== */

#history .content-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal split for better balance */
    gap: 80px;
    padding: 80px 8%;
    align-items: center; /* Vertically centers the text against the image */
}

.history-text {
    max-width: 580px;
}

.history-image-card {
    width: 100%;
    max-width: 500px; /* Prevents the image from becoming a giant tower */
    height: 600px;    /* Fixed professional height */
    margin: 0 auto;
    border-radius: 40px;
    position: relative;
    padding: 15px;    /* This creates the "Frame" effect */
    
    /* THE FRAME MATERIAL */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* THE GLOW: Makes it look like an exhibit piece */
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    transition: 0.6s var(--transition);
}

.history-fit-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px; /* Slightly smaller than the frame radius */
    display: block;
    opacity: 0.8;
    filter: saturate(1.1);
    transition: 0.6s ease;
}

/* Hover Effect: The frame "lights up" */
.history-image-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.history-image-card:hover .history-fit-img {
    opacity: 1;
    filter: saturate(1.3);
}

/* REDESIGNED TAG: Moved to the bottom right for a "signed" look */
.image-overlay {
    position: absolute;
    bottom: 40px;
    right: -20px; /* Overlaps the edge slightly for a cool 3D look */
    background: var(--gradient);
    padding: 10px 20px;
    border-radius: 12px;
    color: #fff;
    font-family: 'Space Grotesk';
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* VISION & MISSION GRID */
#vision-mission {
    padding: 100px 8%;
}

.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Exact 50/50 split for similarity */
    gap: 30px;
    align-items: stretch; /* Forces both cards to be the same height */
}

.vm-card {
    position: relative;
    padding: 50px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow: hidden;
    transition: 0.5s cubic-bezier(.22,1,.36,1);
}

.vm-card:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 189, 248, 0.4);
}

/* Matching Circle Icons */
.vm-icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk';
    font-size: 24px;
    font-weight: 700;
    color: #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.1);
}

.vm-content span {
    color: #38bdf8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.vm-content h2 {
    font-family: 'Space Grotesk';
    font-size: 38px;
    margin-bottom: 20px;
    color: #fff;
}

.vm-content p {
    color: var(--muted);
    line-height: 1.8;
    font-size: 17px;
}

/* Mission Item Styling to match Vision density */
.mission-items {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns inside the mission card */
    gap: 20px;
}

.m-item strong {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}

.m-item p {
    font-size: 13px; /* Slightly smaller to fit the grid */
    line-height: 1.4;
}

/* Background Atmospheric Glow */
.vm-glow {
    position: absolute;
    top: -20%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1100px) {
    .vm-grid { grid-template-columns: 1fr; }
    .mission-items { grid-template-columns: 1fr; }
}
/* =====================================================
   UNIFIED COMMITTEE SECTION
===================================================== */

#committee {
    padding: 100px 8%;
}

.section-header.center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.committee-grid {
    display: grid;
    /* This creates a flexible grid that handles 11 members perfectly */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    justify-content: center;
}

.member-card {
    padding: 40px 30px;
    text-align: center;
    border-radius: 24px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.5s cubic-bezier(.22,1,.36,1);
    
    /* Using the global glass variables */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.member-card:hover {
    transform: translateY(-10px);
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.member-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.member-card p {
    color: #38bdf8; /* Light Blue Accent */
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* Glass helper is already global, but kept here for local override if needed */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cleanup: Old specific grids are no longer used */
.committee-sub-grid, .reps-grid, .rep-item, .sm {
    display: none;
}

/* =====================================================
   ABOUT PAGE MOBILE OPTIMIZATION (Max-width: 768px)
===================================================== */

@media (max-width: 768px) {
    
    /* 1. CENTER LOGO BEFORE SCROLL */
    .top-logo-bar {
        justify-content: center; /* Centers the logo holder */
        height: 120px;
    }

    .logo-holder {
        margin-left: 0; /* Removes PC offset */
        padding: 10px 30px;
    }

    .line-segment {
        display: none; /* Removes lines for a cleaner mobile look */
    }

    /* 2. SLIM MOBILE NAVBAR */
    #main-nav-container {
        width: 92%;
        top: 130px;
    }

    .navbar-pill {
        padding: 10px 20px;
        gap: 15px;
        justify-content: center;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 10px;
        letter-spacing: 1px;
    }

    /* 3. HERO & TEXT SCALING */
    main {
        padding-top: 200px;
    }

    #about-hero {
        padding: 40px 8%;
        text-align: center; /* Center header for mobile */
    }

    #about-hero h1 {
        font-size: clamp(32px, 10vw, 45px);
        letter-spacing: -1px;
    }

    /* 4. HISTORY SECTION STACKING */
    #history .content-container {
        grid-template-columns: 1fr; /* Stack text and image */
        gap: 40px;
        text-align: center;
    }

    .history-image-card {
        height: 300px;
        order: -1; /* Puts image above text on mobile */
    }

    /* 5. VISION & MISSION STACKING */
    .vm-grid {
        grid-template-columns: 1fr; /* Stack Vision and Mission */
        gap: 20px;
    }

    .vm-card {
        padding: 35px 25px;
        text-align: center;
        align-items: center;
    }

    .mission-items {
        grid-template-columns: 1fr; /* Stack items inside the mission card */
        text-align: left;
    }

    /* 6. COMMITTEE GRID FIX */
    .committee-grid {
        grid-template-columns: 1fr; /* One member per row on small phones */
        gap: 15px;
    }

    .member-card {
        padding: 30px 20px;
        min-height: auto;
    }

    .member-card h3 {
        font-size: 18px;
    }

    /* 7. FOOTER */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* =====================================================
   MOBILE KEYFRAMES (Subtle Entry)
===================================================== */

/* Subtle slide-up for mobile cards */
@keyframes mobileFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.member-card, .vm-card, .history-text {
    animation: mobileFadeUp 0.8s ease forwards;
}

/* =====================================================
   THE PERMANENT STABILIZER (Spacing + Side-by-Side)
===================================================== */

/* 1. FIX THE GAPS BETWEEN SECTIONS */
#history, 
#vision-mission, 
#committee {
    padding-top: 60px !important;    
    padding-bottom: 60px !important; 
}

/* 2. FIX THE HERO SECTION (Side-by-Side + No Empty Space) */
#about-hero {
    padding-top: 180px !important; 
    padding-bottom: 40px !important; /* Reduced bottom spacing */
    min-height: auto !important;     /* Removes the big black void */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.hero-container-main {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;    /* CRITICAL: Forbids the video from going below */
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    gap: 40px !important;
}

/* 3. LOCK THE VIDEO PORTAL SIZE (Hostinger Bug Fix) */
.hero-portal-side {
    flex: 0 0 480px !important; /* FORCES the video to stay exactly 480px wide */
    width: 480px !important;
}

.portal-glass-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important; /* FORCES the shape so it doesn't expand */
    border-radius: 28px !important;
    overflow: hidden !important;
}

/* 4. RESPONSIVE: Only stack on Mobile/Tablets */
@media (max-width: 1150px) {
    .hero-container-main {
        flex-direction: column !important;
        flex-wrap: wrap !important; /* Allow stacking on small screens */
        text-align: center !important;
    }
    .hero-portal-side {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 450px !important;
        margin-top: 40px !important;
    }
}