/* main.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========================================================================
   VARIABLES GLOBALES - ARQUETIPO "Medi-Spa / ClÃ­nico-EstÃ©tico"
   ========================================================================= */
:root {
  /* Paleta de Colores Clínicos y Lujosos */
  --color-primary: #0ea5e9; /* sky-500 */
  --color-primary-hover: #0284c7; /* sky-600 */
  --color-bg-light: #ffffff;
  --color-bg-secondary: #f8fafc; /* slate-50 */
  --color-text-dark: #0f172a; /* slate-900 */
  --color-text-muted: #64748b; /* slate-500 */
  --color-accent-rose: #fb7185; /* rose-400 */
  --color-silver: #e2e8f0; /* slate-200 */

  /* Tipografía */
  --font-heading: ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, sans-serif;

  /* Formas y Bordes */
  --border-radius-card: 16px;
  --border-radius-btn: 9999px;
  
  /* Sombras Sutiles de Alta Gama */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(14, 165, 233, 0.3), 0 4px 6px -4px rgba(14, 165, 233, 0.15);

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--color-text-dark);
  line-height: 1.1;
}

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

ul {
  list-style: none;
}

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

@media (max-width: 768px) {
  .hero-layout {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px !important;
  }
  
  .hero-text {
    max-width: 100% !important;
  }
  
  .hero-text h1 {
    font-size: 2.5rem !important;
  }

  .hero-text p {
    font-size: 1.05rem !important;
  }

  .hero-text .btn {
    width: 100%;
  }
  
  .hero-text div {
    justify-content: center;
  }
  
  .hero-image {
    width: 100%;
    justify-content: center !important;
    margin-top: 20px;
  }
}

/* =========================================================================
   UTILITIES & CONTAINERS
   ========================================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-bg-alt {
  background-color: var(--color-bg-secondary);
}

.text-center {
  text-align: center;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 50px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--border-radius-btn);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-dark);
}

/* =========================================================================
   NAVBAR (HEADER)
   ========================================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-silver);
  transition: all var(--transition-normal);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 48px;
  max-width: none;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  color: var(--color-text-dark);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-logo::before {
  content: 'Y';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.25rem;
}

.navbar-logo span {
  color: var(--color-primary);
  opacity: 0.9;
}

.navbar-menu {
  display: flex;
  gap: 32px;
  align-items: center;
}

.navbar-menu a.nav-link {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.navbar-menu a.nav-link:hover {
  color: var(--color-primary);
}

.navbar-menu a.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.navbar-menu a.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 30px;
  height: 24px;
  position: relative;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-dark);
  position: absolute;
  left: 0;
  transition: all var(--transition-fast);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
  background-color: var(--color-text-dark);
  color: #fff;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-primary);
}

.footer-col p, .footer-col ul li a {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.8;
  transition: color var(--transition-fast);
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* =========================================================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #20b858;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* =========================================================================
   ANIMACIONES Y RESPONSIVE
   ========================================================================= */
/* Revelado al hacer scroll (Intersection Observer) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Efectos de escala precisos para tarjetas (Arquetipo B) */
.clinical-card {
  background-color: #fff;
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  transition: all var(--transition-normal);
  border: 1px solid var(--color-silver);
}

.clinical-card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border-color: rgba(14, 165, 233, 0.1);
}

.clinical-card h3 {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem !important;
  letter-spacing: 0.05em;
  color: var(--color-text-dark);
}

/* =========================================================================
   TARIFARIO / MENÚ CLÍNICO
   ========================================================================= */
.menu-category-wrapper {
  display: flex;
  gap: 40px;
  align-items: stretch;
  margin-bottom: 80px;
}

.menu-category-wrapper.reverse-layout {
  flex-direction: row-reverse;
}

.menu-category-image {
  flex: 1;
  position: relative;
  border-radius: var(--border-radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 250px;
}

.menu-category-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-category-wrapper:hover .menu-category-image img {
  transform: scale(1.05);
}

.menu-category-content {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-category-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 30px;
  border-bottom: 1px solid var(--color-silver);
  padding-bottom: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--color-silver);
  transition: all var(--transition-fast);
}

.menu-item:hover {
  border-bottom-color: var(--color-primary);
}

.menu-info {
  flex: 1;
  padding-right: 20px;
}

.menu-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark);
}

.menu-info p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.menu-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

/* =========================================================================
   GALERÍA INTERACTIVA & LIGHTBOX
   ========================================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-card);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  aspect-ratio: 4/3;
  background-color: var(--color-bg-secondary);
}

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

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay svg {
  color: #fff;
  transform: scale(0.8);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay svg {
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--border-radius-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color var(--transition-fast);
  z-index: 2010;
}

.lightbox-close:hover {
  color: var(--color-primary);
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  
  .navbar-menu {
    position: absolute;
    top: 80px;
    left: -100%;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    padding: 30px 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    transition: left 0.3s ease;
    gap: 20px;
  }
  
  .navbar-menu.active {
    left: 0;
  }
  
  .section {
    padding: 60px 0;
  }

  .menu-category-wrapper,
  .menu-category-wrapper.reverse-layout {
    flex-direction: column;
    gap: 25px;
    margin-bottom: 60px;
  }

  .menu-category-image {
    width: 100%;
    min-height: 200px;
  }
}
