/* ===================================================================
   ALLAMA IQBAL GROUP OF INSTITUTIONS - COMPLETE STYLESHEET
   Pure CSS Navigation + Enhanced JavaScript Features
   Production Ready - Chrome/Mobile Optimized
   =================================================================== */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-navy: #1a365d;
    --secondary-navy: #2c5282;
    --terracotta: #c87e6d;
    --terracotta-light: #e09e8f;
    --gold: #d4af37;
    --gold-light: #f4d77c;
    --white: #ffffff;
    --light-gray: #f7fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #4a5568;
    --text-dark: #2d3748;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a, button {
    touch-action: manipulation;
}

/* ===================================================================
   ACCESSIBILITY - SKIP LINK
   =================================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-navy);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Keyboard navigation focus styles */
.keyboard-nav *:focus {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ===================================================================
   HEADER - PURE CSS NAVIGATION
   =================================================================== */

.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    min-height: 60px;
}

/* Logo Section */
.logo-section {
    flex: 1;
    min-width: 180px;
    max-width: 300px;
    z-index: 1002;
}

.logo {
    font-size: clamp(0.95rem, 3vw, 1.5rem);
    color: var(--primary-navy);
    font-weight: 700;
    margin-bottom: 0.1rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.tagline {
    font-size: clamp(0.65rem, 2vw, 0.85rem);
    color: var(--terracotta);
    font-weight: 500;
    line-height: 1.1;
}

/* Pure CSS Menu Toggle */
.menu-checkbox {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background-color: var(--primary-navy);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    display: block;
}

/* Navigation Wrapper - Desktop */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--terracotta);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--terracotta);
}

.cta-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary-navy);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    display: inline-block;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */

.hero {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><path d="M0 0L50 50L0 100M50 0L100 50L50 100M100 0L100 100" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    background-size: 100px 100px;
    animation: backgroundScroll 20s linear infinite;
}

@keyframes backgroundScroll {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 54, 93, 0.7), rgba(200, 126, 109, 0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    animation: fadeInUp 1s ease;
    transition: opacity 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    color: var(--gold-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary-navy);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-navy);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ===================================================================
   SECTION STYLES
   =================================================================== */

section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--primary-navy);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    color: var(--dark-gray);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ===================================================================
   INSTITUTIONS SECTION
   =================================================================== */

.institutions-section {
    background-color: var(--light-gray);
}

.institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.institution-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(40px);
}

.institution-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.institution-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.institution-card:hover .icon-circle {
    transform: rotate(360deg) scale(1.15);
}

.institution-card h3 {
    color: var(--primary-navy);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.institution-card p {
    color: var(--dark-gray);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ===================================================================
   RESULTS SECTION
   =================================================================== */

.results-section {
    background-color: var(--white);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.result-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
}

.result-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.result-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.result-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.result-card:hover img {
    transform: scale(1.05);
}

/* ===================================================================
   WHY CHOOSE US SECTION
   =================================================================== */

.why-choose-section {
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    opacity: 0;
    transform: translateY(40px);
}

.feature-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--gold);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--primary-navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    color: var(--primary-navy);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--dark-gray);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ===================================================================
   DIRECTOR MESSAGE SECTION
   =================================================================== */

.director-message {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    color: var(--white);
}

.message-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.director-message .section-title {
    color: var(--white);
}

.director-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.director-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--gold);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.director-image:hover {
    transform: scale(1.05);
}

.director-message blockquote {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    line-height: 1.8;
    font-style: italic;
    margin: 2rem 0;
}

.director-message blockquote footer {
    font-style: normal;
    margin-top: 1.5rem;
    color: var(--gold-light);
    font-size: 1.1rem;
}

/* ===================================================================
   CTA SECTION
   =================================================================== */

.cta-section {
    background: linear-gradient(135deg, var(--terracotta), var(--terracotta-light));
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ===================================================================
   GALLERY SECTION
   =================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    aspect-ratio: 4/3;
    opacity: 0;
    transform: translateY(40px);
}

.gallery-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ===================================================================
   ABOUT PAGE STYLES
   =================================================================== */

.about-hero {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-navy));
    color: var(--white);
    padding: 4rem 1rem;
    text-align: center;
}

.about-hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 1rem;
}

.about-content {
    background-color: var(--white);
}

.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-section h2 {
    color: var(--primary-navy);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 2rem 0 1rem;
}

.content-section p {
    color: var(--dark-gray);
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-section ul {
    list-style: none;
    padding: 0;
}

.content-section ul li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--dark-gray);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.6;
}

.content-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
    font-size: 1.3rem;
}

/* Director About Section */
.director-about-section {
    background-color: var(--light-gray);
    padding: 3rem 1rem;
}

.director-about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.director-about-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--gold);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.director-about-text {
    flex: 1;
    min-width: 280px;
}

.director-about-text h3 {
    color: var(--primary-navy);
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    margin-bottom: 0.5rem;
}

.director-about-text h4 {
    color: var(--terracotta);
    font-size: clamp(1.1rem, 2vw, 1.2rem);
    margin-bottom: 1.5rem;
}

.director-about-text p {
    color: var(--dark-gray);
    line-height: 1.8;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

/* ===================================================================
   CONTACT PAGE STYLES
   =================================================================== */

.contact-section {
    background-color: var(--light-gray);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
}

.contact-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-card h3 {
    color: var(--primary-navy);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-card p {
    color: var(--dark-gray);
    line-height: 1.8;
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.contact-card a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--gold);
}

/* ===================================================================
   ADMISSIONS PAGE STYLES
   =================================================================== */

.admissions-intro {
    background-color: var(--light-gray);
    padding: 3rem 1rem;
}

.admissions-intro .content-section {
    text-align: center;
}

.requirements-section {
    background-color: var(--white);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.requirement-card {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--gold);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(40px);
}

.requirement-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.requirement-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.requirement-card h3 {
    color: var(--primary-navy);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.requirement-card ul {
    list-style: none;
    padding: 0;
}

.requirement-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.requirement-card ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--terracotta);
    font-weight: bold;
    font-size: 1.5rem;
}

/* ===================================================================
   FACILITIES PAGE STYLES
   =================================================================== */

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.facility-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
}

.facility-card.animated {
    opacity: 1;
    transform: translateY(0);
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.facility-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.facility-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.facility-card:hover .facility-image img {
    transform: scale(1.15);
}

.facility-content {
    padding: 2rem;
}

.facility-content h3 {
    color: var(--primary-navy);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.facility-content p {
    color: var(--dark-gray);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ===================================================================
   FOOTER
   =================================================================== */

.footer {
    background: linear-gradient(to bottom, var(--primary-navy), #0f1f3d);
    color: var(--white);
    padding: 3rem 1rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    color: var(--gold-light);
    margin-bottom: 1rem;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.footer-col p {
    line-height: 1.8;
    opacity: 0.9;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin: 0.5rem 0;
}

.footer-col ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--gold-light);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ===================================================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATIONS
   =================================================================== */

@media (max-width: 992px) {
    .nav-wrapper {
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header .container {
        padding: 0.6rem 0.75rem;
        min-height: 56px;
    }

    .logo-section {
        max-width: 180px;
    }

    /* PURE CSS MOBILE NAVIGATION */
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 4.5rem 1.5rem 2rem;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Show menu when checkbox is checked */
    .menu-checkbox:checked ~ .nav-wrapper {
        right: 0;
    }

    /* Animate hamburger to X when checked */
    .menu-checkbox:checked + .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-checkbox:checked + .menu-toggle span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .menu-checkbox:checked + .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Backdrop overlay when menu is open */
    .menu-checkbox:checked ~ .nav-wrapper::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
        animation: fadeInBackdrop 0.3s ease;
    }

    @keyframes fadeInBackdrop {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
        align-items: flex-start;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--medium-gray);
        font-size: 0.95rem;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:active {
        background-color: rgba(200, 126, 109, 0.05);
    }

    .cta-btn {
        width: 100%;
        text-align: center;
        margin-top: 1.25rem;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    .hero {
        min-height: 400px;
    }

    .director-about-content {
        text-align: center;
    }

    .director-about-text {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header .container {
        padding: 0.5rem 0.75rem;
        min-height: 52px;
    }

    .nav-wrapper {
        width: 80%;
        max-width: 280px;
        padding: 4rem 1.25rem 1.5rem;
    }

    .logo {
        font-size: 0.85rem;
    }

    .tagline {
        font-size: 0.6rem;
    }

    .nav-link {
        padding: 0.85rem 0;
        font-size: 0.9rem;
    }

    .director-image,
    .director-about-image {
        width: 150px;
        height: 150px;
    }

    .institutions-grid,
    .results-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 0.8rem;
    }
    
    .tagline {
        font-size: 0.55rem;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
    }
    
    .menu-toggle span {
        width: 22px;
    }
}

/* ===================================================================
   ACCESSIBILITY & PERFORMANCE
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading Animation */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body.loaded {
    animation: fadeInPage 0.5s ease-in;
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .cta-section,
    .footer,
    .menu-toggle,
    .menu-checkbox {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}