/* ==========================================================================
   CENTRO INTEGRAL DE SALUD - DISEÑO PREMIUM Y ÚNICO
   ========================================================================== */

:root {
  /* COLORES BASE */
  --color-fondo-principal: #fdfaf0;  
  --color-secundario: #6eb5eb;       
  --color-texto-perla: #475569;      
  --color-titulos: #1e293b;          
  --color-amarillo: #f0e68c;         
  --color-blanco: #ffffff;
  --color-borde: #e2e8f0;            
  
  --font-principal: 'Open Sans', system-ui, sans-serif;
  --font-titulos: 'Poppins', system-ui, sans-serif;
  
  /* SOMBRAS Y BORDES MODERNOS */
  --sombra-suave: 0 10px 30px rgba(0, 0, 0, 0.04);
  --sombra-fuerte: 0 20px 40px rgba(110, 181, 235, 0.15);
  --radio-borde: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* FONDO CON DESTELLOS */
body {
  font-family: var(--font-principal);
  color: var(--color-texto-perla);
  background-color: var(--color-fondo-principal); 
  background-image: radial-gradient(circle at 10% 20%, rgba(110, 181, 235, 0.05) 0%, transparent 30%),
                    radial-gradient(circle at 90% 80%, rgba(240, 230, 140, 0.1) 0%, transparent 30%);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 0.5rem; }

h1, h2, h3, h4 { font-family: var(--font-titulos); color: var(--color-titulos); line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.5px; }
h2 { font-size: 1.85rem; margin-bottom: 1rem; }
p { margin-bottom: 1rem; }
a { color: var(--color-secundario); text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
a:hover { color: var(--color-titulos); }
img, picture { max-width: 100%; height: auto; display: block; border-radius: var(--radio-borde); }

/* ENCABEZADO Y LOGOS (ACTUALIZADO) */
.site-header { 
  position: sticky; top: 0; 
  background-color: rgba(255, 255, 255, 0.9); 
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); 
  z-index: 1000; border-bottom: none; 
}
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; flex-wrap: wrap; gap: 1rem; }

.logo-link { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-img { border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); object-fit: cover; background-color: var(--color-blanco); }
.logo-text { font-family: var(--font-titulos); font-size: 1.25rem; font-weight: 800; color: var(--color-titulos); line-height: 1.15; text-align: center; }

/* NAVEGACIÓN */
.nav-list { list-style: none; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.nav-link { font-family: var(--font-titulos); font-weight: 600; color: var(--color-texto-perla); padding: 0.5rem 0; display: inline-block; font-size: 1.05rem; position: relative; }
.nav-link:hover { color: var(--color-secundario); }
.nav-link.activo { color: var(--color-secundario); }
.nav-link.activo::after { 
  content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 4px; 
  background: linear-gradient(90deg, var(--color-secundario), var(--color-amarillo)); border-radius: 4px;
}

/* CARRUSEL */
.carousel-container { position: relative; max-width: 100%; overflow: hidden; border-radius: 30px; box-shadow: var(--sombra-fuerte); margin: 2rem 0; }
.carousel-slide { display: none; width: 100%; animation: fade 1.5s cubic-bezier(0.4, 0, 0.2, 1); }
.carousel-slide.active { display: block; }
@keyframes fade { from {opacity: 0.6; transform: scale(1.02);} to {opacity: 1; transform: scale(1);} }

/* BOTONES */
.btn { 
  display: inline-flex; align-items: center; justify-content: center; padding: 0.85rem 1.8rem; border-radius: 50px; 
  font-family: var(--font-titulos); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.5px;
  cursor: pointer; border: none; margin: 0.5rem; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.btn-primary { background: linear-gradient(135deg, var(--color-secundario), #4ca1df); color: var(--color-blanco); box-shadow: 0 4px 15px rgba(110, 181, 235, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(110, 181, 235, 0.6); }
.btn-secondary { background: linear-gradient(135deg, var(--color-amarillo), #e3d772); color: var(--color-titulos); box-shadow: 0 4px 15px rgba(240, 230, 140, 0.4); }
.btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(240, 230, 140, 0.6); }
.btn-regreso { background-color: var(--color-blanco); color: var(--color-titulos); font-size: 0.9rem; padding: 0.5rem 1.2rem; margin-bottom: 1.5rem; box-shadow: var(--sombra-suave); border: 1px solid var(--color-borde); }
.btn-regreso:hover { transform: translateX(-5px); background-color: var(--color-fondo-principal); }

/* SERVICIOS */
.servicios-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media(min-width: 900px) { .servicios-layout { grid-template-columns: 3fr 1fr; } }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card { background-color: var(--color-blanco); border-radius: var(--radio-borde); padding: 1.5rem; box-shadow: var(--sombra-suave); border: 1px solid rgba(255, 255, 255, 0.5); display: flex; flex-direction: column; transition: all 0.4s ease; }
.card:hover { transform: translateY(-10px); box-shadow: var(--sombra-fuerte); }
.card-header-title { font-size: 1.25rem; color: var(--color-secundario); margin-bottom: 1rem; }
.card-img-wrapper { height: 200px; margin-bottom: 1.5rem; border-radius: 16px; overflow: hidden; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img-wrapper img { transform: scale(1.08); }

.prevencion-corner { background: linear-gradient(135deg, #fffcf0, var(--color-amarillo)); padding: 2rem 1.5rem; border-radius: var(--radio-borde); color: var(--color-titulos); box-shadow: var(--sombra-suave); border: 1px solid rgba(255,255,255,0.8); }
.prevencion-corner h3 { font-size: 1.15rem; color: var(--color-secundario); margin-top: 1.5rem; margin-bottom: 0.5rem; }

/* HISTORIA */
.historia-block { background-color: var(--color-blanco); padding: 2rem; border-radius: var(--radio-borde); box-shadow: var(--sombra-suave); margin-bottom: 2rem; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; transition: all 0.3s ease; }
.historia-block:hover { transform: translateY(-5px); box-shadow: var(--sombra-fuerte); }
@media(min-width: 768px) { .historia-block { grid-template-columns: 1fr 2fr; } }
.historia-img { height: 280px; border-radius: 16px; overflow: hidden; box-shadow: var(--sombra-suave); }
.historia-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.historia-block:hover .historia-img img { transform: scale(1.05); }

/* ESTABLECIMIENTOS */
.lista-centros { list-style: none; padding: 0; }
.lista-centros h3 { margin-top: 3rem; color: var(--color-secundario); padding-bottom: 0.5rem; position: relative; display: inline-block; }
.lista-centros h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50%; height: 4px; background: linear-gradient(90deg, var(--color-secundario), var(--color-amarillo)); border-radius: 4px; }
.lista-centros li { background-color: var(--color-blanco); margin-top: 1rem; padding: 1.2rem 1.5rem; border-radius: 16px; border-left: 6px solid var(--color-borde); font-weight: 700; color: var(--color-titulos); box-shadow: var(--sombra-suave); transition: transform 0.2s; }
.lista-centros li:hover { transform: translateX(8px); border-left-color: var(--color-amarillo); }
.lista-centros li.importante { border-left-color: var(--color-secundario); font-size: 1.15rem; }
.mapa-sede { margin-top: 1.5rem; width: 100%; height: 400px; border-radius: 16px; border: none; box-shadow: var(--sombra-suave); }

/* CONTACTO */
.form-group { margin-bottom: 1.5rem; }
.form-control { width: 100%; padding: 1rem; border: 2px solid var(--color-borde); border-radius: 12px; background-color: var(--color-fondo-principal); transition: all 0.3s; font-family: var(--font-principal); }
.form-control:focus { outline: none; border-color: var(--color-secundario); box-shadow: 0 0 0 4px rgba(110, 181, 235, 0.2); }

/* FLOTANTES */
.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background-color: #25d366; color: #ffffff; border-radius: 50%; width: 65px; height: 65px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); z-index: 999; transition: transform 0.3s; }
.whatsapp-float:hover { transform: scale(1.1) rotate(-10deg); }
.whatsapp-float svg { width: 35px; height: 35px; fill: currentColor; }

.voice-float { position: fixed; bottom: 30px; left: 30px; background: linear-gradient(135deg, var(--color-secundario), #4ca1df); color: var(--color-blanco); border-radius: 50px; padding: 12px 24px; font-family: var(--font-titulos); font-weight: 700; font-size: 0.95rem; border: none; box-shadow: 0 10px 25px rgba(110, 181, 235, 0.4); cursor: pointer; z-index: 999; display: flex; align-items: center; gap: 10px; transition: all 0.3s; }
.voice-float:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(110, 181, 235, 0.6); }

/* FOOTER */
.site-footer { background: linear-gradient(to right, #1e293b, var(--color-titulos)); color: var(--color-blanco); padding: 3rem 0; margin-top: auto; position: relative; text-align: center; font-size: 1.05rem; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: linear-gradient(90deg, var(--color-secundario), var(--color-amarillo)); }