/* ==========================================================
   Charly Tour — estilos
   Colores: azul océano (Viña), rojo y blanco (Chile),
   dorado arena y colores de las casas de Valparaíso.
   ========================================================== */

:root {
  --navy: #0B3C5D;
  --navy-dark: #072a42;
  --sea: #1F7AB8;
  --sky: #5BB8E8;
  --red: #D52B1E;
  --red-dark: #b32217;
  --gold: #F2A93B;
  --sand: #F7F3EC;
  --ink: #1d2733;
  --muted: #5b6875;
  --line: #e3ddd2;
  --white: #ffffff;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 60, 93, .10);
  --font-head: "Poppins", "Montserrat", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--sea); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

.kicker {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .6em;
}
.kicker--light { color: var(--gold); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.5em;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  background: var(--navy);
  color: var(--white);
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--red); }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.8); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--small { padding: .55em 1.1em; font-size: .85rem; }
.btn--block { width: 100%; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--navy); }
.brand-text em { font-style: normal; color: var(--red); }
.brand-text small { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sea); font-weight: 600; }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
}
.main-nav a:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: .35em .8em;
  font: 600 .8rem var(--font-head);
  color: var(--muted);
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 16px; border-top: 1px solid var(--line); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Portada ---------- */
/* Para usar una foto: guardar assets/img/hero.jpg (si no existe, se ve el degradado) */
.hero {
  position: relative;
  color: var(--white);
  background-color: var(--navy);
  background-image:
    linear-gradient(120deg, rgba(7,42,66,.92) 0%, rgba(11,60,93,.78) 45%, rgba(31,122,184,.55) 100%),
    url("../assets/img/hero.jpg");
  background-size: cover;
  background-position: center;
  padding: clamp(80px, 12vw, 140px) 0 clamp(110px, 14vw, 170px);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin-left: max(16px, calc((100% - 1160px) / 2 + 16px)); }
.hero h1 { color: var(--white); }
.hero-text { font-size: 1.15rem; opacity: .92; max-width: 600px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 40px; }
.hero-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.hero-stats li { display: flex; flex-direction: column; max-width: 180px; font-size: .9rem; opacity: .9; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.8rem; color: var(--gold); line-height: 1.1; }
.hero-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 70px; color: var(--white); }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 100px) 0; }
.section--sand { background: var(--sand); }
.section--navy { background: var(--navy); color: rgba(255,255,255,.9); }
.section--navy h2 { color: var(--white); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); }

.note { margin-top: 28px; font-size: .9rem; color: var(--muted); }

/* ---------- Tours ---------- */
.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.tour {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.tour:hover { transform: translateY(-4px); }
.tour-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}
.tour-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,.92);
  color: var(--navy);
  font: 600 .75rem var(--font-head);
  padding: .3em .8em;
  border-radius: 999px;
}
.tour-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.tour-body p { color: var(--muted); font-size: .95rem; }
.tour-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.price { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.price strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--navy); }

/* Fotos de cada tour: guardar en assets/img/ con estos nombres.
   Mientras no existan, se muestra un degradado de color. */
.tour--vina .tour-media     { background-image: url("../assets/img/tour-vina.jpg"),     linear-gradient(135deg, #1F7AB8, #5BB8E8); }
.tour--cerros .tour-media   { background-image: url("../assets/img/tour-cerros.jpg"),   linear-gradient(135deg, #D52B1E, #F2A93B); }
.tour--isla .tour-media     { background-image: url("../assets/img/tour-isla-negra.jpg"), linear-gradient(135deg, #0B3C5D, #1F7AB8); }
.tour--santiago .tour-media { background-image: url("../assets/img/tour-santiago.jpg"), linear-gradient(135deg, #5b6875, #9fb3c8); }
.tour--zapallar .tour-media { background-image: url("../assets/img/tour-zapallar.jpg"), linear-gradient(135deg, #2a9d8f, #5BB8E8); }

.tour--custom {
  background: var(--sand);
  border-style: dashed;
  box-shadow: none;
  justify-content: center;
}
.tour--custom .tour-foot { border-top: 0; }

/* ---------- Agencias ---------- */
.agency {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: start;
}
.benefits {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.benefits li {
  padding-left: 16px;
  border-left: 3px solid var(--red);
}
.benefits h3 { font-size: 1rem; margin-bottom: .3em; }
.benefits p { margin: 0; font-size: .92rem; color: var(--muted); }
.agency-rates {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .agency { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .benefits { grid-template-columns: 1fr; }
}

/* ---------- Formularios ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 28px;
}
.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { margin-bottom: 4px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 500; }
.form input, .form select, .form textarea {
  font: inherit;
  font-size: 1rem;
  padding: .7em .85em;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
  border-color: var(--sea);
}
.form .is-invalid { border-color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.form legend { font-size: .88rem; font-weight: 500; margin-bottom: 6px; }
.form .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form .check input { width: auto; }
.form-error { color: var(--red); font-size: .88rem; margin: 0; }

@media (max-width: 480px) {
  .form-row, .form fieldset { grid-template-columns: 1fr; }
  .card { padding: 20px; }
}

/* ---------- Galería ---------- */
.gal-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.gal-filters button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: .45em 1.1em;
  font: 600 .85rem var(--font-head);
  cursor: pointer;
}
.gal-filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.gal-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sea), var(--sky));
}
.gal-item[data-tipo="grupos"] { background: linear-gradient(135deg, var(--red), var(--gold)); }
.gal-item button {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 12px 10px;
  font-size: .85rem;
  color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  pointer-events: none;
}
.gal-item.is-empty img { display: none; }
.gal-item.is-empty button { cursor: default; }
.gal-item.is-empty::before {
  content: attr(data-pending);
  position: absolute;
  top: 12px;
  left: 12px;
  font: 600 .72rem var(--font-head);
  background: rgba(255,255,255,.9);
  color: var(--navy);
  padding: .3em .8em;
  border-radius: 999px;
}
.gal-item[hidden] { display: none; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lightbox::backdrop { background: rgba(7,42,66,.92); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; object-fit: contain; }
.lightbox figcaption { color: var(--white); text-align: center; }
.lb-close, .lb-nav {
  background: none;
  border: 0;
  color: var(--white);
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 12px 16px;
}
.lb-close { position: fixed; top: 8px; right: 8px; }

/* ---------- Recomendados ---------- */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.rec {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 170px;
}
.rec p { color: var(--muted); margin: 0; }
.rec-cat {
  display: inline-block;
  font: 600 .72rem var(--font-head);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3em .8em;
  border-radius: 999px;
  margin-bottom: 14px;
  color: var(--white);
}
.rec-cat--hotel { background: var(--sea); }
.rec-cat--food  { background: var(--red); }
.rec-cat--place { background: var(--gold); color: var(--navy); }

.rec-cta {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.rec-cta h3 { margin-bottom: .3em; }
.rec-cta p { margin: 0; color: var(--muted); max-width: 620px; }

/* ---------- Nosotros ---------- */
.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  max-width: 920px;
}
.about p:last-child { margin: 0; font-size: 1.05rem; }
@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-logo { width: 96px; height: 96px; }
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact > div > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.contact-list li { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Pie ---------- */
.site-footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: 32px 0;
  font-size: .88rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0; }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* Campo trampa anti-spam: oculto para las personas */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
