/* ============================== */
/*     ESTILOS BASE GENERALES     */
/* ============================== */

:root {
  --bg-azul: rgba(15, 30, 60, 0.85);
  --azul-brillante: #3ba8ff;
  --azul-oscuro: #0a1b33;
  --acento: #ff3c64;
  --blanco: #ffffff;
  --texto-suave: #dce6ff;
  --borde-luminoso: rgba(255, 255, 255, 0.15);

  --tarjeta-gradiente: linear-gradient(145deg, #0f1f35, #122544);
  --shadow-card: 0 6px 25px rgba(0, 0, 0, 0.4);

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: url('../assets/fondo.jpg') center/cover no-repeat fixed;
  color: var(--blanco);
  line-height: 1.4;
  min-height: 100vh;
}

/* Fondo azul translúcido */
.fondo-azul {
  position: fixed;
  inset: 0;
  background: var(--bg-azul);
  z-index: -1;
}

/* ============================== */
/*            HEADER              */
/* ============================== */

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  background: rgba(10, 20, 40, 0.55);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde-luminoso);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-area img {
  height: 60px;
}

.logo-area span {
  font-size: 1.4rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--blanco);
  font-weight: 500;
  transition: 0.25s ease;
}

.nav-links a:hover {
  color: var(--azul-brillante);
  text-shadow: 0 0 12px var(--azul-brillante);
}

/* Hamburguesa */
.nav-toggle {
  display: none;
  font-size: 32px;
  cursor: pointer;
}

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

.hero {
  text-align: center;
  padding: 120px 20px;
  background: linear-gradient(
      180deg,
      rgba(10, 25, 50, 0.6),
      rgba(10, 25, 50, 0)
  );
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.hero p {
  font-size: 1.3rem;
  color: var(--texto-suave);
  max-width: 700px;
  margin: 18px auto 40px;
}

.btn-primary {
  padding: 14px 32px;
  border-radius: var(--radius-lg);
  background: var(--azul-brillante);
  border: none;
  color: var(--blanco);
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 6px 20px rgba(59, 168, 255, 0.4);
}

.btn-primary:hover {
  background: #65bfff;
  box-shadow: 0 0 25px #65bfff;
}

/* ============================== */
/*              CARDS             */
/* ============================== */

.card-large {
  margin: 50px auto;
  max-width: 900px;
  padding: 40px;
  background: var(--tarjeta-gradiente);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--borde-luminoso);
  position: relative;
  overflow: hidden;
}

/* 🎄 Luces navideñas alrededor de la tarjeta */
.card-large::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 2px;
  background: repeating-linear-gradient(
      45deg,
      #ff3c64,
      #ff3c64 10px,
      #3ba8ff 10px,
      #3ba8ff 20px,
      #32ff7e 20px,
      #32ff7e 30px
  );
  -webkit-mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
  mask: 
      linear-gradient(#fff 0 0) content-box, 
      linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.card-large h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.card-large p {
  color: var(--texto-suave);
  margin-bottom: 30px;
}

.card-large img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

/* ============================== */
/*  GRID DE CATEGORÍAS / SECCIONES */
/* ============================== */

.categorias-grid {
  max-width: 1200px;
  margin: 60px auto;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.categoria-box {
  background: var(--tarjeta-gradiente);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--borde-luminoso);
  box-shadow: var(--shadow-card);
  transition: 0.25s ease;
}

.categoria-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(59,168,255,0.35);
}

/* ============================== */
/*             FOOTER             */
/* ============================== */

.main-footer {
  text-align: center;
  padding: 40px;
  background: rgba(10, 20, 40, 0.5);
  border-top: 1px solid var(--borde-luminoso);
  margin-top: 80px;
}

.main-footer p {
  color: var(--texto-suave);
}

/* ============================== */
/*         ANIMACIÓN NIEVE        */
/* ============================== */

.snowflake {
  position: fixed;
  top: -10px;
  color: #fff;
  font-size: 1.2rem;
  pointer-events: none;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
      transform: translateY(110vh);
      opacity: 0;
  }
}

/* Estilos adicionales para modales y formularios */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--tarjeta-gradiente);
  border-radius: var(--radius-xl);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--blanco);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group label {
  color: var(--texto-suave);
  font-weight: 500;
}

.field-group input,
.field-group textarea,
.field-group select {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--borde-luminoso);
  background: rgba(255, 255, 255, 0.1);
  color: var(--blanco);
  font-family: "Poppins", sans-serif;
}

.field-error {
  color: #ff6b6b;
  font-size: 0.85rem;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-secondary {
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid var(--borde-luminoso);
  color: var(--blanco);
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.modal-note {
  font-size: 0.85rem;
  color: var(--texto-suave);
  opacity: 0.8;
}

/* ============================== */
/*           RESPONSIVE           */
/* ============================== */

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

  .nav-toggle {
      display: block;
  }

  .hero h1 {
      font-size: 2.4rem;
  }

  .card-large {
      padding: 28px;
  }
  
  .main-header {
    padding: 12px 20px;
  }
  
  .categorias-grid {
    padding: 20px;
  }
}

