/*
Theme Name: Salvamar Ecolodge
Description: Theme a medida para Salvamar Ecolodge, sin dependencias de page builders. Todo el contenido vive en código dentro de este theme.
Version: 1.0
Author: Salvamar
*/

:root {
  --navy: #16303F;
  --crema: #F4EDE0;
  --madera: #C98F56;
  --texto: #1A1A1A;
  --off-white: #FAFAF8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--texto);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 700; margin: 0 0 20px 0; }
p { margin: 0 0 16px 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; background: #fff; }
.section-tight { padding: 64px 0; }
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .section-tight { padding: 44px 0; }
}

/* Encabezado de sección reutilizable: ojo pequeño + ícono de ola + título + subtítulo */
.section-heading { text-align: center; max-width: 680px; margin: 0 auto 56px auto; }
.section-heading .eyebrow {
  color: var(--madera); text-transform: uppercase; letter-spacing: 3px;
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.section-heading .wave-deco { width: 62px; height: auto; margin: 4px auto 14px auto; display: block; opacity: .85; }
.section-title { font-size: clamp(28px, 4vw, 42px); color: var(--navy); margin-bottom: 14px; }
.section-title-sm { font-size: clamp(22px, 3vw, 30px); color: var(--navy); margin-bottom: 14px; }
.section-subtitle { color: #555; font-size: 17px; margin: 0; }
@media (max-width: 640px) { .section-heading { margin-bottom: 36px; } }

.btn {
  display: inline-block;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 6px;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); opacity: .92; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.btn-madera { background: var(--madera); color: var(--navy); }
.btn-outline-navy { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline-crema { background: transparent; color: var(--crema); border: 2px solid var(--crema); }

/* CTA secundario, más liviano, para no repetir botones grandes en cada tarjeta */
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--navy); font-weight: 600; font-size: 14px;
  padding-top: 4px; transition: gap .2s ease, color .2s ease;
}
.link-arrow::after { content: "→"; transition: transform .2s ease; }
.link-arrow:hover { color: var(--madera); gap: 12px; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(22,48,63,0.96);
  padding: 14px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header img.logo { height: 44px; width: auto; }
.header-right { display: flex; align-items: center; gap: 18px; }
.site-nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--crema); font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: var(--madera); }
.nav-cta { background: var(--madera); color: var(--navy) !important; padding: 10px 20px; border-radius: 6px; font-weight: 600; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--crema); border-radius: 2px; transition: all .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .header-right { gap: 12px; }
  .site-nav {
    position: fixed; top: 74px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; align-items: flex-start;
    gap: 0; padding: 0 24px; max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .site-nav.open { max-height: 480px; padding: 12px 24px 24px; }
  .site-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-cta { margin-top: 14px; text-align: center; }
}

/* HERO */
.hero {
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background-size: cover; background-position: center;
  padding: 60px 24px;
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,48,63,.55) 0%, rgba(22,48,63,.78) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero-eyebrow { color: var(--madera); text-transform: uppercase; letter-spacing: 3px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { color: var(--crema); font-size: clamp(34px, 6vw, 64px); line-height: 1.1; }
.hero p { color: var(--crema); font-size: clamp(16px, 2.2vw, 20px); max-width: 600px; margin: 0 auto 36px auto; opacity: .95; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .wave-divider { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; z-index: 2; }
.hero .wave-divider svg { position: static; }

/* DIVISOR DE OLA entre secciones */
.wave-divider { position: relative; height: 0; }
.wave-divider svg { position: absolute; left: 0; width: 100%; height: 64px; display: block; }
.wave-divider.top svg { bottom: 100%; }
.wave-divider.bottom svg { top: 0; transform: translateY(-1px); }

/* SECCION A PANTALLA COMPLETA CON FOTO DE FONDO (Sobre Salvamar / Ubicación) */
.section-photo {
  position: relative; background-size: cover; background-position: center;
  padding: 120px 24px; color: var(--crema); overflow: hidden;
}
.section-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,48,63,.80) 0%, rgba(22,48,63,.68) 45%, rgba(22,48,63,.85) 100%);
}
.section-photo .container { position: relative; z-index: 2; }
.section-photo .section-heading .section-title,
.section-photo .section-heading .section-subtitle { color: var(--crema); }
.section-photo .section-heading .section-subtitle { color: #dbe4e8; }
.section-photo p { color: #e7ecee; }
.section-photo strong { color: var(--crema); }
@media (max-width: 640px) { .section-photo { padding: 76px 20px; } }

/* GRIDS */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.card img { height: 230px; object-fit: cover; width: 100%; }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 19px; color: var(--navy); margin-bottom: 8px; }
.card-body p { color: #555; font-size: 15px; flex: 1; }
.card-body .btn, .card-body .link-arrow { align-self: flex-start; margin-top: 8px; }

.grid-centered { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.grid-centered .card { width: 100%; max-width: 340px; }

/* TRUST BAR */
.trust-bar { background: var(--off-white); border-top: 1px solid #ececea; border-bottom: 1px solid #ececea; }
.trust-bar .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px; padding: 40px 24px; }
.trust-item { display: flex; align-items: center; gap: 14px; max-width: 260px; }
.trust-item .wave-deco { width: 34px; height: auto; flex-shrink: 0; }
.trust-item span { font-size: 14px; color: var(--navy); font-weight: 500; line-height: 1.35; }

/* ABOUT (dentro de section-photo ahora) */
.about-flex { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.about-flex .about-text { flex: 1; min-width: 280px; }

/* GALERIA estilo masonry (sin JS, con columnas CSS) */
.gallery-grid { column-count: 4; column-gap: 12px; }
.gallery-grid .gallery-item { break-inside: avoid; margin-bottom: 12px; }
.gallery-grid img, .gallery-grid .gallery-thumb { width: 100%; height: auto; border-radius: 6px; display: block; }
@media (max-width: 900px) { .gallery-grid { column-count: 3; } }
@media (max-width: 640px) { .gallery-grid { column-count: 2; column-gap: 8px; } .gallery-grid .gallery-item { margin-bottom: 8px; } }

/* FOOTER */
.site-footer { background: var(--navy); color: var(--crema); padding: 0 0 30px 0; position: relative; }
.footer-top { text-align: center; padding: 64px 24px 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-top .wave-deco { width: 54px; height: auto; margin: 0 auto 18px auto; opacity: .85; }
.footer-top h2 { color: var(--crema); font-size: clamp(24px,3.4vw,34px); margin-bottom: 14px; }
.footer-top p { color: #cbd5db; max-width: 520px; margin: 0 auto 26px auto; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; padding: 40px 0 30px; }
.footer-grid img.logo { height: 54px; margin-bottom: 16px; }
.footer-grid p { color: #cbd5db; font-size: 15px; margin: 4px 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-nav a { color: #cbd5db; font-size: 14px; }
.footer-nav a:hover { color: var(--madera); }
.social-icons { display: flex; gap: 14px; margin-top: 16px; }
.social-icons a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: var(--crema);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.social-icons a svg { width: 18px; height: 18px; }
.social-icons a:hover { background: var(--madera); color: var(--navy); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; text-align: center; font-size: 13px; color: #9fb0b8; }

/* WHATSAPP FLOATING BUTTON */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: #25D366; color: #fff; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.wa-float svg { width: 32px; height: 32px; }

/* IDIOMA */
.lang-en, html.lang-en-active .lang-es { display: none; }
html.lang-en-active .lang-en { display: inline; }

.lang-switch {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.12); border-radius: 12px; padding: 6px 10px; margin-left: 8px;
}
.lang-switch .lang-option {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  opacity: .55; transition: all .2s ease;
}
.lang-switch .lang-option svg { width: 26px; height: 18px; display: block; border-radius: 3px; }
.lang-switch .lang-option span {
  font-family: 'Poppins', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--crema);
}
.lang-switch .lang-option.active { opacity: 1; }
.lang-switch .lang-option.active svg { box-shadow: 0 0 0 2px var(--madera); }
.lang-switch .lang-option.active span { color: var(--madera); }
.lang-switch .lang-option:hover { opacity: .85; }

/* REDES SOCIALES - version escritorio (dentro del header) */
.header-social { display: flex; align-items: center; gap: 10px; padding-left: 4px; border-left: 1px solid rgba(255,255,255,.15); margin-left: 4px; }
.header-social span { color: #cbd5db; font-size: 13px; font-weight: 500; white-space: nowrap; }
.header-social a { color: var(--crema); display: flex; opacity: .8; transition: opacity .2s ease, color .2s ease; }
.header-social a:hover { opacity: 1; color: var(--madera); }
.header-social a svg { width: 17px; height: 17px; }

/* REDES SOCIALES - version movil (franja debajo del header, NO fija, se va con el scroll) */
.mobile-social-bar {
  display: none;
  align-items: center; justify-content: center; gap: 16px;
  background: var(--navy);
  padding: 10px 20px;
}
.mobile-social-bar span { color: #cbd5db; font-size: 13px; font-weight: 500; }
.mobile-social-bar a { color: var(--crema); display: flex; }
.mobile-social-bar a svg { width: 19px; height: 19px; }

@media (max-width: 880px) {
  .header-social { display: none; }
  .mobile-social-bar { display: flex; }
}

/* LIGHTBOX */
.gallery-item { cursor: pointer; position: relative; overflow: hidden; border-radius: 6px; display: block; }
.gallery-item:hover img, .gallery-item:hover .gallery-thumb { transform: scale(1.04); }
.gallery-item img, .gallery-item .gallery-thumb { transition: transform .3s ease; }
.gallery-item .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25);
}
.gallery-item .play-badge svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10,18,22,.95); z-index: 9999;
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-content { max-width: 90vw; max-height: 85vh; }
.lightbox-content img, .lightbox-content video {
  max-width: 90vw; max-height: 85vh; border-radius: 6px; display: block; margin: 0 auto;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,.12); border: none; color: #fff;
  cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 28px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 20px; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--madera); color: var(--navy); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
}
