:root {
    --primary: #f46a1f;
    /* Orange-red */
    --secondary: rgb(79, 50, 78);
    /* Dark Purple */
    --accent: rgb(255, 175, 26);
    /* Yellow-orange */

    --text-main: #111111;
    --text-light: #555555;
    --bg-white: #ffffff;
    --bg-light: #fbffff;
    --bg-grey: #f5f5f5;
    /* Off-white / light cyan */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-max: 1200px;
    --section-spacing: 120px;
}

@font-face {
    font-family: IconosElEspanol;
    font-style: normal;
    font-weight: 400;
    src: local("IconosElEspanol"), url("https://s1.elespanol.com/upload/deportes/sansilvestre25/fonts/IconosElEspanol.woff?v=1") format("woff"), url("https://s1.elespanol.com/upload/deportes/sansilvestre25/fonts/IconosElEspanol.ttf?v=1") format("ttf"), url("https://s1.elespanol.com/upload/deportes/sansilvestre25/fonts/IconosElEspanol.svg?v=1") format("svg")
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 115px;
    /* Compensa la altura del header (48px) + submenu (~55px) */
}

body {
    background-color: var(--bg-white);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

p a {
    color: var(--primary);
}

/* Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.text-orange {
    color: var(--primary);
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
        /* Reduce padding on mobile */
    }

    .section-title {
        font-size: 2rem;
        /* Scale down title */
    }
}

.text-blue {
    color: var(--secondary);
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    /* More standard feel */
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #E64415;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #003399;
}

.flourish-credit {
    display: none;
}

/* Header */
header {
    transform-origin: 100vh;
    animation: header-blur auto linear;
    animation-timeline: --page-scroll;
    width: 100%;
    height: 48px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    background-color: #fff;
    box-shadow: 0 0 20px #00000020;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header__logo-ee {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo-ee img {
    width: auto;
    height: 30px;
}

.header__btn {
    width: auto;
    max-width: 200px;
    height: auto;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 13px;
    padding: 6px 10px;
    margin: 8px 10px;
    background-color: transparent;
    border: solid 1.6px #000;
    border-radius: 6px;
    color: #000;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full viewport height */
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-dark);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-content::after {
    content: "";
    width: 100vw;
    height: 300px;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 1) 65%);
    margin-left: calc(((100vw - 100%) / 2) * -1);
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    /* White overlay to keep text readable */
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    /* Slightly larger max size */
    margin-bottom: 24px;
    line-height: 0.9;
    word-wrap: break-word;
    /* Ensure long words break if needed */
    hyphens: auto;
}

.hero-meta {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    /* Responsive meta size */
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 30px;
    /* Reduced to make space for arrow */
}

/* Scroll Arrow */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    color: var(--secondary);
    font-weight: 600;
}

.arrow-down {
    width: 15px;
    height: 15px;
    border-right: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
    transform: rotate(45deg);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(10px);
    }

    60% {
        transform: translateY(5px);
    }
}

/* Sections */
section {
    padding: var(--section-spacing) 0;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-top: 60px;
    /* Added top spacing */
    margin-bottom: 60px;
    text-align: center;
    color: var(--text-main);
}

.section-title span {
    color: var(--primary);
}

/* Map Dashboard */
#map-dashboard {
    position: relative;
    width: 100%;
    height: 800px;
    /* Taller for dashboard feel */
    background: var(--bg-light);
    /* Changed to light gray */
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 60px;
}

/* ... */
#map {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    /* Changed to light gray */
    z-index: 1;
}

/* Drop Cap & Intro Text */
.intro-content p {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 20px;
}

p.drop-cap::first-letter {
    display: block;
    /* A veces ayuda con la alineación */
    float: left;
    /* Permite que el texto fluya alrededor */
    font-size: 4em;
    /* Hace la letra 4 veces más grande que el texto base */
    line-height: 1;
    /* Ajusta la altura de la línea */
    margin-right: 0.1em;
    /* Añade un pequeño espacio a la derecha */
    color: #333;
    /* Cambia el color */
    font-weight: bold;
    /* Opcional, para hacerla más visible */
}

/* Map Navigation Arrows */
.map-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    /* Above map and dashboard */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.map-nav-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.map-nav-btn.prev {
    left: 20px;
}

.map-nav-btn.next {
    right: 20px;
}

/* Reset Map Button */
#map-reset {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#map-reset:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

#map {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: 1;
}

.leaflet-control-attribution {
    display: none;
}

/* Icons map */
.custom-point-icon .simbol-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

.custom-point-icon .simbol-icon[data-type="info"] {
    background: var(--accent);
    border: 1px solid #fff;
    width: 20px;
    height: 20px;
    font-weight: 300;
    text-transform: math-auto;
}

.custom-point-icon .simbol-icon[data-type="analysis"] {
    background: var(--primary)
}

/* Floating Dashboard Card */
.dashboard-card {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .dashboard-card {
        grid-template-columns: 1fr;
        bottom: 20px;
        width: 95%;
        padding: 20px;
    }
}

.dashboard-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.dashboard-header span {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.stats-grid {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
}

/* Altimetry in Dashboard */
.dashboard-altimetry {
    width: 100%;
    height: 150px;
    position: relative;
}

.dashboard-altimetry svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Custom Icons */
.custom-div-icon {
    background: transparent;
    border: none;
}

.icon-marker {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.3);
    position: relative;
}

.icon-marker::after {
    content: '';
    position: absolute;
    top: -14px;
    left: -14px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Info Cards (Route, Advice) */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--seconday);
}

.info-card h4 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.info-card strong {
    color: var(--primary);
}

/* Schedule Table */
.schedule-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Move shadow to wrapper */
}

.schedule-table {
    width: 100%;
    min-width: 600px;
    /* Force minimum width to trigger scroll */
    border-collapse: collapse;
    background: #fff;
    /* rounded corners handled by wrapper overflow */
}

.schedule-table th,
.schedule-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.schedule-table th {
    background: var(--secondary);
    color: #fff;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.schedule-table tr:hover td {
    background: #f9f9f9;
}

/* Footer */
.footer {
    width: 100%;
    height: auto;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin: 0 0 5vh
}

@media all and (max-width:600px) {
    .footer {
        margin: 0 0 10vh
    }
}

.footer__title {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    text-decoration: none;
    font-size: 20px;
    color: #000;
    margin: 0 0 10px;
    max-width: 450px
}

.footer__text {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    text-decoration: none;
    font-size: 15px;
    color: #000
}

.footer__text a,
.footer__text span {
    color: #000;
    text-transform: uppercase;
    font-weight: 700
}

.footer__container {
    width: 90%;
    height: auto;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    margin-top: 40px;
}

@media all and (max-width:450px) {
    .footer__container {
        width: 100%
    }
}


.footer__credits {
    width: 100%;
    height: auto;
    margin: 50px 10px;
    z-index: 11;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    align-items: center;
    align-content: center
}

.footer__credits .footer__text {
    margin: 0 0 5px
}

@media all and (max-width:450px) {
    .footer__credits {
        display: flex;
        flex-flow: column nowrap;
        justify-content: center;
        align-items: center;
        align-content: center;
        margin: 20px 10px
    }
}

.footer__column {
    width: 50%;
    height: auto
}

@media all and (max-width:450px) {
    .footer__column {
        width: 100%
    }
}

.footer__column.first {
    text-align: right;
    padding: 0 20px 0 0;
    display: flex;
    flex-flow: column;
    align-items: flex-end
}

@media all and (max-width:450px) {
    .footer__column.first {
        text-align: center;
        padding: 10px;
        align-items: center
    }
}

.footer__column.second {
    text-align: left;
    padding: 0 0 0 20px;
    border-left: solid #a3a3a3 1px;
    display: flex;
    flex-flow: column;
    align-items: flex-start
}

@media all and (max-width:450px) {
    .footer__column.second {
        text-align: center;
        padding: 10px;
        border: none;
        align-items: center
    }
}

.footer__logo-ee img {
    width: 200px;
    height: auto;
    margin: 15px 10px
}

.footer__rrss {
    width: 100%;
    height: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    align-content: center
}

.footer__rrss .rrss__list {
    padding: 15px 10px;
    display: block
}

.footer__rrss .rrss__icon {
    font-size: 24px;
    font-family: IconosElEspanol;
    color: #000;
    text-decoration: none
}

.footer__rrss .rrss__icon.twitter::before {
    content: "\e901"
}

.footer__rrss .rrss__icon.facebook::before {
    content: "\f015";
    font-size: 30px
}

.footer__rrss .rrss__icon.youtube::before {
    content: "\f018";
    font-size: 30px
}

.footer__rrss .rrss__icon.instagram::before {
    content: "\f019";
    font-size: 35px
}

.footer__rrss .rrss__icon.tiktok::before {
    content: "\e900"
}

.footer__copyright {
    width: 100%;
    height: auto;
    color: #a3a3a3;
    margin: 15px 10px;
    text-align: center
}

.footer__copyright acronym {
    margin: 0 0 0 5px
}


/* Info Icon & Tooltip */
.info-icon-wrapper {
    display: inline-block;
    margin-left: 4px;
    vertical-align: top;
    cursor: pointer;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #444;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    font-style: italic;
    font-family: serif;
    line-height: 1;
}

/* Custom Modal/Tooltip for mobile-friendliness */
#info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.info-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-family: var(--font-body);
}

.info-modal-content h4 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1rem;
}

.info-modal-content p {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
}

/* Leaflet Overrides */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content h3 {
    color: var(--secondary);
    margin-bottom: 5px;
}

/* Custom Popups */
.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

/* Analysis Popup (Audio) */
.popup-analysis {
    padding: 20px;
    background: #fff;
}

.popup-analysis header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.popup-analysis .km-badge {
    background: var(--primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
}

.popup-analysis h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.popup-analysis p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.4;
}

.audio-player {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
    gap: 10px;
}

.play-btn {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.play-btn:hover {
    transform: scale(1.1);
}

.audio-info {
    flex: 1;
}

.audio-title {
    font-size: 0.75rem;
    font-weight: 700;
    display: block;
    color: var(--secondary);
}

.audio-bar {
    width: 100%;
    height: 4px;
    background: #ccc;
    margin-top: 4px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.audio-progress {
    width: 0%;
    /* JS will update */
    height: 100%;
    background: var(--primary);
}


/* Info Popup (Photo) */
.popup-info header {
    height: 150px;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.popup-info-content {
    padding: 15px;
}

.popup-info h4 {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.popup-info-content.comment p {
    font-size: 1.05rem;
    color: #666;
    font-style: italic;
    padding-left: 20px
}

.popup-info-content.comment p::before {
    content: '"';
    position: absolute;
    font-size: 5em;
    opacity: 0.5;
    margin-top: -35px;
    margin-left: -35px;
    font-family: 'Arial';
    color: var(--primary)
}


/* Palmarés & Records Section */
#palmares {
    background: #fff;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

@media (min-width: 900px) {
    .records-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.record-card {
    background: #f9f9f9;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.record-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.record-card h4 {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 40px;
    /* Align heights */
}

.record-card .record-time {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}

.record-card .record-athlete {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
}

.record-card .record-year {
    color: #999;
    font-size: 0.9rem;
}

.palmares-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-weight: 700;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1rem;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.palmares-table-container {
    display: none;
    animation: fadeIn 0.5s ease;
}

.palmares-table-container.active {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.palmares-table {
    width: 100%;
    border-collapse: collapse;
    max-width: 900px;
    min-width: 600px;
    /* Ensure specific width for scroll */
    margin: 0 auto;
}

.palmares-table th {
    background: #111;
    color: #fff;
    padding: 15px;
    text-align: left;
}

.palmares-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.palmares-table tr:nth-child(even) {
    background: #fafafa;
}

.palmares-table .record-mark {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 5px;
}

.palmares-table tr.hidden-row {
    display: none;
}

.load-more-btn {
    display: block;
    margin: 20px auto 0;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.load-more-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Hero Metadata Block */
.hero-signature-block {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    margin-top: 40px;
    width: 100%;
    max-width: none;
    /* Occupy full width */
    z-index: 90;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    background-color: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

.avatar-icon {
    width: 45px;
    height: 45px;
    object-fit: cover;
    overflow: hidden;
    border-radius: 50%;
}

.author-text {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: uppercase;
    font-family: var(--font-heading);
}

.update-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.meta-divider {
    width: 1px;
    height: 40px;
    background-color: #ddd;
}

.article-tags {
    display: flex;
    gap: 10px;
}

.tag {
    background-color: #f0f0f0;
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-body);
}

@media (max-width: 600px) {
    .hero-signature-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .meta-divider {
        width: 100%;
        height: 1px;
    }
}

/* Audio Progress Bar */
.audio-progress-container {
    width: 100%;
    height: 4px;
    background: #d8d3d3;
    margin-top: 4px;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    /* Interactive */
}

.audio-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear;
}

.audio-info {
    flex-grow: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/*Recomendaciones*/
section#recomendaciones {
    margin-bottom: 50px;
    padding-bottom: 50px;
}

/*Horarios*/
section#horarios {
    margin-bottom: 50px;
}

/*Palmarés*/
section#palmares {
    margin-bottom: 50px;
}

#tab-internacional,
#tab-popular {
    margin-bottom: 50px;
}

/* Consejos */
section#consejos {
    padding-bottom: 50px;
}

/* Camiseta */
section#camiseta {
    padding: 50px 20px;
    background-color: var(--bg-white);
}

.camiseta-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.camiseta-text h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
    line-height: 1.1;
    text-align: left;
}

.camiseta-text .subtitle {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 20px;
}

.camiseta-text p {
    margin-bottom: 1.5rem;
    line-height: 2rem;
    font-size: 1rem;
    color: var(--text-main);
}

.camiseta-main-img {
    width: 100%;
    border-radius: 12px;
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);*/
}

.designs-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--secondary);
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.design-card {
    background: #f3ebd6;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease;
}

.design-card:hover {
    transform: translateY(-5px);
}

.design-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
}

.design-card span {
    display: block;
    font-weight: 700;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .camiseta-showcase {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .designs-grid {
        grid-template-columns: 1fr;
    }
}

/* Fullscreen Visual Break */
.fullscreen-break {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    border-bottom: none;
    /* Override default section border */
}


/* History Section Styles */
section#historia {
    padding-bottom: 50px;
}

.historia-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.historia-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.historia-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.historia-image .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.85rem;
    font-style: italic;
}

.historia-text h3,
.timeline-block h3,
.legends-block h3,
.atmosphere-text h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.historia-text p {
    line-height: 2rem;
    margin-bottom: 1.5rem;
}

.historia-text blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    font-style: italic;
    color: #555;
    margin-top: 20px;
    font-size: 1.1rem;
}

.atmosphere-text {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
    text-align: center;
}

/* Timeline */
.timeline-block {
    margin-bottom: 60px;
    text-align: center;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.timeline-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border-top: 4px solid #ddd;
}

.timeline-card.highlight {
    border-top-color: var(--primary);
    background: #fff5f0;
}

.timeline-card:hover {
    transform: translateY(-5px);
}

.timeline-card .year {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ddd;
    line-height: 1;
    margin-bottom: 10px;
}

.timeline-card.highlight .year {
    color: rgba(244, 106, 31, 0.3);
}

.timeline-card .milestone-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

/* Legends */
.legends-block {
    margin-bottom: 60px;
    text-align: center;
}

.legends-intro {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: var(--text-light);
}

.legends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.legend-card {
    background: var(--bg-dark);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    overflow: hidden;
}

.legend-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.legend-card h4 {
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.legend-card .country {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.legend-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
    margin-bottom: 0;
}

/* Statistics Module */
.stats-module {
    margin-bottom: 60px;
    text-align: center;
}

.stats-module h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.dashboard-subtitle {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.stats-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.history-stats-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.history-stats-grid .stat-card {
    width: 100%;
    min-height: 450px;
}

@media (max-width: 968px) {
    .history-stats-grid {
        flex-direction: column;
        gap: 15px;
    }
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.stat-card h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

.stat-card canvas {
    max-height: 300px;
}

/* Nationality Bars */
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.stat-bar-group {
    text-align: left;
}

.stat-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.bar-container {
    display: flex;
    height: 30px;
    background: #f0f0f0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bar-foreign {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bar-spanish {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.bar-legend {
    display: flex;
    justify-content: space-around;
    font-size: 0.85rem;
    color: var(--text-light);
}

.bar-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.bar-legend .dot.foreign {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bar-legend .dot.spanish {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Gender Donut Chart */
.gender-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.donut-chart {
    position: relative;
    width: 200px;
    height: 200px;
}

.donut-chart svg {
    transform: rotate(0deg);
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center .big {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-dark);
}

.donut-center .small {
    font-size: 0.85rem;
    color: var(--text-light);
}

.gender-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item .label {
    flex: 1;
    font-weight: 600;
    color: var(--text-dark);
}

.legend-item .value {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.stat-note {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

/* Growth Chart */
.growth-chart {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.growth-chart h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

#participantsChart {
    max-height: 400px;
    width: 100% !important;
    height: auto !important;
}

@media (max-width: 768px) {
    #participantsChart {
        max-height: 300px;
    }
}

/* Related News Section */
.related-news {
    background: var(--bg-light);
    padding: 60px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 0.85rem;
    line-height: 1.3;
    color: var(--text-dark);
    margin: 0;
    font-weight: 100;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .news-content h3 {
        font-size: 0.95rem;
    }
}

/* Mayor Quote Section with Photo */
.mayor-quote-section {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    margin-top: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.mayor-photo {
    position: relative;
    overflow: hidden;
}

.mayor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mayor-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent 0%, rgba(248, 249, 250, 0.3) 100%);
}

.mayor-quote-content {
    padding: 50px 50px 50px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.quote-mark {
    position: absolute;
    top: 20px;
    left: -10px;
    font-size: 120px;
    font-family: Georgia, serif;
    color: var(--primary);
    opacity: 0.15;
    line-height: 1;
    font-weight: bold;
}

.mayor-quote-content .quote-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.quote-author-info {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.author-role {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.quote-context {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

@media (max-width: 968px) {
    .mayor-quote-section {
        grid-template-columns: 1fr;
    }

    .mayor-photo {
        height: 300px;
    }

    .mayor-photo::after {
        background: linear-gradient(to bottom, transparent 0%, rgba(248, 249, 250, 0.5) 100%);
    }

    .mayor-quote-content {
        padding: 30px;
    }

    .mayor-quote-content .quote-text {
        font-size: 1.2rem;
    }
}

/* Testimonials Section */
.testimonials-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #e0e0e0;
}

.testimonials-section h3 {
    font-size: 2rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.testimonials-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.testimonial-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 60px;
    font-family: Georgia, serif;
    color: var(--secondary);
    opacity: 0.5;
    font-weight: bold;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.testimonial-photo {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    /*border: 4px solid var(--primary);
    box-shadow: 0 5px 15px rgba(244, 106, 31, 0.3);*/
}

.testimonial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content {
    flex: 1;
}

.testimonial-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.testimonial-quote {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    font-style: italic;
    margin: 0 0 20px 0;
}

.testimonial-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--bg-white);
    color: var(--secondary);
    border-radius: 25px;
    border: 2px solid var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-btn {
    background: var(--secondary);
    color: var(--bg-white);
    transform: scale(1.05);
}


@media (max-width: 968px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Old Quote Box (keeping for backward compatibility) */
.quote-box {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.quote-box .quote-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.quote-box .quote-author {
    font-weight: bold;
    color: var(--secondary);
}

.quote-box .quote-author .role {
    font-weight: normal;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .historia-intro {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    z-index: 10000;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-nav:hover,
.lightbox-close:hover {
    color: var(--primary);
}

/* Cursor pointer for triggers */
.design-card-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #eee;
    cursor: zoom-in;
}

.design-card-image img {
    display: block;
    width: 100%;
    margin-bottom: 0;
    border: none;
    transition: transform 0.3s ease;
}

.design-card:hover .design-card-image img {
    transform: scale(1.05);
}

.design-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3Cline x1='11' y1='8' x2='11' y2='14'%3E%3C/line%3E%3Cline x1='8' y1='11' x2='14' y2='11'%3E%3C/line%3E%3C/svg%3E") center no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.design-card:hover .design-card-image::after {
    opacity: 1;
}