/**
 * shared.css — Estilos compartidos entre páginas públicas
 * [MEJORA-CSS] Consolidado desde index.php, proyecto.php, visor.php, comparar.php, marketplace.php
 * Las clases base (.video-background, .stat-badge, .btn-wa, .leyenda-mapa, .info-parcela)
 * viven en parcelas-osorno-css.css. Aquí solo van las que son inline en múltiples páginas.
 */

/* ── Botón WhatsApp flotante / CTA ─────────────────────────── */
.btn-wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #25D366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  text-decoration: none;
  z-index: 9999;
  transition: transform .2s, box-shadow .2s;
}
.btn-wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,.5); color:#fff; }

/* ── Badges de estado de parcela ───────────────────────────── */
.badge-disponible { background: #dcfce7; color: #166534; }
.badge-reservada  { background: #fef9c3; color: #854d0e; }
.badge-vendida    { background: #fee2e2; color: #991b1b; }

/* ── Estadísticas rápidas (stat-badge) ────────────────────── */
.stat-disp  { background: #16a34a; }
.stat-res   { background: #d97706; }
.stat-vend  { background: #dc2626; }

/* ── Leyenda del mapa ──────────────────────────────────────── */
.leyenda-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: #555;
}
.leyenda-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Cards de comparación / marketplace ───────────────────── */
.proyecto-card-compare {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.proyecto-card-compare:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

/* ── Sección hero con video ────────────────────────────────── */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.55) 100%);
  z-index: 1;
}

/* ── Formulario de contacto ────────────────────────────────── */
.form-contacto-wrap {
  background: rgba(255,255,255,.97);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

/* ── Precio en UF ──────────────────────────────────────────── */
.precio-uf {
  font-size: 1.6rem;
  font-weight: 800;
  color: #2D4A1E;
  line-height: 1.1;
}
.precio-uf small {
  font-size: .9rem;
  font-weight: 400;
  color: #6b7280;
}

/* ── Responsive utils ──────────────────────────────────────── */
@media (max-width: 768px) {
  .btn-wa-float { width: 48px; height: 48px; font-size: 1.3rem; }
  .precio-uf    { font-size: 1.3rem; }
}

/* ── Animaciones comunes ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { animation: fadeInUp .5s ease both; }

/* ════════════════════════════════════════════════════════════════
   GALERÍA CAROUSEL (gc-*)  — usada en index.php y proyecto.php
   ════════════════════════════════════════════════════════════════ */
.gc-wrap {
  max-width: 900px;
  margin: 1.5rem auto 0;
}
.gc-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
.gc-main img,
.gc-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .25s;
}
.gc-counter {
  position: absolute;
  top: .75rem;
  right: .85rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .75rem;
  padding: .2rem .65rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.gc-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .65rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff;
  font-size: .85rem;
  pointer-events: none;
  border-radius: 0 0 14px 14px;
}
.gc-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s;
  z-index: 2;
}
.gc-btn:hover   { background: rgba(0,0,0,.7); }
.gc-btn.prev    { left:  .6rem; }
.gc-btn.next    { right: .6rem; }

/* Tira de miniaturas */
.gc-thumbs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .5rem 0;
  scrollbar-width: thin;
  scrollbar-color: #2D4A1E #f0f0f0;
}
.gc-thumbs::-webkit-scrollbar       { height: 5px; }
.gc-thumbs::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 4px; }
.gc-thumbs::-webkit-scrollbar-thumb { background: #2D4A1E; border-radius: 4px; }

.gc-thumb {
  flex: 0 0 90px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: .6;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s;
  position: relative;
}
.gc-thumb img,
.gc-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.gc-thumb.activo { opacity: 1; border-color: #2D4A1E; }
.gc-thumb:hover  { opacity: .9; }

.gc-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  background: rgba(0,0,0,.3);
}

@media (max-width: 640px) {
  .gc-btn  { width: 32px; height: 32px; font-size: 1.2rem; }
  .gc-thumb { flex: 0 0 68px; height: 50px; }
}

/* ════════════════════════════════════════════════════════════════
   LIGHTBOX OVERLAY  — index.php, proyecto.php
   ════════════════════════════════════════════════════════════════ */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 10500;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.activo { display: flex; }

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: opacity .2s;
  z-index: 10501;
}
.lightbox-close:hover { opacity: 1; }

/* Modal estático (compatibilidad) */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 10500;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.modal.activo { display: flex; }
.modal .modal-content {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  display: block;
}
.modal .close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  font-weight: 300;
  line-height: 1;
  z-index: 10501;
}

/* ════════════════════════════════════════════════════════════════
   FAQ — PREGUNTAS FRECUENTES  (index.php, proyecto.php)
   ════════════════════════════════════════════════════════════════ */
section#faq {
  background: #f7faf5;
  padding: 4rem 1.5rem;
}
.faq-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.faq-titulo {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #1e4620;
  margin: 0 0 .5rem;
}
.faq-subtitulo {
  color: #6b7280;
  font-size: .95rem;
  margin: 0 0 2rem;
}
.faq-item {
  border-bottom: 1px solid #d1e8d1;
  overflow: hidden;
}
.faq-pregunta {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #1e4620;
  cursor: pointer;
  line-height: 1.4;
  transition: color .2s;
}
.faq-pregunta:hover { color: #2D4A1E; }
.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: #2D4A1E;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 700;
  transition: transform .3s, background .2s;
}
.faq-item.abierto .faq-icon {
  transform: rotate(45deg);
  background: #C8A96E;
}
.faq-respuesta {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-item.abierto .faq-respuesta { max-height: 600px; }
.faq-respuesta-inner {
  padding: 0 0 1.25rem 2.25rem;
  color: #374151;
  font-size: .92rem;
  line-height: 1.75;
}

/* CTA lateral del FAQ */
.faq-cta {
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  text-align: center;
  border: 1px solid #e0ead0;
  position: sticky;
  top: 6rem;
}
.faq-cta .cta-icono { font-size: 2.5rem; margin-bottom: .75rem; }
.faq-cta h4 { color: #1e4620; font-weight: 700; margin: 0 0 .5rem; }
.faq-cta p  { color: #6b7280; font-size: .88rem; line-height: 1.6; margin: 0 0 1.25rem; }

.btn-visor-cta {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  background: #f4faf4;
  color: #1e4620;
  border: 1.5px solid #a8d5a8;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  text-align: center;
  transition: background .2s, border-color .2s;
  margin-top: .5rem;
}
.btn-visor-cta:hover {
  background: #e0f0e0;
  border-color: #2D4A1E;
  color: #1e4620;
}

@media (max-width: 820px) {
  .faq-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .faq-cta { position: static; }
}
