:root {
  --verde: #2d7d46;
  --verde-oscuro: #1a5c31;
  --naranja: #e8671a;
  --naranja-claro: #f5893a;
  --crema: #faf6ef;
  --gris: #4a4a4a;
  --gris-claro: #f0ede8;
  --blanco: #ffffff;
  --sombra: 0 4px 20px rgba(0,0,0,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--gris); background: var(--blanco); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--verde-oscuro); color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px; box-shadow: var(--sombra);
}
.nav-logo { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.nav-logo span { color: var(--naranja-claro); }
.nav-links { display: flex; gap: 1.8rem; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--naranja-claro); transition: color 0.2s; }
.nav-cta {
  background: var(--naranja); color: white;
  padding: 0.5rem 1.2rem; border-radius: 24px;
  font-weight: 600; font-size: 0.9rem; transition: background 0.2s;
}
.nav-cta:hover { background: var(--naranja-claro); }
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* HERO */
.hero {
  position: relative; min-height: 92vh;
  background: linear-gradient(135deg, #0a2e1a 0%, #1a5c31 40%, #2d7d46 70%, #3a9658 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: white; overflow: hidden; padding: 2rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><radialGradient id="g1" cx="50%" cy="40%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.03"/><stop offset="100%" stop-color="%23000000" stop-opacity="0.3"/></radialGradient></defs><rect width="1200" height="800" fill="url(%23g1)"/><circle cx="200" cy="150" r="300" fill="%23ffffff" fill-opacity="0.02"/><circle cx="1000" cy="600" r="250" fill="%23e8671a" fill-opacity="0.08"/></svg>') center/cover;
}
.hero-content { position: relative; max-width: 800px; }
.hero-badge {
  display: inline-block; background: rgba(232,103,26,0.25);
  border: 1px solid rgba(232,103,26,0.5); color: var(--naranja-claro);
  padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.hero h1 em { color: var(--naranja-claro); font-style: normal; }
.hero-sub { font-size: 1.2rem; opacity: 0.85; max-width: 600px; margin: 0 auto 2rem; line-height: 1.6; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--naranja); color: white;
  padding: 0.9rem 2rem; border-radius: 32px;
  font-weight: 700; font-size: 1.05rem; transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(232,103,26,0.4);
}
.btn-primary:hover { background: var(--naranja-claro); transform: translateY(-2px); }
.btn-secondary {
  background: rgba(255,255,255,0.12); color: white;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 0.9rem 2rem; border-radius: 32px;
  font-weight: 600; font-size: 1.05rem; transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.hero-stats {
  display: flex; gap: 3rem; justify-content: center;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat strong { display: block; font-size: 2rem; font-weight: 800; color: var(--naranja-claro); }
.hero-stat span { font-size: 0.85rem; opacity: 0.7; }

/* SECTIONS */
section { padding: 5rem 2rem; }
.section-title { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 800; text-align: center; margin-bottom: 0.5rem; }
.section-sub { text-align: center; color: #777; font-size: 1.1rem; max-width: 600px; margin: 0 auto 3rem; }
.section-title-accent { color: var(--verde); }

/* DESTINOS GRID */
.destinos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto;
}
.destino-card {
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--sombra); transition: transform 0.2s, box-shadow 0.2s;
  background: white; cursor: pointer;
}
.destino-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.18); }
.destino-img {
  height: 200px; display: flex; align-items: center; justify-content: center;
  font-size: 0; position: relative;
  background-size: cover; background-position: center;
}
.destino-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--naranja); color: white;
  font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.6rem;
  border-radius: 12px; text-transform: uppercase;
}
.destino-info { padding: 1.2rem; }
.destino-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.3rem; }
.destino-info p { font-size: 0.9rem; color: #777; line-height: 1.5; }
.destino-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.destino-tours { font-size: 0.85rem; color: var(--verde); font-weight: 600; }
.destino-desde { font-size: 0.9rem; color: var(--naranja); font-weight: 700; }

/* TOURS CATALOG */
.tours-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto;
}
.tour-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid #e8e0d8; transition: all 0.2s;
  background: white;
}
.tour-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12); transform: translateY(-4px); }
.tour-card-head {
  height: 180px; display: flex; align-items: center; justify-content: center;
  font-size: 0; position: relative;
  background-size: cover; background-position: center;
}
.tour-tags { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: rgba(0,0,0,0.55); color: white;
  font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.6rem;
  border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px;
}
.tour-card-body { padding: 1.2rem; }
.tour-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.tour-card-body p { font-size: 0.88rem; color: #777; line-height: 1.5; margin-bottom: 1rem; }
.tour-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.2rem; background: var(--gris-claro); border-top: 1px solid #e0dbd4;
}
.tour-precio { font-size: 1.1rem; font-weight: 800; color: var(--verde-oscuro); }
.tour-precio small { font-size: 0.75rem; font-weight: 400; color: #888; }
.btn-reservar {
  background: var(--verde); color: white;
  padding: 0.5rem 1.1rem; border-radius: 20px;
  font-size: 0.85rem; font-weight: 600; transition: background 0.2s;
}
.btn-reservar:hover { background: var(--verde-oscuro); }

/* FILTERS */
.filters {
  display: flex; gap: 0.8rem; justify-content: center;
  flex-wrap: wrap; margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.4rem 1rem; border-radius: 20px;
  border: 2px solid #ddd; background: white; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--verde); color: white; border-color: var(--verde);
}

/* COMO FUNCIONA */
.como-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 2rem; max-width: 1000px; margin: 0 auto;
}
.como-step { text-align: center; padding: 2rem; }
.como-step .num {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--verde); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; margin: 0 auto 1rem;
}
.como-step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.como-step p { font-size: 0.9rem; color: #777; line-height: 1.5; }

/* RESERVA FORM */
.reserva-section {
  background: linear-gradient(135deg, var(--verde-oscuro), var(--verde));
  color: white; text-align: center;
}
.reserva-section .section-title { color: white; }
.reserva-section .section-sub { color: rgba(255,255,255,0.8); }
.form-reserva {
  max-width: 620px; margin: 0 auto;
  background: white; border-radius: 20px;
  padding: 2.5rem; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  color: var(--gris);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #555; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
  border: 1.5px solid #ddd; font-size: 0.95rem; transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--verde);
}
.form-group textarea { resize: vertical; height: 80px; }
.btn-form {
  width: 100%; padding: 1rem; border-radius: 12px;
  background: var(--naranja); color: white; border: none;
  font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-form:hover { background: var(--naranja-claro); transform: translateY(-1px); }
.btn-form:disabled { opacity: 0.6; cursor: not-allowed; }
.form-success {
  display: none; background: #e8f5e9; border: 2px solid var(--verde);
  border-radius: 12px; padding: 1.5rem; text-align: center; color: var(--verde-oscuro);
  font-weight: 600;
}

/* WA FLOAT */
.wa-float {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.1); }

/* FOOTER */
footer {
  background: #0a1f12; color: rgba(255,255,255,0.75);
  padding: 3rem 2rem 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; max-width: 1200px; margin: 0 auto 2rem;
}
.footer-brand h3 { color: white; font-size: 1.3rem; font-weight: 800; margin-bottom: 0.5rem; }
.footer-brand h3 span { color: var(--naranja-claro); }
.footer-brand p { font-size: 0.88rem; line-height: 1.6; }
.footer-col h4 { color: white; font-weight: 700; margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-col a { display: block; font-size: 0.88rem; margin-bottom: 0.4rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--naranja-claro); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem; text-align: center; font-size: 0.82rem; opacity: 0.6;
  max-width: 1200px; margin: 0 auto;
}

/* CHAT */
.chat-toggle {
  position: fixed; bottom: 2rem; left: 2rem; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--verde); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: var(--sombra); cursor: pointer;
  transition: transform 0.2s;
}
.chat-toggle:hover { transform: scale(1.1); }
.chat-box {
  position: fixed; bottom: 6rem; left: 2rem; z-index: 199;
  width: 340px; border-radius: 20px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  background: white; display: none; flex-direction: column;
  max-height: 500px;
}
.chat-box.open { display: flex; }
.chat-head {
  background: var(--verde-oscuro); color: white;
  padding: 1rem; display: flex; align-items: center; gap: 0.8rem;
}
.chat-head .avatar { font-size: 1.8rem; }
.chat-head h4 { font-size: 0.95rem; font-weight: 700; }
.chat-head p { font-size: 0.78rem; opacity: 0.7; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  background: #f9f7f4;
}
.msg {
  max-width: 85%; padding: 0.6rem 0.9rem;
  border-radius: 14px; font-size: 0.88rem; line-height: 1.5;
}
.msg.bot { background: white; border: 1px solid #e5e0d8; align-self: flex-start; }
.msg.user { background: var(--verde); color: white; align-self: flex-end; }
.chat-input { display: flex; gap: 0.5rem; padding: 0.8rem; border-top: 1px solid #e5e0d8; }
.chat-input input {
  flex: 1; padding: 0.6rem 0.9rem; border-radius: 20px;
  border: 1.5px solid #ddd; font-size: 0.88rem;
}
.chat-input button {
  background: var(--verde); color: white; border: none;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  nav { padding: 0 1rem; }
  .nav-cta { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--verde-oscuro); color: #fff;
    padding: 1rem 1.5rem; gap: 1.1rem; z-index: 99;
    box-shadow: var(--sombra);
  }
  .hamburger.open { color: var(--naranja-claro); }
  .hero-stats { gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chat-box { width: calc(100vw - 2rem); left: 1rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

/* ── PRUEBA SOCIAL: ratings ─────────────────────────────────────── */
.tour-card-meta { min-height: 20px; margin-bottom: 0.35rem; }
.tour-rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.85rem; color: #4a4a4a;
}
.tour-rating .stars { color: #f5a623; font-size: 0.95rem; line-height: 1; }
.tour-rating strong { color: #333; font-weight: 700; }
.tour-rating .rev { color: #999; font-weight: 400; font-size: 0.8rem; }

/* ── FAVORITOS (wishlist) ───────────────────────────────────────── */
.fav-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: #cfcfcf;
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18); transition: transform 0.15s, color 0.15s;
  z-index: 2;
}
.fav-btn:hover { transform: scale(1.12); color: #ff6b6b; }
.fav-btn.activo { color: #e8384f; }
.fav-btn.activo:hover { color: #e8384f; }

/* Badge de conteo en el enlace Favoritos del nav */
.fav-count {
  display: none; margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--naranja); color: white; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700; line-height: 18px; text-align: center;
  vertical-align: middle;
}
.fav-count.visible { display: inline-block; }

/* Rating dentro de las páginas de detalle (inyectado) */
.detalle-rating {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.16); border-radius: 20px;
  padding: 4px 12px; font-size: 0.95rem; margin-top: 8px;
}
.detalle-rating .stars { color: #ffcf5c; }
