/* ==========================================================================
   VARIABLES DE COLOR (Control de paleta: Rosas/Moradas por defecto)
   ========================================================================== */
:root {
    --primary: #4a154b;         
    --primary-light: #6b21a8;   
    --accent: #bc507a;          
    --accent-hover: #9d365c;    
    --bg-light: #fff5f7;        
    --bg-tint: #fae8ff;         
    --bg-gris: #F0F0F0;         
    --text-dark: #1e1b4b;       
    --text-muted: #6b7280;      
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05);
}

/* ==========================================================================
   ESTILOS BASE Y CONFIGURACIÓN DE ANIMACIÓN
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 85px; /* Evita que el menú fijo tape el inicio del Hero */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Botones unificados */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}
.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.text-center { text-align: center; }
.section-padding { padding: 80px 0; }

.section-title {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px auto;
}

/* ==========================================================================
   REQUISITO 1: CABECERA FIJA (STICKY) CON MENÚ DE NAVEGACIÓN
   ========================================================================== */
header {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}
.logo-img {
    max-height: 80px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}
.nav-menu a:hover {
    color: var(--accent);
}

.nav-right-zone {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-phone {
    font-weight: 600;
    color: var(--primary-light);
    text-decoration: none;
    border: 1px solid var(--primary-light);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.nav-phone:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

/* ==========================================================================
   REQUISITO 4: HERO SECTION (Imagen de fondo controlada)
   ========================================================================== */
.hero {
    position: relative;
    background-image: url('../images/banner.jpg?v=2.0'); 
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    min-height: 700px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,245,247,0.95) 35%, rgba(255,245,247,0.7) 55%, rgba(255,245,247,0) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    max-width: 950px;
    padding: 40px 100px;
    position: relative; 
    z-index: 3; 
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary);
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 35px;
}
.hero-buttons { 
    display: flex; 
    gap: 16px; 
}

/* ==========================================================================
   SECCIÓN DOLORES (Con soporte para iconos lineales)
   ========================================================================== */
.pains { background-color: var(--bg-gris); }
.pains-grid { display: table; width: 100%; table-layout: fixed; }
.pain-card { display: table-cell; width: 33.333%; padding: 0 15px; vertical-align: top; height: 400px;}

.pain-box {
    background: var(--bg-light);
    padding: 35px 25px;
    border-radius: 12px;
    border-left: 4px solid var(--accent); /* Marco rosa original */
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    
    /* Agregamos una transición suave para el cambio de color y la sombra */
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0); /* Inicialmente sin sombra visible */
}

.pain-card-img {
    width: 120px;          
    height: 120px;         
    object-fit: contain;   
    margin: 0 auto 20px auto; 
    display: block;        
    opacity: 0.9;         
    transition: transform 0.3s ease;
}

.pain-box h4 { font-size: 1.2rem; color: var(--primary); margin-bottom: 12px; }
.pain-box p { color: var(--text-muted); font-size: 0.95rem; }

.pain-card:hover .pain-box {
    border-color: var(--primary);          /* El marco rosa cambia al morado principal */
    box-shadow: var(--shadow-lg);          /* Se activa la sombra suave que ya tienes en variables */
    transform: translateY(-5px);           /* Toda la tarjeta sube sutilmente 5px */
    background-color: var(--white);        /* Cambia ligeramente a blanco para resaltar la sombra */
}

/* Modificamos el hover de la imagen para que trabaje en conjunto */
.pain-card:hover .pain-card-img {
    transform: scale(1.05);                /* El icono lineal se agranda un 5% de forma elegante */
    opacity: 1;                            /* Gana total nitidez */
}

/* ==========================================================================
   SECCIÓN DOS DOCTORES
   ========================================================================== */
.doctors-section { background-color: var(--bg-white); }
.doctors-grid { display: table; width: 100%; table-layout: fixed; }
.doc-column { display: table-cell; width: 50%; padding: 0 20px; }
.doc-profile {
    background-color: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    padding-bottom: 35px;
    height: 780px;
}
.doc-img-placeholder {
    width: 100%;
    max-height: 350px;
    background-color: #e2e8f0; 
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
}
.doc-info { padding: 0 30px; }
.doc-name { font-size: 1.6rem; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.doc-specialty { color: var(--accent); font-weight: 600; font-size: 1rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-bio { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; min-height: 80px; }

/* ==========================================================================
   SERVICIOS / PADECIMIENTOS
   ========================================================================== */
.services-grid { display: table; width: 100%; table-layout: fixed; }
.services-row { display: table-row; }
.service-cell { display: table-cell; width: 33.333%; padding: 15px; }
.service-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    height: 100%;
}
.service-icon { color: var(--accent); font-size: 1.5rem; margin-bottom: 15px; font-weight: bold; }
.service-card h4 { font-size: 1.2rem; color: var(--primary); margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.90rem; }

/* ==========================================================================
   CÓMO FUNCIONA
   ========================================================================== */
.how-grid { display: table; width: 100%; table-layout: fixed; margin-top: 40px; }
.step-col { display: table-cell; width: 33.333%; padding: 0 20px; text-align: center; }
.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ==========================================================================
   PUNTO 1: ANIMACIÓN EXCLUSIVA PARA EL CONTENIDO DEL BANNER
   ========================================================================== */
.animar-entrada {
    opacity: 0;
    animation: fadeInUpHero 1s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
    animation-delay: 0.2s;
}

@keyframes fadeInUpHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   PUNTO 2: INDICADOR VISUAL RESALTADO PARA EL MENÚ ACTIVO
   ========================================================================== */
.nav-menu a.active {
    color: var(--accent) !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

/* ==========================================================================
   PUNTO 3: BOTÓN FLOTANTE REGRESAR AL INICIO (SCROLL TO TOP)
   ========================================================================== */
.scroll-top-btn {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    width: 48px !important;
    height: 48px !important;
    background-color: var(--accent) !important;
    color: var(--white) !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 1.4rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 9999 !important; /* Capa superior absoluta para evitar bloqueos visuales */
    
    /* Animación de Transición e Inicialización */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease !important;
}

/* Clase desencadenada por JavaScript */
.scroll-top-btn.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.scroll-top-btn:hover {
    background-color: var(--accent-hover) !important;
    transform: scale(1.05) !important;
}

/* ==========================================================================
   NUEVOS ESTILOS PARA LA SECCIÓN FAQS ACORDEÓN (2 COLUMNAS)
   ========================================================================== */
.faqs-section {
    background-color: var(--bg-gris); /* Fondo rosa sutil de tu paleta */
}

/* Rejilla para dividir en dos columnas usando la misma estructura que tus componentes anteriores */
.faq-two-columns {
    display: flex;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.faq-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Diseño de las tarjetas del acordeón */
.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-lg);
}

/* Botón de la pregunta */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 25px;
    text-align: left;
    font-size: 1.05rem;
    color: var(--primary);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(250, 232, 255, 0.3); /* Destello sutil al pasar el mouse */
}

/* Icono del símbolo + / - */
.faq-toggle {
    font-size: 1.3rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

/* Caja de la respuesta (Oculta por defecto con animación de altura fluida) */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: var(--white);
}

.faq-answer p {
    padding: 0 25px 20px 25px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Clases de activación (Controladas por JS) */
.faq-item.active .faq-answer {
    max-height: 150px; /* Permite que la respuesta se despliegue de forma suave */
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg); /* Convierte el '+' en una 'x' o gira sutilmente */
    color: var(--primary);
}

/* Adaptabilidad para móviles */
@media (max-width: 768px) {
    .faq-two-columns {
        flex-direction: column;
        gap: 15px;
    }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA EL CARRUSEL DE TESTIMONIOS CON FOTO
   ========================================================================== */
.testimonial-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 850px;
    margin: 40px auto 0 auto;
    position: relative;
    gap: 20px;
}

/* Contenedor principal que enmascara los testimonios ocultos */
.testimonial-carousel-container {
    width: 100%;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    position: relative;
    width: 100%;
}

/* Estructura de cada Slide de Testimonio */
.testimonial-slide {
    min-width: 100%;
    display: none; /* Ocultos por defecto */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Clase de activación inyectada por JavaScript */
.testimonial-slide.active {
    display: block;
    opacity: 1;
}

/* Diseño estilizado de la Tarjeta */
.test-card-premium {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(188, 80, 122, 0.1);
}

/* Contenedor circular perfecto para la foto */
.test-avatar-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent); /* Círculo de color rosa acento */
    box-shadow: var(--shadow);
    background-color: #e2e8f0;
}

.test-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la imagen se distorsione o aplaste */
}

.test-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.test-author {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

/* Botones de las Flechas de Navegación */
.carousel-arrow {
    background-color: var(--white);
    color: var(--accent);
    border: 2px solid var(--accent);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.carousel-arrow:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: scale(1.05);
}

/* Adaptabilidad responsiva para dispositivos móviles */
@media (max-width: 600px) {
    .testimonial-carousel-wrapper { gap: 10px; }
    .test-card-premium { padding: 30px 20px; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 0.9rem; }
    .test-text { font-size: 1rem; }
}

/* ==========================================================================
   CÓMO FUNCIONA (Optimizado para imagen de fondo oscura y textos claros)
   ========================================================================== */
.how-it-works-section {
    position: relative;
    background-image: url('../images/fondo_doctores.jpg'); /* Guarda tu imagen oscura aquí */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 0;
}

/* Capa oscura superpuesta para asegurar el contraste de las letras claras */
.how-it-works-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* El tono oscuro morado de tu paleta con opacidad */
    z-index: 1;
}

/* Mantiene el contenedor físico por encima de la capa oscura */
.how-it-works-section .container {
    position: relative;
    z-index: 2;
}

/* Forzamos el título principal a color claro */
.how-it-works-section .section-title {
    color: var(--white) !important;
    margin-bottom: 50px;
}

/* Configuración de la rejilla de los pasos */
.how-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.step-col {
    display: table-cell;
    width: 33.333%;
    padding: 0 20px;
    text-align: center;
}

/* Cambiamos el círculo para que sea claro con número oscuro para el contraste */
.step-number {
    width: 55px;
    height: 55px;
    background-color: var(--white); /* Círculo ahora blanco */
    color: var(--primary);          /* Número morado oscuro */
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 22px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Subtítulos de los pasos en blanco puro */
.step-col h4 {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Párrafos descriptivos en un tono claro suave (grisáceo / rosa tenue) para que no canse la vista */
.step-col p {
    color: var(--bg-tint); /* Usa tu color claro tintado */
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Adaptabilidad para móviles */
@media (max-width: 768px) {
    .how-grid {
        display: block;
    }
    .step-col {
        display: block;
        width: 100%;
        margin-bottom: 40px;
    }
    .step-col:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   ESTILOS PREMIUM PARA EL PIE DE PÁGINA (FOOTER)
   ========================================================================== */
.main-footer {
    background-color: var(--primary); /* Fondo oscuro morado de tu paleta */
    color: var(--white);
    padding-top: 60px;
    position: relative;
}

/* Fila superior: Caja flexible de 3 columnas */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    gap: 30px;
}

.footer-col {
    flex: 1;
}

.footer-col h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Estilos específicos de Contacto */
.contact-col p {
    font-size: 0.95rem;
    color: var(--bg-tint);
    margin-bottom: 10px;
}

/* Estilos específicos de Redes Sociales */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.social-item {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.social-item:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}

/* Estilos específicos de la Imagen del lado derecho */
.text-right {
    text-align: right;
}

.footer-logo-img {
    max-height: 110px;
    width: auto;
    opacity: 0.75;
    transition: opacity 0.3s ease;
    border: 1px solid #fff;
    border-radius: 10px;
    padding: 3px;

}

.footer-logo-img:hover {
    opacity: 1;
}

/* Fila inferior: Sección delgada de Copyright */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2); /* Fondo ligeramente más oscuro */
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--white); /* Gris claro para no competir visualmente */
    margin: 0;
}

/* ==========================================================================
   ESTILIZACIÓN DEL ENLACE EN EL COMPONENTE INFERIOR DEL FOOTER
   ========================================================================== */
.footer-bottom p a {
    color: var(--accent);            /* Cambia el azul por tu rosa corporativo */
    text-decoration: none;           /* Quita la línea de subrayado fija */
    font-weight: 600;                /* Le da un poco más de cuerpo para que se lea perfecto */
    transition: color 0.2s ease;     /* Transición suave para cuando pasen el mouse */
}

/* Efecto al pasar el cursor sobre el enlace */
.footer-bottom p a:hover {
    color: var(--bg-tint);           /* Al pasar el mouse cambia al rosa claro/blanco tintado */
    text-decoration: underline;      /* Aparece el subrayado solo al interactuar */
}

/* Adaptabilidad Responsiva para Pantallas Móviles */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        text-align: center !important;
        gap: 40px;
    }
    
    .text-right {
        text-align: center;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
}


/* ==========================================================================
   SERVICIOS / PADECIMIENTOS (Totalmente Animado y Estilizado)
   ========================================================================== */
.services-grid { 
    display: table; 
    width: 100%; 
    table-layout: fixed; 
}

.services-row { 
    display: table-row; 
}

.service-cell { 
    display: table-cell; 
    width: 33.333%; 
    padding: 15px; 
    height: 410px;
}

/* Tarjeta base con transiciones fluidas */
.service-card {
    background: var(--bg-light);
    padding: 35px 30px;
    border-radius: 14px;
    height: 100%;
    border: 1px solid rgba(188, 80, 122, 0.05);
    
    /* Configuración para la animación */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                background-color 0.3s ease;
}

/* Contenedor del icono estilizado en lugar de la palomita suelta */
.service-icon { 
    color: var(--accent); 
    font-size: 1.4rem; 
    margin-bottom: 20px; 
    font-weight: bold;
    background-color: var(--white); /* Círculo blanco de fondo */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(188, 80, 122, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.service-card h4 { 
    font-size: 1.25rem; 
    color: var(--primary); 
    margin-bottom: 12px; 
    font-weight: 700;
}

.service-card p { 
    color: var(--text-muted); 
    font-size: 0.95rem; 
    line-height: 1.6;
}

/* ==========================================================================
   ANIMACIÓN HOVER PARA LOS SERVICIOS
   ========================================================================== */
.service-cell:hover .service-card {
    background-color: var(--white);                  /* Cambia a blanco limpio */
    transform: translateY(-6px);                      /* Se eleva elegantemente */
    box-shadow: var(--shadow-lg);                    /* Se proyecta una sombra suave */
    border-color: rgba(188, 80, 122, 0.15);
}

/* El icono también reacciona en sincronía con la tarjeta */
.service-cell:hover .service-icon {
    background-color: var(--accent);                  /* Invierte su color a rosa */
    color: var(--white);                              /* La palomita pasa a blanca */
    transform: rotate(10deg) scale(1.05);             /* Pequeño giro dinámico */
}

/* Contenedor principal en esquina inferior derecha */
.whatsapp-float-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

/* Estilo individual del botón */
.whatsapp-btn {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  padding: 6px 14px 6px 6px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

/* Contenedor del avatar circular */
.avatar-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

/* Imagen de la foto del doctor */
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

/* Badge de WhatsApp superpuesto */
.wa-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.wa-icon {
  width: 12px;
  height: 12px;
}

/* Texto descriptivo */
.btn-label {
  margin-left: 10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #611235; /* Tono institucional de Médica Sanara */
  white-space: nowrap;
}

/* Responsive: Ajustes opcionales para pantallas pequeñas */
@media (max-width: 480px) {
  .whatsapp-float-container {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }
  
  .whatsapp-btn {
    padding: 5px 12px 5px 5px;
  }
  
  .avatar-wrapper {
    width: 44px;
    height: 44px;
  }
  
  .btn-label {
    font-size: 13px;
  }
}



/* Botón hamburguesa oculto por defecto en escritorio */
.menu-toggle {
  display: none;
}

/* Bloquear el desbordamiento horizontal en todo el documento */
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Evitar que imágenes o contenedores sobrepasen la pantalla */
img, video {
    max-width: 100% !important;
    height: auto !important;
}


/* Ajustar los botones del banner para que no desborden */
@media (max-width: 768px) {
  .hero-buttons, 
  .cta-container { /* Ajusta a la clase contenedora de tus botones si varía */
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .doctors-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .doc-column {
    width: 100%;
  }

  /* Cambia estos nombres por las clases reales del contenedor de tarjetas */
  .differentials-grid, 
  .services-grid,
  .features-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  /* Asegura que cada tarjeta o columna ocupe el ancho completo */
  .differential-card, 
  .service-card,
  .feature-item {
    width: 100%;
  }

  /* ==========================================
     1. ¿Por qué Médica Sanara es diferente?
     ========================================== */
  .pains-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem !important;
  }

  .pains-grid .pain-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ==========================================
     2. ¿En qué podemos ayudarte?
     ========================================== */
  .services-grid,
  .services-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem !important;
  }

  .services-row .service-cell,
  .service-cell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  .service-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative;
  }

  /* Mostrar y estilizar el botón en móvil */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
  }

  /* Líneas del botón usando tu variable principal */
  .menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-light, #802654);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Convertir el nav-menu en desplegable vertical */
  .nav-menu {
    display: none !important;
    flex-direction: column !important;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    gap: 1.2rem !important;
    box-sizing: border-box;
    z-index: 1000;
  }

  /* Mostrar el menú cuando tenga la clase active */
  .nav-menu.active {
    display: flex !important;
  }

  /* Ocultar el botón secundario de WhatsApp en la barra superior móvil */
  .nav-right-zone {
    display: none !important;
  }

/* Ajustar relleno interno y ancho completo en móviles */
  .hero-content {
    padding: 30px 20px !important; /* Reduce los 100px laterales a solo 20px */
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Reducir el tamaño del título principal para que respire */
  .hero-content h1 {
    font-size: 2.1rem !important; /* O ajusta a 32px segun la escala usada */
    line-height: 1.25 !important;
  }

  /* Reducir ligeramente el texto secundario */
  .hero-content p {
    font-size: 1rem !important;
  }  
}


/* Botón Ubicación: Fondo blanco y borde con el color actual (#c0567a / var(--accent)) */
.btn-location {
    background-color: var(--white);
    color:  var(--accent);
    border: 2px solid #c0567a !important;
    transition: all 0.3s ease;

    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

/* Estado Hover: invierte los colores al pasar el cursor */
.btn-location:hover {
  background-color: #c0567a !important;
  color: #ffffff !important;
}

/* Estilos del Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 15px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-content {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 950px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content h3 {
  margin-top: 0;
  color: #802654;
  margin-bottom: 15px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
}

.map-container {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Contenedor derecho: alinea botón e íconos en la misma línea */
.nav-right-zone {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
}

/* Bloque de redes a la derecha del botón */
.nav-social-desktop {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Estilo para los iconos de redes sociales */
.nav-social-desktop a {
  color: #c0567a; /* Color guinda/rosa del tema */
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(192, 86, 122, 0.1); /* Fondo suave circular */
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-social-desktop a:hover {
  background-color: #c0567a;
  color: #ffffff;
}

/* Contenedor de redes en el footer */
.footer-social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Íconos adaptados al fondo del footer */
.footer-social-links a {
  color: #ffffff;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12); /* Fondo blanco translúcido */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Efecto Hover al pasar el cursor */
.footer-social-links a:hover {
  background-color: #c0567a; /* Color rosa/guinda del tema */
  color: #ffffff;
  transform: translateY(-2px);
}

/* Limpiar estilo de botones en el footer para que parezcan enlaces */
button.legal-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-block;
}

/* Modal específico para textos legales largos */
.legal-modal-content {
  max-width: 750px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-text-body {
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 10px;
  text-align: left;
  color: #333;
  line-height: 1.6;
  font-size: 0.95rem;
}