/* ====== Reset / Base ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

:root {
  --bg: #0d1b2a;
  --bg-alt: #11253b;
  --card: #0f2742;
  --muted: #9fb0c6;
  --text: #e6eef6;
  --accent: #4fb3ff;
  --accent-2: #ffd166;
  --container: 1200px;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #0a1523 100%);
  color: var(--text);
  line-height: 1.6;
  padding-top: 64px; /* margen para el header fijo */
}

/* ====== Layout ====== */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 6rem 0;
}

.section--alt {
  background: linear-gradient(180deg, var(--bg-alt) 0%, #0e1f33 100%);
}

.section__title {
  font-size: clamp(1.6rem, 1.4rem + 1.2vw, 2.4rem);
  text-align: center;
  margin-bottom: 2rem;
}

/* ====== Header / Nav ====== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 20, 35, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: .5px;
  font-size: 1.25rem;
}

.navlinks {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding-top: 0; /* corregido */
  align-items: center;
}

/* enlaces visibles */
.navlinks a {
  color: var(--accent-2);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.navlinks a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* botón contacto alineado */
.navlinks .btn--sm {
  background: var(--accent);
  color: #081423;
  border: 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  border-radius: 999px;
  line-height: 1;
  font-weight: 700;
  box-shadow: var(--shadow);
  align-self: center;
  transition: transform 0.2s, filter 0.2s;
}

.navlinks .btn--sm:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.burger {
  all: unset;
  display: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  border-radius: 2px;
}

/* ====== Buttons ====== */
.btn {
  background: var(--accent);
  color: #081423;
  border: 0;
  padding: .85rem 1.1rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: none;
}

.btn--sm {
  padding: .5rem .9rem;
  font-size: .95rem;
  box-shadow: none;
}

/* ====== Hero ====== */
.hero {
  padding: 5rem 0 2rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.2rem;
  align-items: center;
}

.hero__copy h1 {
  font-size: clamp(1.8rem, 1.4rem + 2vw, 3rem);
  margin-bottom: 1rem;
}

.accent {
  color: var(--accent-2);
}

.lead {
  color: var(--muted);
  font-size: clamp(1rem, .9rem + .4vw, 1.125rem);
}

.hero__cta {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero__media img {
  width: 100%;
  height: auto;
}

/* ====== Cards ====== */
.cards {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--card);
  padding: 1.25rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: .35rem;
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
}

/* ====== Feature list ====== */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.feature {
  background: var(--card);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .06);
}

.feature h3 {
  margin-bottom: .25rem;
}

/* ===== Galería en mosaico ===== */
.gallery--mosaic {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;               /* grande + dos columnas pequeñas */
  grid-template-rows: repeat(3, minmax(220px, 1fr));/* 3 filas */
  grid-template-areas:
    "big a b"
    "big c d"
    "big e f";
  gap: 1rem;
  margin-top: 1rem;
}

.gallery__item--big { grid-area: big; }
.gallery__item--a   { grid-area: a; }
.gallery__item--b   { grid-area: b; }
.gallery__item--c   { grid-area: c; }
.gallery__item--d   { grid-area: d; }
.gallery__item--e   { grid-area: e; }
.gallery__item--f   { grid-area: f; }

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #0b2038;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.gallery__item figcaption {
  color: var(--muted);
  margin-top: .5rem;
  font-size: .95rem;
  text-align: center;
}

/* ====== Contact ====== */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: fixed;
}

.contact__list {
  margin: .75rem 0 0 .75rem;
  position: center;
}

.contact__list li {
  margin: .25rem 0;
}

.contact__form {
  display: grid;
  gap: .8rem;
}

.contact__form label {
  display: grid;
  gap: .4rem;
  font-weight: 600;
  font-size: .95rem;
}

.contact__form input,
.contact__form textarea {
  background: #0b2038;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: .9rem 1rem;
  outline: none;
}

.contact__form textarea {
  resize: vertical;
}

/* ====== Footer ====== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: #081423;
  padding: 1.2rem 0;
  color: var(--muted);
}

.footer__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__mail {
  color: var(--muted);
}

.footer__mail:hover {
  color: var(--text);
}

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .hero__grid { grid-template-columns: 1fr; }

  .navlinks {
    display: none;
    position: absolute;
    right: 1rem;
    top: 64px;
    background: rgba(10, 20, 35, .98);
    padding: .75rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
  }
  .navlinks.show { display: flex; flex-direction: column; gap: .25rem; }
  .burger { display: block; }
}

/* ===== Responsivo galería ===== */
@media (max-width: 1024px) {
  .gallery--mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "big big"
      "a b"
      "c d"
      "e f";
  }
}

@media (max-width: 640px) {
  .gallery--mosaic {
    grid-template-columns: 1fr;
    grid-template-areas:
      "big" "a" "b" "c" "d" "e" "f";
  }
}

/* ==== ENLACES DENTRO DEL CONTENIDO ==== */
a {
  color: var(--accent-2);
  text-decoration: underline;
  transition: color 0.2s, opacity 0.2s;
}
a:hover { color: var(--accent); opacity: 0.9; }

.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

/* ==== TARJETAS COLAPSABLES (sección Qué es) ==== */
/*
#que-es .card {
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
#que-es .card h3 { margin-bottom: 0; transition: color 0.2s; }
#que-es .card p { opacity: 0; max-height: 0; transition: all 0.3s ease; color: var(--muted); }
#que-es .card.active { height: auto; padding-bottom: 1rem; }
#que-es .card.active p { opacity: 1; max-height: 200px; margin-top: 0.5rem; }
#que-es .card:hover h3 { color: var(--accent-2); }
*/
/* ==== TARJETAS SIEMPRE ABIERTAS (sección Qué es) ==== */
#que-es .card {
  cursor: default;
  overflow: visible;
  height: auto;
  display: block;
  transition: none;
}

#que-es .card h3 {
  margin-bottom: 0.35rem;
}

#que-es .card p {
  opacity: 1;
  max-height: none;
  margin-top: 0.35rem;
  color: var(--muted);
}

/* puedes mantener el hover si quieres un pequeño efecto visual */
#que-es .card:hover h3 {
  color: var(--accent-2);
}


/* ===== LIGHTBOX (visor) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 14, 26, 0.85);
  display: none;                /* se activa con .is-open */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox__figure { margin: 0; max-width: 95vw; max-height: 90vh; display: grid; gap: .5rem; justify-items: center; }
.lightbox__img {
  max-width: 95vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.4); object-fit: contain;
}
.lightbox__cap { color: var(--muted); font-size: .95rem; text-align: center; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem; font-size: 2rem; line-height: 1;
  background: transparent; border: none; color: #fff; cursor: pointer;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(11, 32, 56, 0.6); color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 12px;
  font-size: 2rem; width: 48px; height: 56px; cursor: pointer; display: grid; place-items: center;
}
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }
body.no-scroll { overflow: hidden; }
