/* ==== AJUSTES GENERALES ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-primario: #0b3c5d;
  --color-primario-oscuro: #07293e;
  --color-acento: #22c55e;
  --color-fondo: #f3f4f6;
  --color-texto: #111827;
  --color-card: #ffffff;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-texto);
  background-color: var(--color-fondo);
}

html {
  scroll-behavior: smooth; /* scroll suave al hacer clic en el menú */
}

body {
  margin: 0;
  line-height: 1.5;
}

/* ==== CABECERA Y NAVEGACIÓN ==== */
.cabecera {
  background: linear-gradient(135deg, var(--color-primario), var(--color-primario-oscuro));
  color: #ffffff;
  padding: 1rem 0 1.2rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.cabecera__contenedor {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  text-align: center;
}

/* ==== LOGO / MARCA ==== */
.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-cubo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: radial-gradient(circle at 20% 20%, #facc15, #f97316 40%, #0ea5e9 80%);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(15, 23, 42, 0.7);
}

.logo-cubo__texto {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
}

.marca__texto h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marca__subtitulo {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Por si en algún sitio se usa directamente .cabecera h1 */
.cabecera h1 {
  margin: 0;
}

/* ==== MENÚ ==== */
.menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 0.25rem 0 0;
  justify-content: center;
}

.menu a {
  position: relative;
  color: #e5f2ff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.15s ease;
}

/* subrayado animado */
.menu a::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0.2rem;
  height: 2px;
  background: var(--color-acento);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease-out;
}

.menu a:hover {
  background: rgba(15, 23, 42, 0.45);
  transform: translateY(-1px);
}

.menu a:hover::after {
  transform: scaleX(1);
}

/* ==== CONTENIDO PRINCIPAL ==== */
.contenido {
  max-width: 960px;
  margin: 1.8rem auto 2.4rem;
  padding: 0 1rem;
}

/* separador visual suave entre secciones */
.seccion {
  margin-bottom: 2.4rem;
  position: relative;
}

.seccion::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1.2rem;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.35),
    transparent
  );
}

.seccion:first-of-type::before {
  display: none;
}

.seccion h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  padding-left: 0.7rem;
}

/* barra de color a la izquierda de los títulos */
.seccion h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  bottom: 0.1rem;
  width: 3px;
  border-radius: 999px;
  background: var(--color-acento);
}

/* alternar fondo de algunas secciones para más contraste */
.seccion:nth-of-type(even) .tarjeta {
  background: #f9fafb;
}

/* ==== TARJETAS GENERALES ==== */
.tarjeta {
  background: var(--color-card);
  border-radius: 0.95rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tarjeta:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
}

/* ==== NOTICIA CON IMAGEN ==== */
.seccion--noticia .tarjeta--noticia {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 1.3rem;
  align-items: center;
}

.tarjeta__texto p {
  margin-top: 0.5rem;
}

.tarjeta__texto p:last-child {
  margin-bottom: 0;
}

.tarjeta__imagen img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.8rem;
  border: 1px solid #e2e8f0;
}

.tarjeta__imagen figcaption {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.35rem;
}

/* ==== VÍDEO ==== */
.seccion--video .video-contenedor {
  margin-top: 1rem;
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  border: 1px solid #0f172a;
}

/* Mantener proporción 16:9 con CSS moderno */
.video-contenedor iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* Texto de enlaces del vídeo */
.enlace-video {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  color: #374151;
}

.enlace-video a {
  text-decoration: underline;
}

/* ==== FORMULARIOS ==== */
.formulario {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

label {
  font-weight: 500;
}

input[type="number"] {
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  border: 1px solid #cbd5e1;
  font: inherit;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primario);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(11, 60, 93, 0.25);
}

.boton {
  margin-top: 0.25rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: none;
  background: var(--color-primario);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.boton::after {
  content: "↩";
  font-size: 0.85rem;
}

.boton:hover {
  background: var(--color-primario-oscuro);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

.resultado {
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  background: #f1f5f9;
  min-height: 1.5rem;
  font-size: 0.95rem;
  border: 1px dashed #cbd5e1;
}

/* ==== PIE DE PÁGINA ==== */
.pie {
  background: linear-gradient(135deg, var(--color-primario-oscuro), #020617);
  color: #e5f2ff;
  text-align: center;
  padding: 0.9rem;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .seccion--noticia .tarjeta--noticia {
    grid-template-columns: 1fr;
  }

  .cabecera__contenedor {
    align-items: center;
  }

  .marca {
    flex-direction: column;
  }

  .marca__texto h1 {
    font-size: 1.6rem;
  }

  .menu {
    font-size: 0.95rem;
  }

  .tarjeta {
    padding: 1.05rem 1.1rem;
  }
}
