:root {
  --bg: #f3f4f6;
  --bg-page: #f9fafb;
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-card: #ffffff;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #1d4ed8;
  --text: #111827;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-page);
  color: var(--text);
}

/* LAYOUT GENERAL */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: var(--bg-header);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav__logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, #eff6ff, #2563eb);
  color: #0b1120;
  font-size: 1.1rem;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
}

.nav__brand-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.nav__brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav__links a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}

/* BOTONES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.4);
}

.btn--primary-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
}

.btn--primary-outline:hover {
  background: var(--accent);
  color: #ffffff;
}

.btn--ghost {
  background: #eef2ff;
  color: #4f46e5;
}

.btn--ghost:hover {
  background: #e0e7ff;
}

.btn--small {
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
}

/* MAIN */

.site-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* BANNER (VIDEO/IMAGEN) */

.top-media {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 1.5rem;
  border-radius: 18px;
  overflow: hidden;
}

.top-media video,
.top-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.top-media--overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 55%);
}

.top-media__overlay-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.top-media__overlay-content h1 {
  margin: 0;
  font-size: 2rem;
}

.top-media__overlay-content p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  border: 1px solid #bfdbfe;
}

.hero__title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin: 0.9rem 0 0.5rem;
  line-height: 1.1;
  color: #0f172a;
}

.hero__highlight {
  color: var(--accent-strong);
}

.hero__subtitle {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.3rem;
}

.hero__meta-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
}

.hero__meta-item strong {
  font-size: 0.95rem;
  color: #111827;
}

.hero__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero__hint {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* SECCIONES / GRID / CARDS */

.section {
  margin-bottom: 2.8rem;
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section__title {
  font-size: 1.25rem;
  margin: 0 0 0.2rem;
  color: #0f172a;
}

.section__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.section__link {
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--accent-strong);
}

.grid {
  display: grid;
  gap: 1.2rem;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  border-color: rgba(37, 99, 235, 0.25);
  background-color: #f9fafb;
}

.card__icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.card:hover .card__icon {
  transform: translateY(-2px);
  opacity: 0.95;
}

.card__title {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: #111827;
}

.card__body {
  font-size: 0.8rem;
  margin: 0;
  color: var(--text-muted);
}

/* CARDS DE RUTAS (MMTY → MMUN, etc.) */

.card.route-card {
  position: relative;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.card.route-card::after {
  content: "✈️";
  position: absolute;
  right: 1.2rem;
  top: 1.1rem;
  font-size: 1.3rem;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card.route-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(#ffffff, #ffffff),
    linear-gradient(130deg, #2563eb, #60a5fa, #a5b4fc);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.card.route-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* CTA FINAL */

.cta {
  margin-top: 2.5rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.4rem;
  border: 1px solid #bfdbfe;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}

.cta__text {
  max-width: 420px;
}

.cta__text h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: #1d4ed8;
}

.cta__text p {
  margin: 0;
  font-size: 0.8rem;
  color: #4b5563;
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 1.3rem 1.5rem 1.7rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-note {
  margin-top: 0.25rem;
}

/* ====== EVENT CARD (Próximo evento, estilo ticket) ====== */

.event-card {
  position: relative;
  border-radius: 18px;
  padding: 1.1rem 1.6rem 1.2rem 2.4rem; /* más espacio a la izquierda */
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Barra vertical tipo ticket */
.event-card::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #6366f1, #a855f7);
}

/* Pato enojado POP-IN  */
/* Ajusta la ruta a donde tengas la imagen: por ejemplo /media/pato-enojado.png */
.event-card::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  bottom: 1.1rem;
  width: 60px;
  height: 60px;
  background-image: url("/media/pato-enojado.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(0.7);
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.event-card:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Hover general */
.event-card:hover {
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  transform: translateY(-3px);
}

/* Header evento */

.event-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}

.event-card__badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 500;
}

.event-card__date {
  font-size: 0.8rem;
  color: #6b7280;
}

/* Título y ruta */

.event-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: #0f172a;
}

/* IMAGEN DENTRO DEL EVENTO */

.event-card__media {
  position: relative;
  margin: 0.4rem 0 0.8rem;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
}

.event-card__media img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
  opacity: 0.96;
}

.event-card:hover .event-card__media img {
  transform: scale(1.03);
  opacity: 1;
}

/* overlay oscuro abajo */
.event-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.85),
    rgba(15, 23, 42, 0) 60%
  );
}

/* tag con ruta y hora */
.event-card__media-tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.7rem;
  z-index: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  white-space: nowrap;
}

/* Texto descriptivo y chips */

.event-card__description {
  font-size: 0.82rem;
  color: #4b5563;
  margin: 0.45rem 0 0.7rem;
  line-height: 1.4;
}

.event-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.event-card__chip {
  font-size: 0.75rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
}

.event-card__chip--vatsim {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  font-weight: 500;
}

.event-card__chip--link {
  text-decoration: none;
  border-color: #2563eb;
  background: #f0f7ff;
  color: #1d4ed8;
}

/* Footer: countdown */

.event-card__footer {
  margin-top: 0.1rem;
}

.event-card__countdown {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  animation: countdown-pulse 2.2s ease-out infinite;
}

@keyframes countdown-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-card {
    margin-top: 1.5rem;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    margin-top: 0.4rem;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 0.7rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav__links--open {
    display: flex;
  }

  .nav__links a {
    text-align: right;
  }
}

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

  .site-main {
    padding-inline: 1.1rem;
  }

  .top-media video,
  .top-media img {
    height: 200px;
  }
}
