/* ===================================================================
   Barbería Hugo · styles.css
   Autor: delysz (https://github.com/delysz)
   Versión refactorizada y optimizada (2025)
   
   ÍNDICE:
   1. Variables y Reset
   2. Layout General (Header, Nav, Container, Footer)
   3. Componentes Reutilizables (Botones, Dropdown Idioma)
   4. Estilos de Secciones
      - 4.1. Carrusel de Reseñas (#carrusel)
      - 4.2. Servicios (#servicios)
      - 4.3. Galería (#galeria)
      - 4.4. Horario y Contacto (#horario, #contacto)
   5. Elementos Flotantes y CTA
   6. Lightbox (Galería)
   7. Efectos Especiales (WOW) y Animaciones
   8. Media Queries (Responsividad)
   =================================================================== */


/* ===================================
   1. Variables y Reset
   =================================== */
:root {
  --bg: #0f1220;
  --bg-soft: #141937;
  --card: #0d1027;
  --text: #eef2ff;
  --muted: #a5b4fc;
  --accent: #f6c90e;
  --accent-2: #ffdb4d;
  --border: rgba(255, 255, 255, .12);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1080px;
  /* Vars animación anillo logo */
  --ring-angle: 0turn;
  --ring-opacity: 0;
  --ring-scale: .92;
  /* Nuevas vars para efectos avanzados */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --particle-size: 4px;
  --depth-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  --hover-lift: translateY(-8px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: 'Poppins', 'Segoe UI', system-ui, Arial, sans-serif;
}

h1,
h2,
h3 {
  margin: 0 0 .6rem;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 1px;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

p {
  margin: .5rem 0 1rem;
  color: var(--muted);
}


/* ===================================
   2. Layout General
   =================================== */

/* --- Header --- */
header {
  position: relative;
  text-align: center;
  /* Ocultamos el desbordamiento para evitar barras de scroll horizontal causadas
     por elementos decorativos. El espacio vertical para descendentes de la
     fuente ya se maneja en `.slogan` mediante `line-height` y `margin-bottom`. */
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 64px 16px 36px;
  perspective: 800px;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 200px at var(--gx, 50%) var(--gy, -80px), rgba(246, 201, 14, .35), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent);
}

/* Partículas flotantes en el header */
header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(var(--particle-size) var(--particle-size) at 20% 30%, rgba(246, 201, 14, 0.6) 50%, transparent 50%),
    radial-gradient(var(--particle-size) var(--particle-size) at 80% 70%, rgba(255, 219, 77, 0.4) 50%, transparent 50%),
    radial-gradient(var(--particle-size) var(--particle-size) at 40% 80%, rgba(246, 201, 14, 0.3) 50%, transparent 50%),
    radial-gradient(var(--particle-size) var(--particle-size) at 90% 20%, rgba(255, 219, 77, 0.5) 50%, transparent 50%),
    radial-gradient(var(--particle-size) var(--particle-size) at 10% 60%, rgba(246, 201, 14, 0.4) 50%, transparent 50%);
  animation: particleFloat 20s ease-in-out infinite;
  filter: blur(0.5px);
}

.logo-barber {
  display: block;
  width: clamp(190px, 28vw, 340px);
  height: auto;
  margin: 0 auto 28px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4));
  border-radius: 50%;
  border: none !important;
  transition: transform .35s ease, filter .35s ease;
  transform-style: preserve-3d;
  position: relative;
  will-change: transform;
}

/* Shine sutil al cargar */
.logo-barber::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .5) 40%, transparent 80%);
  transform: translateX(-150%);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: logoShine 1.6s ease .45s 1 both;
}

/* Anillo luminoso controlado por CSS vars (GSAP) */
.logo-barber::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: conic-gradient(from var(--ring-angle), rgba(246, 201, 14, .85), rgba(255, 219, 77, .45), transparent 60%);
  filter: blur(10px) saturate(1.05);
  opacity: var(--ring-opacity);
  transform: scale(var(--ring-scale));
  transition: opacity .28s ease, transform .4s ease;
  z-index: -1;
  pointer-events: none;
}

/* Efecto de profundidad 3D en hover */
.logo-barber:hover {
  transform: translateZ(20px) rotateX(-5deg) rotateY(5deg);
  filter: drop-shadow(0 20px 40px rgba(246, 201, 14, 0.6));
}

/* Hover ligero para dar vida sin distraer */
header:hover .logo-barber {
  transform: translateY(-2px) rotate(-1.2deg) scale(1.02);
}

header h1 {
  font-family: 'Grand Hotel', cursive;
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 4.5rem);
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .4);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

header .slogan {
  font-family: 'Imperial Script', cursive;
  /* Reducimos el tamaño aún más para garantizar que el eslogan no se salga
     del ancho de la página. Esto ayuda a que el texto se ajuste
     correctamente, incluso en pantallas pequeñas. */
  /* Ajuste fino del tamaño: un poco más grande sin perder ajuste horizontal */
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  font-weight: 400;
  color: var(--accent);
  /* Reducimos el espaciado entre letras para que el texto ocupe menos
     espacio horizontal y evitar que se corte el último carácter. */
  letter-spacing: 0.25px;
  /*
    El script Imperial tiene unos descendentes pronunciados, por lo que un
    line‑height demasiado reducido puede provocar que la última letra se
    recorte visualmente. Aumentamos el interlineado y añadimos un margen
    inferior para asegurar que la "d" final de la palabra "identidad"
    aparezca completa en todas las resoluciones.
  */
  line-height: 1.35;
  margin-bottom: 0.5rem;

  /* Forzamos que el texto largo pueda pasar a la siguiente línea
     cuando no haya espacio suficiente. Esto evita que la última
     letra de la palabra "identidad" se corte si la pantalla es
     estrecha. La propiedad `overflow-wrap: anywhere` permite
     dividir palabras largas en cualquier punto si es necesario. */
  overflow-wrap: anywhere;

  /* Limitar el ancho del eslogan a un valor razonable asegura que el texto
     pueda dividirse en varias líneas y se mantenga centrado. Esto previene
     que palabras largas se salgan del área visible del encabezado. */
  max-width: min(90vw, 680px);
  margin-left: auto;
  margin-right: auto;

  /* Añadimos un pequeño relleno lateral para limitar el ancho efectivo y
     favorecer que el texto se divida en dos líneas cuando sea necesario. */
  padding-left: 1rem;
  padding-right: 1rem;

  /* Mantenemos la estructura simple para evitar recortes de texto */
}


/* --- Navegación --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(13, 16, 39, .95), rgba(13, 16, 39, .7));
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  height: auto;
  padding: 10px 16px;
  flex-wrap: wrap;
  font: 600 1rem/1.4 'Lato', 'Segoe UI', system-ui, Arial, sans-serif;
}

nav a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: .4px;
  font-size: 1rem;
  padding: 8px 10px;
  border-radius: 10px;
  position: relative;
  transition: .18s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

nav a:hover {
  background: rgba(255, 255, 255, .06);
}

nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s;
}

nav a:hover::after,
nav a.active::after {
  transform: scaleX(1);
}

/* Compensación por nav fijo y anclas */
header {
  padding-top: 120px;
}

#carrusel,
#servicios,
#galeria,
#horario,
#contacto {
  scroll-margin-top: 90px;
}

/* --- Contenedor y Tarjetas de Sección --- */
.container {
  max-width: var(--container);
  margin: 26px auto 40px;
  padding: 32px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-soft);
}

.container.section-card {
  max-width: 800px;
  padding: 28px;
  margin-bottom: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--depth-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover avanzado en tarjetas */
.container.section-card:hover {
  transform: var(--hover-lift);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(246, 201, 14, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.container h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  font: 700 clamp(1.6rem, 2.8vw, 2.2rem) 'Bebas Neue', 'Segoe UI', system-ui, Arial, sans-serif;
  color: var(--text);
  text-transform: uppercase;
}

.container h2::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 6px rgba(246, 201, 14, .15);
}

/* --- Footer --- */
footer {
  margin-top: 44px;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

footer p {
  margin: 0;
}

.credits {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.credits a {
  color: var(--accent);
  text-decoration: none;
}

.credits a:hover {
  text-decoration: underline;
}


/* ===================================
   3. Componentes Reutilizables
   =================================== */

/* --- Dropdown de Idioma --- */
.lang-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 2500;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 6px 8px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  border: 2px solid var(--accent);
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.lang-toggle img {
  width: 28px;
  height: 21px;
  border-radius: 4px;
  display: block;
}

.lang-toggle .caret {
  font-size: .8rem;
  opacity: .8;
}

.lang-toggle[aria-expanded="true"] {
  background: var(--accent);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: linear-gradient(180deg, rgba(13, 16, 39, .96), rgba(13, 16, 39, .92));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex !important;
  /* Safety net against JS conflicts */
  gap: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: .18s;
}

.lang-dropdown.open .lang-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.lang-menu button {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid var(--accent);
  cursor: pointer;
  line-height: 0;
  transition: transform .15s, filter .15s;
}

.lang-menu button:hover {
  transform: scale(1.05);
}

.lang-menu img {
  width: 28px;
  height: 21px;
  border-radius: 4px;
  display: block;
}

/* --- Botones Principales --- */
.whatsapp-btn.grande,
.call-btn.grande,
.btn-sec {
  padding: 14px 22px;
  border-radius: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 1rem;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-btn.grande:hover,
.call-btn.grande:hover,
.btn-sec:hover {
  transform: var(--hover-lift) scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(246, 201, 14, 0.5);
}

.whatsapp-btn.grande {
  background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  letter-spacing: .3px;
  border: 1px solid rgba(0, 0, 0, .2);
  box-shadow: 0 6px 16px rgba(37, 211, 102, .25), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.call-btn.grande {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #111;
  font-weight: 800;
  letter-spacing: .4px;
  border: 2px solid var(--accent);
  box-shadow: 0 6px 16px rgba(246, 201, 14, 0.3), inset 0 1px 0 rgba(255, 255, 255, .3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.btn-sec {
  background: linear-gradient(180deg, #2a2f66, #1a1f51);
  color: #fff;
  letter-spacing: .3px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}


/* ===================================
   4. Estilos de Secciones
   =================================== */

/* --- 4.1. Carrusel de Reseñas (#carrusel) --- */
.carousel {
  position: relative;
  max-width: 560px;
  margin: 16px auto 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.carousel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.carousel-item {
  display: none;
  padding: 24px;
  text-align: center;
  animation: fadeIn .6s ease;
}

.carousel-item.active {
  display: block;
}

.review-card {
  position: relative;
  text-align: left;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.review-card::before {
  content: "“";
  position: absolute;
  top: -18px;
  left: 12px;
  font: normal 5rem/1 Georgia, serif;
  color: rgba(246, 201, 14, .20);
  pointer-events: none;
}

.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.stars {
  display: inline-flex;
  gap: 4px;
}

.star {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  opacity: .5;
}

.star.filled {
  opacity: 1;
}

.review-text {
  margin: 6px 0 10px;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.55;
}

.review-author {
  display: inline-block;
  font-weight: 800;
  color: var(--accent);
  margin-top: 4px;
}

.review-author .badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: .8em;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #111;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  transition: .2s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

.carousel-btn:hover {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #111;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}


/* --- 4.2. Servicios (#servicios) --- */
#servicios .svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

#servicios .svc-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

#servicios .svc-card h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

#servicios .svc-card .price {
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

#servicios .svc-card button {
  padding: 6px 10px;
  font-size: .9rem;
  border-radius: 8px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  cursor: pointer;
  transition: .2s;
  align-self: flex-start;
}

#servicios .svc-card button:hover {
  background: rgba(255, 255, 255, .1);
}

#servicios .svc-card button.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

#servicios .svc-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

#servicios .svc-total {
  font-weight: 900;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

#servicios .svc-when {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, .2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

#servicios .svc-when label {
  color: var(--text);
  font-weight: 700;
  letter-spacing: .2px;
  min-width: max-content;
}

#servicios .svc-when input {
  appearance: none;
  background: #fff;
  color: #111;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1rem;
  min-width: 210px;
  font-family: inherit;
}

#servicios .svc-when input::placeholder {
  color: #666;
}

#servicios .svc-when input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

#servicios .svc-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .25);
  background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .25), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .15s, filter .2s;
  text-decoration: none;
  cursor: pointer;
}

#servicios .svc-wa:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

#servicios .svc-wa[disabled] {
  filter: grayscale(.2) saturate(.6) opacity(.65);
  cursor: not-allowed;
  pointer-events: none;
}


/* --- 4.3. Galería (#galeria) --- */
.gallery-carousel {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--depth-shadow);
  border: 1px solid var(--border);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.gallery-carousel:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.g-slide {
  display: none;
  animation: fadeIn .6s ease-in-out;
  cursor: pointer;
}

.g-slide.active {
  display: block;
}

.g-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.g-prev,
.g-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transition: filter .2s ease, background .2s ease;
  z-index: 10;
}

.g-prev:hover,
.g-next:hover {
  background: var(--accent);
  color: #111;
}

.g-prev {
  left: 10px;
}

.g-next {
  right: 10px;
}


/* --- 4.4. Horario y Contacto --- */
#horario {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)),
    radial-gradient(800px 160px at 100% -40px, rgba(246, 201, 14, .18), transparent 60%),
    var(--card);
}

#horario p {
  margin: .3rem 0;
  color: var(--text);
}

#horario p+p {
  color: var(--muted);
}

.horario-cita {
  margin-top: 16px;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
  opacity: .9;
}

#contacto {
  gap: 20px;
}

.contact-subtitle {
  color: var(--muted);
  margin: .2rem 0 1rem;
}

.contact-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.mapa {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 100%;
}

.mapa iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}


/* ===================================
   5. Elementos Flotantes y CTA
   =================================== */
.whatsapp-float,
.social-float {
  position: fixed;
  right: 20px;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  box-shadow: var(--depth-shadow);
  transition: transform .2s, box-shadow .2s;
  z-index: 2000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-float:hover,
.social-float:hover {
  transform: var(--hover-lift) scale(1.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  border-color: rgba(246, 201, 14, 0.5);
}

.whatsapp-float img,
.whatsapp-float svg,
.social-float img {
  width: 32px;
  height: 32px;
}

.whatsapp-float {
  bottom: 20px;
  background: linear-gradient(90deg, #25D366 0%, #1ebe5a 100%);
}

.social-float.instagram {
  bottom: 76px;
  background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
}

.social-float.facebook {
  bottom: 132px;
  background: #1877F2;
}

.follow-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 12px;
  box-shadow: var(--shadow);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  text-align: center;
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid var(--glass-border);
}

.follow-cta:hover {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.follow-cta.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.follow-cta p {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--text);
}

.follow-cta .cta-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.follow-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--border);
  color: #fff;
}

.follow-cta .btn-cta img {
  width: 18px;
  height: 18px;
}

.follow-cta .btn-cta.ig {
  background: radial-gradient(circle at 30% 30%, #feda75, #d62976, #962fbf, #4f5bd5);
}

.follow-cta .btn-cta.fb {
  background: #1877F2;
}

.follow-cta .cta-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, .3);
  color: #fff;
  cursor: pointer;
}


/* ===================================
   6. Lightbox (Galería)
   =================================== */
.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  backdrop-filter: blur(20px);
}

.lb-img {
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.lb-img:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .2s, background .2s;
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover,
.lb-next:hover,
.lb-close:hover {
  background: var(--accent);
  color: #111;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 30px rgba(246, 201, 14, 0.4);
}

.lb-close:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(246, 201, 14, 0.4);
}


/* ===================================
   7. Efectos Especiales (WOW) y Animaciones
   =================================== */

/* --- Keyframes consolidados --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Logo: animación de entrada y brillo --- */
@keyframes logoIntro {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(.92) rotate(-2deg);
  }

  60% {
    opacity: 1;
    transform: translateY(-6px) scale(1.03) rotate(1.2deg);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes logoShine {
  0% {
    transform: translateX(-150%);
    opacity: .0;
  }

  20% {
    opacity: .0;
  }

  50% {
    opacity: .8;
  }

  100% {
    transform: translateX(150%);
    opacity: 0;
  }
}

/* Animación de partículas flotantes */
@keyframes particleFloat {

  0%,
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.6;
  }

  25% {
    transform: translateY(-20px) translateX(10px) rotate(90deg);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-10px) translateX(-15px) rotate(180deg);
    opacity: 0.4;
  }

  75% {
    transform: translateY(-30px) translateX(5px) rotate(270deg);
    opacity: 0.7;
  }
}

/* Animación de entrada más elaborada para secciones */
@keyframes slideInUpEnhanced {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95) rotateX(-10deg);
    filter: blur(5px);
  }

  50% {
    opacity: 0.7;
    transform: translateY(20px) scale(0.98) rotateX(-5deg);
    filter: blur(2px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0px);
  }
}

/* Efecto de ondas en botones */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- WOW: Borde luminoso animado --- */
.container.section-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: conic-gradient(from var(--angle, 0turn), var(--accent), var(--accent-2), var(--accent));
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinBorder 8s linear infinite;
  opacity: .45;
  pointer-events: none;
}

@keyframes spinBorder {
  to {
    --angle: 1turn;
  }
}

/* --- WOW: Glow y blobs en el hero --- */
header::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background:
    radial-gradient(45% 60% at 70% 20%, rgba(246, 201, 14, .22), transparent 60%),
    radial-gradient(40% 55% at 30% 10%, rgba(255, 219, 77, .18), transparent 60%);
  filter: blur(32px);
  animation: heroFloat 16s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: .45;
  }

  50% {
    transform: translateY(10px) scale(1.04);
    opacity: .6;
  }
}

/* --- WOW: Brillo en botones --- */
.whatsapp-btn.grande::after,
.call-btn.grande::after,
.btn-sec::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .35) 40%, transparent 80%);
  transform: translateX(-150%);
  transition: transform .7s ease;
}

.whatsapp-btn.grande:hover::after,
.call-btn.grande:hover::after,
.btn-sec:hover::after {
  transform: translateX(150%);
}

/* --- WOW: Barra de progreso de scroll --- */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 2000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: width 0.1s linear;
}

/* --- Animaciones de entrada al hacer scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal.slide-up {
  transform: translateY(18px);
}

.reveal.slide-left {
  transform: translateX(-24px);
}

.reveal.slide-right {
  transform: translateX(24px);
}

.reveal.pop {
  transform: scale(.96);
}

/* Animaciones mejoradas para reveal */
.reveal.slide-up.is-visible {
  animation: slideInUpEnhanced 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Efecto de ondas en botones principales */
.whatsapp-btn.grande::before,
.call-btn.grande::before,
.btn-sec::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.whatsapp-btn.grande:active::before,
.call-btn.grande:active::before,
.btn-sec:active::before {
  width: 300px;
  height: 300px;
  animation: ripple 0.6s ease-out;
}

/* Stagger (hijos se animan uno a uno) */
.stagger>* {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
  will-change: opacity, transform;
}

.stagger.is-visible>* {
  opacity: 1;
  transform: none;
}



/* === GSAP split helpers === */
.titulo-principal .char,
.titulo-principal .word,
.slogan .char,
.slogan .word {
  display: inline-block;
  will-change: transform, opacity;
}

/* ===================================
   8. Media Queries (Responsividad)
   =================================== */

/* Dispositivos Medianos (tablets, etc.) */
@media (max-width: 900px) {
  #servicios .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Dispositivos Pequeños (móviles grandes) */
@media (max-width: 680px) {

  /* Nav */
  nav {
    row-gap: 6px;
    justify-content: center;
    padding: 8px 10px 6px;
  }

  header {
    padding-top: 160px;
  }

  #carrusel,
  #servicios,
  #galeria,
  #horario,
  #contacto {
    scroll-margin-top: 140px;
  }

  /* Lang dropdown */
  .lang-menu {
    right: 50%;
    transform: translateX(50%) translateY(-6px);
  }

  .lang-dropdown.open .lang-menu {
    transform: translateX(50%) translateY(0);
  }

  /* Servicios */
  #servicios .svc-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #servicios .svc-total {
    text-align: left;
  }

  #servicios .svc-when {
    flex-wrap: wrap;
  }

  #servicios .svc-when input {
    width: 100%;
    min-width: 0;
  }

  /* Follow CTA */
  .follow-cta {
    bottom: 92px;
  }
}

@media (max-width: 560px) {

  /* Servicios */
  #servicios .svc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  #servicios .svc-card {
    padding: 10px;
  }

  #servicios .svc-card h3 {
    font-size: .95rem;
  }

  #servicios .svc-card .price {
    font-size: .9rem;
  }

  #servicios .svc-card button {
    padding: 6px 8px;
    font-size: .85rem;
  }

  /* Galería */
  .gallery-carousel img {
    max-height: 320px;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  .gallery-carousel img {
    max-height: 260px;
  }
}

@media (max-width: 420px) {

  /* Nav */
  nav a {
    padding: 7px 9px;
    font-size: .9rem;
    letter-spacing: .3px;
  }

  header {
    padding-top: 170px;
  }

  #carrusel,
  #servicios,
  #galeria,
  #horario,
  #contacto {
    scroll-margin-top: 150px;
  }
}

@media (max-width: 380px) {
  #servicios .svc-grid {
    grid-template-columns: 1fr;
  }
}

/* Respeto a usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .stagger>* {
    opacity: 1 !important;
    transform: none !important;
  }

  .logo-barber::after,
  .logo-barber::before {
    display: none !important;
  }

  header::after {
    display: none !important;
  }

  .container.section-card:hover {
    transform: none !important;
  }

  .carousel:hover,
  .gallery-carousel:hover {
    transform: none !important;
  }

  .review-card:hover {
    transform: none !important;
  }

  .whatsapp-float:hover,
  .social-float:hover {
    transform: none !important;
  }

  .follow-cta:hover {
    transform: translateX(-50%) translateY(0) !important;
  }
}

/* === GSAP Turbo: Tilt y Parallax === */
#servicios {
  perspective: 700px;
}

#servicios .svc-card {
  transform-style: preserve-3d;
  will-change: transform;
}

#servicios .svc-card .svc-media,
#servicios .svc-card img {
  transform: translateZ(30px);
}

.gallery-carousel .g-slide img {
  will-change: transform;
  transform-origin: 50% 50%;
}

.social-float,
.whatsapp-float {
  will-change: transform;
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {

  .gallery-carousel .g-slide img,
  .social-float,
  .whatsapp-float,
  #servicios .svc-card {
    transition: none !important;
    animation: none !important;
  }
}

/* --- Estilos para los Títulos de Categorías de Servicios --- */
.svc-category-title {
  grid-column: 1 / -1;
  /* Hace que el título ocupe todo el ancho de la rejilla */
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 2.2vw, 1.8rem);
  color: var(--accent);
  margin: 24px 0 8px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
}

/* Ajuste para el primer título, para que no tenga tanto margen superior */
.svc-category-title:first-of-type {
  margin-top: 8px;
}

@media (max-width: 680px),
(max-width: 900px) and (pointer: coarse) {

  .container.section-card,
  .carousel,
  .gallery-carousel,
  .review-card,
  .lightbox {
    backdrop-filter: none !important;
    background: var(--bg-soft) !important;
  }
}

/* Preloader styles */
#preloader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: var(--bg, #0f1220);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s;
  /* Auto-ocultación con animación para casos en los que el JS falle */
  animation: preloaderFadeOut 0.6s ease 5.5s forwards;
}

#preloader .loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Anillo giratorio del preloader */
#preloader .spinner {
  width: 64px;
  height: 64px;
  border: 6px solid var(--accent, #f6c90e);
  border-top: 6px solid transparent;
  border-radius: 50%;
  animation: spinner-rotate 0.9s linear infinite;
}

/* Título del preloader */
#preloader .preloader-title {
  margin-top: 14px;
  font-family: 'Bebas Neue', 'Lato', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--accent, #f6c90e);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.4s;
}

/* Subtítulo del preloader */
#preloader .preloader-subtitle {
  margin-top: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: center;
  max-width: 320px;
  color: var(--text-light, #dcdce6);
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
  animation-delay: 0.6s;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#preloader.hide {
  opacity: 0;
  pointer-events: none;
}

@keyframes preloaderFadeOut {
  to {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}

/* ===================================
   9. ESTILOS IMPRESIONANTES (NUEVO)
   =================================== */

/* --- Tarjetas de Servicios Mejoradas --- */
#servicios {
  /* Activa un contexto de perspectiva para los hijos */
  perspective: 1000px;
}

.svc-card {
  position: relative;
  /* Necesario para el pseudo-elemento del borde */
  transform-style: preserve-3d;
  /* Permite que los hijos tengan profundidad 3D */
  transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
  will-change: transform, box-shadow;
}

/* Contenido de la tarjeta con efecto de profundidad */
.svc-card>* {
  transform: translateZ(25px);
  /* Eleva el contenido hacia el espectador */
  transition: transform 0.4s ease-out;
}

.svc-card:hover {
  box-shadow: 0px 30px 50px -20px rgba(0, 0, 0, 0.6);
  transform: scale(1.05) rotateX(var(--rotX)) rotateY(var(--rotY));
}

/* Borde luminoso interactivo */
.svc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  background: radial-gradient(circle at var(--mouse-x) var(--mouse-y),
      rgba(246, 201, 14, 0.4),
      transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.svc-card:hover::before {
  opacity: 1;
}

/* --- Fondo de estrellas animado --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(1px, rgba(255, 255, 255, 0.2) 1px, transparent 0),
    radial-gradient(1px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 40px 40px, 80px 80px;
  background-position: 0 0, 30px 30px;
  animation: move-stars 90s linear infinite;
  z-index: -1;
  will-change: background-position;
}

@keyframes move-stars {
  from {
    background-position: 0 0, 30px 30px;
  }
  to {
    background-position: -1000px 500px, -1030px 530px;
  }
}

.titulo-principal .char { will-change: transform, opacity; }

/* Estado general mientras carga (opcional) */
html.is-loading, html.is-loading body {
  overflow: hidden;
}

/* Preloader como overlay */
#preloader{
  position: fixed;
  inset: 0;
  z-index: 99999; /* bien arriba de todo */
  background: #0b0b0b;           /* o el color que usabas */
  display: grid;
  place-items: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .45s ease; /* fade-out suave */
}

/* contenido interno opcional (logo, spinner…) */
#preloader .spinner, #preloader .logo{
  will-change: transform, opacity;
}

/* Al ocultar */
#preloader.hide{
  opacity: 0;
  pointer-events: none;
}
