/**
 * styles.css - Estilos globales del sitio web Kalaluna
 *
 * Estructura de bloques:
 *   1.  Reset global y configuración base
 *   2.  Header y navegación inteligente
 *   3.  Sección Hero (Inicio)
 *   4.  Sección Sobre Kalaluna
 *   5.  Sección Servicios
 *   6.  Sección Espacios / Instalaciones
 *   7.  Galería y Portafolio
 *   8.  Contacto y Ubicación
 *   9.  Pie de Página (Footer)
 *   10. Media Queries responsivos
 *
 * Paleta de colores:
 *   Dorado:       #D4AF37  (acentos, bordes, hovers)
 *   Crema:        #FAF6F0  (fondos claros, texto en fondos oscuros)
 *   Marrón nogal: #2C1E16  (texto general)
 *   Verde bosque: #071410  (fondos de secciones)
 *   Marrón café:  #1A120C  (fondos de tarjetas)
 *
 * Breakpoints responsivos:
 *   1200px - Laptops y escritorios pequeños
 *   992px  - Tablets
 *   768px  - Tablets pequeñas y celulares grandes
 *   575px  - Celulares pequeños
 */


/* 1. RESETEO GLOBAL Y CONFIGURACIÓN BASE */

/** Scroll suave al navegar entre anclas, box-sizing global */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

/** Hereda box-sizing en todos los elementos */
*, *:before, *:after {
  box-sizing: inherit;
}

/** Reseteo de márgenes, fondo crema, texto marrón, fuente del sistema */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: #FAF6F0;
  color: #2C1E16;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color-scheme: light dark;
}

/** Reseteo del main (padding y margin en 0) */
main {
  padding: 0;
  margin: 0;
}

/** Offset para que el scroll no tape el header fijo (70px) */
section, [id] {
  scroll-margin-top: 70px;
}

/** Layout general de secciones (excepto hero que usa 100vh) */
section:not(.section-hero) {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/** Subtítulos de sección: uppercase, letter-spacing, color dorado */
.section-subtitle {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #C5A059;
  display: block;
  margin-bottom: 0.5rem;
}

/** Contenedor de encabezado de sección */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

/** Tipografía de títulos h2 dentro de secciones */
section h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 2.5rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1rem;
}

/**
 * Botón primario (CTA).
 * Fondo dorado con texto blanco, hover invierte colores.
 */
.btn-primary {
  background-color: #D4AF37;
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid #D4AF37;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #2C1E16;
  color: #D4AF37;
  border-color: #2C1E16;
}


/* 2. HEADER Y NAVEGACIÓN INTELIGENTE */

/**
 * Header principal.
 * Posición absoluta por defecto (flota sobre el hero).
 * Se oculta/muestra con transform translateY según scroll.
 */
header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  background: transparent;
  box-sizing: border-box;
  z-index: 1000 !important;
  color: #FFFFFF;
  transition: transform 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

/** Estado oculto: se desplaza fuera de pantalla hacia arriba */
header.site-header.header-hidden {
  transform: translateY(-100%);
}

/**
 * Estado fijo: position fixed, fondo oscuro con blur,
 * sombra sutil, padding reducido.
 */
header.site-header.header-fixed {
  position: fixed;
  background-color: rgba(7, 20, 16, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  padding: 0.8rem 3rem;
  align-items: center;
  color: #ffffff;
}

/**
 * Forzar header visible cuando el menú hamburguesa está abierto.
 * Usa :has() para detectar si el body tiene el overlay abierto.
 */
header.site-header:has(.menu-toggle.active),
body:has(.mobile-menu-overlay.is-open) header.site-header {
  transform: translateY(0) !important;
  position: fixed !important;
  background: transparent !important;
  box-shadow: none !important;
}

/**
 * Botón hamburguesa / X.
 * Sin fondo, sin borde, color blanco, z-index alto.
 */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002 !important;
  position: relative;
  transition: opacity 0.3s ease;
}

/** Color del trazo SVG del botón hamburguesa */
.menu-toggle svg {
  stroke: #ffffff !important;
}

/**
 * Contenedor del logo y nombre del sitio.
 * Centrado absolutamente en el header.
 */
.header-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0px;
  transition: opacity 0.3s ease;
}

/** Logo principal del header (visible solo en estado inicial) */
.site-logo {
  height: 200px;
  width: auto;
  margin-bottom: 5px;
  transition: opacity 0.3s ease;
}

/** Texto de la marca (oculto por defecto, visible en header fijo) */
.brand-text {
  display: none;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

/** Ocultar logo grande en estado fijo */
header.site-header.header-fixed .site-logo {
  display: none;
}

/** Reposicionar marca en estado fijo */
header.site-header.header-fixed .header-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
}

/** Mostrar texto de marca en estado fijo */
header.site-header.header-fixed .brand-text {
  display: block !important;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #ffffff;
  text-decoration: none;
}

/** Contenedor del enlace "Contáctanos" (derecha) */
.header-action {
  margin-left: auto;
  transition: opacity 0.3s ease;
}

/** Estilo del enlace de contacto rápido */
.header-link {
  text-decoration: none;
  color: inherit;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-bottom: 0;
  transition: opacity 0.3s ease;
  font-weight: 600;
  opacity: 0.95;
}

.header-link:hover {
  opacity: 0.6;
}

/**
 * Overlay del menú móvil.
 * Pantalla completa, fondo radial verde oscuro, opacity 0 por defecto.
 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    #0e241c 0%,
    #071410 70%,
    #030907 100%
  ) !important;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/** Estado abierto del overlay: visible con opacity 1 */
.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/** Lista de enlaces de navegación del menú móvil */
.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/** Estilo de cada enlace del menú móvil */
.mobile-nav-links a {
  color: #FAF6F0;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.4rem;
  letter-spacing: 3px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
  color: #D4AF37;
}

/** Enlace de contacto con borde dorado (destacado) */
.mobile-contact-link {
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 0.6rem 1.8rem;
  border-radius: 4px;
  color: #D4AF37 !important;
  display: inline-block;
  margin-top: 0.5rem;
}

.mobile-contact-link:hover {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: #D4AF37;
}

/** Ocultar marca y acción cuando el menú está abierto */
body:has(.mobile-menu-overlay.is-open) .header-brand,
body:has(.mobile-menu-overlay.is-open) .header-action {
  opacity: 0 !important;
  pointer-events: none !important;
}

/** Reposicionar hamburguesa al centro superior cuando el menú está abierto */
body:has(.mobile-menu-overlay.is-open) .menu-toggle {
  position: fixed;
  top: 1.5rem;
  left: 2rem;
}


/* 3. SECCIÓN INICIO (HERO COVER) */

/**
 * Hero: pantalla completa con imagen de fondo.
 * Flexbox centrado, padding-top alto para compensar el header.
 * Background color oscuro evita flash blanco antes de cargar la imagen.
 */
.section-hero {
  min-height: 100vh;
  width: 100vw;
  background-color: #071410;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('./images/image_3.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 160px 2rem 2rem 2rem;
  box-sizing: border-box;
}

/** Contenedor del texto del hero */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/** Título principal del hero */
.section-hero h1 {
  font-family: "Times New Roman", Times, serif;
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #FFFFFF;
  max-width: 800px;
}

/** Párrafo del hero */
.section-hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  color: #FFFFFF;
}


/* 4. SECCIÓN "SOBRE KALALUNA" */

/** Logo badge de la sección about */
.about-badge-logo {
  height: 120px;
  width: auto;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

/**
 * Wrapper de la sección about.
 * Fondo radial verde oscuro, sombras inset, ancho completo (100vw).
 */
.section-about-wrapper {
  background: radial-gradient(
    ellipse 80% 50% at 50% 35%,
    #142e26 0%,
    #0d1f19 50%,
    #050d0a 100%
  ) !important;
  box-shadow: inset 0 30px 40px -10px rgba(0, 0, 0, 0.5),
              inset 0 -30px 40px -10px rgba(0, 0, 0, 0.5) !important;
  width: 100vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 6rem 2rem !important;
  box-sizing: border-box;
}

/** Contenedor centrado del contenido about */
.section-about {
  max-width: 750px !important;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/** Subtítulo dorado en sección about */
.section-about .section-subtitle {
  color: #D4AF37;
  margin-bottom: 0.75rem;
}

/** Título de la sección about */
.section-about h2 {
  color: #FAF6F0;
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

/** Párrafo lead de la sección about */
.about-lead {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #D5C9BD;
  font-weight: 300;
  max-width: 650px;
  margin: 0 0 3.5rem 0;
}

/** Contenedor de la imagen about (con borde dorado y sombra) */
.about-image-container {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/** Imagen about con efecto hover de zoom */
.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.about-image-container:hover .about-image {
  transform: scale(1.03);
}


/* 5. SECCIÓN "NUESTROS SERVICIOS" */

/**
 * Wrapper de servicios.
 * Mismo patrón que about: fondo radial, 100vw, sombras inset.
 */
.section-services-wrapper {
  background: radial-gradient(
    ellipse 80% 50% at 50% 40%,
    #142e26 0%,
    #0d1f19 50%,
    #050d0a 100%
  ) !important;
  box-shadow: inset 0 30px 40px -10px rgba(0, 0, 0, 0.5),
              inset 0 -30px 40px -10px rgba(0, 0, 0, 0.5) !important;
  width: 100vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 6rem 2rem !important;
  box-sizing: border-box;
}

/** Contenedor interno de servicios */
.section-services {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent !important;
}

/** Título de servicios en color claro */
.section-services h2 {
  color: #FAF6F0 !important;
}

/**
 * Grid editorial de tarjetas de servicios.
 * 12 columnas, gap de 2rem.
 */
.services-editorial-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
}

/**
 * Tarjeta de servicio por defecto: ocupa 4 columnas.
 * Fondo marrón café, borde dorado sutil, sombra profunda.
 */
.service-card-editorial {
  grid-column: span 4;
  background: #1a120c;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.65),
              0 0 20px 2px rgba(212, 175, 55, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

/** Tarjeta destacada: ocupa 6 columnas (doble de ancho) */
.service-card-editorial.card-featured {
  grid-column: span 6;
}

/**
 * Hover en dispositivos con pointer fino.
 * Eleva la tarjeta y agranda la sombra.
 */
@media (hover: hover) {
  .service-card-editorial:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.85),
                0 0 30px 5px rgba(212, 175, 55, 0.22);
  }

  .service-card-editorial:hover .service-img {
    transform: scale(1.05);
  }
}

/** Wrapper de la imagen del servicio */
.service-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/** Imagen destacada usa aspect-ratio más ancho */
.card-featured .service-image-wrapper {
  aspect-ratio: 16 / 9;
}

/** Imagen del servicio con object-fit cover */
.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

/**
 * Overlay degradado sobre la imagen del servicio.
 * Degradado de oscuro abajo hacia transparente arriba.
 */
.service-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 23, 19, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

/** Título del servicio sobre la imagen */
.service-image-overlay h3 {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.5px;
}

/** Línea divisoria dorada entre imagen y descripción */
.service-gold-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, #D4AF37 0%, rgba(212, 175, 55, 0.2) 100%);
}

/** Contenedor de la descripción del servicio */
.service-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

/** Texto de la descripción del servicio */
.service-info p {
  color: #D5C9BD;
  font-size: 1.08rem;
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}


/* 6. SECCIÓN "NUESTROS ESPACIOS" / INSTALACIONES */

/**
 * Wrapper de instalaciones.
 * Mismo patrón de fondo radial y 100vw.
 */
.section-spaces-wrapper {
  background: radial-gradient(
    ellipse 80% 50% at 50% 40%,
    #142e26 0%,
    #0d1f19 50%,
    #050d0a 100%
  ) !important;
  box-shadow: inset 0 30px 40px -10px rgba(0, 0, 0, 0.5),
              inset 0 -30px 40px -10px rgba(0, 0, 0, 0.5) !important;
  width: 100vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 6rem 2rem !important;
  box-sizing: border-box;
}

/**
 * Layout de dos columnas: sticky izquierda + scroll derecha.
 * Grid de 1fr 1.2fr con gap de 5rem.
 */
.spaces-split-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

/** Columna izquierda: sticky al hacer scroll */
.spaces-sticky-left {
  position: sticky;
  top: 6rem;
  padding-right: 2rem;
}

/** Subtítulo en la columna sticky */
.spaces-sticky-left .section-subtitle {
  color: #D4AF37;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/** Título de la sección instalaciones */
.spaces-sticky-left h2 {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 2.8rem;
  margin: 0.5rem 0 1.5rem 0;
  line-height: 1.1;
}

/** Párrafo lead de la columna sticky */
.spaces-lead {
  color: #D5C9BD;
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 2rem;
}

/** Badge dorado con borde */
.spaces-gold-badge {
  display: inline-block;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

/** Texto del badge dorado */
.spaces-gold-badge span {
  color: #D4AF37;
  font-size: 0.80rem;
  letter-spacing: 1.5px;
}

/** Columna derecha: bloques de especificaciones */
.spaces-scroll-right {
  display: flex;
  flex-direction: column;
}

/**
 * Bloque de especificación individual.
 * Separado por borde inferior dorado semi-transparente.
 */
.spec-block {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: border-color 0.3s ease;
}

/** Primer bloque sin padding-top */
.spec-block:first-child {
  padding-top: 0;
}

/** Último bloque sin borde inferior */
.spec-block:last-child {
  border-bottom: none;
}

/** Hover: intensificar borde inferior */
.spec-block:hover {
  border-bottom-color: rgba(212, 175, 55, 0.6);
}

/** Etiqueta del bloque (ej: "01 / AFORO") */
.spec-tag {
  color: #D4AF37;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
}

/** Título del bloque de especificación */
.spec-block h3 {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 1.5rem;
  margin: 0 0 0.8rem 0;
  font-weight: 400;
}

/** Descripción del bloque de especificación */
.spec-block p {
  color: #D5C9BD;
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0;
  font-weight: 300;
}


/* 7. GALERÍA Y PORTAFOLIO DE EVENTOS */

/** Wrapper del portafolio */
.portfolio-wrapper {
  width: 100%;
}

/**
 * Wrapper del banner de galería.
 * Fondo radial, 100vw, overflow visible para la tarjeta flotante.
 */
.section-gallery-banner-wrapper {
  background: radial-gradient(
    ellipse 80% 50% at 50% 30%,
    #0e241c 0%,
    #071410 60%,
    #030907 100%
  ) !important;
  box-shadow: inset 0 20px 30px -10px rgba(0, 0, 0, 0.8) !important;
  width: 100vw;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 4rem 2rem 6rem 2rem !important;
  padding-bottom: 5rem !important;
  box-sizing: border-box;
  overflow: visible !important;
}

/** Contenedor del banner */
.gallery-banner-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

/**
 * Marco de la imagen del banner.
 * Height fijo de 480px, overflow hidden, borde dorado sutil.
 */
.gallery-banner-frame {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  background-color: #071410;
}

/** Imagen del banner */
.gallery-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

/**
 * Tarjeta flotante sobre el banner.
 * Posicionada absolutamente en la esquina inferior derecha.
 * Se superpone al banner con bottom negativo.
 */
.gallery-floating-card {
  position: absolute;
  bottom: -2.5rem;
  right: 3rem;
  background-color: #1a120c;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 2.2rem 2rem;
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
  max-width: 320px;
  z-index: 50 !important;
}

/** Subtítulo de la tarjeta flotante */
.floating-card-subtitle {
  color: #D4AF37;
  font-size: 0.75rem;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/** Título de la tarjeta flotante */
.floating-card-title {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  font-weight: 400;
  line-height: 1.2;
}

/**
 * Botón de acción de la tarjeta flotante.
 * Borde inferior dorado, hover invierte colores.
 */
.floating-card-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FAF6F0;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-decoration: none;
  border-bottom: 1px solid #D4AF37 !important;
  padding-bottom: 4px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.floating-card-btn:hover {
  color: #D4AF37;
  border-color: #FAF6F0 !important;
}

/** Flecha del botón: transición de rotación/traslación */
.btn-arrow {
  transition: transform 0.3s ease;
}

/** Flecha rotada 90° cuando la galería está abierta */
.btn-arrow.open {
  transform: rotate(90deg);
}

/** Flecha se desliza a la derecha en hover (solo cuando no está abierta) */
.floating-card-btn:hover .btn-arrow:not(.open) {
  transform: translateX(5px);
}

/**
 * Wrapper de la galería desplegable (grid de fotos).
 * Fondo radial más claro, ancho completo.
 */
.section-gallery-grid-wrapper {
  background: radial-gradient(
    ellipse 75% 60% at 50% 35%,
    #1b3b2f 0%,
    #0e241c 45%,
    #071410 75%,
    #030907 100%
  ) !important;
  box-shadow: inset 0 20px 35px -10px rgba(0, 0, 0, 0.75) !important;
  width: 100vw !important;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 5rem 2rem 6rem 2rem !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/** Contenedor del toggle de galería */
#galeria {
  background-color: #071410 !important;
  width: 100%;
  padding: 0;
  margin: 0;
  position: relative;
  z-index: 10;
}

/** Estado cerrado: altura 0, oculto */
.gallery-toggle-container.is-closed {
  height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/** Estado abierto: altura automática, visible */
.gallery-toggle-container.is-open {
  height: auto;
  overflow: visible;
  visibility: visible;
  opacity: 1;
  background-color: #071410 !important;
  transition: opacity 0.35s ease-in-out;
}

/** Animación de fade-in para la galería */
@keyframes fadeInGallery {
  0% {
    opacity: 0;
    transform: translateY(8px);
    background-color: #071410;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/** Contenedor interno de la galería */
.gallery-content-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent !important;
}

/**
 * Grid de imágenes de la galería.
 * Columnas responsivas: mínimo 320px por columna.
 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/**
 * Item individual de la galería.
 * Aspect-ratio 4:3, fondo oscuro para prevenir flash blanco.
 */
.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0 !important;
  overflow: hidden !important;
  background-color: #071410 !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65) !important;
}

/** Imagen del item con hover zoom */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
  border-radius: 0 !important;
  background-color: #071410 !important;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/** Contenedor del botón "Cerrar Portafolio" */
.gallery-close-footer {
  text-align: center;
  margin-top: 4rem;
}

/**
 * Botón de cerrar galería.
 * Borde dorado, fondo transparente, hover resalta.
 */
.close-gallery-btn {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
  color: #D5C9BD !important;
  padding: 0.8rem 2.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
}

.close-gallery-btn:hover {
  border-color: #D4AF37 !important;
  color: #D4AF37 !important;
  background-color: rgba(212, 175, 55, 0.08) !important;
}


/* 8. CONTACTO Y UBICACIÓN */

/**
 * Wrapper de contacto.
 * Fondo radial, 100vw, padding inferior mayor para compensar tarjeta.
 */
.section-contact-wrapper {
  background: radial-gradient(
    ellipse 75% 60% at 50% 35%,
    #1b3b2f 0%,
    #0e241c 45%,
    #071410 75%,
    #030907 100%
  ) !important;
  box-shadow: inset 0 20px 35px -10px rgba(0, 0, 0, 0.75) !important;
  width: 100vw !important;
  max-width: none !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 6rem 2rem 7rem 2rem !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/** Layout de dos columnas: info izquierda, tarjeta derecha */
.contact-editorial-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/** Título de contacto */
.contact-title {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 2.5rem;
  margin: 0 0 1.5rem 0;
  font-weight: 400;
  line-height: 1.2;
}

/** Párrafo lead de contacto */
.contact-lead {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/** Espaciado entre items de contacto */
.contact-details-list .contact-detail-item {
  margin-bottom: 1.8rem;
}

/** Ajuste de etiqueta dentro de la lista */
.contact-details-list .detail-label {
  margin-bottom: 0.5rem !important;
  letter-spacing: 1.8px !important;
}

/** Ajuste de valor dentro de la lista */
.contact-details-list .detail-value {
  line-height: 1.6 !important;
}

/** Etiqueta de detalle (ej: "UBICACIÓN FÍSICA") */
.detail-label {
  color: #D4AF37;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 0.3rem;
}

/** Valor del detalle (dirección, teléfono, email) */
.detail-value {
  color: #FAF6F0;
  font-size: 1.1rem;
  margin: 0;
}

/** Tarjeta flotante de contacto (columna derecha) */
.contact-floating-card {
  background-color: #1a120c;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 3rem 2.5rem;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/** Título dentro de la tarjeta de contacto */
.contact-floating-card .floating-card-title {
  font-family: "Times New Roman", Times, serif;
  color: #FAF6F0;
  font-size: 1.8rem;
  margin: 0 0 2rem 0;
  font-weight: 400;
}

/** Lista vertical de botones de contacto */
.contact-actions-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/**
 * Botón de acción de contacto (WhatsApp, Gmail, Facebook, Maps).
 * Borde inferior dorado, flex para alinear icono + texto + flecha.
 */
.contact-action-btn {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4) !important;
  padding: 0.8rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #FAF6F0;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-action-btn:hover {
  color: #D4AF37;
  border-color: #D4AF37 !important;
  padding-left: 5px;
}

/** Flecha del botón de contacto */
.contact-action-btn .btn-arrow {
  transition: transform 0.3s ease;
}

.contact-action-btn:hover .btn-arrow {
  transform: translateX(6px);
}

/** Contenedor del icono + texto en el botón de contacto */
.btn-content-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/** Icono SVG de los botones de contacto */
.contact-icon {
  width: 18px;
  height: 18px;
  fill: #D4AF37;
  transition: transform 0.3s ease, fill 0.3s ease;
}

/** Icono: scale + color en hover */
.contact-action-btn:hover .contact-icon {
  transform: scale(1.15);
  fill: #FAF6F0;
}


/* 9. PIE DE PÁGINA (FOOTER) */

/** Footer principal */
.site-footer {
  background-color: #1a120c !important;
  border-top: 1px solid rgba(212, 175, 55, 0.4) !important;
  padding: 1.8rem 2rem !important;
  color: #D5C9BD;
}

/** Contenedor flex del footer: logo izquierda, créditos derecha */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/** Lado izquierdo: logo + tagline */
.footer-brand-side {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/** Logo de Kalaluna en el footer */
.kalaluna-footer-logo {
  height: 80px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

/** Texto de tagline del footer */
.footer-tagline-text {
  color: #D4AF37;
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 500;
  line-height: 1;
}

/** Lado derecho: desarrollador + copyright */
.footer-credits-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/** Texto de copyright */
.footer-copyright-text {
  margin: 0;
  font-size: 0.8rem;
  color: #D5C9BD;
  letter-spacing: 0.5px;
  line-height: 1;
}

/** Fila del desarrollador (texto + logo) */
.footer-developer-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #D4AF37;
  line-height: 1;
}

/** Enlace del logo del desarrollador */
.brajos-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/** Logo del desarrollador (fondo blanco para contraste) */
.brajos-logo-img {
  height: 22px !important;
  width: auto !important;
  object-fit: contain;
  background-color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  display: block;
}


/* 10. MEDIA QUERIES RESPONSIVOS */

/**
 * Breakpoint 1: Laptops y escritorios pequeños (≤1200px)
 * - Reduce padding del header
 * - Reduce gap del grid de servicios
 * - Reduce padding de todas las secciones
 */
@media (max-width: 1200px) {
  header.site-header {
    padding: 1.2rem 2rem;
  }

  header.site-header.header-fixed {
    padding: 0.8rem 2rem;
  }

  .services-editorial-grid {
    gap: 1.5rem;
  }

  .section-services-wrapper,
  .section-about-wrapper,
  .section-spaces-wrapper,
  .section-gallery-banner-wrapper,
  .section-contact-wrapper {
    padding: 5rem 2rem !important;
  }
}

/**
 * Breakpoint 2: Tablets (≤992px)
 * - Logo más pequeño
 * - Hero con menos padding-top
 * - Servicios: grid de 2 columnas (todas iguales)
 * - Espacios: sin sticky, columna única
 * - Contacto: columna única
 */
@media (max-width: 992px) {
  header.site-header {
    padding: 1rem 1.5rem;
  }

  .site-logo {
    height: 140px;
  }

  .section-hero {
    padding-top: 180px;
  }

  .section-hero h1 {
    font-size: 2.8rem;
  }

  .section-about h2 {
    font-size: 2.3rem;
  }

  .services-editorial-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }

  .service-card-editorial,
  .service-card-editorial.card-featured {
    grid-column: span 3;
  }

  .card-featured .service-image-wrapper,
  .service-image-wrapper {
    aspect-ratio: 4 / 3;
  }

  .service-image-overlay h3 {
    font-size: 1.3rem;
  }

  .spaces-split-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .spaces-sticky-left {
    position: relative;
    top: 0;
    padding-right: 0;
  }

  .spaces-sticky-left h2 {
    font-size: 2.3rem;
  }

  .contact-editorial-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-title {
    font-size: 2.2rem;
  }
}

/**
 * Breakpoint 3: Tablets pequeñas y celulares grandes (≤768px)
 * - Brand text más pequeño
 * - Hero: h1 y p más pequeños
 * - Servicios: grid de 1 columna
 * - Galería: tarjeta flotante pasa a posición relativa
 * - Footer: columna vertical centrada
 */
@media (max-width: 768px) {
  header.site-header.header-fixed .brand-text {
    font-size: 1.2rem;
  }

  .site-logo {
    height: 110px;
  }

  .section-hero h1 {
    font-size: 2.2rem;
  }

  .section-hero p {
    font-size: 1rem;
  }

  .services-editorial-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card-editorial,
  .service-card-editorial.card-featured {
    grid-column: span 1;
  }

  .service-image-wrapper,
  .card-featured .service-image-wrapper {
    aspect-ratio: 16 / 10;
  }

  /** Galería: overflow visible para que la tarjeta no se corte */
  .section-gallery-banner-wrapper {
    padding-bottom: 5rem !important;
    overflow: visible !important;
  }

  .gallery-banner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }

  .gallery-banner-frame {
    height: 260px;
    width: 100%;
    overflow: visible !important;
  }

  /**
   * Tarjeta flotante: pasa a posición relativa
   * y se superpone sobre la imagen con margin negativo.
   */
  .gallery-floating-card {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    margin: -2.5rem auto 0 auto !important;
    width: 90% !important;
    max-width: 380px !important;
    padding: 1.8rem 1.5rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.75) !important;
    z-index: 20 !important;
    display: block !important;
  }

  .floating-card-title {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }

  .floating-card-btn {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 0.85rem !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-floating-card {
    padding: 2rem 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 1.5rem;
  }

  .footer-brand-side {
    flex-direction: column;
    gap: 0.6rem;
  }

  .footer-credits-side {
    align-items: center;
  }
}

/**
 * Breakpoint 4: Celulares pequeños (≤575px)
 * - Header, logo y hero compactos 
 * - Padding reducido en todas las secciones
 * - Títulos más pequeños
 * - Tarjetas de servicio con menos padding
 * - Galería con frame más bajo
 */
@media (max-width: 575px) {
  header.site-header {
    padding: 0.8rem 1rem;
  }

  .site-logo {
    height: 90px;
  }

  .header-link {
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .section-hero {
    padding-top: 90px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-hero h1 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }

  .section-about-wrapper,
  .section-services-wrapper,
  .section-spaces-wrapper,
  .section-gallery-banner-wrapper,
  .section-gallery-grid-wrapper,
  .section-contact-wrapper {
    padding: 3.5rem 1rem !important;
  }

  .section-about h2,
  .spaces-sticky-left h2,
  .contact-title {
    font-size: 1.8rem;
  }

  .service-image-overlay {
    padding: 1rem;
  }

  .service-image-overlay h3 {
    font-size: 1.2rem;
  }

  .service-info {
    padding: 1rem;
  }

  .gallery-banner-frame {
    height: 210px;
    overflow: visible !important;
  }

  .gallery-floating-card {
    margin: -2rem auto 0 auto !important;
    width: 92% !important;
    padding: 1.25rem 1rem !important;
  }

  .floating-card-title {
    font-size: 1.25rem !important;
  }

  .kalaluna-footer-logo {
    height: 60px !important;
  }
}