/* ===================================================
   CABAÑAS LAS VIOLETAS — style.css
   Paleta: verde bosque, crema cálido, madera
   =================================================== */

/* === VARIABLES === */
:root {
  --verde:        #2d6a4f;
  --verde-oscuro: #1b4332;
  --verde-claro:  #52b788;
  --verde-hover:  #245f44;
  --crema:        #f8f4ed;
  --crema-dark:   #ede8df;
  --madera:       #8b5e3c;
  --texto:        #1a1a1a;
  --texto-medio:  #444;
  --texto-suave:  #777;
  --blanco:       #ffffff;
  --sombra:       0 4px 24px rgba(0,0,0,.10);
  --sombra-hover: 0 8px 32px rgba(0,0,0,.18);
  --radio:        10px;
  --radio-lg:     16px;
  --transicion:   .3s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* === TIPOGRAFÍA === */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
  color: var(--verde-oscuro);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; }

/* === LAYOUT === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.seccion { padding: 5rem 0; }
.bg-crema { background: var(--crema); }

/* === ANIMACIONES === */
.animar {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.animar.visible {
  opacity: 1;
  transform: none;
}

/* === NAVBAR === */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transicion), box-shadow var(--transicion);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--blanco);
  white-space: nowrap;
  transition: color var(--transicion);
}
#nav-links {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}
#nav-links a {
  font-size: .88rem;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  padding: .4rem .65rem;
  border-radius: 5px;
  transition: color var(--transicion), background var(--transicion);
  letter-spacing: .03em;
  text-transform: uppercase;
}
#nav-links a:hover { color: var(--blanco); background: rgba(255,255,255,.15); }

.btn-whatsapp-nav {
  display: flex;
  align-items: center;
  gap: .45rem;
  background: #25D366;
  color: var(--blanco) !important;
  font-size: .85rem;
  font-weight: 700;
  padding: .5rem 1.1rem;
  border-radius: 25px;
  white-space: nowrap;
  transition: background var(--transicion), transform var(--transicion);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.btn-whatsapp-nav:hover { background: #1ebe57; transform: translateY(-1px); }

/* Navbar scrolled */
#navbar.scrolled {
  background: var(--blanco);
  box-shadow: 0 2px 20px rgba(0,0,0,.10);
}
#navbar.scrolled .nav-logo { color: var(--verde-oscuro); }
#navbar.scrolled #nav-links a { color: var(--texto-medio); }
#navbar.scrolled #nav-links a:hover { color: var(--verde); background: rgba(45,106,79,.08); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  z-index: 10;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: background var(--transicion);
}
#navbar.scrolled .hamburger span { background: var(--texto); }

/* === BARRA MÓVIL === */
.barra-movil {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 999;
  background: var(--verde-oscuro);
  justify-content: space-around;
  align-items: center;
  padding: .7rem 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.15);
}
.barra-movil a {
  color: var(--blanco);
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .3rem .8rem;
  transition: opacity var(--transicion);
}
.barra-movil a:hover { opacity: .75; }

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/hero.webp') center/cover no-repeat;
  animation: kenBurns 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(10,40,20,.68), rgba(0,60,30,.50));
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--blanco);
  padding: 2rem 1.5rem;
  max-width: 800px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  color: var(--blanco);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .45rem 1.2rem;
  border-radius: 25px;
  margin-bottom: 1.2rem;
}
.hero-content h1 {
  color: var(--blanco);
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  margin-bottom: .75rem;
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 300;
  color: rgba(255,255,255,.88);
  margin-bottom: 2rem;
  letter-spacing: .02em;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Lato', sans-serif;
  font-size: .92rem;
  font-weight: 700;
  padding: .85rem 1.8rem;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background var(--transicion), transform var(--transicion), box-shadow var(--transicion);
  cursor: pointer;
}
.btn-primary {
  background: #25D366;
  color: var(--blanco);
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
}
.btn-primary:hover { background: #1ebe57; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,.5); }
.btn-secondary {
  background: rgba(255,255,255,.2);
  color: var(--blanco);
  border: 2px solid rgba(255,255,255,.6);
  backdrop-filter: blur(6px);
}
.btn-secondary:hover { background: rgba(255,255,255,.32); transform: translateY(-2px); }
.btn-verde {
  background: var(--verde);
  color: var(--blanco);
  box-shadow: 0 4px 16px rgba(45,106,79,.3);
}
.btn-verde:hover { background: var(--verde-hover); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator span::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,.7);
  border-radius: 2px;
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot {
  0%   { opacity: 1; top: 5px; }
  100% { opacity: 0; top: 22px; }
}

/* === NOSOTROS === */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.nosotros-img-wrap {
  position: relative;
  border-radius: var(--radio-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--sombra);
}
.nosotros-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.nosotros-img-wrap:hover img { transform: scale(1.04); }
.img-badge {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  background: var(--verde);
  color: var(--blanco);
  font-size: .8rem;
  font-weight: 700;
  padding: .4rem .9rem;
  border-radius: 20px;
  letter-spacing: .05em;
}
.nosotros-texto h2 { margin-bottom: .75rem; }
.nosotros-texto p { color: var(--texto-medio); margin-bottom: 1.1rem; }
.linea-deco {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--verde), var(--verde-claro));
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.linea-deco.centrada { margin-left: auto; margin-right: auto; }
.destacado {
  border-left: 4px solid var(--verde);
  background: var(--crema);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radio) var(--radio) 0;
  font-style: italic;
  color: var(--verde-oscuro);
  margin: 1.5rem 0 2rem;
  font-size: .98rem;
  line-height: 1.6;
}

/* === SERVICIOS === */
.titulo-seccion {
  text-align: center;
  margin-bottom: .6rem;
}
.subtitulo-seccion {
  text-align: center;
  color: var(--texto-suave);
  margin-bottom: 2rem;
  font-size: .95rem;
}
.servicios-lista {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 2rem;
}
.servicio-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--blanco);
  border: 1px solid var(--crema-dark);
  border-radius: var(--radio);
  padding: 1.3rem 1.4rem;
  transition: box-shadow var(--transicion), transform var(--transicion);
}
.servicio-item:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.serv-icono {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: .1rem;
}
.servicio-item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin-bottom: .25rem;
}
.servicio-item div { font-size: .92rem; color: var(--texto-medio); line-height: 1.6; }

/* === BANNER INFO === */
.banner-info {
  background: var(--verde);
  display: flex;
  flex-wrap: wrap;
}
.banner-bloque {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,.15);
  color: var(--blanco);
}
.banner-bloque:last-child { border-right: none; }
.banner-icono { font-size: 2rem; }
.banner-bloque strong {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}
.banner-bloque span { font-size: .88rem; color: rgba(255,255,255,.82); }

/* === GALERÍA === */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
  margin-top: 1.8rem;
}
.galeria-item {
  position: relative;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.galeria-item:hover img { transform: scale(1.07); }
.galeria-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,67,50,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  opacity: 0;
  transition: opacity var(--transicion);
}
.galeria-item:hover .galeria-overlay { opacity: 1; }

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.activo { display: flex; }
.lightbox-img-wrap { max-width: 90vw; max-height: 85vh; }
.lightbox-img-wrap img {
  object-fit: contain;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 6px;
}
.lightbox-cerrar {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  font-size: 2.5rem;
  color: var(--blanco);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: opacity var(--transicion);
}
.lightbox-cerrar:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--blanco);
  background: rgba(255,255,255,.1);
  border: none;
  cursor: pointer;
  padding: .5rem .9rem;
  border-radius: 8px;
  transition: background var(--transicion);
  line-height: 1;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.22); }

/* === FAQs === */
.faq-container { max-width: 800px; }
.faq-lista { margin-top: 2rem; display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
  background: var(--blanco);
  border: 1px solid var(--crema-dark);
  border-radius: var(--radio);
  overflow: hidden;
  transition: box-shadow var(--transicion);
}
.faq-item:hover { box-shadow: var(--sombra); }
.faq-pregunta {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--verde-oscuro);
  list-style: none;
  gap: 1rem;
}
.faq-pregunta::-webkit-details-marker { display: none; }
.faq-pregunta::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--verde);
  flex-shrink: 0;
  transition: transform var(--transicion);
}
.faq-item[open] .faq-pregunta::after { transform: rotate(45deg); }
.faq-respuesta {
  padding: 0 1.4rem 1.1rem;
  color: var(--texto-medio);
  font-size: .95rem;
  line-height: 1.7;
}

/* === CÓMO LLEGAR === */
.mapa-botones {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.btn-mapa {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--blanco);
  border: 2px solid var(--verde);
  color: var(--verde);
  font-weight: 700;
  font-size: .88rem;
  padding: .7rem 1.4rem;
  border-radius: 25px;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background var(--transicion), color var(--transicion), transform var(--transicion);
}
.btn-mapa:hover { background: var(--verde); color: var(--blanco); transform: translateY(-2px); }
.mapa-embed {
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sombra);
}
.mapa-embed iframe { display: block; }

/* === CONTACTO === */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.contacto-info h2 { margin-bottom: .7rem; }
.contacto-info p { color: var(--texto-medio); margin-bottom: 1.8rem; }
.contacto-datos { display: flex; flex-direction: column; gap: 1.1rem; }
.contacto-datos li { display: flex; align-items: flex-start; gap: .9rem; }
.dato-icono {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .15rem;
}
.contacto-datos strong { display: block; font-weight: 700; color: var(--verde-oscuro); font-size: .9rem; margin-bottom: .15rem; }
.contacto-datos span { color: var(--texto-medio); font-size: .92rem; }
.contacto-datos a { color: var(--verde); font-weight: 600; }
.contacto-datos a:hover { text-decoration: underline; }

/* Formulario */
.contacto-form {
  background: var(--crema);
  border-radius: var(--radio-lg);
  padding: 2.2rem 2rem;
  box-shadow: var(--sombra);
}
.form-grupo { margin-bottom: 1.2rem; }
.form-grupo label {
  display: block;
  font-size: .87rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.opcional { font-weight: 400; color: var(--texto-suave); text-transform: none; }
.form-grupo input,
.form-grupo textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid #d5cfc5;
  border-radius: var(--radio);
  font-family: 'Lato', sans-serif;
  font-size: .95rem;
  color: var(--texto);
  background: var(--blanco);
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.form-grupo input:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
.form-grupo textarea { resize: vertical; min-height: 110px; }
.form-ok {
  display: none;
  margin-top: 1rem;
  padding: .9rem 1.2rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: var(--radio);
  font-weight: 700;
  font-size: .92rem;
  text-align: center;
}

/* === FOOTER === */
footer {
  background: var(--verde-oscuro);
  color: rgba(255,255,255,.8);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding: 3.5rem 1.5rem 2rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: .6rem;
}
.footer-brand p { font-size: .9rem; line-height: 1.6; margin-bottom: .8rem; }
.footer-tel { display: flex; flex-direction: column; gap: .3rem; }
.footer-tel a { color: var(--verde-claro); font-size: .92rem; font-weight: 600; }
.footer-tel a:hover { color: var(--blanco); }
.footer-links nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer-links nav a {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  transition: color var(--transicion);
}
.footer-links nav a:hover { color: var(--blanco); }
.footer-cta { display: flex; align-items: flex-start; }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.2rem 1.5rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}

/* === BOTÓN ARRIBA === */
.btn-arriba {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 998;
  background: var(--verde);
  color: var(--blanco);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transicion), transform var(--transicion);
}
.btn-arriba.visible { opacity: 1; pointer-events: auto; }
.btn-arriba:hover { transform: translateY(-3px); background: var(--verde-hover); }

/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 1024px) {
  .galeria-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-cta { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .contacto-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .btn-whatsapp-nav { display: none; }

  #nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--verde-oscuro);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: .5rem;
    z-index: 999;
  }
  #nav-links.abierto { display: flex; }
  #nav-links a {
    font-size: 1rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    color: rgba(255,255,255,.9);
    display: block;
  }

  .barra-movil { display: flex; }
  .btn-arriba { bottom: 4.5rem; }

  .grid-2col { grid-template-columns: 1fr; gap: 2rem; }
  .galeria-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-bloque { flex: 0 0 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .banner-bloque:last-child { border-bottom: none; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  .servicios-lista { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
  .mapa-botones { flex-direction: column; align-items: center; }
  .contacto-form { padding: 1.5rem 1.2rem; }
  .seccion { padding: 3rem 0; }
}
