/* ============================================ */
/* VARIABLES Y RESET                             */
/* ============================================ */
:root {
    --color-primary: #1e3b4a;
    --color-primary-dark: #152e3a;
    --color-accent: #c87a5c;
    --color-accent-hover: #b06248;
    --color-accent-light: #e8c9bb;
    --color-background: #F5F0E8;
    --color-surface: #ffffff;
    --color-surface-alt: #faf8f6;
    --color-text: #2c2b2b;
    --color-text-light: #6b6a6a;
    --color-border: #e5ddd5;
    
    --shadow-sm: 0 12px 30px rgba(0,0,0,0.06);
    --shadow-card: 0 20px 35px rgba(0,0,0,0.08);
    --shadow-lg: 0 25px 50px rgba(0,0,0,0.12);
    
    --transition: all 0.3s ease;
    --transition-smooth: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    
    --navbar-height: 80px;
    --border-radius-sm: 24px;
    --border-radius-md: 32px;
    --border-radius-lg: 48px;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
  }
  
  body {
    font-family: 'Inter', sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }
  
  h1, h2, h3, .serif {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  
  img {
    max-width: 100%;
    display: block;
  }
  
  /* ============================================ */
  /* UTILIDADES Y ANIMACIONES                      */
  /* ============================================ */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.96);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  
  /* Scrollbar personalizada */
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: var(--color-background);
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-hover);
  }
  
  /* ============================================ */
  /* BOTONES                                       */
  /* ============================================ */
  .btn {
    background: var(--color-accent);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(200,122,92,0.35);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
  }
  
  .btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(200,122,92,0.45);
  }
  
  .btn:active {
    transform: translateY(0);
  }
  
  .btn:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
  }
  
  /* ============================================ */
  /* SECCIONES GENERALES                           */
  /* ============================================ */
  section {
    padding: 6rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
  }
  
  .section-title {
    font-size: 2.8rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-primary);
    position: relative;
  }
  
  .section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--color-accent);
    margin: 0.8rem auto 0;
    border-radius: 4px;
  }
  
  /* ============================================ */
  /* NAVBAR                                        */
  /* ============================================ */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
  }
  
  .navbar.scrolled {
    padding: 0.5rem 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  }
  
  .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    transition: transform 0.3s ease;
  }
  
  .logo:hover {
    transform: scale(1.02);
  }
  
  .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
  }
  
  .nav-links a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    padding: 0.5rem 0;
  }
  
  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
  }
  
  .nav-links a:hover,
  .nav-links a.active {
    color: var(--color-accent);
  }
  
  .nav-links a:hover::after,
  .nav-links a.active::after {
    width: 100%;
  }
  
  .menu-toggle {
    display: none;
    font-size: 1.7rem;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .menu-toggle:active {
    transform: scale(0.95);
  }
  
  /* ============================================ */
  /* HERO                                          */
  /* ============================================ */
  .hero {
    height: 100vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    padding: 0 1.5rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
  }
  
  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30,59,74,0.85) 0%, rgba(44,82,102,0.7) 40%, rgba(176,137,104,0.6) 100%);
    z-index: 1;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease;
    backdrop-filter: blur(2px);
    padding: 2rem;
    border-radius: 40px;
  }
  
  .hero-title {
    font-size: clamp(2.8rem, 8vw, 5rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  }
  
  .hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.4rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
  }
  
  /* ============================================ */
  /* TIMELINE                                      */
  /* ============================================ */
  .timeline-vertical {
    position: relative;
    padding-left: 2rem;
  }
  
  .timeline-vertical::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: linear-gradient(to bottom, var(--color-accent), var(--color-primary), var(--color-accent));
    border-radius: 3px;
  }
  
  .timeline-item-v {
    display: flex;
    gap: 1.8rem;
    margin-bottom: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.5s ease;
  }
  
  .timeline-item-v.visible {
    opacity: 1;
    transform: translateX(0);
  }
  
  .timeline-marker {
    flex-shrink: 0;
    width: 50px;
    display: flex;
    justify-content: center;
  }
  
  .timeline-dot {
    width: 18px;
    height: 18px;
    background: var(--color-accent);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--color-accent);
    transition: all 0.3s;
  }
  
  .timeline-item-v:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px var(--color-accent);
  }
  
  .timeline-card-v {
    flex: 1;
    background: var(--color-surface);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
  }
  
  .timeline-card-v:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
  }
  
  .timeline-img-v {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  
  .timeline-card-v:hover .timeline-img-v {
    transform: scale(1.03);
  }
  
  .timeline-content-v {
    padding: 1.5rem;
  }
  
  .timeline-date-v {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
  }
  
  /* ============================================ */
  /* VIDEO                                         */
  /* ============================================ */
  .video-container {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  
  .video-container:hover {
    transform: scale(1.01);
  }
  
  .video-thumbnail {
    width: 100%;
    display: block;
    transition: filter 0.3s;
  }
  
  .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
  }
  
  .video-overlay i {
    font-size: 5rem;
    color: white;
    text-shadow: 0 2px 15px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
  }
  
  .video-container:hover .video-overlay {
    background: rgba(0,0,0,0.3);
  }
  
  .video-container:hover .video-overlay i {
    transform: scale(1.1);
  }
  
  .video-caption {
    text-align: center;
    margin-top: 1.2rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
  }
  
  /* ============================================ */
  /* JUEGO                                         */
  /* ============================================ */
  .game-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    background: var(--color-surface);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    align-items: center;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
  }
  
  .game-preview:hover {
    transform: translateY(-5px);
  }
  
  .game-mockup {
    flex: 1 1 280px;
    min-height: 280px;
    border-radius: 28px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
  }
  
  .game-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
  }
  
  .game-info p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
  }
  
  /* ============================================ */
  /* REPORTAJE                                     */
  /* ============================================ */
  .reportaje-destacado {
    background: var(--color-surface);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: all 0.4s;
  }
  
  .reportaje-destacado:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
  }
  
  .reportaje-hero-img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    transition: transform 0.6s;
  }
  
  .reportaje-destacado:hover .reportaje-hero-img {
    transform: scale(1.02);
  }
  
  .reportaje-texto {
    padding: 2rem;
  }
  
  .reportaje-texto h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--color-primary);
  }
  
  .leer-mas {
    display: inline-block;
    margin-top: 1.2rem;
    font-weight: 600;
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    cursor: pointer;
    transition: letter-spacing 0.3s;
  }
  
  .leer-mas:hover {
    letter-spacing: 0.5px;
  }
  
  /* ============================================ */
  /* COUNTDOWN                                     */
  /* ============================================ */
  .countdown-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a3a48 100%);
    color: white;
    text-align: center;
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
  }
  
  .countdown-container {
    max-width: 900px;
    margin: 0 auto;
  }
  
  .countdown-section .section-title {
    color: white;
  }
  
  .countdown-section .section-title::after {
    background: var(--color-accent);
  }
  
  .countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
    margin: 2.5rem 0;
  }
  
  .countdown-box {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem 2rem;
    min-width: 120px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }
  
  .countdown-box:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.25);
    border-color: var(--color-accent);
  }
  
  .countdown-number {
    font-size: 3.8rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.2;
  }
  
  .countdown-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 0.6rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
  }
  
  .countdown-event {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(0,0,0,0.2);
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(5px);
  }
  
  /* ============================================ */
  /* GALERÍA                                       */
  /* ============================================ */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
  }
  
  .gallery-item {
    height: 300px;
    border-radius: 28px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
  }
  
  .gallery-item::before {
    content: '🔍';
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    transform: translateY(10px);
  }
  
  .gallery-item:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .gallery-item:hover::before {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* ============================================ */
  /* REDES SOCIALES                                */
  /* ============================================ */
  .social-section {
    background: var(--color-surface-alt);
    text-align: center;
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-sm);
    margin: 1rem auto;
  }
  
  .social-icons {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
  }
  
  .social-icon-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--color-primary);
    transition: var(--transition-smooth);
    font-weight: 500;
    padding: 0.5rem;
  }
  
  .social-icon-link i {
    font-size: 2.8rem;
    transition: all 0.3s;
  }
  
  .social-icon-link span {
    font-size: 0.9rem;
  }
  
  .social-icon-link:hover {
    transform: translateY(-8px);
    color: var(--color-accent);
  }
  
  .social-icon-link:hover i {
    color: var(--color-accent);
    transform: scale(1.1) translateY(-3px);
  }
  
  /* ============================================ */
  /* CRÉDITOS / EQUIPO                             */
  /* ============================================ */
  .credits-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
  }
  
  .credit-card {
    background: var(--color-surface);
    border-radius: var(--border-radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    width: 240px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
  }
  
  .credit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
  }
  
  .credit-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--color-accent);
    transition: transform 0.3s;
  }
  
  .credit-card:hover .credit-avatar {
    transform: scale(1.02);
  }
  
  /* ============================================ */
  /* FOOTER                                        */
  /* ============================================ */
  footer {
    background: var(--color-primary);
    color: #f0e9df;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 2rem;
  }
  
  .back-to-top {
    margin-top: 1.2rem;
    background: var(--color-accent);
    border: none;
    color: white;
    padding: 0.7rem 1.6rem;
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
  }
  
  .back-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-3px);
  }
  
  /* ============================================ */
  /* MODALES                                       */
  /* ============================================ */
  .modal-overlay,
  .lightbox-modal,
  .generic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s;
  }
  
  .modal-overlay.active,
  .lightbox-modal.active,
  .generic-modal.active {
    visibility: visible;
    opacity: 1;
  }
  
  .modal-container {
    background: var(--color-surface);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    border-radius: 40px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInScale 0.3s ease;
  }
  
  .modal-header {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 1;
  }
  
  .modal-close,
  .lightbox-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-primary);
    transition: transform 0.2s;
  }
  
  .modal-close:hover,
  .lightbox-close:hover {
    transform: scale(1.1);
    color: var(--color-accent);
  }
  
  .modal-body {
    padding: 2rem;
  }
  
  .modal-body img {
    width: 100%;
    border-radius: 28px;
    margin: 1rem 0;
  }
  
  .lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
  }
  
  .generic-modal-content {
    background: var(--color-surface);
    max-width: 450px;
    width: 85%;
    border-radius: 32px;
    padding: 2rem;
    text-align: center;
    animation: fadeInScale 0.3s ease;
  }
  
  #modalMessage {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    white-space: pre-line;
    color: var(--color-text);
  }

  .generic-modal-close {
    background: var(--color-accent);
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10; /* Asegurar que esté por encima */
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    }
  
    .generic-modal-close:hover {
        background: var(--color-accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(200,122,92,0.4);
      }
      .generic-modal-close:active {
        transform: translateY(0) scale(0.98);
      }
      
      /* Evitar que eventos del modal interfieran */
      .generic-modal-content * {
        pointer-events: auto;
      }