/* =========================
   NAVBAR
========================= */

/* Header contenedor */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navbar-h);
  z-index: 1000;
  transition: transform 0.4s ease;
}

/* =========================
   NAVBAR MINIMAL
========================= */

.main-navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: var(--color-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: transform 0.35s ease;
}

/* menú */

.menu {
  display: flex;
  gap: 2rem;
}

.menu a {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.05em;

  transition: color 0.2s ease;
}

.menu a:hover,
.menu a.active {
  color: var(--color-primary);
}
/* icono */

.icons {
  display: flex;
  align-items: center;
}

.org-icon {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #f5f5f5;

  color: #333;

  transition: transform 0.15s ease;
}

.org-icon:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 5px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .org-icon {
    display: none;
  }
  .menu-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--color-text);
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    display: none;
  }

  .menu.active {
    display: flex;
  }
}

.mobile-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform 0.35s ease;
  z-index: 1200;
}

.mobile-dropdown.active {
  transform: translateY(0);
}

#closeMobileMenu {
  position: absolute;
  top: 25px;
  right: 30px;
  font-size: 34px;
  border: none;
  background: none;
  color: var(--color-text);
  cursor: pointer;
}

.mobile-dropdown a {
  color: var(--color-text);
  text-decoration: none;

  font-size: 1.6rem;
  font-weight: 600;

  letter-spacing: 2px;
  text-transform: uppercase;

  transition: color 0.2s ease;
}

.mobile-dropdown a:hover {
  color: #f0b400;
}

/* =========================
   HERO
========================= */

.hero-section {
  position: relative;
  height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Overlay para mejorar contraste */

.hero-section::before {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), var(--color-bg));
}

/* .hero-video-desktop {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
} */

.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-img {
  position: absolute;
  top: 30%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.mobile {
  display: none;
}

@media (max-width: 768px) {
  .desktop {
    display: none;
  }

  .mobile {
    display: block;
  }
}

/* =========================
   HERO CONTENT
========================= */

.hero-content {
  position: relative;
  z-index: 2;

  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* logo */

.hero-logo {
  width: 400px;
  margin-bottom: 25px;
}

/* subtitulo */

.hero-subtitle {
  color: white;
  font-size: 1.2rem;
  letter-spacing: 1px;

  max-width: 600px;

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* =========================
   HERO INFO BAR
========================= */

.hero-info-bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--color-primary);
  padding: 18px 0;
  z-index: 2;
}

/* contenedor interno */

.hero-info-container {
  max-width: 1100px;
  margin: auto;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 20px;
}

/* fecha */

.hero-date {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text);
}

/* distancias */

.hero-distances {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--color-text);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .hero-logo {
    width: 200px;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 20px;
  }

  .hero-info-container {
    flex-direction: column;
    gap: 6px;
  }

  .hero-date {
    font-size: 1.1rem;
  }

  .hero-distances {
    font-size: 1.3rem;
  }
}

/* imagen */

/* .hero-image img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  display: block;
} */

/* ===== ABOUT LAYOUT ===== */

.about-section {
  background: #fff;
  padding: clamp(48px, 10vw, 120px) 0;
  color: var(--color-text);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 6vw, 72px);
}

.about-title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  /* color: #f5f1e8; */
  letter-spacing: 3px;
  margin-bottom: 60px;
  text-transform: uppercase;
}

/* Imagen a la derecha, alta y limpia */
.about-media {
  margin: 0;
  overflow: hidden;
}

.about-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 700px;
  transform-origin: center bottom;
  will-change: transform;
}

/* zoom suave mientras la sección entra y sale del viewport */
@supports (animation-timeline: view()) {
  .about-media {
    view-timeline-name: --about; /* crea una línea de tiempo ligada a la vista */
    view-timeline-axis: block;
  }
  .about-media img {
    animation: zoom-on-scroll both linear;
    animation-timeline: --about;
    animation-range: entry 0% exit 100%; /* desde que entra hasta que sale */
  }
  @keyframes zoom-on-scroll {
    from {
      transform: scale(1) translateY(0);
    }
    to {
      transform: scale(1.15) translateY(-12px);
    } /* ajustá 1.10~1.2 y el translate */
  }
}

/* Responsive: apilar en mobile */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-media {
    order: 2; /* imagen debajo del texto */
    margin-top: 24px;
    overflow: hidden;
  }

  .about-media img {
    display: none;
  }
}

/* ===== TIMELINE LAYOUT ===== */

.timeline-section {
  background: linear-gradient(to bottom, #f3f3f3 0%, #ececec 100%);
  padding: 4rem 1rem 0;
  text-align: center;
}

.timeline {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* =========================
   DOCUMENTOS – MODERNO DINÁMICO
========================= */

.documentos-section {
  background: var(--color-bg);
  padding: 80px 20px;
  text-align: center;
  position: relative;
}

/* Título */

.titulo-documentos {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 2px;
  margin-bottom: 50px;
  text-transform: uppercase;
}

/* Caja */

.documentos-box {
  background: rgba(255, 255, 255, 0.04);
  padding: 40px;
  max-width: 850px;
  margin: 0 auto;
  border-radius: 16px;

  backdrop-filter: blur(8px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.documentos-box p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

/* Botones */

.documentos-botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.btn-doc {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 220px;
  padding: 14px 26px;

  background: transparent;
  color: var(--color-text);

  border: 2px solid var(--color-primary);
  border-radius: 10px;

  font-weight: 700;
  letter-spacing: 0.04em;

  text-decoration: none;

  transition: all 0.25s ease;
}

/* Hover moderno */

.btn-doc:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile */

@media (max-width: 768px) {
  .documentos-botones {
    flex-direction: column;
    align-items: center;
  }

  .btn-doc {
    width: 100%;
    max-width: 280px;
  }
}

/* ===============================
   CIRCUITOS – MODERNO DINÁMICO
================================ */

.circuitos-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 80px 20px;
  background: var(--color-bg);
  color: var(--color-text);
  text-align: center;
}

/* TITULOS */

.section-title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: auto;
  margin-bottom: 60px;
  opacity: 0.7;
}

/* GRID */

.circuitos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* CARD */

.circuito-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  backdrop-filter: blur(6px);

  border: 1px solid rgba(255, 255, 255, 0.06);

  transition: all 0.35s ease;
}

/* HOVER MÁS PRO */

.circuito-card:hover {
  transform: translateY(-10px) scale(1.01);
  border: 1px solid var(--color-primary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.circuito-card h3 {
  transition: color 0.3s ease;
}

.circuito-card:hover h3 {
  color: var(--color-primary);
}

/* IMG */

.circuito-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.circuito-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.circuito-card:hover img {
  transform: scale(1.08);
}

/* CONTENT */

.circuito-content {
  padding: 25px;
  text-align: left;
}

.circuito-content h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

/* INFO */

.circuito-info {
  list-style: none;
  padding: 0;
  margin-bottom: 15px;
  font-size: 0.95rem;
  opacity: 0.8;
}

.circuito-info li {
  margin-bottom: 6px;
}

/* DESC */

.circuito-desc {
  opacity: 0.75;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* ===============================
   SVG BACKGROUND
================================ */

.circuito-svg {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 160%;
  height: 160%;

  transform: translate(-50%, -50%);

  opacity: 0.15;
  z-index: 0;
  pointer-events: none;

  filter: drop-shadow(0 0 6px var(--color-primary));
}

.container-circuitos {
  position: relative;
  z-index: 2;
}

.circuito-svg path {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-dasharray: 20000;
  stroke-dashoffset: 20000;
}

.circuito-svg.animar path {
  animation: dibujarCircuito 6s ease forwards;
}

@keyframes dibujarCircuito {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===============================
   MOBILE
================================ */

@media (max-width: 768px) {
  .circuito-img {
    height: 200px;
  }

  .circuito-svg {
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 220%;
    height: auto;
    opacity: 0.25;
  }
}

/* =========================
   SPONSORS – TRAIL TÉCNICO
========================= */

.sponsors-section {
  padding: 70px 2rem;
  background: #f5f1e8; /* arena natural */
  text-align: center;
}

/* Header */

.sponsors-header {
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sponsors-icon {
  font-size: 2rem;
  color: #c79a2b; /* dorado técnico */
  margin-bottom: 0.75rem;
}

.sponsors-title {
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 700;
  color: #1f2a1f; /* verde montaña */
  letter-spacing: 3px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
/* 
.sponsors-title::after {
  content: "";
  display: block;
  margin: 0.75rem auto 0;
  width: 60%;
  height: 2px;
  background-color: #c79a2b;
  transition: width 0.3s ease;
} */

.sponsors-header:hover .sponsors-title::after {
  width: 85%;
}

.sponsors-subtitle {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.75rem;
  max-width: 420px;
  line-height: 1.5;
}

/* Grid */

.sponsors-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sponsors-group + .sponsors-group {
  margin-top: 4rem;
}

/* Animación entrada */

.sponsor-card {
  background: #ffffff;
  padding: 1.2rem;
  border-radius: 8px; /* menos redondeo, más técnico */
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 120px;

  opacity: 0;
  transform: translateY(40px);
}

.sponsor-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Imagen */

.sponsor-card img {
  max-width: 100%;
  max-height: 1200px;
  object-fit: contain;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

/* Tiers */

.sponsor-card.tier-1 {
  width: 230px;
  height: 150px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  transition-delay: 0.1s;
}

.sponsor-card.tier-2 {
  width: 210px;
  height: 140px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition-delay: 0.2s;
}

.sponsor-card.tier-3 {
  width: 190px;
  height: 130px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition-delay: 0.3s;
}

.sponsor-card.tier-4,
.sponsor-card.tier-5 {
  transition-delay: 0.4s;
  opacity: 0.9;
}

/* Hover técnico elegante */

.sponsor-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.sponsor-card:hover img {
  transform: scale(1.05);
}

/* Responsive */

@media (max-width: 768px) {
  .sponsor-card {
    width: 130px !important;
    height: 95px !important;
    padding: 0.8rem;
  }

  .sponsors-group {
    gap: 1.5rem;
  }

  .sponsors-subtitle {
    font-size: 0.85rem;
  }

  .sponsors-icon {
    font-size: 1.5rem;
  }
}

/* =========================
   FOOTER – MODERNO DINÁMICO
========================= */

.site-footer {
  background: var(--color-bg);
  color: var(--color-text);
  padding-top: 80px;
  position: relative;
}

/* contenedor */

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* logo */

.footer-brand img {
  height: 100px;
  margin-bottom: 25px;
  opacity: 0.9;
}

/* organización */

.footer-org {
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  opacity: 0.85;
}

/* mail */

.footer-mail {
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  transition: all 0.2s ease;
  opacity: 0.8;
}

.footer-mail:hover {
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* redes */

.footer-social {
  margin-top: 25px;
  display: flex;
  gap: 18px;
}

.footer-social a {
  color: var(--color-text);
  font-size: 1.4rem;

  transition:
    transform 0.2s ease,
    color 0.2s ease;

  opacity: 0.7;
}

.footer-social a:hover {
  color: var(--color-primary);
  transform: translateY(-3px) scale(1.05);
}

/* bottom */

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* =========================
   DETALLE PRO (opcional)
========================= */

/* línea sutil con color de marca */

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 120px;
  height: 3px;

  background: var(--color-primary);
  border-radius: 2px;
}
