/* --- Variables & Setup --- */
:root {
    --rpi-red: #cc0000; 
    --main-bg: #222222; 
    --dark-bg: #2a2a2a; 
    --darker-bg: #1e1e1e; 
    --text-light: #ffffff;
    --text-dark: #212529;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; } 

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--main-bg); 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 900;
}

a { text-decoration: none; color: inherit; }

/* 1. Lock the navbar to a small, thin size */
#navbar {
    position: fixed;
    top: 0; 
    width: 100%;
    background: rgba(30, 30, 30, 0.98); 
    padding: 5px 0;
    height: 70px;
    z-index: 1000;
    border-bottom: 3px solid var(--rpi-red);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* 2. Make the container fit perfectly inside the locked bar */
.nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    padding: 0 30px;
    margin: auto;
    height: 100%; 
}

.logo { 
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 40px;
}

.nav-logo-img {
    width: 170px;
    height: auto; 
    max-height: none; 
    transform-origin: left center; 
}

.logo-text {
    color: var(--text-light);
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.8rem;
    margin-top: 5px;
    letter-spacing: 1px;
}

.nav-links { list-style: none; display: flex; align-items: center; gap: 25px; }
.nav-links a { color: var(--text-light); font-weight: 600; font-size: 0.95rem; text-transform: uppercase; transition: color 0.3s; }
.nav-links a:hover { color: var(--rpi-red); }

.btn-nav {
    background: var(--rpi-red); padding: 10px 20px; border-radius: 4px; color: white !important; transition: 0.3s;
}
.btn-nav:hover { background: white !important; color: var(--rpi-red) !important; }

/* --- Navbar Dropdown Styling --- */
.dropdown { position: relative; }
.dropdown .dropbtn { display: flex; align-items: center; gap: 6px; }

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(30, 30, 30, 0.98); 
    min-width: 240px;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.6);
    z-index: 1000;
    top: 100%;
    left: 0;
    border-top: 3px solid var(--rpi-red);
    border-radius: 0 0 6px 6px;
}

.dropdown-content a {
    color: var(--text-light) !important;
    padding: 15px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 700;
}

.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #2a2a2a; color: var(--rpi-red) !important; padding-left: 28px; }
.nav-links li.dropdown:hover .dropdown-content { display: block; }

/* --- Layout Utilities --- */
.section { padding: 100px 0; flex: 1; }
.container { width: 90%; max-width: 1200px; margin: auto; }
.text-center { text-align: center; }
.divider { height: 5px; width: 80px; background: var(--rpi-red); margin: 25px auto 40px; border-radius: 5px; }

h2 { font-size: 2.8rem; margin-bottom: 10px; }
.lead-text { font-size: 1.3rem; font-weight: 600; margin-bottom: 25px; color: #ccc; }

/* --- Hero Section with Plane Background --- */
.hero {
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.75)), url('Photos/M3_Flight.jpg') no-repeat center center / cover;
    color: var(--text-light); 
    position: relative;
    padding: 0 20px;
}

.hero-content { z-index: 2; max-width: 900px; width: 100%; }
.title-massive { 
    font-size: clamp(2.2rem, 6vw, 5rem); 
    letter-spacing: 5px; 
    margin-bottom: 10px; 
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8); 
    white-space: normal !important;
}
.subtitle { font-size: 1.4rem; margin-bottom: 30px; font-weight: 400; color: #eeeeee; text-shadow: 0px 2px 10px rgba(0,0,0,0.8); }
.tech-callouts { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.callout {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 25px; border-radius: 50px; font-weight: 600; transition: 0.3s;
}
.callout i { color: var(--rpi-red); margin-right: 10px; }

/* --- Split Layouts --- */
.split-layout { display: flex; align-items: center; gap: 60px; }
.text-content { flex: 1; }
.text-content h2 span { color: var(--rpi-red); }
.text-content p { font-size: 1.1rem; color: #bbbbbb; margin-bottom: 30px; }
.feature-list { list-style: none; }
.feature-list li { margin-bottom: 20px; font-size: 1.1rem; background: rgba(255,255,255,0.03); padding: 15px; border-left: 4px solid var(--rpi-red); }
.feature-list i { color: var(--rpi-red); margin-right: 10px; }
.image-placeholder {
    flex: 1; background: linear-gradient(45deg, #2a2a2a, #1e1e1e); height: 500px; display: flex; align-items: center; justify-content: center; border: 1px solid #444; border-radius: 12px; color: #888; font-family: var(--font-heading); font-weight: bold; letter-spacing: 2px; text-align: center; padding: 20px;
}

/* --- Buttons --- */
.action-buttons { margin-top: 50px; display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.btn { padding: 15px 35px; font-weight: 900; text-transform: uppercase; border-radius: 4px; font-family: var(--font-heading); }
.btn-outline { border: 2px solid var(--rpi-red); color: var(--rpi-red); transition: 0.3s; }
.btn-outline:hover { background: var(--rpi-red); color: white !important; border-color: var(--rpi-red) !important;}
.btn-solid { background: var(--dark-bg); color: white; border: 2px solid var(--dark-bg); }
.btn-solid:hover { background: #333; border-color: #333; }
.btn-solid-red { background: var(--rpi-red); color: white; border: 2px solid var(--rpi-red); transition: 0.3s; }
.btn-solid-red:hover { background: #990000; border-color: #990000; } 

/* --- Footer --- */
.site-footer {
    background-color: var(--rpi-red); 
    color: var(--text-light);
    padding: 20px 0;
    margin-top: auto;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}

.footer-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: auto;
    flex-wrap: wrap; 
    gap: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

.footer-logo {
    flex: 0 0 auto; 
    margin-left: 0;
}

.footer-social {
    margin-right: auto;
}

.footer-contact, .footer-location {
    flex: 0 0 auto;
}

.footer-logo img {
    height: 120px; 
    width: auto;
    max-width: 100%;
}

.social-links {
    display: flex;
    gap: 20px; 
}

.social-links a {
    color: var(--text-light);
    font-size: 2rem; 
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.7; 
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-light);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    font-weight: 600;
}

.footer-col a {
    color: var(--text-light);
    transition: 0.3s ease;
}

.footer-col a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .nav-container {
        padding: 0 15px;
    }
    .nav-logo-img {
        width: 130px;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-links a {
        font-size: 0.8rem;
    }
    .btn-nav {
        padding: 6px 12px;
    }
    .footer-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 20px;
    }
    .footer-social {
        margin-right: 0;
    }
    .footer-col {
        align-items: center;
    }
}

/* ========================================= */
/* --- History Page Styles --- */
/* ========================================= */

.page-header { 
    padding: 160px 0 80px; 
    position: relative; 
    color: white; 
    text-align: center; 
}

.history-card {
    display: flex;
    background: var(--darker-bg);
    border-radius: 12px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #333;
    border-top: 5px solid var(--rpi-red); 
    padding: 30px; 
    gap: 40px;
    align-items: center; 
}

.history-card:nth-child(even) {
    flex-direction: row-reverse;
}

.history-text {
    flex: 1.2;
    padding: 10px;
}

.history-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.history-desc {
    color: #bbbbbb;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.history-stats {
    list-style: none;
    margin-top: 15px;
    padding-top: 25px;
    border-top: 1px solid #333; 
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.history-stats li {
    font-size: 1.15rem;
    color: var(--rpi-red);
    font-family: var(--font-heading);
}

.history-stats li strong {
    color: var(--text-light);
    margin-right: 8px;
    font-weight: 800;
}

.history-image {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.history-image img {
    width: 100%;
    height: auto; 
    max-height: 450px; 
    object-fit: cover;
    display: block;
}

.photo-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: #fff;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.6);
    padding: 5px 10px;
    border-radius: 4px;
    margin: 0;
    z-index: 10;
}

@media (max-width: 900px) {
    .history-card, .history-card:nth-child(even) {
        flex-direction: column;
        padding: 20px;
    }
    .history-text {
        padding: 10px;
    }
    .history-stats {
        flex-direction: column;
        gap: 15px;
    }
}

/* ========================================= */
/* --- Alumni Page Styles --- */
/* ========================================= */

.alumni-card {
    background: var(--darker-bg);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-top: 5px solid var(--rpi-red);
}

.alumni-year {
    font-size: 2.2rem;
    color: var(--text-light);
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.alumni-team-photo {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.alumni-team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px 20px;
}

.alumni-role {
    color: var(--rpi-red);
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 5px;
}

.alumni-names {
    color: #bbbbbb;
    font-size: 1.1rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .alumni-card {
        padding: 25px;
    }
    .alumni-team-photo {
        height: 250px; 
    }
}

/* ========================================= */
/* --- Clickable Sponsor Cards --- */
/* ========================================= */

.sponsor-card {
    background-color: #ffffff;
    width: 240px;
    height: 120px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none; 
}

.sponsor-card:hover {
    transform: scale(1.05); 
    box-shadow: 0 8px 25px rgba(204, 0, 0, 0.3);
}

.sponsor-card img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

/* ========================================= */
/* --- Image Modal Styles --- */
/* ========================================= */

.modal {
    display: none;
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100vw; 
    height: 100vh; 
    background-color: rgba(0,0,0,0.9); 
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 90vw;
    height: 90vh;
    object-fit: contain;
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from {transform: scale(0.5)} 
    to {transform: scale(1)}
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--rpi-red);
    text-decoration: none;
    cursor: pointer;
}