/* ==========================================================================
   PROYECTO: Ikigai Spa - Clínica de Belleza Avanzada
   ESTILO: Hoja de Estilos Principal (Original Validado)
   DIRECCIÓN DE ARTE: Estructuración y Comentarios (SIN CAMBIOS DE DISEÑO)
   ========================================================================== */


/* -----------------------------------------------------------
   1. RESET Y CONFIGURACIÓN GLOBAL
   Definición de comportamientos base del documento.
   ----------------------------------------------------------- */

:root {
  /* Paleta y variables globales */
  --kanva-bg: #f0f9f7;
  --kanva-text: #08261e;
  --kanva-line: rgba(8, 38, 30, 0.08);
  --kanva-accent: #8acbba;
  
  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --mobile-menu-width: 80vw;
}

/* Reset básico y normalización */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Corrección de overflow horizontal global */
html, body {
  width: 100%;
  overflow-x: hidden; /* Previene scroll horizontal */
  -webkit-overflow-scrolling: touch;
  position: relative;
}

body {
  background-color: var(--kanva-bg);
  color: var(--kanva-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.container { 
  width: 90%; 
  max-width: 1400px; 
  margin: 0 auto; 
}


/* -----------------------------------------------------------
   2. UTILIDADES Y CONTROL DE VISIBILIDAD
   Clases auxiliares para control de renderizado.
   ----------------------------------------------------------- */

.desktop-only { display: block; }
.menu-toggle { display: none; }


/* -----------------------------------------------------------
   3. HEADER & NAVEGACIÓN
   Cabecera sticky, logo y navegación principal.
   ----------------------------------------------------------- */

header {
  padding: 30px 0;
  border-bottom: 1px solid var(--kanva-line);
  position: sticky; 
  top: 0; 
  z-index: 100;
  background: #6fd2bb;
}

/* Contenedor interno con distribución flex */
.header-inner { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: var(--transition);
}

/* Hover con ligera escala */
.logo-link:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Navegación principal */
nav ul { 
  display: flex; 
  gap: 40px; 
  list-style: none; 
}

nav a { 
  text-decoration: none; 
  color: var(--kanva-text); 
  font-size: 0.85rem; 
  text-transform: uppercase; 
  letter-spacing: 1px; 
}

nav a:hover {
  color: #947705;
}


/* -----------------------------------------------------------
   4. MENÚ MÓVIL (HAMBURGUESA + OVERLAY)
   Sistema de navegación responsive con animaciones.
   ----------------------------------------------------------- */

/* Botón hamburguesa */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1001;
}

/* Líneas del ícono */
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--kanva-text);
  position: absolute;
  transition: var(--transition);
}

.menu-toggle span:first-child { top: 0; }
.menu-toggle span:last-child { bottom: 0; }

/* Transformación a "X" */
.menu-toggle.active span:first-child {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:last-child {
  transform: translateY(-9px) rotate(-45deg);
}

/* Overlay del menú móvil */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%); /* Oculto inicialmente */
  width: var(--mobile-menu-width);
  height: 100vh;
  background-color: var(--kanva-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

/* Estado activo del menú */
.mobile-menu-overlay.active {
  transform: translateX(0);
  visibility: visible;
}

/* Backdrop oscurecido */
.mobile-menu-overlay::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 38, 30, 0.4);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active::before {
  opacity: 1;
}

/* Botón cerrar (X) */
.close-menu {
  position: absolute;
  top: 30px;
  right: 5%;
  background: none;
  border: none;
  cursor: pointer;
  width: 25px;
  height: 25px;
  z-index: 1001;
}

.close-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--kanva-text);
  position: absolute;
  top: 50%;
  left: 0;
  transition: var(--transition);
}

.close-menu span:first-child {
  transform: translateY(-50%) rotate(45deg);
}

.close-menu span:last-child {
  transform: translateY(-50%) rotate(-45deg);
}

.close-menu:hover span {
  background-color: #ffcc00;
}

/* Navegación móvil */
.mobile-nav {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mobile-nav ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.mobile-nav ul li {
  margin: 20px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateX(50px);
  transition: var(--transition);
}

/* Animación de entrada escalonada */
.mobile-menu-overlay.active .mobile-nav ul li {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.2s;
}

.mobile-menu-overlay.active .mobile-nav ul li:nth-child(2) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-nav ul li:nth-child(3) { transition-delay: 0.4s; }
.mobile-menu-overlay.active .mobile-nav ul li:nth-child(4) { transition-delay: 0.5s; }

.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--kanva-text);
  transition: var(--transition);
}

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


/* -----------------------------------------------------------
   5. HERO SECTION
   Encabezado principal tipo editorial.
   ----------------------------------------------------------- */

.kanva-hero { padding: 50px 0; }

.eyebrow { 
  text-transform: uppercase; 
  font-size: 0.75rem; 
  letter-spacing: 3px; 
  color: #0b7055; 
  display: block; 
  margin-bottom: 20px; 
}

.kanva-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.kanva-hero p { 
  font-size: 1.1rem; 
  color: #666; 
  margin-top: 30px;
  width: 100%;
  text-align: justify;
}

.hero-image-full { 
  width: 100%; 
  height: 80vh; 
  margin-top: 60px; 
  overflow: hidden; 
}

.hero-image-full img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}


/* -----------------------------------------------------------
   6. SERVICIOS (GRID CATÁLOGO)
   Layout en grid con tarjetas visuales.
   ----------------------------------------------------------- */

.kanva-services { 
  padding: 120px 0; 
  border-top: 1px solid var(--kanva-line); 
}

.section-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
  margin-bottom: 60px; 
}

.section-header h2 { 
  font-family: var(--font-display); 
  font-size: 3rem; 
  text-transform: uppercase; 
  letter-spacing: -2px; 
}

/* Grid principal */
.kanva-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 1px; 
  background: var(--kanva-line); 
  border: 1px solid var(--kanva-line); 
}

/* Tarjetas */
.kanva-card { 
  background: #fff; 
  padding: 60px; 
  transition: background 0.3s; 
}

.kanva-card:hover { background: #fcfcfc; }

/* Imagen de tarjeta */
.card-img { 
  aspect-ratio: 1/1; 
  overflow: hidden; 
  margin-bottom: 40px; 
}

.card-img img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
}

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

.card-num { 
  font-size: 0.7rem; 
  color: #999; 
  display: block; 
  margin-bottom: 10px; 
}

.kanva-card h3 { 
  font-family: var(--font-display); 
  font-size: 1.8rem; 
  margin-bottom: 15px; 
  text-transform: uppercase; 
}


/* -----------------------------------------------------------
   7. BOTONES Y ELEMENTOS INTERACTIVOS
   ----------------------------------------------------------- */

.btn-outline { 
  border: 1px solid var(--kanva-text); 
  padding: 12px 25px; 
  text-decoration: none; 
  color: var(--kanva-text); 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  display: inline-block; 
  transition: all 0.3s; 
}

.btn-outline:hover { 
  background: var(--kanva-text); 
  color: #fff; 
}

.btn-text {
  /* Limpieza estricta de bordes y fondos de button original replicado */
  background: none;
  border: none;
  
  /* ESTILOS TIPOGRÁFICOS ORIGINALES: */
  font-family: var(--font-display); 
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: bold; /* Añadido para mejor legibilidad */
  color: #333; /* Texto oscuro original replicado */
  cursor: pointer;
  margin-top: 20px;
  
  /* Transición suave para todos los estados (Hover y Active) */
  transition: var(--transition);
}

.btn-text:active {
  color: #036487 !important; /* ROJO PURO AL DAR CLIC (Replicado) */
  transform: scale(0.95);    /* Efecto de "presión" sutil para UX */
}

.btn-text:hover {
  color: #af8d04; 
  /* Opcional: Pequeño movimiento sutil */
  transform: translateX(5px); 
}

/* -----------------------------------------------------------
   8. CONTACTO
   ----------------------------------------------------------- */

.kanva-contact { 
  padding: 100px 0; 
  border-top: 1px solid var(--kanva-line); 
}

.contact-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 80px; 
  align-items: center; 
}

.contact-text h2 { 
  font-size: 5rem; 
  text-transform: uppercase; 
  letter-spacing: -4px; 
  margin-bottom: 20px; 
}

.phone-link { 
  font-size: 2rem; 
  color: var(--kanva-text); 
  text-decoration: none; 
  font-weight: 600; 
}

.contact-map iframe { 
  width: 100%; 
  height: 400px; 
}

  .artech-link {
    color: #366d74;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  .artech-link:hover {
    color: #d4af37; /* dorado */
  }



/* -----------------------------------------------------------
   9. ELEMENTOS FLOAT (WHATSAPP)
   ----------------------------------------------------------- */

.wpp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--kanva-text);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 100;
  text-decoration: none;
  transition: transform 0.3s;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.wpp-float:hover { 
  transform: scale(1.1); 
}


/* -----------------------------------------------------------
   10. RESPONSIVE (≤ 900px)
   Adaptaciones principales para tablets y móviles.
   ----------------------------------------------------------- */

@media (max-width: 900px) {

  .desktop-nav, .desktop-only { 
    display: none !important; 
  }
  
  .menu-toggle { 
    display: block; 
    position: relative;
    z-index: 1001;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
  }

  .kanva-hero h1 { 
    font-size: 4rem; 
    line-height: 0.9;
  }
  
  .kanva-grid, 
  .contact-grid { 
    grid-template-columns: 1fr; 
  }
  
  .kanva-card { 
    padding: 60px 20px; 
    border-bottom: 1px solid var(--kanva-line);
  }
}


/* -----------------------------------------------------------
   11. RESPONSIVE (≤ 600px)
   Ajustes finos de art direction en móviles pequeños.
   ----------------------------------------------------------- */

@media (max-width: 600px) {
  .logo-img {
    height: 35px;
    transition: height 0.3s ease;
  }
}

/* -----------------------------------------------------------
   X. MEDIA QUERY ESPECÍFICA (550px)
   Solución para el amontonamiento en Bento Grid Header.
   ----------------------------------------------------------- */
@media (max-width: 550px) {
  /* Reducción sutil del título principal para dar aire en Bento Grid */
  .section-header h2 {
    font-size: 2.2rem; /* Cambiado de 3rem original a 2.2rem para armonía móvil */
    letter-spacing: -1px; /* Ajuste ligero del espaciado entre letras */
  }

  /* Ajuste opcional: Aumentar el aire del Bento Header */
  .section-header {
    margin-bottom: 40px; /* Un poco menos de espacio que los 60px originales para Bento simétrico */
  }
}