@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
    --primary: #D4AF37;
    /* Metallic Gold */
    --primary-dark: #AA8A2E;
    --primary-light: #F9E076;
    --bg-light: #FFFFFF;
    --bg-accent: #FAF7F2;
    /* Subtle Gold-tinted White */
    --dark: #000000;
    --soft-dark: #111111;
    --white: #FFFFFF;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    /* Fluid Typography */
    --fs-h1: clamp(2.5rem, 8vw + 1rem, 7rem);
    --fs-h2: clamp(1.8rem, 4vw + 0.5rem, 3.5rem);
    --fs-h3: clamp(1.6rem, 3vw + 0.5rem, 2.8rem);
    --fs-body: clamp(0.95rem, 1.2vw + 0.2rem, 1.25rem);

    /* Layout */
    --section-padding: clamp(80px, 12vw, 160px);
    /* Increased section separation */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--dark);
    line-height: 1.9;
    /* Increased for breathing room */
    overflow-x: hidden;
    font-size: var(--fs-body);
    letter-spacing: 0.3px;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
}


.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Title Strip Implementation */
.title-strip {
    background: var(--dark);
    color: var(--primary);
    padding: clamp(30px, 6vw, 60px) 0;
    text-align: center;
    width: 100%;
    margin-bottom: clamp(40px, 8vw, 80px);
    border-bottom: 2px solid var(--primary-dark);
    position: relative;
    z-index: 2;
}

.title-strip h2 {
    font-size: var(--fs-h2);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 4px;
}

.title-with-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(15px, 4vw, 35px);
    flex-wrap: wrap;
    max-width: 90%;
    margin: 0 auto;
}

.section-logo {
    height: clamp(60px, 10vw, 120px);
    /* Ligeramente más grandes para mayor impacto */
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

@media (max-width: 480px) {
    .title-with-logo {
        flex-direction: column;
        gap: 10px;
    }

    .section-logo {
        height: 70px;
    }

    .title-strip h2 {
        letter-spacing: 2px;
        line-height: 1.2;
    }
}

/* Global Text Standard */
.texto-normal {
    font-size: 1.35rem;
    line-height: 1.8;
    color: #555;
    max-width: 850px;
    margin: 0 auto 1.5rem;
    text-align: center;
    font-family: var(--font-body);
}

.bg-dark .texto-normal {
    color: #BBB;
}

/* Background Utility Classes */
.bg-white {
    background-color: var(--white);
}

.bg-accent {
    background-color: var(--bg-accent);
}

.bg-dark {
    background-color: var(--dark);
    color: var(--white);
}

.bg-soft-dark {
    background-color: var(--soft-dark);
    color: var(--white);
}

/* Card Styling for Heavy Text Blocks */
.text-card {
    background: var(--white);
    padding: clamp(30px, 6vw, 60px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-top: 4px solid var(--primary);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    position: relative;
    transition: var(--transition);
}

.text-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.1);
    border-color: var(--primary);
}

.text-card p {
    margin-bottom: 2rem;
    /* Vertical Rhythm */
    color: #444;
}

.text-card p:last-child {
    margin-bottom: 0;
}

.bg-dark .text-card {
    background: var(--soft-dark);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--white);
}

.bg-dark .text-card p {
    color: #BBB;
}




/* Readability Wrapper */
.reading-width {
    max-width: 80ch;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel Implementation */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 40px;
}

.carousel-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    padding: 20px 5%;
    cursor: grab;
    scroll-snap-type: x mandatory;
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.carousel-item {
    flex: 0 0 400px;
    background: var(--white);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    scroll-snap-align: center;
}

.carousel-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.carousel-item img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background-color: #faf7f2;
    display: block;
    transition: opacity 0.5s ease;
}

/* Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.1);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--primary);
}

.dot.active {
    background-color: var(--primary);
    transform: scale(1.3);
}

/* Video Card Hover Effect */
.video-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-card video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #faf7f2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.video-card.video-active video {
    opacity: 1;
}

.video-mute-toggle {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.video-mute-toggle:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.1);
}

.video-mute-toggle i {
    font-size: 1.2rem;
}

@media (max-width: 992px) {
    .video-mute-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Custom styles for Nuestros Eventos Side-by-Side - Premium Redesign */
#track-events .carousel-item {
    flex: 0 0 950px;
    max-width: 95vw;
}

#track-events .video-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: auto;
    background: transparent;
    gap: 30px;
    padding: 10px;
}

.event-item-frame {
    flex: 1;
    position: relative;
    background: var(--white);
    padding: 15px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    overflow: visible; /* To allow corners to peak out if needed */
}

/* Individual Gold Corners for each frame */
.event-item-frame::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 30px;
    height: 30px;
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
    z-index: 1;
}

.event-item-frame::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    z-index: 1;
}

#track-events .event-item-frame img,
#track-events .event-item-frame video {
    width: 100%;
    height: 480px;
    display: block;
    object-fit: contain;
    background-color: #050505; /* Black background for letterboxing */
    opacity: 1;
    position: relative; /* Ensure it stays in flow */
    pointer-events: auto; /* Ensure it responds to clicks/touches */
    transition: var(--transition);
}

#track-events .event-item-frame video {
    object-fit: contain;
    background: #050505;
}

.video-card.video-active .event-item-frame {
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.1);
    transform: translateY(-5px);
}

@media (max-width: 992px) {
    .events-section {
        padding: 100px 0 140px; /* Increased vertical space for mobile */
    }

    #track-events .carousel-item {
        flex: 0 0 92vw;
    }
    
    #track-events .video-card {
        flex-direction: column;
        gap: 25px;
        padding: 8px;
        overflow: visible;
        min-height: 600px; /* Force minimum height for stacked content */
    }
    
    #track-events .event-item-frame {
        padding: 12px;
        flex: none; /* Don't grow/shrink unexpectedly on mobile Safari */
        width: 100%;
    }

    #track-events .event-item-frame img,
    #track-events .event-item-frame video {
        height: 280px;
        width: 100%;
        max-width: 100%;
        object-fit: contain;
        background-color: #050505;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}
/* Redundant block removed to fix syntax error */

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 85vw;
        scroll-snap-align: center;
    }

    .carousel-item img {
        height: 60vh;
    }
}

/* Section Spacing */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

/* Base Components */
.container {
    max-width: 1400px;
    /* Increased for PCs and TVs */
    margin: 0 auto;
    padding: 0 5%;
    /* Percentage-based for better mobile side-padding */
}

.btn {
    display: inline-block;
    padding: 18px 45px;
    border-radius: 0;
    /* Sharp corners for elegance */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--dark);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary);
    color: var(--dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: var(--dark);
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

header.scrolled .logo,
header.scrolled .nav-links a {
    color: var(--primary) !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: 1.5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Mobile Toggle / Universal Hamburger Menu */
.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: 0.5s ease;
    z-index: 1000;
}

.nav-links.active {
    right: 0;
}

.nav-links a {
    font-size: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/IMG_0126.PNG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    border-bottom: 5px solid var(--primary);
}

.hero-content h1 {
    font-size: var(--fs-h1);
    margin-bottom: 20px;
    color: var(--primary);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    line-height: 1;
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    max-width: 800px;
    margin: 0 auto 40px;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 1px;
}

/* Quienes Somos - Extended Premium Layout */
.about {
    padding: 80px 0;
    background: var(--bg-light);
    overflow: hidden;
}

.about-image-container {
    margin: 60px auto 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: var(--shadow);
    position: relative;
    padding: 15px;
    background: var(--white);
    max-width: 900px;
}

.about-image-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 50px;
    height: 50px;
    border-top: 3px solid var(--primary);
    border-left: 3px solid var(--primary);
}

.about-image-container::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    border-bottom: 3px solid var(--primary);
    border-right: 3px solid var(--primary);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: grayscale(20%);
    transition: var(--transition);
}

.about-image-container:hover .about-img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

.youtube-section {
    padding: 80px 0;
    background: var(--bg-light);
    color: var(--dark);
}

/* Benefits - Extended Premium Layout */
.benefits-section {
    padding: 80px 0;
    background: var(--white);
}

.benefits-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.benefit-card-premium {
    background: var(--white);
    padding: 45px;
    border: 1px solid #F0F0F0;
    display: flex;
    gap: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.benefit-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    transform: translateY(100%);
    transition: var(--transition);
}

.benefit-card-premium:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.benefit-card-premium:hover::before {
    transform: translateY(0);
}

.benefit-card-premium i {
    font-size: 2.8rem;
    color: var(--primary);
    flex-shrink: 0;
}

.benefit-item-content h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.benefit-item-content p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

.sponsorship-why-container {
    margin-bottom: 60px;
}

.sponsorship-why-container h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-transform: uppercase;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.why-item {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border: 1px solid #F0F0F0;
    transition: var(--transition);
}

.why-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.why-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.why-item p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
}


/* Social Footer */
.social-section {
    padding: 80px 0;
    background: var(--dark);
    color: var(--primary);
    text-align: center;
    border-top: 2px solid var(--primary-dark);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.social-link {
    color: var(--primary);
    font-size: 2.5rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--white);
    transform: translateY(-5px);
}

footer {
    padding: 20px;
    text-align: center;
    background: #111;
    color: #666;
    font-size: 0.9rem;
}

/* --- PREMIUM MEMBERSHIP MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0A0A0A;
    border: 1px solid var(--primary);
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 60px 50px;
    border-radius: 5px;
    transform: translateY(30px);
    transition: transform 0.4s ease;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-icon {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close-icon:hover {
    transform: rotate(90deg) scale(1.1);
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 25px;
    text-transform: uppercase;
    text-align: center;
}

.modal-body {
    color: #EEE;
    line-height: 1.8;
    text-align: center;
}

.membership-price-tag {
    background: var(--primary);
    color: var(--dark);
    display: inline-block;
    padding: 15px 40px;
    font-size: 2rem;
    font-weight: 900;
    margin: 30px 0;
    border-radius: 5px;
    font-family: var(--font-heading);
}

.membership-list {
    list-style: none;
    margin: 40px 0;
    padding: 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.membership-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.15rem;
}

.membership-list li i {
    color: var(--primary);
    margin-top: 5px;
}

.modal-footer {
    margin-top: 50px;
    text-align: center;
}

.modal-footer .btn-primary {
    width: 100%;
    padding: 25px;
    font-size: 1.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.modal-closing-manifesto {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    color: #888;
    font-style: italic;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 50px 25px;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .membership-list li {
        font-size: 1rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--dark);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary);
    color: var(--dark);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

/* Accessibility: Focus States */
a:focus, 
button:focus,
.modal-trigger:focus {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

/* Base Styles for section headers to ensure contrast */
.title-strip h2 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}