:root {
    --primary-color: #BC2026;
    --secondary-color: #FDB913;
    --success-color: #76B852;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --light-grey: #F5F5F5;
    --font-primary: 'Poppins', sans-serif;
    --container-width: 1400px;
    --slide-animation-duration: 0.8s;
}

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

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo img {
    height: 60px;
    /* Slightly larger than original 50px */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

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

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

.donate-btn {
    background-color: var(--secondary-color);
    color: var(--text-dark) !important;
    padding: 8px 20px !important;
    border-radius: 4px;
    font-weight: 600 !important;
}

.donate-btn:hover {
    background-color: #e5a812;
    color: var(--white) !important;
}

.donate-btn::after {
    display: none;
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--white);
}

/* Hero Section with Slider */
.hero {
    position: relative;
    height: 500px;
    /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

/* Container for slides */
.hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind content */
}

/* Individual Slide */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    /* Smooth cross-fade */
}

.slide.active {
    opacity: 1;
}

/* Add a dark overlay to ensure text readability on top of images */
.hero-slides::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* 50% Desktop overlay */
    z-index: 1;
    /* On top of slides, below content */
}

.hero-content {
    position: relative;
    z-index: 2;
    /* On top of slides and overlay */
}

/* Typography Enhancements */
.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    /* Use the premium font */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.cta-btn:hover {
    background-color: #e5a812;
    color: var(--white);
}

/* Sections General */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 60px 0 20px;
}

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

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-social {
    margin-top: 36px;
}

.footer-social p {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 18px;
    display: inline-block;
    padding-bottom: 5px;
}

.footer-social a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.1);
}

.footer-social img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        height: 70px;
        padding: 0 15px;
    }

    .logo {
        font-size: 18px;
        gap: 10px;
    }

    .logo img {
        height: 45px;
    }

    .hamburger {
        display: block;
        padding: 8px;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        padding: 20px 0;
        display: block;
    }

    .hero-content h1 {
        font-size: 32px;
    }
}

/* Image Carousel */
.image-carousel {
    width: 100%;
    overflow: hidden;
    background-color: var(--light-grey);
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    /* Ensure track is as wide as its content */
    animation: scroll 20s linear infinite;
}

.carousel-track img {
    height: 300px;
    /* Fixed height for uniformity */
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Keyframes for smooth infinite scroll */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Move left by 50% of the track width (assuming 2 sets of images) */
        /* Exact calculation: 3 images + specific gap. 
           For perfect seamlessness, we ideally need JS or accurate calc.
           Trying a rough estimate or simply moving left until the duplicate set takes over.
           Since we have 2 sets, moving -50% is the goal, but translateX works on element width.
           Let's try translating by the width of the FIRST SET. */
        transform: translateX(calc(-100% / 2));
    }
}

/* Pause on hover for better UX */
.carousel-track:hover {
    animation-play-state: paused;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
    .carousel-track img {
        height: 200px;
    }
}

/* Image Protection */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
    /* Allows clicking but prevents simple dragging */
    user-select: none;
    /* Prevents selection */
}

/* Specific protection for committee members - blocks all mouse interaction on the image itself */
.committee-member-img {
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Sidebar Ads */
.sidebar-ads {
    background-color: var(--light-grey);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.sidebar-ads h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

/* Sponsor Categories */
.sponsor-category {
    margin-bottom: 25px;
}

/* Category-specific heights based on percentage allocation of total sidebar space
   Note: These are minimum heights to ensure proper display with 300x200px logos.
   Actual allocation percentages are approximate based on typical sidebar height:
   - Diamond: 680px (fits 3 logos at 200px each + spacing)
   - Gold: 480px (fits 2 logos at 200px each + spacing)
   - Silver: 480px (fits 2 logos at 200px each + spacing)
*/
.sponsor-category-diamond .sponsor-logos-scroll {
    min-height: 680px;
}

.sponsor-category-gold .sponsor-logos-scroll {
    min-height: 480px;
}

.sponsor-category-silver .sponsor-logos-scroll {
    min-height: 480px;
}

.sponsor-category-title {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--secondary-color);
}

/* Vertical sponsor logos display */
.sponsor-logos-scroll {
    width: 100%;
    overflow: hidden;
    background-color: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sponsor-logos-track {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

.sponsor-logo {
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    transform: translateY(100%);
    transition: transform var(--slide-animation-duration) ease-in-out, 
                opacity var(--slide-animation-duration) ease-in-out, 
                visibility 0s var(--slide-animation-duration);
}

.sponsor-logo.visible {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateY(0);
    transition: transform var(--slide-animation-duration) ease-in-out, 
                opacity var(--slide-animation-duration) ease-in-out;
}

.sponsor-logo.sliding-out {
    opacity: 0;
    transform: translateY(-100%);
    transition: transform var(--slide-animation-duration) ease-in-out, 
                opacity var(--slide-animation-duration) ease-in-out;
}

/* Category-specific logo sizes - all logos same size, dynamically calculated based on available height */
.sponsor-category-diamond .sponsor-logo,
.sponsor-category-gold .sponsor-logo,
.sponsor-category-silver .sponsor-logo {
    /* All logos use the same max size, calculated dynamically by JavaScript */
    max-width: 100%;
    width: auto;
    height: auto;
}

/* Legacy ad banner styles (kept for backward compatibility) */
.ad-banner {
    background-color: var(--white);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.ad-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.ad-banner a {
    display: block;
    text-decoration: none;
}

.ad-banner img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.ad-banner h4 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 8px;
}

.ad-banner p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ad-banner .ad-cta {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.ad-banner .ad-cta:hover {
    background-color: #e5a812;
    color: var(--white);
}

/* Layout with Sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .content-with-sidebar {
        grid-template-columns: 1fr 400px;
    }
}

.main-content {
    min-width: 0;
}

.sidebar {
    min-width: 0;
}

/* Responsive adjustments for sidebar */
@media (max-width: 991px) {
    .sidebar {
        order: -1;
    }

    .sidebar-ads {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}