/* Reset y base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores del tema - Club Ciclista Utiel */
    --cycling-primary: #dd2f2f;     /* Rojo corporativo principal */
    --cycling-secondary: #312222;   /* Marrón oscuro para degradados */
    --cycling-accent: #ff4444;      /* Rojo más claro para acentos */
    --cycling-dark: #1a1a1a;        /* Negro para textos */
    --cycling-light: #ffffff;       /* Blanco para textos claros */
    --cycling-muted: #666666;       /* Gris para textos secundarios */
    --cycling-background: #f5f5f5;  /* Fondo suave */
    --cycling-subtle: #eeeeee;      /* Bordes y fondos sutiles */
    
    /* Colores adicionales para iconos */
    --cycling-blue: #3b82f6;        /* Azul para iconos */
    --cycling-green: #10b981;       /* Verde para iconos */
    --cycling-orange: #f59e0b;      /* Naranja para iconos */
    
    /* Gradientes corporativos */
    --gradient-hero: linear-gradient(135deg, rgba(221, 47, 47, 0.9), rgba(49, 34, 34, 0.9));
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--cycling-dark);
    background-color: var(--cycling-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Prevenir espacios en blanco al final */
html, body {
    overflow-x: hidden;
    height: 100%;
}

html {
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
}

/* Tipografías */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', 'Bebas Neue', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #0d1117;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 0.8rem;
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 0.6rem;
}

h4 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 0.5rem;
}

/* Header */
.header {
    background: var(--cycling-light);
    border-bottom: 3px solid var(--cycling-primary);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--cycling-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 0.8rem;
    position: relative;
    border-radius: 6px;
    font-size: 0.95rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cycling-primary), #ff4757);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--cycling-primary);
    background: rgba(221, 47, 47, 0.05);
}

.nav-link:hover::before {
    width: calc(100% - 1rem);
}

.nav-link.active {
    color: var(--cycling-primary);
    background: rgba(221, 47, 47, 0.1);
}

.nav-link.active::before {
    width: calc(100% - 1rem);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    /* Mejoras específicas para iOS antiguos */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Prevenir zoom accidental en iOS */
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: none;
    /* Mejorar rendimiento en dispositivos antiguos */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.nav-toggle:hover {
    background-color: rgba(44, 90, 160, 0.1);
}

.nav-toggle:active {
    background-color: rgba(44, 90, 160, 0.2);
    transform: scale(0.95);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--cycling-dark);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-secondary));
    color: white;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--cycling-primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--cycling-accent), var(--cycling-primary));
    border-color: var(--cycling-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Botón específico en la navegación */
.nav-link.btn-primary {
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    margin-left: 0.5rem;
    position: relative;
}

.nav-link.btn-primary::before {
    display: none; /* Quita la línea inferior del nav-link */
}

.nav-link.btn-primary:hover {
    color: white;
    transform: translateY(-1px);
}

.nav-link.btn-primary.active {
    color: white !important;
}

/* ============================================================================
   DROPDOWN STYLES
   ============================================================================ */

.dropdown {
    position: relative;
}

/* Gap invisible para mejorar la experiencia de hover */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px; /* Gap invisible de 10px */
    background: transparent;
}

.dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-icon {
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px); /* Añadir separación del trigger */
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    list-style: none; /* Eliminar puntos de lista */
    margin: 0; /* Eliminar márgenes por defecto */
}

/* Los estilos hover ahora se manejan con JavaScript para mejor control */

.dropdown-menu li {
    list-style: none; /* Asegurar que los li no tengan puntos */
    margin: 0;
    padding: 0;
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--cycling-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.dropdown-link:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--cycling-primary);
    text-decoration: none;
}

.dropdown-link:focus {
    outline: 2px solid var(--cycling-blue);
    outline-offset: -2px;
}

/* Estado activo para elementos del dropdown */
.dropdown-link.active {
    background: rgba(255, 107, 107, 0.15);
    color: var(--cycling-primary);
    font-weight: 600;
}

/* Estado visual cuando el dropdown está abierto */
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Cuando hay un enlace activo del dropdown, mantener el toggle marcado */

.dropdown-toggle.active {
    color: var(--cycling-primary) !important;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    color: var(--cycling-primary);
    border: 2px solid var(--cycling-primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--cycling-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-secondary));
    color: white;
    border: 2px solid var(--cycling-primary);
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: linear-gradient(135deg, var(--cycling-accent), var(--cycling-primary));
    border-color: var(--cycling-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-cta {
    background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-accent));
    color: white;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border: 2px solid var(--cycling-primary);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-cta:hover {
    background: linear-gradient(135deg, var(--cycling-accent), #ff6666);
    border-color: var(--cycling-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cycling-light);
    overflow: hidden;
}

/* Hero estándar - estilos unificados */
.hero-standard {
    min-height: 60vh !important;
}

.hero-standard .hero-title {
    color: var(--cycling-light) !important;
    font-family: 'Oswald', 'Bebas Neue', sans-serif !important;
    font-weight: 600 !important;
    font-size: clamp(2.5rem, 6vw, 4rem) !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 1rem !important;
}

.hero-standard .hero-subtitle {
    color: var(--cycling-light) !important;
    font-size: clamp(1rem, 3vw, 1.25rem) !important;
    margin-bottom: 2rem !important;
    opacity: 0.95 !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

/* Hero Home - Specific styles for index page */
.hero-home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: var(--cycling-light);
    overflow: hidden;
    padding-bottom: 5vh;
}

.hero-home .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/portada.jpeg');
    background-size: cover;
    background-position: center center;
    z-index: -1;
}

.hero-home .hero-content {
    max-width: 800px;
    padding: 2.5rem 2rem;
    margin-bottom: 0;
    background: rgba(217, 236, 239, 0.8);
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
}

/* Hero Home - Specific title and subtitle styles */
.hero-home .hero-title {
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
    color: var(--cycling-light);
    line-height: 1.1;
}

.hero-home .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.95);
}

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

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: var(--cycling-background);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}



.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cycling-dark);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--cycling-muted);
    font-weight: 500;
}

/* Sections */
.rutas-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--cycling-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Rutas Grid */
.rutas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ruta-card {
    background: var(--cycling-light);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.ruta-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cycling-dark);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-medium {
    background: var(--cycling-subtle);
    color: var(--cycling-dark);
}

.badge-high {
    background: var(--cycling-subtle);
    color: var(--cycling-light);
}

.badge-extreme {
    background: #dc2626;
    color: var(--cycling-light);
}

.card-content {
    padding: 1.5rem;
}

.ruta-info {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--cycling-muted);
}

.icon-small {
    width: 1rem;
    height: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distance {
    font-weight: 700;
    color: var(--cycling-dark);
    font-size: 1.125rem;
}

/* Why Section */
.why-section {
    padding: 4rem 0;
    background: var(--cycling-background);
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
}

.feature-icon .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--cycling-primary);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cycling-dark);
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--cycling-muted);
    line-height: 1.6;
}

.cta-card {
    background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-secondary));
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--cycling-light);
    margin: 0 auto;
    max-width: 650px;
    width: 100%;
    box-shadow: var(--shadow-xl);
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white !important;
}

.cta-description {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* CTA Section as Separate Block */
.cta-section-separate {
    padding: 4rem 0;
    background: var(--cycling-light);
}

@media (max-width: 768px) {
    .cta-section-separate {
        padding: 2rem 1rem;
    }
    
    .utiel-center-image {
        max-height: 300px !important;
        height: auto !important;
    }
    
    /* Mejorar espaciado de secciones en móvil */
    .why-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        text-align: center;
        padding: 0 1rem;
    }
}

/* Main content wrapper para sticky footer */
main {
    flex: 1 0 auto;
    padding-bottom: 2rem;
    min-height: calc(100vh - 200px); /* Asegurar altura mínima considerando header y footer */
}

/* Espaciado adecuado para contenido dinámico */
.dynamic-content {
    margin-bottom: 2rem;
}

/* Espaciado consistente entre secciones de contenido */
section + section {
    margin-top: 0 !important;
}

/* Asegurar que no hay espacios extra entre secciones */
.section-content {
    padding: 3rem 0;
    background: var(--cycling-light);
}

/* El CTA necesita espaciado antes del footer */
#join-cta-placeholder {
    margin-top: 2rem;
    margin-bottom: 2.5rem !important;
    padding-bottom: 1rem;
}

/* Evitar espacios adicionales solo después del footer */
.footer {
    margin-bottom: 0 !important;
}

/* Footer */
.footer {
    background: var(--cycling-dark);
    color: var(--cycling-light);
    padding: 3rem 0 1rem;
    margin-top: auto;
    flex-shrink: 0; /* Evitar que el footer se comprima */
}

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

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--cycling-accent);
}

.footer-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-description {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--cycling-accent);
}

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

.footer-logo-img {
    height: 60px;
    width: auto;
    opacity: 1;
    background: var(--cycling-light);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Enlaces de Contacto */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cycling-light);
    transform: translateX(5px);
    border-color: var(--cycling-accent);
}

.contact-icon {
    width: 1.125rem;
    height: 1.125rem;
    stroke-width: 2;
    flex-shrink: 0;
    color: var(--cycling-accent);
    stroke: currentColor;
    fill: none;
}

.contact-link:hover .contact-icon {
    color: var(--cycling-light);
    transform: scale(1.1);
    stroke: currentColor;
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}



.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--cycling-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-link:hover .social-icon {
    transform: scale(1.1);
    color: var(--cycling-light);
    fill: currentColor;
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: #d1d5db;
    fill: currentColor;
}

.social-link span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Efectos específicos por red social */
.social-link[href*="instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}

.social-link[href*="facebook"]:hover {
    background: #1877f2;
    border-color: transparent;
}

.social-link[href*="strava"]:hover {
    background: #FC4C02;
    border-color: transparent;
}

/* Iconos SVG */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2;
}

/* ============================================================================
   KDD GRAVEL 2025 STYLES
   ============================================================================ */

/* Hero Section KDD Gravel */
.hero-kdd-gravel {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-kdd-gravel .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-kdd-gravel .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.8), rgba(0, 0, 0, 0.6));
    z-index: 2;
}

.hero-kdd-gravel .container {
    position: relative;
    z-index: 3;
}

.hero-kdd-gravel .hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-kdd-gravel .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-kdd-gravel .hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    text-align: left;
}

.detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item strong {
    color: var(--cycling-accent);
}

/* Event Info Section */
.event-info-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

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

.description-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--cycling-primary);
}

.description-card h3 {
    color: #0d1117;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.event-highlights {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.event-highlights h3 {
    color: #b91c1c;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

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

.highlights-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.highlights-list li:last-child {
    border-bottom: none;
}

.practical-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--cycling-accent);
}

.info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    color: var(--cycling-primary);
    display: inline-block;
    min-width: 140px;
}

.requirements-section {
    margin-top: 3rem;
}

.requirement-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.requirement-card.important {
    border: 2px solid #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.requirement-card.important h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Registration Section */
.registration-section {
    padding: 4rem 0;
    background: white;
}

.registration-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.registration-form {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--cycling-dark);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--cycling-primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-input:invalid {
    border-color: #dc3545;
}

.checkbox-group {
    margin: 2rem 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--cycling-primary);
}

.checkbox-label {
    cursor: pointer;
    flex: 1;
}

.checkbox-text {
    display: block;
}

.checkbox-text strong {
    color: var(--cycling-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.checkbox-text small {
    color: #6c757d;
    font-size: 0.875rem;
}

.form-error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-width: 250px;
}

.btn-loading {
    display: none;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.registration-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--cycling-accent);
}

.info-card h3 {
    color: #b91c1c;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li:before {
    content: "✓ ";
    color: var(--cycling-primary);
    font-weight: bold;
}

/* Responsive Design para KDD Gravel */
@media (max-width: 1024px) {
    .event-content,
    .registration-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .registration-info {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hero-kdd-gravel .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-kdd-gravel .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-details {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .detail-item {
        text-align: center;
    }
    
    .registration-form {
        padding: 1.5rem;
    }
    
    .btn-large {
        width: 100%;
        min-width: auto;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        height: 40px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px; /* Altura del header */
        left: 0;
        right: 0;
        background: var(--cycling-light);
        flex-direction: column;
        padding: 2rem 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        border-top: 3px solid var(--cycling-primary);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        /* Mejorar rendimiento en móviles */
        -webkit-transform: translateY(0) translateZ(0);
        transform: translateY(0) translateZ(0);
    }
    
    /* Mejorar transiciones en dispositivos móviles */
    .nav-menu {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000px;
        perspective: 1000px;
        /* Prevenir scroll del body cuando el menú está abierto */
        overscroll-behavior: contain;
        /* Mejoras específicas para iOS antiguos */
        -webkit-overflow-scrolling: touch;
        /* Prevenir problemas de renderizado en Safari antiguo */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, opacity;
    }
    
    /* Estilos específicos para iOS antiguos */
    @supports (-webkit-overflow-scrolling: touch) {
        .nav-menu {
            /* Mejorar scroll en iOS */
            -webkit-overflow-scrolling: touch;
        }
        
        .nav-menu.active {
            /* Forzar repaint en iOS antiguos */
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        text-align: center;
        width: 100%;
        border-radius: 0.5rem;
        margin: 0;
    }
    
    .nav-link.btn-primary {
        margin: 1rem 0 0 0;
        background: linear-gradient(135deg, var(--cycling-primary), var(--cycling-secondary));
        color: white;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
        /* Mejorar área táctil en móviles */
        min-width: 48px;
        min-height: 48px;
        padding: 0.75rem;
        /* Prevenir zoom en iOS */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* Mejorar rendimiento en móviles */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Mejorar feedback táctil */
    .nav-toggle:active {
        transform: scale(0.95) translateZ(0);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
        text-align: center;
    }
    
    .stat-value {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .rutas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .ruta-card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-title {
        font-size: 1.125rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .badge {
        align-self: flex-start;
    }
    
    .why-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .feature-icon {
        margin-bottom: 1rem;
    }
    
    .feature-content {
        max-width: 100%;
    }
    
    .feature-title {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .feature-description {
        text-align: center;
        line-height: 1.7;
    }
    
    /* Ocultar imagen de la puerta del sol en móvil */
    .why-section .utiel-center-image,
    .why-section div[style*="position: relative"] {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Ocultar sitemap en móvil */
    .footer-sitemap {
        display: none !important;
    }
    
    .contact-links {
        gap: 0.5rem;
    }
    
    .contact-link {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Ya definido en la media query posterior */
    
    .social-icon, .contact-icon {
        width: 1rem;
        height: 1rem;
    }
    
    .contact-link span {
        display: block;
        word-break: break-all;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
    }

    /* Dropdown responsive para móviles */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.9);
        margin: 0.5rem 0;
        border-radius: 0.25rem;
    }

    .dropdown-toggle {
        justify-content: center;
        padding: 1rem 0.5rem;
    }

    .dropdown-icon {
        margin-left: auto;
    }

    .dropdown-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

            .dropdown-link:last-child {
            border-bottom: none;
        }

        /* Estado activo del dropdown toggle en móvil */
        .dropdown-toggle.active {
            color: var(--cycling-primary) !important;
            background: rgba(255, 107, 107, 0.1);
        }
}

/* Media query adicional para pantallas muy pequeñas */
@media (max-width: 480px) {
    .hero-home .hero-content {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-home .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-home .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .ruta-card {
        margin-bottom: 1.5rem;
    }
    
    .cta-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .nav-menu {
        padding: 1.5rem 1rem;
    }
    
    .nav-link {
        padding: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .why-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

.hero-content {
    animation: fadeInUp 1s ease-out;
}

/* Scroll suave ya definido en html al inicio del archivo */

/* Estados de hover mejorados */
.ruta-card:hover .btn {
    background: var(--cycling-primary);
    color: var(--cycling-light);
}



.feature-item:hover .feature-icon {
    background: rgba(59, 130, 246, 0.2);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

/* Benefits Section - Beneficios de ser socio */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--cycling-light);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.check-icon {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--cycling-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cycling-light);
    font-size: 0.75rem;
    flex-shrink: 0;
    font-weight: bold;
}

