/* =============================================
   EL SOSIEGO — MORELLA
   Estilos compartidos para toda la web
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=Lato:wght@300;400;700&display=swap');

/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  /* Colores globales */
  --amarillo: #E8A820;
  --amarillo-hover: #CF9218;
  --amarillo-claro: rgba(232, 168, 32, 0.15);
  --texto-oscuro: #2C2A26;
  --texto-medio: #5A5550;
  --crema: #F5F0E8;
  --crema-oscura: #EDE7DA;
  --blanco: #FDFAF5;

  /* Casa Rural */
  --verde-musgo: #4A5E3A;
  --verde-musgo-oscuro: #37482B;
  --verde-suave: rgba(74, 94, 58, 0.08);
  --marron-tierra: #7A5C3E;
  --marron-claro: rgba(122, 92, 62, 0.15);

  /* Eventos */
  --azul-celeste: #5BA8C4;
  --azul-oscuro: #3D8CAA;
  --azul-suave: rgba(91, 168, 196, 0.1);

  /* Tipografía */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', sans-serif;

  /* Espaciado */
  --max-width: 1200px;
  --seccion-padding: 90px 24px;

  /* Sombras */
  --sombra-suave: 0 4px 24px rgba(44, 42, 38, 0.08);
  --sombra-media: 0 8px 40px rgba(44, 42, 38, 0.14);
  --sombra-fuerte: 0 16px 60px rgba(44, 42, 38, 0.2);

  /* Transiciones */
  --transicion: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================
   RESET Y BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--texto-oscuro);
  background-color: var(--crema);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =============================================
   NAVEGACIÓN
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transicion);
}

.navbar.scrolled {
  background: rgba(245, 240, 232, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(44, 42, 38, 0.1);
}

/* Modo hero: texto blanco cuando navbar es transparente (solo index) */
.navbar.hero-mode .navbar-logo-text {
  color: #fff;
}

.navbar.hero-mode .navbar-links a {
  color: rgba(255, 255, 255, 0.88);
}

.navbar.hero-mode .navbar-toggle span {
  background: #fff;
}

/* Al hacer scroll (scrolled) se vuelve al color normal */
.navbar.scrolled .navbar-logo-text {
  color: var(--texto-oscuro);
}

.navbar.scrolled .navbar-links a {
  color: var(--texto-oscuro);
}

.navbar.scrolled .navbar-toggle span {
  background: var(--texto-oscuro);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo img {
  height: 44px;
  width: auto;
}

.navbar-logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--texto-oscuro);
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--texto-oscuro);
  padding: 8px 16px;
  border-radius: 2px;
  transition: var(--transicion);
  position: relative;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--amarillo);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  transform: scaleX(1);
}

.navbar-links a.nav-cta {
  background: var(--amarillo);
  color: var(--texto-oscuro);
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 2px;
}

.navbar-links a.nav-cta::after {
  display: none;
}

.navbar-links a.nav-cta:hover {
  background: var(--amarillo-hover);
  transform: translateY(-1px);
}

/* Menú hamburguesa */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--texto-oscuro);
  transition: var(--transicion);
}

.navbar-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggle.open span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   BOTONES
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transicion);
  border-radius: 2px;
  text-decoration: none;
}

.btn-amarillo {
  background: var(--amarillo);
  color: var(--texto-oscuro);
}

.btn-amarillo:hover {
  background: var(--amarillo-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 168, 32, 0.4);
}

.btn-outline-amarillo {
  background: transparent;
  color: var(--amarillo);
  border: 2px solid var(--amarillo);
}

.btn-outline-amarillo:hover {
  background: var(--amarillo);
  color: var(--texto-oscuro);
  transform: translateY(-2px);
}

.btn-verde {
  background: var(--verde-musgo);
  color: var(--crema);
}

.btn-verde:hover {
  background: var(--verde-musgo-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 94, 58, 0.3);
}

.btn-azul {
  background: var(--azul-celeste);
  color: var(--blanco);
}

.btn-azul:hover {
  background: var(--azul-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 168, 196, 0.35);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =============================================
   HERO PAGES (subpáginas)
   ============================================= */
.page-hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.page-hero p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  max-width: 600px;
  margin: 0 auto 40px;
  opacity: 0.8;
}

/* =============================================
   SECCIONES COMUNES
   ============================================= */
.seccion {
  padding: var(--seccion-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.seccion-full {
  padding: var(--seccion-padding);
  width: 100%;
}

.seccion-full .seccion-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.seccion-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amarillo);
  margin-bottom: 16px;
}

.seccion-titulo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--texto-oscuro);
  margin-bottom: 24px;
}

.seccion-titulo em {
  font-style: italic;
  color: var(--verde-musgo);
}

.seccion-titulo em.azul {
  color: var(--azul-celeste);
}

.seccion-subtitulo {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--texto-medio);
  max-width: 580px;
  line-height: 1.8;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--texto-oscuro);
  color: var(--crema);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245, 240, 232, 0.12);
  margin-bottom: 32px;
}

.footer-brand .footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--crema);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.65);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amarillo);
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--amarillo);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--amarillo);
}

.footer-contact-item a {
  color: rgba(245, 240, 232, 0.7);
  transition: color 0.2s;
}

.footer-contact-item a:hover {
  color: var(--amarillo);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.4);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 240, 232, 0.2);
  border-radius: 50%;
  color: rgba(245, 240, 232, 0.6);
  transition: var(--transicion);
}

.footer-socials a:hover {
  border-color: var(--amarillo);
  color: var(--amarillo);
  transform: translateY(-2px);
}

.footer-socials a svg {
  width: 16px;
  height: 16px;
}

/* =============================================
   DECORATIVOS
   ============================================= */
.linea-dorada {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--amarillo);
  margin-bottom: 32px;
}

.linea-dorada.centrada {
  margin-left: auto;
  margin-right: auto;
}

/* Placeholder imágenes */
.img-placeholder {
  background: var(--crema-oscura);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--texto-medio);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 24px;
  border: 2px dashed rgba(122, 92, 62, 0.2);
  position: relative;
  overflow: hidden;
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(122, 92, 62, 0.04) 10px,
    rgba(122, 92, 62, 0.04) 20px
  );
}

.img-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.35;
  position: relative;
  z-index: 1;
}

.img-placeholder span {
  position: relative;
  z-index: 1;
  opacity: 0.6;
}

/* =============================================
   ANIMACIONES AOS — overrides
   ============================================= */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* =============================================
   RESPONSIVE — BREAKPOINTS
   ============================================= */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --seccion-padding: 60px 20px;
  }

  .navbar-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 280px;
    background: var(--crema);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 32px;
    gap: 4px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -4px 0 30px rgba(44, 42, 38, 0.15);
  }

  /* Dentro del panel móvil los links siempre son oscuros, sin importar el modo */
  .navbar-links a,
  .navbar.hero-mode .navbar-links a {
    color: var(--texto-oscuro) !important;
  }

  .navbar-links.open {
    right: 0;
  }

  .navbar-links a {
    width: 100%;
    font-size: 1rem;
    padding: 12px 8px;
  }

  .navbar-links a.nav-cta {
    margin-top: 16px;
    text-align: center;
    width: 100%;
  }

  .navbar-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 24px;
    font-size: 0.8rem;
  }
}

/* =============================================
   LIGHTBOX — galería ampliada al clic
   ============================================= */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,18,14,0.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
  animation: lbFadeIn 0.25s ease;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  cursor: default;
  animation: lbScale 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,240,232,0.12);
  border: 1px solid rgba(245,240,232,0.25);
  border-radius: 50%;
  cursor: pointer;
  color: var(--crema);
  transition: background 0.2s;
  z-index: 9001;
}

.lightbox-close:hover {
  background: rgba(245,240,232,0.25);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lbScale {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* =============================================
   FOTO INTERACTIVA — hover zoom + click cursor
   ============================================= */
.foto-galeria {
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 2px;
  background: var(--crema-oscura);
}

.foto-galeria img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.35s ease;
  will-change: transform;
}

.foto-galeria:hover img {
  transform: scale(1.04);
  filter: brightness(1.04);
}
