/* CSS Variables for TEDU Colors & Theme */
:root {
    /* IEEE Theme (Current) */
    --ted-navy: #002855; /* IEEE Navy */
    --ted-red: #00629B;  /* IEEE Blue */

    /* Original TEDU Colors (Commented for easy reversal) */
    /*
    --ted-navy: #040914;
    --ted-red: #C8102E;
    */

    --bg-light: #F6F6F8;
    --text-dark: #121212;
    --text-muted: #555555;
    --white: #FFFFFF;
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Typography */
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-serif: 'Lora', Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.font-sans { font-family: var(--font-sans) !important; }
.font-serif { font-family: var(--font-serif) !important; }
.font-italic { font-style: italic !important; }
.font-black { font-weight: 900 !important; letter-spacing: -0.05em; }
.mobile-only { display: none; }

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Utilities */
h1, h2, h3, h4, .huge-text {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

.text-red { color: var(--ted-red); }
.text-navy { color: var(--ted-navy); }
.text-white { color: var(--white); }
.dark-text { color: var(--text-dark); }
.mt-4 { margin-top: 4rem; }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--ted-red);
    color: var(--white);
    border: 2px solid var(--ted-red);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--ted-red);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 1rem 5%;
    background: rgba(246, 246, 248, 0.9);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar.scrolled {
    padding: 0.6rem 5%;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ted-navy);
    letter-spacing: -0.02em;
}

.nav-logo {
    height: 115px;
    mix-blend-mode: multiply;
    filter: contrast(1.1); /* slight contrast bump */
    transition: height 0.3s ease;
}

.navbar.scrolled .nav-logo {
    height: 90px;
}


.mobile-nav-links {
    display: none;
    gap: 1.5rem;
    margin-left: auto;
    margin-right: 1.5rem;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--ted-navy);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.mobile-nav-links a:hover {
    color: var(--ted-red);
}


.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--ted-red);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 14rem; /* Safely clear navbar */
    padding-bottom: 5rem;
    background-color: var(--bg-light);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7.5rem);
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--ted-navy);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-muted);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* About Section */
.bg-navy { background-color: var(--ted-navy); }
.about-section {
    padding: 8rem 0;
}

.about-highlight {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 400;
    line-height: 1.4;
    color: var(--white);
    margin-bottom: 4rem;
    max-width: 1000px;
}

.about-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
}

/* Committees Section - Vertical Stack with Flip Logo */
/* Committees Section - New 3-Column Design */
.committees-section {
    padding: 10rem 0;
    background-color: var(--bg-light);
}

.committees-section .container {
    max-width: 1600px; /* Overriding default container for more width */
}

.committees-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 4rem;
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
}

/* Desktop override for all-in-one-line */
@media (min-width: 1024px) {
    .committees-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .committee-wrapper {
        display: block !important;
        opacity: 1 !important;
    }
}

.committee-card-new {
    position: relative;
    width: 100%;
    aspect-ratio: 0.85; /* More balanced shape, less 'long' */
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.committee-card-new:hover {
    transform: translateY(-10px);
}

.card-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    transition: filter 0.6s ease;
}

.card-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    mix-blend-mode: multiply;
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(0,0,0,0.02));
    transition: all 0.6s ease;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--ted-navy);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin: 0;
    transition: color 0.4s ease;
}

.card-icon-wrap {
    width: 40px;
    height: 40px;
    position: relative;
}

/* Plus Icon Construction */
.plus-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 3px;
    background-color: var(--ted-navy);
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.plus-icon::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--ted-navy);
    transform: rotate(90deg);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-description {
    margin-top: 2.5rem;
    color: var(--white);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    /* Added to prevent text clipping if it still exceeds */
    overflow-y: auto;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.card-description::-webkit-scrollbar {
    display: none;
}

.card-description p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* HOVER STATES */
.committee-card-new:hover .card-bg {
    filter: blur(12px) brightness(0.7);
}

.committee-card-new:hover .card-overlay {
    background: rgba(0, 40, 85, 0.85); /* Deep IEEE Navy with transparency */
    backdrop-filter: blur(4px);
}

.committee-card-new:hover .card-title {
    color: var(--white);
}

.committee-card-new:hover .plus-icon {
    background-color: var(--white);
    transform: translate(-50%, -50%) rotate(180deg);
}

.committee-card-new:hover .plus-icon::before {
    background-color: var(--white);
    transform: rotate(0deg); /* Horizontal line now */
}

.committee-card-new:hover .card-description {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 1023px) {
    .committee-wrapper {
        display: none;
    }
    .committee-wrapper.active {
        display: block;
    }
}


/* Activities / Blog Section */
/* Visual Restoration Styles */
.activities-section {
    padding: 10rem 0 6rem 0;
    overflow: hidden;
}

.activities-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 5%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scroll-behavior: smooth;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
}

.activities-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.activity-card {
    flex: 0 0 380px;
    aspect-ratio: 0.85; /* Squarer, more balanced look */
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--text-dark);
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.activity-card:hover { 
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.ac-top-right {
    align-self: flex-end;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.activity-card:hover .ac-top-right {
    opacity: 1;
}

.ac-content {
    text-align: left;
}

.ac-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.ac-title {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1.2;
    margin: 0;
}

/* Navigation Arrow Buttons */
.activities-nav-next, .activities-nav-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background-color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ted-navy);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.activities-nav-next {
    right: 20px;
}

.activities-nav-prev {
    left: 20px;
}

.activities-nav-next:hover, .activities-nav-prev:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .activity-card {
        flex: 0 0 85%;
        padding: 2rem;
    }
    .activities-nav-next, .activities-nav-prev {
        display: none;
    }
}
/* Team Section - Collins Carousel */
.team-section {
    padding: 8rem 0;
    overflow: hidden;
    background-color: #FFFFFF !important; /* Force pure white, override bg-light */
}

.carousels-wrapper {
    background-color: #FFFFFF;
}

.mb-4 { margin-bottom: 4rem; }

/* Genel Baskan & Tabs */
.presidential-office {
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 8vw, 6rem);
    margin-bottom: 6rem;
    flex-wrap: wrap;
}
.president-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gb-avatar {
    width: clamp(220px, 20vw, 280px);
    max-width: 100%;
    aspect-ratio: 4/5;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.gb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gb-name {
    font-size: clamp(2rem, 4vw, 3rem);
    font-family: var(--font-serif);
    font-weight: 600;
    font-style: italic;
    color: var(--ted-navy); /* Dark text on white bg */
    text-transform: capitalize;
}
.gb-role {
    color: var(--ted-red);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.team-tabs-container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto 6rem auto;
}
.team-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: relative;
    align-items: end;
}
.team-tab-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}
.team-tab-wrapper:hover .tab-leader,
.team-tab-wrapper:hover .team-tab {
    opacity: 0.8;
}
.tab-leader {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.team-tab-wrapper.active .tab-leader {
    opacity: 1;
}
.tab-box {
    width: 100%;
    background: transparent;
    border-top: 2px solid rgba(4, 9, 20, 0.1);
    border-bottom: 2px solid rgba(4, 9, 20, 0.1);
    border-left: 1px solid rgba(4, 9, 20, 0.1);
    border-right: 1px solid rgba(4, 9, 20, 0.1);
    border-radius: 0;
    padding: 0.8rem; /* Thinner */
    text-align: center;
    transition: all 0.3s;
    position: relative;
}
.team-tab-wrapper:first-child .tab-box {
    border-left: 2px solid rgba(4, 9, 20, 0.1);
    border-radius: 0; /* Sharp edges */
}
.team-tab-wrapper:last-child .tab-box {
    border-right: 2px solid rgba(4, 9, 20, 0.1);
    border-radius: 0; /* Sharp edges */
}
.team-tab-wrapper.active .tab-box {
    background: rgba(4, 9, 20, 0.05); /* Slight dark navy tint active */
}
.team-tab-wrapper.active .tab-box::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0 15px;
    border-style: solid;
    border-color: var(--ted-red) transparent transparent transparent;
}
.leader-avatar {
    width: 220px; /* Explicit width to prevent flex collapse when empty */
    max-width: 100%;
    aspect-ratio: 4/5;
    border-radius: 15px;
    background-color: rgba(4, 9, 20, 0.05); /* Soft placeholder grey */
    background-size: cover;
    background-position: center;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-name {
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    font-family: var(--font-serif);
    font-weight: 600;
    font-style: italic;
    color: var(--ted-navy); /* Dark text */
    text-transform: capitalize;
    text-align: center;
}
.team-tab {
    background: transparent;
    color: var(--ted-navy); /* Dark text */
    border: none;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: bold;
    pointer-events: none;
    text-transform: uppercase;
    padding: 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.team-tab-wrapper.active .team-tab {
    opacity: 1;
}

/* Default: centered, NO scrolling */
.collins-carousel {
    display: flex;
    flex-wrap: nowrap !important; 
    gap: 1.5rem;
    padding: 0 5vw 4rem 5vw;
    justify-content: center;
    overflow: hidden;
    background-color: #FFFFFF;
}

/* RAS only: scrollable */
#ras-board {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 5vw;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#ras-board::-webkit-scrollbar {
    display: none;
}

/* Ensure padding doesn't collapse during scroll */
#ras-board .collins-card:first-child {
    margin-left: 0; /* padding on parent handles it */
}
#ras-board .collins-card:last-child {
    margin-right: 5vw; /* extra space at the end so last card isn't flush */
}

.collins-card {
    flex: 0 0 clamp(200px, 20vw, 260px);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

/* Team Navigation Arrows (RAS only, managed by JS) */
.team-nav-next, .team-nav-prev {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background-color: var(--white);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--ted-navy);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.team-nav-next { right: 20px; }
.team-nav-prev { left: 20px; }

.team-nav-next:hover, .team-nav-prev:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.collins-card:hover {
    transform: translateY(-5px);
}

.collins-card-bg {
    width: 100%;
    aspect-ratio: 4/5;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(4, 9, 20, 0.1);
    background-color: #d0e4ff; /* Placeholder color */
}

.collins-card-content {
    padding: 1.5rem 0 0 0;
    text-align: center;
}

.collins-card-name {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.8rem);
    font-weight: 600;
    color: var(--ted-navy);
    line-height: 1.2;
    text-transform: capitalize;
}

/* LinkedIn Icon Component */
.member-linkedin {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #0077B5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    z-index: 10;
}
.member-linkedin:hover {
    transform: scale(1.15);
    background: #006097;
}
.member-linkedin svg {
    width: 16px;
    height: 16px;
}
/* Link styling for LinkedIn icons */
.member-linkedin {
    text-decoration: none !important;
    color: white !important;
}

/* Ensure parents are relative for positioning icon */
.gb-avatar, .leader-avatar, .collins-card-bg {
    position: relative !important;
}

@media (max-width: 1100px) {
    .collins-carousel {
        gap: 1rem;
    }
    .collins-card {
        /* let the clamp handle sizing */
    }
}

@media (max-width: 768px) {
    .collins-carousel {
        gap: 1rem;
        padding-left: 5vw;
        padding-right: 5vw;
    }
    .collins-card {
        flex: 0 0 clamp(160px, 45vw, 220px) !important; /* Fixed width for mobile, 2 visible at a time */
    }
    .collins-card-bg {
        border-radius: 10px;
    }
    .member-linkedin {
        width: 24px;
        height: 24px;
        bottom: 8px;
        right: 8px;
    }
    .member-linkedin svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 1000px) {
    .collins-grid { grid-template-columns: repeat(2, 1fr); }
    .collins-grid-item:nth-child(2n) { border-right: none; }
    .collins-grid-item:nth-child(4n) { border-right: 1px solid rgba(0,0,0,0.1); }
}
@media (max-width: 600px) {
    .collins-grid { grid-template-columns: 1fr; }
    .collins-grid-item { border-right: none !important; aspect-ratio: 16/9; padding: 1.5rem; }
}

.avatar {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #F0F0F0 0%, #E4E4E4 100%);
    border-radius: 30px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.avatar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid rgba(11, 29, 58, 0.05);
    border-radius: 30px;
}

.team-member:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.team-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ted-navy);
}

.team-role {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Footer Section */
.footer {
    padding: 8rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4rem;
    margin-bottom: 2rem;
}

.huge-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(4rem, 10vw, 12rem);
    line-height: 0.85;
    margin-left: -0.05em;
}

.footer-links {
    display: flex;
    gap: 5rem;
    margin-top: 1rem;
}

.link-group h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.link-group ul {
    list-style: none;
}

.link-group ul li {
    margin-bottom: 1rem;
}

.link-group a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: var(--ted-red);
}

.footer-bottom {
    text-align: right;
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   HAMBURGER MENU
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1100;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ted-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile slide-in menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 75vw;
    max-width: 320px;
    height: 100%;
    background: var(--white);
    z-index: 1050;
    padding: 6rem 2.5rem 3rem 2.5rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    overflow-y: auto;
}
.mobile-menu.open {
    transform: translateX(0);
}
.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mobile-menu ul li {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.mobile-menu ul li a {
    display: block;
    padding: 1.1rem 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--ted-navy);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    transition: color 0.2s;
}
.mobile-menu ul li a:hover {
    color: var(--ted-red);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.mobile-menu-overlay.open {
    opacity: 1;
}

/* =============================================
   RESPONSIVE — 900px and below
   ============================================= */
@media (max-width: 900px) {
    .about-text-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Hide desktop nav links, hide hamburger, show mobile links */
    .nav-links {
        display: none !important;
    }
    .hamburger {
        display: none !important;
    }
    .mobile-nav-links {
        display: flex;
    }
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
    .nav-logo {
        height: 50px !important;
    }
    .navbar {
        padding: 0.6rem 5% !important;
    }


    /* --- Committees: switcher-based mobile redesign --- */
    .committee-focus {
        display: none !important;
    }
    .committee-card {
        display: block !important;
        max-width: 100% !important;
        margin-top: 1rem !important;
        gap: 0 !important;
        padding: 0 !important;
    }
    /* Make texts more readable on mobile (1rem instead of 0.75rem) */
    .committee-short {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.3 !important;
        display: block !important;
        opacity: 0.6;
    }
    .committee-motto {
        font-size: 1.6rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
    }
    .mobile-committee-desc {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        opacity: 0.8;
        margin-top: 0.6rem !important;
        padding: 0 !important;
    }
    .committee-switcher {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin: 0.5rem auto 1.2rem auto !important;
        padding: 0.4rem;
        background: rgba(4, 9, 20, 0.04);
        border-radius: 50px;
        width: fit-content;
    }

    .com-tab {
        background: transparent;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 50px;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 0.8rem;
        color: var(--ted-navy);
        cursor: pointer;
        transition: all 0.3s ease;
        text-transform: uppercase;
        opacity: 0.6;
    }
    .com-tab.active {
        background: var(--white);
        color: var(--ted-navy);
        box-shadow: 0 4px 10px rgba(4, 9, 20, 0.08);
        opacity: 1;
    }




    .committee-wrapper {
        display: none;
    }
    .committee-wrapper.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .committee-card {
        flex-direction: column;
        gap: 0;
        margin-top: 0;
        border-radius: 25px;
        overflow: hidden;
        box-shadow: 0 15px 45px rgba(0,0,0,0.06);
        background: var(--white);
        border: 1px solid rgba(0,0,0,0.05);
    }
    .committee-card.reverse {
        flex-direction: column;
    }

    .mobile-only {
        display: block !important;
    }

    /* Show a cleaner mobile committee card without toggles */
    .mobile-committee-card {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    .mobile-committee-logo {
        width: 100%;
        height: 180px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2.5rem;
        background: var(--white);
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }
    .mobile-committee-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        mix-blend-mode: multiply;
    }
    .mobile-committee-info {
        width: 100%;
        background: var(--white);
        padding: 2.5rem;
    }
    .mobile-committee-info .committee-short {
        margin-bottom: 1.2rem;
        font-size: 1rem;
    }
    .mobile-committee-info .committee-motto {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    .mobile-committee-desc {
        font-family: var(--font-serif);
        font-size: 1.05rem;
        line-height: 1.7;
        color: var(--text-muted);
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 1.5rem;
    }


    /* Instagram Feed Grid (replaces Activities Carousel on mobile) */
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    .instagram-post {
        border-radius: 8px !important;
    }
    .instagram-follow-btn {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }


    .committee-info {
        display: none !important;
    }


    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-top .huge-text {
        font-size: clamp(2.5rem, 9vw, 3.8rem) !important;
        margin-bottom: 1.5rem !important;
        line-height: 0.85;
    }

    .link-group h4 {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
    .link-group a {
        font-size: 0.95rem !important;
    }
    .footer-bottom {
        text-align: left;
        margin-top: 3rem;
    }


    /* Hero spacing */
    .hero-section {
        padding-top: 10rem;
    }

    .hero-subtitle {
        margin-top: 2rem !important;
    }
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    /* About text size */
    .about-highlight {
        font-size: clamp(1.4rem, 4vw, 2rem);
    }

    /* Team section tabs */
    .team-tabs {
        grid-template-columns: repeat(4, 1fr);
        align-items: end;
        gap: 0;
    }

    .leader-avatar {
        width: 60px !important;
        height: 60px !important;
        aspect-ratio: 1 !important;
        border-radius: 50% !important;
        margin-bottom: 0.5rem !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        flex-shrink: 0;
    }
    
    .leader-name {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-wrap: break-word;
        padding: 0 0.2rem;
        height: 2em; /* Ensure uniform baseline for tabs underneath if names wrap */
    }
    
    .tab-leader {
        margin-bottom: 1rem !important;
    }
    
    .team-tab {
        font-size: 0.9rem !important;
    }
    
    .tab-box {
        padding: 0.4rem 0.1rem !important;
    }
    
    .presidential-office {
        flex-wrap: nowrap !important;
        gap: 0.8rem !important;
        justify-content: center !important;
    }

    .president-box .gb-avatar {
        width: 140px !important;
        height: 175px !important;
        margin-bottom: 0.8rem !important;
    }

    .president-box .gb-name {
        font-size: 1.1rem !important;
    }

    .president-box .gb-role {
        font-size: 0.7rem !important;
    }
    
    .mobile-committee-logo {
        width: 140px !important;
        height: 140px !important;
    }
    
    .committee-switcher {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }
}


.hero-scroll-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ted-navy);
    pointer-events: none;
    animation: bounce 2s infinite ease-in-out;
    opacity: 0.7;
    z-index: 5;
}
@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 15px); }
}

.hero-btn-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Floating Contact Card */
.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--ted-navy);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(4, 9, 20, 0.2);
    text-decoration: none;
    z-index: 9999;
    overflow: hidden; /* Enables sliding effect */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}
.floating-contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 0%;
    background: var(--white);
    transition: width 0.4s ease-in-out;
    z-index: -1;
}
.floating-contact.dark-bg-mode::before {
    width: 100%;
}
.floating-contact.dark-bg-mode {
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}
.floating-contact:hover {
    transform: translateY(-5px) scale(1.02);
}
.fc-title {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--white) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.4s ease-in-out;
    position: relative;
    z-index: 10;
}
.floating-contact.dark-bg-mode .fc-title {
    color: var(--ted-navy) !important;
}
.floating-contact.hide-contact {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(150px) !important; /* Deep slide up */
}
@media (max-width: 768px) {
    .floating-contact {
        bottom: 20px;
        right: 20px;
        padding: 1rem 2rem;
    }
    .fc-title {
        font-size: 1rem;
    }
}

/* --- Instagram Feed Grid --- */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.instagram-post {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 15px;
    background-color: var(--light-muted);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.instagram-post:hover {
    transform: translateY(-8px);
}

.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.instagram-post:hover img {
    transform: scale(1.08);
}

.instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 9, 20, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.instagram-post:hover .instagram-overlay {
    opacity: 1;
}

.instagram-overlay-icon {
    color: white;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.instagram-post:hover .instagram-overlay-icon {
    transform: scale(1);
}

.instagram-follow-btn {
    display: inline-flex;
    align-items: center;
    background: #E1306C; /* Instagram gradient start */
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(225, 48, 108, 0.3);
}

.instagram-follow-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(225, 48, 108, 0.4);
    color: white;
}

.instagram-skeleton {
    aspect-ratio: 1/1;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.instagram-skeleton::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.btn-outline-white {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 1rem 2.5rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-outline-white:hover {
    background: white;
    color: var(--ted-navy);
}

/* Utility Helpers missing without Bootstrap */
.position-relative {
    position: relative !important;
}

/* Nav Arrows for Carousels */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ted-navy);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s;
}
.nav-arrow:hover {
    transform: translateY(-50%) scale(1.1);
    background: var(--white);
}
.nav-prev { left: 1rem; }
.nav-next { right: 1rem; }
@media(max-width: 900px) {
    .nav-arrow { display: none; }
}

/* Force dark arrows on bright backgrounds like Team Section */
.team-section .nav-arrow {
    background: var(--ted-navy) !important;
    color: var(--white) !important;
    z-index: 99 !important;
    opacity: 1; /* Reset default opacity before JS override */
}
.team-section .nav-arrow.nav-prev {
    left: 20px !important; 
}
.team-section .nav-arrow.nav-next {
    left: auto !important;
    right: 20px !important;
}
.team-section .nav-arrow:hover {
    background: var(--ted-red) !important;
}
/* Final Mobile Overrides */
@media (max-width: 768px) {
    .hero-btn-wrap {
        display: none !important;
    }
    .collins-carousel {
        flex-wrap: nowrap !important;
        gap: 0.8rem;
        justify-content: flex-start !important; /* switch back to start if fitting on one line to avoid micro-centering */
        overflow-x: hidden; /* Ensure no scrollbar */
    }
    .collins-card {
        flex: 1 1 0px !important;
        min-width: 0 !important;
    }
}

/* Year Switcher Styles */
.year-switcher-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.year-btn {
    background: transparent;
    border: 2px solid var(--ted-navy);
    color: var(--ted-navy);
    padding: 0.5rem 1.5rem;
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-btn:hover {
    background: rgba(18, 30, 48, 0.1);
}

.year-btn.active {
    background: var(--ted-navy);
    color: var(--white);
}

/* Fade transition for team elements */
#presidential-office-container, .team-tabs-container, .carousels-wrapper {
    transition: opacity 0.2s ease-in-out;
}

