/* ===== IMPORTAR FUENTES ELEGANTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600;700&family=Manrope:wght@500;600;700&display=swap');

/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #7b3ff2;
    --accent-color: #a855f7;
    --secondary-rgb: 123, 63, 242;
    --accent-rgb: 168, 85, 247;
    --text-color: #2d2d2d;
    --light-text: #666666;
    --light-bg: #f8f8f8;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(123, 63, 242, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    position: relative;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(14px);
    opacity: 0.35;
}

body::before {
    top: -10rem;
    left: -12rem;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.16) 0%, rgba(var(--secondary-rgb), 0) 72%);
    animation: ambientFloat 18s ease-in-out infinite;
}

body::after {
    right: -10rem;
    bottom: 8rem;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, rgba(var(--accent-rgb), 0) 70%);
    animation: ambientFloat 22s ease-in-out infinite reverse;
}

/* ===== CONTENEDOR ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

/* No mostrar underline en ciertos contextos */
.page-header h1::after,
.nav-menu a::after {
    display: none !important;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
    color: var(--light-text);
    line-height: 1.8;
    text-align: justify;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

a:hover {
    color: var(--accent-color);
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    margin: 10px 10px 10px 0;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(123, 63, 242, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 63, 242, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 63, 242, 0.3);
}

/* ===== NAVEGACIÓN ===== */
.navbar {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(45, 45, 45, 0.92) 55%, rgba(var(--secondary-rgb), 0.85) 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    background-color: rgba(26, 26, 26, 0.95);
    isolation: isolate;
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.06) 45%, transparent 100%);
    transform: translateX(-100%);
    animation: navSweep 10s linear infinite;
    pointer-events: none;
    z-index: -1;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-height: 56px;
}

.logo-escudo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(123, 63, 242, 0.3));
    transition: var(--transition);
}

.logo-escudo:hover {
    filter: drop-shadow(0 4px 8px rgba(123, 63, 242, 0.6));
    transform: scale(1.1);
}

.nav-brand h1 {
    background: linear-gradient(135deg, var(--white), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    min-height: 45px;
    font-size: 1.6rem;
    line-height: 1;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    transition: var(--transition);
    text-transform: uppercase;
}

.nav-brand h1:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    flex-direction: row;
    flex: 1 1 320px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-menu li {
    border-bottom: none;
}

.nav-menu a {
    color: var(--white);
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    display: inline-block;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    width: 100%;
}

/* ===== ICONOS DE REDES SOCIALES ===== */
.social-icons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.social-icons a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    overflow: hidden;
}

.social-icons a::after {
    display: none;
}

.social-icon-image {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}

.social-icons a:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-color: var(--white);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 18px rgba(var(--secondary-rgb), 0.28);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 50%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(123, 63, 242, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 18% 10% auto;
    height: 180px;
    background:
        radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.12) 0 4px, transparent 5px),
        radial-gradient(circle at 65% 30%, rgba(255, 255, 255, 0.14) 0 3px, transparent 4px),
        radial-gradient(circle at 80% 75%, rgba(255, 255, 255, 0.12) 0 5px, transparent 6px);
    opacity: 0.9;
    animation: sparkleDrift 14s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    max-width: 980px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content > * {
    will-change: transform, opacity;
}

.hero h2 {
    color: var(--white);
    font-size: clamp(3.3rem, 6vw, 4.9rem);
    margin-bottom: 1rem;
    text-shadow: 2px 8px 16px rgba(0, 0, 0, 0.3);
}

.hero-title {
    width: 100%;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.05;
    letter-spacing: 0.03em;
    text-wrap: balance;
    background: linear-gradient(135deg, #ffffff 0%, #f4e8ff 48%, #d8b7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12em;
    transition: transform 0.35s ease, filter 0.35s ease;
    cursor: default;
}

.hero-title::after {
    content: "";
    position: absolute;
    inset: 18% -6% auto;
    height: 64%;
    z-index: -1;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28) 0%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0) 74%);
    opacity: 0.7;
    filter: blur(8px);
}

.hero-title:hover,
.hero-title:focus-visible {
    /* Interactividad deshabilitada */
}

.hero-title-main,
.hero-title-sub {
    display: block;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: letter-spacing 0.35s ease, transform 0.35s ease, text-shadow 0.35s ease;
}

.hero-title-main {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.22em;
}

.hero-title-sub {
    font-size: 1em;
}

.hero-title:hover .hero-title-main,
.hero-title:focus-visible .hero-title-main {
    /* Interactividad deshabilitada */
}

.hero-title:hover .hero-title-sub,
.hero-title:focus-visible .hero-title-sub {
    /* Interactividad deshabilitada */
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInUp 0.8s ease-out 0.2s both;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

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

@keyframes heroTitleEntrance {
    0% {
        opacity: 0;
        transform: translateY(-34px) scale(0.96);
        letter-spacing: -0.03em;
        filter: blur(6px);
    }
    60% {
        opacity: 1;
        transform: translateY(4px) scale(1.02);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: 0.02em;
        filter: blur(0);
    }
}

@keyframes heroTitleAura {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.94);
        filter: blur(8px);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
        filter: blur(12px);
    }
}

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

/* ===== MAIN CONTENT ===== */
.main-content {
    min-height: 60vh;
}

.section {
    padding: 80px 20px;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: min(92%, 1120px);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(var(--secondary-rgb), 0.18), transparent);
}

.section h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section p {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--light-text);
}

/* ===== SECCIÓN SOBRE NOSOTROS ===== */
.about-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "large historia" "large direccion";
    gap: 2rem;
    margin-top: 4rem;
}

.about-box {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.about-box * {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.about-box h2,
.about-box h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    position: relative;
    line-height: 1.1;
}

.about-box h2::before,
.about-box h3::before {
    display: none;
}

.about-box p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.8;
    margin-top: 1rem;
    text-align: center;
}

.box-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.box-link:hover {
    text-decoration: none;
}

.about-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Responsive para sección sobre nosotros */
@media (max-width: 768px) {
    .about-us-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "large" "historia" "direccion";
        gap: 1.5rem;
    }
    
    .about-box {
        min-height: 250px;
        padding: 2rem;
    }
    
    .about-box.large-box {
        min-height: 250px;
    }
    
    .about-box.small-box {
        min-height: 250px;
    }
}

/* ===== TARJETAS DESTACADAS ===== */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

/* Asegurar que las cajas de dirección musical sean del mismo tamaño que las del organigrama */
section:nth-of-type(3) .highlights {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.highlight-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

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

.highlight-card .highlight-image {
    width: 100%;
    min-height: 180px;
    border-radius: 12px;
    background-color: rgba(123, 63, 242, 0.08);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid rgba(123, 63, 242, 0.25);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card .highlight-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.18);
}

.highlight-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.highlight-card p {
    margin: 0;
    color: var(--light-text);
    line-height: 1.7;
    text-align: center;
}

.page-content section[style*="text-align: center"] p {
    text-align: center;
}

/* Media queries responsivos para dirección musical */
@media (max-width: 1024px) {
    section:nth-of-type(3) .highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    section:nth-of-type(3) .highlights {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    section:nth-of-type(3) .highlight-card {
        min-height: 0;
    }

    .highlight-card {
        width: min(100%, 260px);
        margin-left: auto;
        margin-right: auto;
        padding: 1.2rem;
        gap: 0.85rem;
    }

    .highlight-card .highlight-image {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        min-height: 180px;
    }

    .highlight-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .highlight-card p {
        font-size: 0.95rem;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    section:nth-of-type(3) .highlights {
        grid-template-columns: repeat(1, 1fr);
    }

    .highlight-card {
        width: min(100%, 260px);
        padding: 1.2rem;
        border-radius: 10px;
    }

    .highlight-card .highlight-image {
        width: 100%;
        min-height: 180px;
        border-radius: 10px;
    }

    .highlight-card h3 {
        font-size: 1.05rem;
    }

    .highlight-card p {
        font-size: 0.9rem;
    }
}

/* ===== SECCIÓN NOTICIAS CARRUSEL ===== */
.news-carousel-section {
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    padding: 80px 20px;
}

.news-carousel-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.news-carousel-wrapper {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.news-carousel {
    display: flex;
    gap: 1.5rem;
    animation: slideRightInfinite 60s linear infinite;
    padding: 20px;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.05), rgba(var(--accent-rgb), 0.05));
    width: fit-content;
}

@keyframes slideRightInfinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-33.33% - 1.5rem));
    }
}

.news-carousel-item {
    flex: 0 0 500px;
    height: auto;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--secondary-color);
}

.news-carousel-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-color);
}

.news-carousel-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    flex-shrink: 0;
}

.news-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}

.news-carousel-item:hover .news-carousel-image img {
    transform: scale(1.1);
}

.news-carousel-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.news-carousel-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.news-carousel-content h3 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.news-carousel-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.6;
}

/* Responsivo */
@media (max-width: 768px) {
    .news-carousel-item {
        flex: 0 0 350px;
        height: auto;
    }

    .news-carousel-image {
        aspect-ratio: 16 / 10;
    }

    .news-carousel {
        gap: 1rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .news-carousel-item {
        flex: 0 0 280px;
        height: auto;
    }

    .news-carousel-image {
        aspect-ratio: 16 / 10;
    }

    .news-carousel-content {
        padding: 15px;
    }

    .news-carousel-content h3 {
        font-size: 1.1rem;
    }
}

/* ===== SECCIÓN MERCHANDISING ===== */
.merchandise-section {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    padding: 80px 20px;
}

.merchandise-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.merchandise-section > .container > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--light-text);
}

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

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
    isolation: isolate;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--secondary-rgb), 0.12), transparent 35%, rgba(var(--accent-rgb), 0.12));
    opacity: 0;
    transition: var(--transition-slow);
    pointer-events: none;
    z-index: 0;
}

.product-card:hover::before {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    letter-spacing: 0.5px;
}

.product-image {
    width: 100%;
    min-height: 260px;
    aspect-ratio: 4 / 5;
    background:
        radial-gradient(circle at top, rgba(var(--secondary-rgb), 0.12), transparent 55%),
        linear-gradient(160deg, #ffffff 0%, #f4f1fb 48%, #eeeeee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid #f0f0f0;
}

.product-image::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 22px;
    border: 1px solid rgba(var(--secondary-rgb), 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18));
    pointer-events: none;
}

.product-placeholder {
    font-size: 4rem;
    opacity: 0.7;
}

.product-card h3 {
    padding: 20px 20px 10px 20px;
    font-size: 1.3rem;
    text-align: center;
}

.product-card p {
    padding: 0 20px 20px 20px;
    font-size: 0.95rem;
    text-align: center;
    color: var(--light-text);
    line-height: 1.6;
}

/* ===== CARGA DE IMÁGENES ===== */
.upload-btn {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    padding: clamp(1.2rem, 2.8vw, 2rem);
    transform-origin: center center;
    transition: transform 0.45s ease, filter 0.45s ease;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.12));
}

.product-card:hover .product-img {
    transform: scale(0.98);
    filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.18));
}

#polo-img {
    object-position: center 38%;
    padding-block: clamp(1rem, 2.2vw, 1.6rem);
    transform: scale(0.88);
}

#sudadera-img {
    object-position: center 28%;
    padding-inline: clamp(1rem, 2.3vw, 1.6rem);
    transform: scale(0.84);
}

@media (min-width: 769px) {
    .product-image {
        min-height: 300px;
    }

    #polo-img {
        object-position: center 36%;
    }

    #sudadera-img {
        object-position: center 24%;
    }
}

/* ===== IMÁGENES EN LÍNEA DE TIEMPO ===== */
.timeline-image-container {
    margin-bottom: 1rem;
    position: relative;
}

.timeline-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.timeline-image-container .upload-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
}

/* ===== SECCIÓN CTA ===== */
.cta-section {
    background:
        radial-gradient(circle at top left, rgba(var(--secondary-rgb), 0.12), transparent 32%),
        radial-gradient(circle at bottom right, rgba(var(--accent-rgb), 0.1), transparent 28%),
        linear-gradient(135deg, #f8f8f8 0%, #efefef 100%);
    padding: 80px 20px;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
    border-bottom: 4px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: auto -10% -80px;
    height: 180px;
    background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.16) 0%, rgba(var(--secondary-rgb), 0) 68%);
    animation: ambientFloat 14s ease-in-out infinite;
    pointer-events: none;
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 650px;
    margin: 0 auto 3rem;
    color: var(--light-text);
    text-align: center;
}

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

/* ===== TABLA DE NOTICIAS ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.news-card {
    background-color: var(--white);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-slow);
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.news-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.news-card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 1.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--light-bg), #efefef);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-date {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.news-card-title {
    color: var(--white);
    margin: 0.5rem 0 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
}

.news-card-body {
    padding: 1.8rem;
}

/* ===== FORMULARIO ===== */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
}

.form-container:hover {
    border-color: var(--secondary-color);
}

.form-group {
    margin-bottom: 1.8rem;
}

label {
    display: block;
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8f8f8;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(123, 63, 242, 0.1);
}

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

.form-group.required label::after {
    content: " *";
    color: var(--secondary-color);
    font-weight: 700;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
    color: var(--white);
    text-align: center;
    padding: 2.5rem;
    margin-top: 4rem;
    border-top: 4px solid var(--secondary-color);
}

.footer p {
    margin: 0.8rem 0;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.9;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-policies {
    font-size: 0.9rem;
    opacity: 0.85;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-policies a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-policies a:hover {
    opacity: 1;
    text-decoration: underline;
    color: var(--accent-color);
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-policies {
        font-size: 0.85rem;
    }
}

/* ===== MAPA ===== */
.map-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
    padding: 0 !important;
}

.map-container iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    box-sizing: border-box !important;
}

/* Estilos para iframe en secciones de página */
.page-content section iframe {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    box-sizing: border-box !important;
    border-radius: 12px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.page-content section iframe:not(.map-container iframe) {
    margin: 0 auto;
}

/* Fuerza total en viewport para evitar overflow */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

/* ===== PÁGINA DE HISTORIA / CONTENIDO ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 50%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(123, 63, 242, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: float 30s linear infinite;
}

.page-header h1 {
    color: var(--white);
    font-size: 3rem;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 2px 8px 16px rgba(0, 0, 0, 0.3);
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
    margin-top: 0.5rem;
    text-align: center;
}

.page-content {
    padding: 80px 20px;
}

.page-content h2 {
    margin-top: 3rem;
}

.page-content section {
    margin: 4rem 0;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    margin-bottom: 2.5rem;
    padding-left: 50px;
    position: relative;
    animation: fadeInLeft 0.8s ease-out;
}

/* ===== NUEVA TIMELINE INTERACTIVA ===== */

.timeline-section {
    position: relative;
    padding: 4rem 0;
}

.timeline-progress {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--light-bg) 0%, var(--light-bg) 100%);
    border-radius: 2px;
    margin: 2rem 0 3rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
    animation: progressFill 3s ease-in-out forwards;
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.timeline-container {
    position: relative;
    padding: 3rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color), var(--primary-color));
    transform: translateX(-50%);
}

.timeline-item-modern {
    margin-bottom: 4rem;
    display: flex;
    position: relative;
    opacity: 0;
    animation: fadeInTimeline 0.8s ease-out forwards;
}

.timeline-item-modern:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item-modern:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item-modern:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item-modern:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item-modern:nth-child(5) {
    animation-delay: 0.5s;
}

.timeline-item-modern:nth-child(6) {
    animation-delay: 0.6s;
}

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

.timeline-item-modern.left-align {
    flex-direction: row;
    justify-content: flex-end;
}

.timeline-item-modern.right-align {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.timeline-badge {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.timeline-year {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--secondary-color), 0 0 20px rgba(123, 63, 242, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-dot-active {
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 3px var(--secondary-color), 0 0 30px rgba(123, 63, 242, 0.8);
    animation: pulseActive 2s ease-in-out infinite;
}

@keyframes pulseActive {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--secondary-color), 0 0 30px rgba(123, 63, 242, 0.8);
    }
    50% {
        box-shadow: 0 0 0 3px var(--secondary-color), 0 0 50px rgba(123, 63, 242, 1);
    }
}

.timeline-content {
    width: 45%;
    padding: 0 2rem;
}

.timeline-card {
    background: var(--white);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--secondary-color);
    transition: var(--transition-slow);
    cursor: pointer;
    max-height: 280px;
    position: relative;
}

.timeline-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-left-color: var(--accent-color);
}

.timeline-card.expanded {
    max-height: 800px;
}

.timeline-card-highlight {
    background: linear-gradient(135deg, rgba(123, 63, 242, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-left-color: var(--accent-color);
}

.timeline-card-highlight:hover {
    background: linear-gradient(135deg, rgba(123, 63, 242, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
}

.card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--light-bg);
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.milestone-badge {
    display: inline-flex;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.milestone-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.milestone-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.milestone-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.milestone-purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.milestone-present {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.timeline-image-new {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 1.5rem;
    display: block;
    max-height: 500px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.card-body.visible {
    display: block;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.card-body .summary {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
}

.card-body .description {
    font-size: 0.9rem;
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.highlights-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.highlights-list li {
    background: var(--light-bg);
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-color);
    border-left: 3px solid var(--secondary-color);
}

.expand-toggle {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--light-bg);
    background: var(--light-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.expand-toggle:hover {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.08), rgba(202, 138, 4, 0.08));
    color: var(--accent-color);
    transform: translateY(-2px);
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
}

.timeline-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--secondary-color);
    transition: var(--transition);
}

.timeline-item:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--secondary-color), 0 0 15px rgba(123, 63, 242, 0.5);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 24px;
    width: 2px;
    height: calc(100% + 10px);
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.timeline-item h3:hover {
    color: var(--secondary-color);
}

/* ===== RESPONSIVE ===== */

/* TABLETS (hasta 1024px) */
@media (max-width: 1024px) {
    .navbar .container {
        gap: 0.75rem 1.25rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    .hero h2 {
        font-size: 2.9rem;
    }

    .section h2,
    .cta-section h2 {
        font-size: 2.2rem;
    }
}

/* TABLETS PEQUEÑAS Y MÓVILES (hasta 768px) */
@media (max-width: 768px) {
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .navbar .container {
        position: relative;
        overflow-x: hidden !important;
    }

    /* Mostrar hamburguesa */
    .menu-toggle {
        display: flex;
        margin-left: auto;
        order: 4;
    }

    /* Ocultar menú por defecto */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        z-index: 999;
        box-shadow: var(--shadow-lg);
        order: 5;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }

    /* Mostrar menú cuando está activo */
    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.5rem 0;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 12px 0;
        display: block;
        font-size: 1.05rem;
    }

    .social-icons {
        order: 3;
        margin-left: auto;
    }

    /* Tipografía responsive */
    h1 {
        font-size: 2.2rem;
    }

    .hero {
        padding: 80px 20px;
    }

    .hero h2 {
        font-size: 2.45rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 20px;
    }

    .product-image {
        min-height: 230px;
    }

    #polo-img {
        object-position: center 34%;
        transform: scale(1);
    }

    #sudadera-img {
        object-position: center 24%;
        transform: scale(0.96);
    }

    .section h2,
    .cta-section h2,
    .page-header h1 {
        font-size: 1.8rem;
    }

    .section p,
    .cta-section p {
        font-size: 1rem;
    }

    .highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }

    .highlight-card {
        padding: 1.8rem;
        max-width: 100%;
    }

    .highlight-card h3 {
        font-size: 1.4rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .page-header {
        padding: 60px 20px;
    }

    .page-content {
        padding: 40px 15px;
        width: 100%;
        overflow-x: hidden;
    }

    .page-content section {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }

    .timeline-item {
        padding-left: 40px;
    }

    /* Responsive Timeline */
    .timeline-container::before {
        display: none;
    }

    .timeline-item-modern {
        flex-direction: column;
        justify-content: flex-start;
    }

    .timeline-item-modern.left-align,
    .timeline-item-modern.right-align {
        flex-direction: column;
        justify-content: flex-start;
    }

    .timeline-badge {
        position: relative;
        left: auto;
        transform: none;
        flex-direction: row;
        margin-bottom: 1rem;
        gap: 1rem;
    }

    .timeline-content {
        width: 100%;
        padding: 0;
    }

    .timeline-card {
        max-height: none;
        max-width: 100%;
    }

    .card-header {
        padding: 1rem;
    }

    .card-header h3 {
        font-size: 1.1rem;
    }

    .timeline-image-new {
        height: 150px;
    }

    .container {
        padding: 0 15px !important;
        width: 100%;
        overflow-x: hidden;
    }

    .map-container {
        max-width: 100%;
        width: 100%;
        padding: 0 !important;
        margin: 0 auto;
    }

    .map-container iframe {
        height: 350px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-content section iframe {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
    }
}

/* MÓVILES PEQUEÑOS (hasta 480px) */
@media (max-width: 480px) {
    /* Viewport protection */
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .container {
        padding: 0 15px !important;
        width: 100% !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .navbar .container {
        gap: 0.75rem;
        overflow-x: hidden !important;
    }

    .nav-brand {
        gap: 8px;
        max-width: calc(100% - 110px);
    }

    .logo-escudo {
        width: 44px;
        height: 44px;
    }

    .nav-brand h1 {
        min-height: 44px;
        font-size: 1.2rem;
    }

    .social-icons {
        gap: 0.45rem;
    }

    .social-icons a {
        width: 26px;
        height: 26px;
    }

    .social-icon-image {
        width: 12px;
        height: 12px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 1.9rem;
    }

    .hero-title {
        max-width: 15ch;
        line-height: 1.1;
    }

    .hero-title-main {
        letter-spacing: 0.16em;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 40px 15px;
        overflow-x: hidden;
    }

    .product-image {
        min-height: 210px;
        aspect-ratio: 1 / 1.18;
    }

    .product-card {
        border-radius: 18px;
        max-width: 100%;
    }

    .product-card h3,
    .product-card p {
        padding-left: 16px;
        padding-right: 16px;
    }

    #polo-img,
    #sudadera-img {
        padding: 0.8rem;
    }

    .section h2 {
        font-size: 1.6rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .highlight-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .highlight-card h3 {
        font-size: 1.2rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .page-header {
        padding: 40px 15px;
    }

    .page-content {
        padding: 30px 0;
        width: 100%;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .page-content section {
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
        padding: 0 15px !important;
    }

    .container {
        padding: 0 15px !important;
        width: 100%;
        overflow-x: hidden;
        max-width: 100%;
    }

    .vertical-timeline {
        padding: 1.5rem 0.5rem 2.5rem;
        max-width: 100%;
        width: 100%;
    }

    .timeline-line {
        left: 20px;
        width: 4px;
    }

    .timeline-event {
        margin-bottom: 3.5rem;
    }

    .timeline-dot {
        left: 20px;
        width: 35px;
        height: 35px;
    }

    .event-card {
        width: calc(100% - 64px);
        margin-left: 42px !important;
        margin-right: 0 !important;
        padding: 1.25rem 1rem;
        margin-top: 0 !important;
        max-width: 100%;
    }

    .event-card h3 {
        font-size: 1.1rem;
    }

    .event-image {
        height: 180px;
        max-width: 100%;
    }

    .event-card p {
        font-size: 0.9rem;
    }

    .card-year {
        font-size: 0.75rem;
    }

    .event-category {
        font-size: 0.65rem;
    }

    /* Estilos específicos para iframe del mapa en móvil */
    .page-content section {
        padding: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .page-content section > div:not(:has(iframe)) {
        padding: 0 15px;
    }

    .page-content section iframe {
        width: 100% !important;
        height: 280px !important;
        box-sizing: border-box !important;
        margin-top: 2rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        display: block !important;
        border: none !important;
    }

    .map-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border-radius: 12px;
    }

    .map-container iframe {
        height: 280px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(123, 63, 242, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(123, 63, 242, 0.6);
    }
}

@keyframes shimmer {
    0%, 100% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Scroll animations */
.btn {
    animation: slideUp 0.6s ease-out;
}

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

@keyframes ambientFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(18px, 22px, 0) scale(1.06);
    }
}

@keyframes navSweep {
    0% {
        transform: translateX(-120%);
    }
    45%, 100% {
        transform: translateX(120%);
    }
}

@keyframes sparkleDrift {
    0% {
        transform: translate3d(-2%, 0, 0);
        opacity: 0.35;
    }
    50% {
        transform: translate3d(2%, 8%, 0);
        opacity: 0.85;
    }
    100% {
        transform: translate3d(6%, -4%, 0);
        opacity: 0.4;
    }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.75s ease,
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Efecto smooth scroll en links */
a {
    position: relative;
}

/* Efectos en inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Mejores efectos en checkboxes */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--secondary-color);
}

/* Scroll bar custom */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--secondary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===== LÍNEA DE TIEMPO VERTICAL CON RAYO ===== */
.vertical-timeline {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

/* Línea central */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(123, 63, 242, 0.9) 0%, rgba(168, 85, 247, 0.82) 45%, rgba(123, 63, 242, 0.92) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.75),
        0 0 18px rgba(123, 63, 242, 0.28);
    transform: translateX(-50%);
    z-index: 1;
}

/* Eventos de la línea de tiempo */
.timeline-event {
    margin-bottom: 5rem;
    position: relative;
    display: flex;
    align-items: flex-start;
    z-index: 2;
}

.timeline-event.left {
    flex-direction: row-reverse;
}

.timeline-event.left .event-card {
    margin-right: 4rem;
}

.timeline-event.right .event-card {
    margin-left: 4rem;
}

/* Punto en la línea */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 1.5rem;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 4px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 0 2px var(--white), 0 4px 15px rgba(123, 63, 242, 0.3);
}

.dot-inner {
    width: 12px;
    height: 12px;
    background: var(--secondary-color);
    border-radius: 50%;
    transition: var(--transition);
}

.timeline-dot.active {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--white), 0 0 30px rgba(123, 63, 242, 0.6);
}

.timeline-dot.active .dot-inner {
    background: var(--white);
    width: 18px;
    height: 18px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.timeline-dot:hover {
    transform: translateX(-50%) scale(1.2);
}

/* Tarjeta de evento */
.event-card {
    width: min(500px, calc(50% - 4.75rem));
    margin-top: 1.35rem;
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--secondary-color);
    transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.35s ease, border-left-color 0.35s ease;
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent-color);
}

.event-card.animate-in {
    animation: timelineCardReveal 0.45s ease;
}

@keyframes timelineCardReveal {
    from {
        opacity: 0.72;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-year {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
}

.event-card h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.event-category {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.event-category.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.event-category.gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.event-category.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.event-category.purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.event-category.indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.event-category.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.event-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1.5rem 0;
    transition: var(--transition);
}

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

.event-card p {
    margin: 1rem 0;
    color: var(--light-text);
    line-height: 1.7;
    font-size: 0.95rem;
}

.event-card p:last-child {
    margin-bottom: 0;
}

/* Responsive Timeline */
@media (max-width: 1024px) {
    .vertical-timeline {
        max-width: 1080px;
    }

    .event-card {
        width: min(440px, calc(50% - 4rem));
    }
    
    .timeline-event.left .event-card {
        margin-right: 3.5rem;
    }
    
    .timeline-event.right .event-card {
        margin-left: 3.5rem;
    }
}

@media (max-width: 768px) {
    .vertical-timeline {
        padding: 2rem 0.75rem 3rem;
        max-width: 100%;
        width: 100%;
    }

    .timeline-line {
        left: 30px;
        width: 5px;
    }

    .timeline-event {
        margin-bottom: 4rem;
        flex-direction: column;
    }

    .timeline-event.left,
    .timeline-event.right {
        flex-direction: column;
    }

    .timeline-dot {
        left: 30px;
    }

    .event-card {
        width: calc(100% - 84px);
        margin-left: 54px !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        padding: 1.5rem 1.35rem;
        max-width: 100%;
    }

    .event-image {
        height: 200px;
        max-width: 100%;
    }

    .event-card h3 {
        font-size: 1.3rem;
    }

    .card-year {
        font-size: 0.8rem;
    }

    .page-content {
        padding: 40px 15px;
        width: 100%;
        overflow-x: hidden;
    }

    .map-container {
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
    }

    .map-container iframe {
        height: 350px !important;
    }

    .container {
        padding: 0 15px !important;
        width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .vertical-timeline {
        padding: 1.5rem 0.5rem 2.5rem;
        max-width: 100%;
        width: 100%;
    }

    .timeline-line {
        left: 20px;
        width: 4px;
    }

    .timeline-event {
        margin-bottom: 3.5rem;
    }

    .timeline-dot {
        left: 20px;
        width: 35px;
        height: 35px;
    }

    .event-card {
        width: calc(100% - 64px);
        margin-left: 42px !important;
        margin-right: 0 !important;
        padding: 1.25rem 1rem;
        margin-top: 0 !important;
        max-width: 100%;
    }

    .event-card h3 {
        font-size: 1.1rem;
    }

    .event-image {
        height: 180px;
        max-width: 100%;
    }

    .event-card p {
        font-size: 0.9rem;
    }

    .card-year {
        font-size: 0.75rem;
    }

    .event-category {
        font-size: 0.65rem;
    }

    .container {
        padding: 0 15px !important;
        width: 100%;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }

    .page-content {
        padding: 40px 15px;
        width: 100%;
        overflow-x: hidden;
    }

    .map-container {
        max-width: 100%;
        width: 100%;
        padding: 0 5px;
    }

    .map-container iframe {
        height: 300px !important;
    }
}

.history-gallery-section {
    margin-top: 4rem;
}

.gallery-launcher {
    position: relative;
    width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: #111;
    box-shadow: var(--shadow-lg);
}

.gallery-launcher-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-launcher-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.18), rgba(15, 15, 15, 0.68));
}

.gallery-launcher-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: var(--white);
}

.gallery-launcher-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #f4e8ff 48%, #d8b7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 8px 16px rgba(0, 0, 0, 0.22);
}

.gallery-launcher-subtitle {
    max-width: 580px;
    font-size: 1rem;
    line-height: 1.6;
}

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

.gallery-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1200;
}

.gallery-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 12, 0.76);
    backdrop-filter: blur(6px);
}

.gallery-modal-dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 4rem);
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.3);
}

.gallery-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: var(--primary-color);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-right: 3.2rem;
}

.gallery-modal-header h2 {
    margin: 0;
}

.gallery-modal-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
}

.gallery-slider {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    gap: 1rem;
    align-items: center;
}

.gallery-nav {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(123, 63, 242, 0.1);
    color: var(--secondary-color);
    font-size: 2rem;
    cursor: pointer;
}

.gallery-stage {
    margin: 0;
}

.gallery-stage-image {
    display: block;
    width: 100%;
    max-height: 64vh;
    object-fit: contain;
    border-radius: 14px;
    background: #f5f5f5;
}

.gallery-stage-caption {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 0 0;
    color: var(--light-text);
}

.gallery-stage-caption strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.gallery-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
}

.gallery-thumb.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.12);
}

.gallery-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .gallery-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .gallery-launcher {
        min-height: 280px;
    }

    .gallery-launcher-image {
        min-height: 280px;
    }

    .gallery-modal {
        padding: 1rem;
    }

    .gallery-modal-dialog {
        padding: 1rem;
    }

    .gallery-modal-header {
        flex-direction: column;
        align-items: stretch;
        padding-right: 2.8rem;
    }

    .gallery-modal-download {
        width: 100%;
    }

    .gallery-slider {
        grid-template-columns: 1fr;
    }

    .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    .gallery-nav.prev {
        left: 1.25rem;
    }

    .gallery-nav.next {
        right: 1.25rem;
    }

    .gallery-stage-image {
        max-height: 52vh;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Efecto elegante en selección de texto */
::selection {
    background-color: var(--secondary-color);
    color: var(--white);
}

::-moz-selection {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Efectos en focus visible para accesibilidad */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
