/* Hoja de Trabajo 1 - Excursión al Lago de Atitlán
   Estilo sobrio: paleta neutra, tipografía clara, layout simple */

:root {
  --color-bg: #f6f5f2;
  --color-surface: #ffffff;
  --color-text: #2b2b2b;
  --color-muted: #6b6b6b;
  --color-accent: #3f5d63;
  --color-accent-dark: #2c4246;
  --color-border: #dedad3;

  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Poppins", "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1, h2 {
  font-family: var(--font-heading);
  color: var(--color-accent-dark);
  margin-top: 0;
}

a {
  color: var(--color-accent);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background-color: var(--color-accent);
  color: #fff;
}

/* Hero */
.hero {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-surface);
}

.hero picture {
  display: block;
  width: 100%;
  height: clamp(180px, 28vw, 380px);
  overflow: hidden;
}

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

.hero-text {
  padding: 1.5rem 1rem 0.5rem;
}

.hero-text h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.03em;
}

.hero-text .subtitle {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-text::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 1rem auto 0;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* Navegación */
.site-nav {
  max-width: 640px;
  margin: 2rem auto;
  padding: 1.25rem 1.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.site-nav h2 {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.site-nav ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav li a:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* Secciones generales */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease;
}

.section:hover {
  box-shadow: 0 6px 16px rgba(44, 66, 70, 0.12);
}

.section h2 {
  position: relative;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.section-intro {
  text-align: center;
  color: var(--color-muted);
  margin-top: -0.5rem;
}

.back-link {
  text-align: center;
  margin: 1.5rem 0;
}

.back-link a {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.back-link a:hover {
  background-color: var(--color-accent);
  color: #fff;
}

/* Galería - estilo bento grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 140px;
  gap: 1rem;
  margin-top: 1.25rem;
}

.gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.gallery figure:nth-child(1) {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.gallery figure:nth-child(2) {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.gallery figure:nth-child(3) {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}

.gallery figure:nth-child(4) {
  grid-column: 4 / 5;
  grid-row: 2 / 3;
}

.gallery-trigger {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.gallery-trigger::after {
  content: "\26F6";
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery figure:hover .gallery-trigger::after,
.gallery-trigger:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

.gallery picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

.gallery figure:hover img {
  transform: scale(1.06);
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.75rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}

.credits {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
}

/* Visor de imágenes (modal <dialog> controlado por JavaScript) */
.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 2.5rem 1.5rem 3rem;
  border: none;
  background-color: transparent;
  overflow: hidden;
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.lightbox::backdrop {
  background-color: rgba(10, 14, 15, 0.78);
  backdrop-filter: blur(4px);
}

.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: aparecer 0.25s ease;
}

.lightbox-info {
  max-width: min(90vw, 700px);
  text-align: center;
  color: #f0efe9;
}

.lightbox-info h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  color: #ffffff;
}

.lightbox-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #d8d5cd;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tabla de itinerario */
.itinerary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
}

.itinerary-table caption {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-accent-dark);
}

.itinerary-table th,
.itinerary-table td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.itinerary-table th {
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
}

.itinerary-table tbody tr:nth-child(even) {
  background-color: var(--color-bg);
}

.itinerary-table tbody tr {
  transition: background-color 0.2s ease;
}

.itinerary-table tbody tr:hover {
  background-color: #eef3f2;
}

.itinerary-table td:first-child,
.itinerary-table td:nth-child(2) {
  text-align: center;
  white-space: nowrap;
}

/* Actividades y recomendaciones */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.two-col .section {
  margin: 0;
}

.two-col ul {
  padding-left: 1.25rem;
  margin: 0;
}

.two-col li {
  margin-bottom: 0.5rem;
}

/* Utilidades controladas por JavaScript */
.oculto {
  display: none !important;
}

.sin-scroll {
  overflow: hidden;
}

.aviso {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--color-accent);
  background-color: var(--color-bg);
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Filtro de actividades */
.filtro {
  margin-bottom: 1.1rem;
}

.filtro label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

/* Formularios (cotizador y reservación) */
.formulario {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 1.25rem;
}

.campo-completo {
  grid-column: 1 / -1;
}

.campo label,
.campo legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"]:not([disabled]),
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(63, 93, 99, 0.15);
}

textarea {
  resize: vertical;
}

fieldset.campo {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
}

.check:last-child {
  margin-bottom: 0;
}

.check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.acciones-centro {
  justify-content: center;
  margin-top: 1.1rem;
}

.btn {
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  background-color: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-secundario {
  background-color: transparent;
  color: var(--color-accent);
}

.btn-secundario:hover {
  background-color: var(--color-accent);
  color: #fff;
}

.error {
  display: block;
  min-height: 1rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #a33a3a;
}

.invalido {
  border-color: #a33a3a !important;
  box-shadow: 0 0 0 3px rgba(163, 58, 58, 0.12) !important;
}

/* Resultados de cotización y confirmación */
.resultado {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-bg);
  animation: aparecer 0.3s ease;
}

.resultado h3 {
  font-family: var(--font-heading);
  margin: 0 0 0.6rem;
  color: var(--color-accent-dark);
}

.resultado ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.93rem;
}

.resultado p {
  margin: 0.4rem 0 0;
}

.resultado .total {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

.resultado-error {
  border-left-color: #a33a3a;
  background-color: #fbf1f1;
  color: #7d2c2c;
}

/* Testimonios */
.testimonio {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-bg);
  text-align: center;
}

.testimonio.animar {
  animation: aparecer 0.35s ease;
}

.testimonio-texto {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.7;
  color: var(--color-accent-dark);
  margin: 0 0 0.9rem;
}

.testimonio-autor {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
  background-color: var(--color-accent-dark);
  color: #f0efe9;
  border-top: 3px solid var(--color-accent);
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: #cfe0e2;
}

.site-footer a:hover {
  color: #ffffff;
}

/* Responsive */
@media (max-width: 700px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .formulario {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .gallery figure:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }

  .gallery figure:nth-child(2),
  .gallery figure:nth-child(3),
  .gallery figure:nth-child(4) {
    grid-column: span 1;
    grid-row: auto;
  }
}

@media (max-width: 460px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery figure:nth-child(1),
  .gallery figure:nth-child(2),
  .gallery figure:nth-child(3),
  .gallery figure:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
