/* ==========================================================================
   Caminito del Tajo — hoja de estilos
   ========================================================================== */

:root {
  --bg: #fbfbf9;
  --ink: #12262a;
  --ink-soft: #33484c;
  --muted: #46585c;
  --teal: #1f6363;
  --aqua: #a0e1e1;
  --aqua-light: #c7eded;
  --line: #e7e7e0;
  --footer-bg: #0f2226;
  --footer-text: #c3d2d5;
  --footer-line: #24393e;
  --footer-muted: #7f959a;
  --star: #e8b425;
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
}

main { flex: 1; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -.015em;
}

p { margin: 0; }

a { color: var(--teal); }
a:hover { color: #174f4f; }

[id] { scroll-margin-top: 80px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  background: var(--aqua);
  color: var(--teal);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--aqua-light); color: var(--teal); }
.btn--lg { font-size: 16px; padding: 15px 34px; }
.btn--sm { font-size: 14px; padding: 10px 22px; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  background: rgba(251, 251, 249, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  height: 52px;
  width: 52px;
  border-radius: 50%;
  object-fit: cover;
}
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.01em;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a.btn { font-weight: 700; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 78vh;
  min-height: 540px;
  overflow: hidden;
}

.bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 16, 20, .35) 0%, rgba(6, 16, 20, .62) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 0 64px;
  max-width: 860px;
}
.hero-content h1 {
  font-weight: 800;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: pretty;
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.3vw, 27px);
  color: var(--aqua);
}
.hero-note {
  font-size: 19px;
  font-weight: 600;
  color: rgba(160, 225, 225, .92);
}
.hero-cta { margin-top: 10px; }

/* ---------- Secciones ---------- */

.section { padding: 84px 56px; }

.section--white {
  background: #fff;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  text-align: center;
}

.section-title {
  font-weight: 800;
  font-size: 42px;
  letter-spacing: -.02em;
}

.section-intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 640px;
  text-wrap: pretty;
}

/* ---------- Rejillas de tarjetas ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
}
.card-grid--reviews { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.route-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(18, 38, 42, .05);
}
.route-card > img {
  width: 100%;
  height: 225px;
  object-fit: cover;
}
.route-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  flex: 1;
}
.route-card h3 {
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
}
.route-card .desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
}
.route-card .price {
  font-size: 17px;
  color: var(--ink);
}

/* ---------- Secciones a dos columnas ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  padding: 72px 56px;
}
.split--why {
  grid-template-columns: 1fr 1.5fr;
  padding: 80px 56px;
}
.split > img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 18px;
}
.split--why > img { height: 480px; }
.split-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.split-text h2 {
  font-weight: 800;
  font-size: 40px;
  line-height: 1.12;
  text-wrap: pretty;
}
.split-text p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--muted);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.feature-list li {
  display: flex;
  gap: 12px;
}
.feature-list li::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  margin-top: 8px;
}

/* ---------- Banners con imagen de fondo ---------- */

.banner {
  position: relative;
  padding: 96px 64px;
  overflow: hidden;
}
.banner--contact { padding: 88px 64px; }

.banner-scrim {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .55);
}
.banner-scrim--strong { background: rgba(255, 255, 255, .62); }

.banner-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.banner-content p {
  font-size: 17px;
  line-height: 1.6;
  color: #22383c;
  font-weight: 500;
}

/* ---------- FAQ ---------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
}
.section--white .faq-card { background: var(--bg); }
.faq-card summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17.5px;
}
.faq-card p {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- Opiniones ---------- */

.review-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
}
.review-card .stars {
  color: var(--star);
  font-size: 20px;
  letter-spacing: 3px;
}
.review-card .quote {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  flex: 1;
}
.review-card .author {
  font-weight: 700;
  font-size: 14.5px;
}

/* ---------- Contacto ---------- */

.contact-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
}
.contact-inner .section-title { text-align: center; }

.form-success {
  background: #dff3ea;
  border: 1px solid #9fd8bd;
  color: #1c5c3e;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 15px;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-form input,
.contact-form textarea {
  padding: 15px 18px;
  border: 1px solid #cfd8d4;
  border-radius: 12px;
  font-size: 15px;
  font-family: var(--font-body);
  background: #fff;
  color: var(--ink);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--teal); }
.contact-form textarea { resize: vertical; }
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* ---------- Datos de contacto y sellos ---------- */

.info-section {
  padding: 64px 56px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  max-width: 1020px;
  margin: 0 auto;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-item strong {
  font-family: var(--font-display);
  font-size: 16px;
}
.info-item a {
  color: var(--teal);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}
.info-item a:hover { text-decoration: underline; }

.seals {
  padding: 56px;
  border-top: 1px solid var(--line);
}
.seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.seal img {
  height: 96px;
  object-fit: contain;
}
.seal h3 {
  font-weight: 700;
  font-size: 16.5px;
}

/* ---------- Ficha de ruta ---------- */

.route-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 52px;
  align-items: start;
  padding: 64px 56px;
  max-width: 1280px;
  margin: 0 auto;
}
.route-detail > img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 18px;
  position: sticky;
  top: 96px;
}
.route-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.route-info h1 {
  font-weight: 800;
  font-size: 42px;
  line-height: 1.1;
  text-wrap: pretty;
}
.route-info p {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.booking {
  padding: 0 56px 56px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.route-extra {
  padding: 0 56px 72px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- Páginas de contenido ---------- */

.page-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 72px 56px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.page-main h1 {
  font-weight: 800;
  font-size: 42px;
}
.page-subtitle {
  font-weight: 600;
  font-size: 22px;
  color: var(--teal);
}
.page-text {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- Aviso y configuración de cookies (RGPD / LSSI) ---------- */

#cookie-banner {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 760px;
  flex-direction: column;
  gap: 10px;
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 20px 22px;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
  font-size: 14px;
  line-height: 1.55;
}
#cookie-banner.show { display: flex; }
#cookie-banner a { color: var(--aqua); }
#cookie-banner .cookie-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.cookie-actions .btn { min-width: 118px; }
.cookie-actions .btn--ghost { margin-right: auto; }

/* Aceptar y Rechazar comparten estilo (misma relevancia); Configurar va en secundario */
.btn--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
#cookie-banner .btn--ghost,
#cookie-banner .btn--ghost:hover { color: var(--aqua); }
#cookie-banner .btn--ghost:hover { background: rgba(160, 225, 225, .12); }
.cookie-settings .btn--ghost:hover { background: rgba(31, 99, 99, .08); }

#cookie-banner button:focus-visible,
#cookie-reopen:focus-visible { outline-color: var(--aqua); }

.cookie-settings {
  width: calc(100% - 32px);
  max-width: 620px;
  max-height: calc(100% - 32px);
  padding: 0;
  border: none;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.cookie-settings:not([open]) { display: none; }
.cookie-settings::backdrop { background: rgba(6, 16, 20, .6); }

.cookie-settings-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
}
.cookie-settings h2 {
  font-weight: 800;
  font-size: 24px;
  padding-right: 40px;
}
.cookie-settings p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

.cookie-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.cookie-close:hover { background: var(--line); }

.cookie-category {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
}
.cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
label.cookie-category-head { cursor: pointer; }
.cookie-always {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--teal);
  white-space: nowrap;
}

/* Botones siempre visibles aunque el panel tenga scroll */
.cookie-settings .cookie-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -28px -28px;
  padding: 14px 28px 28px;
  background: #fff;
  border-top: 1px solid var(--line);
}

/* Interruptor: checkbox real (accesible) oculto visualmente */
.cookie-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.cookie-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--footer-muted);
  transition: background .15s;
}
.cookie-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.cookie-switch-input:checked + .cookie-switch { background: var(--teal); }
.cookie-switch-input:checked + .cookie-switch::after { transform: translateX(20px); }
.cookie-switch-input:focus-visible + .cookie-switch {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Botón fijo para cambiar o retirar el consentimiento */
#cookie-reopen {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--footer-line);
  border-radius: 50%;
  background: var(--footer-bg);
  color: var(--aqua);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  cursor: pointer;
}
#cookie-reopen.show { display: flex; }
#cookie-reopen:hover { border-color: var(--aqua); }
#cookie-reopen svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 840px) {
  #cookie-banner {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 18px;
  }
  .cookie-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }
  .cookie-actions .btn--ghost {
    flex-basis: 100%;
    margin-right: 0;
  }
  .cookie-settings-inner { padding: 22px 18px; }
  .cookie-settings .cookie-actions {
    margin: 0 -18px -22px;
    padding: 14px 18px 22px;
  }
  .cookie-settings h2 { font-size: 21px; }
  .cookie-close {
    top: 14px;
    right: 14px;
  }
}

/* ---------- Pie de página ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 56px 56px 30px;
}

.footer-top {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand--footer img {
  height: 44px;
  width: 44px;
}
.brand--footer span {
  font-size: 17px;
  color: #fff;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px 44px;
  font-size: 14.5px;
}
.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
}
.footer-links a:hover { color: var(--aqua); }

.social {
  display: flex;
  gap: 12px;
}
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #2c4247;
  color: var(--footer-text);
}
.social a:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}
.social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid var(--footer-line);
  margin-top: 40px;
  padding-top: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--footer-muted);
}

/* ==========================================================================
   Móvil
   ========================================================================== */

@media (max-width: 840px) {
  html, body { overflow-x: hidden; }

  .site-header { padding: 10px 20px; }

  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .1);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 16px;
    padding: 6px 0;
  }

  .hero-content { padding: 0 20px; }
  .hero-content h1 { font-size: 34px; }
  .hero-sub { font-size: 22px; }

  .section,
  .banner,
  .info-section,
  .seals,
  .page-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 56px 20px;
  }
  .split > img {
    height: 280px;
    position: static;
  }

  .section-title { font-size: 30px; }
  .split-text h2 { font-size: 30px; }
  .page-main h1 { font-size: 34px; }
  .page-subtitle { font-size: 22px; }

  .route-detail {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 20px;
  }
  .route-detail > img {
    height: 280px;
    position: static;
  }
  .route-info h1 { font-size: 34px; }

  .booking { padding: 0 20px 48px; }
  .route-extra { padding: 0 20px 64px; }

  .form-row { grid-template-columns: 1fr; }

  .site-footer { padding: 48px 24px 28px; }
  .footer-top { gap: 28px; }
  .footer-links { grid-template-columns: 1fr; }
}
