/* ===================================
   Moto Klub Salines - Styles
   =================================== */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #8B0000;
    --primary-gold: #C9A656;
    --charcoal: #2B2B2B;
    --deep-black: #1a1a1a;
    --light-gold: #D4B770;
    --off-white: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
}

/* Fix horizontal overflow on mobile */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* === LANGUAGE SELECTOR === */
.language-selector {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: var(--charcoal);
    color: var(--primary-gold);
    border: 2px solid var(--primary-gold);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--primary-gold);
    color: var(--charcoal);
}

.lang-btn.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

/* === HEADER & NAVIGATION === */
header {
    background-color: var(--charcoal);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
}

.logo-container {
    height: 120px;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 100%;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

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

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

.nav-links a:hover {
    color: var(--light-gold);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-gold);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 1rem 1rem 3rem 1rem;
    position: relative;
    width: 100%;
    margin: 0;
    left: 0;
    right: 0;
    z-index: 1;
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
    /* Loading state */
    background-color: var(--charcoal);
    transition: background-image 0.3s ease;
}

/* Hero image loaded state */
.hero.image-loaded {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                      url('../images/hero-bg.jpg');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 15;
    animation: fadeInUp 1s ease;
}

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-gold);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-content .tagline {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--off-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-badge {
    display: inline-block;
    background: rgba(201, 166, 86, 0.2);
    border: 2px solid var(--primary-gold);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

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

/* === BUTTONS === */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(161, 57, 57, 0.3);
}

.btn-primary:hover {
    background-color: #8A2F2F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(161, 57, 57, 0.5);
}

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

.btn-secondary:hover {
    background-color: var(--primary-gold);
    color: var(--charcoal);
    border-color: var(--primary-gold);
}

/* === SECTIONS === */
section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Override section constraints for hero */
section.hero {
    max-width: none;
    margin: 0;
    padding: 2rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 1rem;
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--charcoal);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-gold));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* === STATS BAR === */
.stats-bar {
    background: linear-gradient(135deg, var(--primary-red), var(--charcoal));
    padding: 3rem 2rem;
    margin: 0;
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    color: var(--white);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === WELCOME SECTION === */
.welcome {
    background-color: var(--off-white);
}

.welcome-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.welcome-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.welcome-image {
    background: linear-gradient(135deg, var(--charcoal), var(--primary-red));
    height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.welcome-image::before {
    content: '🏍️';
    font-size: 8rem;
    opacity: 0.1;
    position: absolute;
}

.group-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.group-photo:hover {
    transform: scale(1.02);
}

/* === VALUES SECTION === */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-red);
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 166, 86, 0.1), transparent);
    transition: left 0.5s ease;
}

.value-card:hover::before {
    left: 100%;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-gold);
}

.value-card h3 {
    color: var(--charcoal);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* === ABOUT SECTION === */
.about {
    background: var(--charcoal);
    color: var(--white);
}

.about .section-title {
    color: var(--primary-gold);
}

.about .section-subtitle {
    color: var(--light-gold);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.about-text h3 {
    color: var(--primary-gold);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-highlights {
    background: rgba(201, 166, 86, 0.1);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-gold);
}

.about-highlights h3 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
}

.about-highlights ul {
    list-style: none;
    padding: 0;
}

.about-highlights li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.about-highlights li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-gold);
    font-weight: bold;
}

/* === EVENTS SECTION === */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.event-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.event-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-red), var(--charcoal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 1.5rem;
    position: relative;
    overflow: hidden;
}

.event-image::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.event-content {
    padding: 1.5rem;
}

.event-date {
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-content h3 {
    color: var(--charcoal);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.event-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* === GALLERY SECTION === */
.gallery {
    background-color: var(--off-white);
}

/* Gallery Categories */
.gallery-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

@media (max-width: 1024px) {
    .gallery-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.gallery-category {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.gallery-category.active {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
    border: 2px solid var(--primary-red);
}

.gallery-category.active .gallery-category-overlay {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(139, 0, 0, 0.7));
}

.gallery-category-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.gallery-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.gallery-category-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-gold);
}

.gallery-category-count {
    font-size: 0.9rem;
    opacity: 0.9;
}


.gallery-grid-container {
    position: relative;
    margin-top: 3rem;
    padding: 0 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) transparent;
    align-items: center;
    justify-content: flex-start;
}

.gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 4px;
}

.gallery-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-red);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 15;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav-arrow.left {
    left: -30px;
}

.gallery-nav-arrow.right {
    right: -30px;
}

.gallery-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-nav-arrow:disabled:hover {
    transform: translateY(-50%);
}

.gallery-item {
    height: 300px;
    min-width: 280px;
    max-width: 320px;
    background: var(--charcoal);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

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

.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item-image.loaded {
    opacity: 1;
}

.gallery-item-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    z-index: 1;
}

.video-poster::after {
    content: '▶️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--charcoal), var(--primary-red));
    padding: 2rem;
    text-align: center;
}

/* Gallery Navigation */
.gallery-navigation {
    text-align: center;
    margin: 2rem 0;
}

/* Gallery Lightbox/Popup */
.gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 240ms ease-in-out, transform 240ms ease-in-out;
    transform: scale(0.995);
}

.gallery-lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

.gallery-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}

.gallery-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 300ms ease, filter 300ms ease, transform 300ms ease;
    will-change: opacity, transform;
}

.gallery-item-image.lazy {
    /* slight subdued look until the medium image loads */
    opacity: 0.85;
}

.gallery-item-image.loaded {
    opacity: 1;
    filter: none;
    transform: none;
}

.gallery-lightbox-close:hover {
    background: var(--primary-gold);
    transform: scale(1.1);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(161, 57, 57, 0.8);
    color: var(--white);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gallery-lightbox-nav:hover {
    background: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-nav.prev {
    left: 20px;
}

.gallery-lightbox-nav.next {
    right: 20px;
}

.gallery-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-lightbox-nav:disabled:hover {
    transform: translateY(-50%);
}

.gallery-lightbox-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.gallery-lightbox-thumbnails {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    max-width: 80vw;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-lightbox-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-lightbox-thumb:focus {
    outline: 3px solid rgba(201,166,86,0.35);
    outline-offset: 2px;
}

.gallery-lightbox-thumb:hover,
.gallery-lightbox-thumb.active {
    opacity: 1;
    border-color: var(--primary-gold);
    transform: scale(1.1);
}

/* Loading States */
.gallery-item-image[data-src] {
    opacity: 0.7;
    filter: blur(5px);
    transition: all 0.3s ease;
}

.gallery-item-image.loaded {
    opacity: 1;
    filter: blur(0);
}

/* === DONORS SECTION === */
.donors {
    background: var(--off-white);
}

.donors-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

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

.donor-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.donor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.donor-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.donor-card.platinum .donor-badge {
    background: linear-gradient(135deg, #E5E4E2, #C0C0C0);
    color: var(--charcoal);
    border: 2px solid #B8B8B8;
}

.donor-card.gold .donor-badge {
    background: linear-gradient(135deg, #FFD700, #8B0000);
    color: var(--charcoal);
    border: 2px solid #DAA520;
}

.donor-card.silver .donor-badge {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: var(--charcoal);
    border: 2px solid #999999;
}

.donor-card.bronze .donor-badge {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: var(--white);
    border: 2px solid #A0522D;
}

.donor-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--off-white);
    border: 2px dashed var(--text-light);
}

.donor-placeholder {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 600;
}

.donor-card h3 {
    color: var(--charcoal);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.donor-card p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.become-donor {
    background: var(--white);
    border-radius: 10px;
    padding: 3rem;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.become-donor h3 {
    color: var(--charcoal);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.become-donor > p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 2rem;
}

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

.benefit-item {
    padding: 1.5rem;
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-item h4 {
    color: var(--charcoal);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* === CONTACT SECTION === */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(201, 166, 86, 0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    background: var(--charcoal);
    color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-info h3 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-item {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.contact-icon {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(201, 166, 86, 0.4);
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    color: var(--white);
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--primary-gold);
}

/* === EVENT POPUP MODAL === */
.event-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.event-popup.active {
    display: flex;
}

.event-popup-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 625px; /* Increased from 500px to 625px (25% wider) */
    width: 100%;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow-y: auto;
    animation: slideInUp 0.4s ease;
    position: relative;
    z-index: 10001;
    margin: 2rem auto;
}

.event-popup-header {
    background: linear-gradient(135deg, var(--primary-red), var(--charcoal));
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.event-popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.event-popup-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-gold);
}

.event-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.event-popup-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.event-popup-body {
    padding: 2rem;
}

.event-popup-date,
.event-popup-location,
.event-popup-entry {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--off-white);
    border-radius: 8px;
    border-left: 4px solid var(--primary-gold);
}

.event-popup-date-icon,
.event-popup-location-icon,
.event-popup-entry-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.event-popup-date-text,
.event-popup-location-text,
.event-popup-entry-text {
    font-weight: 600;
    color: var(--charcoal);
}

.event-popup-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 1.5rem 0;
    text-align: center;
    font-style: italic;
}

.event-popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.event-popup-actions .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    min-width: 150px;
}

/* Scroll indicator for modal */
.event-popup-scroll-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
    animation: bounceDown 2s infinite;
    z-index: 10002;
    transition: all 0.3s ease;
}

.event-popup-scroll-indicator:hover {
    background: var(--charcoal);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.4);
}

.event-popup-scroll-indicator.hidden {
    display: none;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Countdown Timer */
.event-countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-red), var(--charcoal));
    border-radius: 10px;
    color: var(--white);
}

.countdown-item {
    text-align: center;
    min-width: 60px;
}

.countdown-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* RSVP Section */
.event-rsvp-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--off-white);
    border-radius: 10px;
    border: 2px solid var(--primary-gold);
}

.rsvp-title {
    text-align: center;
    color: var(--charcoal);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.event-rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-rsvp-form input,
.event-rsvp-form select,
.event-rsvp-form textarea {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.event-rsvp-form input:focus,
.event-rsvp-form select:focus,
.event-rsvp-form textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(201, 166, 86, 0.1);
}

.rsvp-submit {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Mobile Responsive for Popup */
@media (max-width: 576px) {
    .event-popup {
        padding: 1rem 0.5rem;
        align-items: flex-start;
    }
    
    .event-popup-content {
        max-height: 95vh;
        margin: 1rem auto;
        border-radius: 10px;
    }
    
    .event-countdown {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
    }
    
    .countdown-label {
        font-size: 0.7rem;
    }
    
    .event-popup-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-popup-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .event-rsvp-section {
        margin: 1.5rem 0;
        padding: 1rem;
    }
        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 0.5rem;
        }
        .gallery-item {
            min-width: 140px;
            max-width: 100%;
            height: 160px;
        }
        .gallery-nav-arrow {
            position: static;
            margin: 0.5rem;
            width: 48px;
            height: 48px;
            font-size: 1.2rem;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .gallery-lightbox-content {
            max-width: 98vw;
            max-height: 98vh;
            flex-direction: column;
        }
        .gallery-lightbox-image {
            max-width: 100vw;
            max-height: 70vh;
        }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* === FOOTER === */
footer {
    background-color: var(--deep-black);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 1rem 0.5rem;
    }
    
    .footer-content {
        padding: 0;
    }
}

.footer-logo {
    height: 100px;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--light-gold);
    margin-bottom: 1rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(201, 166, 86, 0.3);
    color: var(--text-light);
}

/* === SCROLL TO TOP BUTTON === */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(161, 57, 57, 0.3);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--primary-gold);
    transform: translateY(-3px);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 140px;
        flex-direction: column;
        background-color: var(--charcoal);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 2rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }

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

    .mobile-menu-btn {
        display: block;
    }

    /* Mobile hero optimizations */
    .hero {
        min-height: 60vh;
        background-attachment: scroll;
        background-position: center 30%;
        padding: 0.5rem 0.5rem 2rem 0.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 0.3rem;
    }

    .hero-content .tagline {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.3rem 1rem;
        margin-bottom: 1rem;
    }

    .welcome-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .values-grid,
    .events-grid,
    .gallery-grid,
    .donors-grid {
        grid-template-columns: 1fr;
    }


    .gallery-item {
        min-width: 250px;
        max-width: 250px;
        height: 250px;
    }

    /* Virtualized gallery placeholder styles: when the grid has many items and
       virtualization is enabled we show a repeating subtle skeleton so the track
       looks continuous even when only some items are rendered. */
    .gallery-grid.virtualized {
        background-image: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0.02) 100%);
        background-size: 320px 100%;
    }

    .gallery-grid .spacer {
        height: 1px;
        width: 100%;
    }

    /* Items created for virtualization are absolutely positioned; ensure they
       stack correctly inside the track */
    .gallery-grid .gallery-item {
        position: absolute;
        top: 0;
    }

    .gallery-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gallery-nav-arrow.left {
        left: -20px;
    }

    .gallery-nav-arrow.right {
        right: -20px;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gallery-lightbox-nav.prev {
        left: 10px;
    }

    .gallery-lightbox-nav.next {
        right: 10px;
    }

    .gallery-lightbox-thumbnails {
        bottom: -80px;
    }

    .gallery-lightbox-thumb {
        width: 50px;
        height: 50px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    section {
        padding: 3rem 1.5rem;
    }

    .stats-bar {
        padding: 2rem 1.5rem;
    }

    .donor-benefits {
        grid-template-columns: 1fr;
    }

    .language-selector {
        top: 5px;
        right: 10px;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .logo-container {
        height: 80px;
    }

    /* Small mobile hero optimizations */
    .hero {
        min-height: 50vh;
        background-position: center 25%;
        padding: 0.3rem 0.3rem 1.5rem 0.3rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }

    .hero-content .tagline {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.8rem;
        margin-bottom: 0.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
    }

    .section-title {
        font-size: 2rem;
    }

    nav {
        padding: 0.5rem 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .language-selector {
        flex-direction: column;
        gap: 0.3rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}
