/* === VARIABLES Y RESET === */
:root {
    --primary: #0A2342; 
    --secondary: #2CA6A4; 
    --accent: #00D1B2;
    --dark-bg: #0F172A; 
    --light-bg: #F8FAFC; 
    --white: #FFFFFF;
    --text-dark: #1E293B; 
    --text-light: #64748B;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text-dark); background: var(--white); line-height: 1.5; overflow-x: hidden; font-size: 13px; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; }
a { text-decoration: none; } 
ul { list-style: none; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* === BARRA SUPERIOR === */
.top-bar { background: var(--dark-bg); color: #cbd5e1; padding: 5px 0; font-size: 0.8rem; }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.top-bar-phone { font-weight: 700; color: var(--accent); font-size: 0.85rem; }
.top-bar-phone i { margin-right: 5px; }
.top-bar-links { display: flex; gap: 15px; align-items: center; }
.top-bar-links a { color: #cbd5e1; text-decoration: none; transition: color 0.3s; font-size: 1rem; }
.top-bar-links a:hover { color: white; }
.lang-selector { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); padding: 3px 10px; border-radius: 20px; cursor: pointer; }
.lang-selector i { color: white; font-size: 0.9rem; }
.lang-selector .goog-te-combo { background: transparent; color: white; border: none; font-size: 0.7rem; cursor: pointer; outline: none; }
.lang-selector .goog-te-combo option { color: black; }
.goog-logo-link, .goog-te-gadget span { display: none !important; }

/* === HEADER Y MENÚ === */
#header { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.logo-img { max-height: 40px; width: auto; }
.menu-toggle, .menu-icon { display: none; }
nav ul { display: flex; gap: 20px; align-items: center; }
nav ul li a { color: var(--text-dark); font-weight: 500; transition: color 0.3s; position: relative; font-size: 0.85rem; }
nav ul li a:not(.btn-nav-cta):hover { color: var(--secondary); }
nav ul li a:not(.btn-nav-cta)::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--secondary); transition: width 0.3s; }
nav ul li a:not(.btn-nav-cta):hover::after { width: 100%; }
.btn-nav-cta { background: var(--primary); color: var(--white) !important; padding: 7px 18px; border-radius: 30px; font-weight: 600; transition: all 0.3s; }
.btn-nav-cta:hover { background: var(--secondary); transform: translateY(-2px); }

/* === MENÚ DESPLEGABLE === */
.dropdown { position: relative; }
.dropdown > a { display: flex; align-items: center; gap: 5px; }
.dropdown-content {
    position: absolute; top: 100%; left: 0; background-color: var(--white);
    min-width: 230px; box-shadow: 0 15px 40px rgba(0,0,0,0.12); border-radius: 10px;
    padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(15px);
    transition: all 0.3s; z-index: 1001; border-top: 3px solid var(--secondary);
    list-style: none; display: flex !important; flex-direction: column !important; gap: 0 !important;
}
.dropdown:hover .dropdown-content, .dropdown:focus-within .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-content li { width: 100%; display: block; }
.dropdown-content li a { padding: 8px 18px; display: flex; align-items: center; gap: 10px; color: var(--text-dark); font-weight: 500; font-size: 0.8rem; transition: all 0.2s ease; border-left: 3px solid transparent; }
.dropdown-content li a:hover { background-color: var(--light-bg); color: var(--primary); border-left: 3px solid var(--secondary); }
.dropdown-content li a i { color: var(--secondary); width: 20px; text-align: center; font-size: 0.85rem; }
.dropdown:last-child .dropdown-content, .dropdown:nth-last-child(2) .dropdown-content { right: 0; left: auto; }

/* === HERO SLIDER === */
.hero-slider-container { position: relative; height: 70vh; overflow: hidden; }
.hero-slide { display: none; width: 100%; height: 100%; position: relative; }
.hero-slide.active { display: flex; }
.slide-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; }
.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(10,35,66,0.85) 0%, rgba(10,35,66,0.4) 50%, transparent 100%); }
.slide-content { position: relative; z-index: 5; max-width: 450px; padding: 0 35px; align-self: center; }
.slide-content h1 { font-size: 2.2rem; color: white; margin-bottom: 15px; line-height: 1.2; }
.slide-content p { font-size: 1rem; color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.text-highlight { color: var(--accent); }
.hero-badge { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); padding: 5px 12px; border-radius: 30px; font-size: 0.75rem; font-weight: 600; display: inline-block; margin-bottom: 12px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: white; border: none; padding: 10px 12px; cursor: pointer; z-index: 10; font-size: 1rem; transition: background 0.3s; }
.slider-arrow:hover { background: var(--secondary); }
.arrow-left { left: 12px; } 
.arrow-right { right: 12px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; }
.dot.active { background: var(--accent); width: 20px; border-radius: 6px; }

/* === BOTONES === */
.btn-primary { background: var(--accent); color: var(--primary); padding: 10px 25px; border-radius: 30px; font-weight: 700; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-size: 0.85rem; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 209, 178, 0.3); }
.btn-outline { border: 2px solid var(--white); color: var(--white); padding: 8px 25px; border-radius: 30px; font-weight: 600; transition: all 0.3s; }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* === SECCIONES === */
.section { padding: 60px 0; }
.section-alt { background: var(--light-bg); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 35px; }
.section-tag { color: var(--secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; display: block; margin-bottom: 8px; }
.section-header h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 10px; }
.section-header p { font-size: 0.9rem; color: var(--text-light); }

/* === TARJETAS FLOTANTES === */
.quick-access-wrapper { max-width: 1000px; margin: -40px auto 0; position: relative; z-index: 10; padding: 0 20px; }
.quick-access-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qa-card { background: white; padding: 15px 8px; border-radius: 10px; text-align: center; box-shadow: var(--shadow-lg); text-decoration: none; color: var(--primary); border-top: 4px solid var(--secondary); transition: transform 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qa-card:hover { transform: translateY(-6px); }
.qa-card i { font-size: 1.8rem; color: var(--secondary); margin-bottom: 8px; }
.qa-card h4 { font-family: 'Montserrat', sans-serif; font-size: 0.9rem; }

/* === CARRUSEL GALERIA === */
.carousel-container { max-width: 850px; margin: 25px auto; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-lg); }
.carousel-slide { display: flex; width: 300%; animation: slide 15s infinite; }
.carousel-slide img { width: 33.33%; height: 350px; object-fit: cover; }
@keyframes slide { 0%{transform: translateX(0)} 30%{transform: translateX(-33.33%)} 60%{transform: translateX(-66.66%)} 100%{transform: translateX(0)} }

/* === CARRUSEL DE DOCTORES === */
.doctors-carousel-wrapper { overflow: hidden; margin: 25px auto; max-width: 100%; padding: 12px 0; }
.doctors-carousel { display: flex; gap: 20px; animation: scrollDoctors 25s linear infinite; }
.doctors-carousel .doctor-card { min-width: 250px; flex-shrink: 0; }
.doctors-carousel-wrapper:hover .doctors-carousel { animation-play-state: paused; }
@keyframes scrollDoctors { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-270px * 3)); } }
.doctor-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); text-align: center; transition: transform 0.3s; }
.doctor-card:hover { transform: translateY(-6px); }
.doc-avatar-sticker { width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; background: var(--light-bg); font-size: 4rem; color: var(--secondary); }
.doctor-info { padding: 12px; }
.doctor-info h3 { color: var(--primary); margin-bottom: 4px; font-size: 1rem; }
.doctor-info p { color: var(--secondary); font-weight: 600; font-size: 0.75rem; }
.doctor-actions { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.doc-btn { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; font-size: 0.75rem; }
.doc-btn.coco { background: var(--primary); } 
.doc-btn.call { background: #25d366; } 
.doc-btn.wa { background: #128C7E; }

/* === CANALES ATENCIÓN === */
.contact-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
@media (min-width: 992px) { .contact-cards-grid { grid-template-columns: repeat(4, 1fr); } }
.contact-card-whatsapp { background: white; padding: 20px 12px; border-radius: 10px; text-align: center; box-shadow: var(--shadow-sm); border-top: 4px solid #25d366; display: flex; flex-direction: column; justify-content: center; align-items: center; }

/* === LEMA === */
.lema-section { background: linear-gradient(135deg, var(--primary) 0%, #15467a 100%); color: white; text-align: center; padding: 50px 20px; }
.lema-section h2 { font-size: 1.5rem; font-style: italic; max-width: 700px; margin: 0 auto 10px; color: white; line-height: 1.4; }

/* === FARMACIA Y RESULTADOS === */
.pharmacy-box { background: linear-gradient(135deg, #15315e, #2CA6A4); color: white; padding: 25px; border-radius: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* === WEBCALLBACK === */
.callback-wrapper { background: var(--primary); color: white; padding: 35px; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: center; }
.callback-form { display: flex; flex-direction: column; gap: 10px; }
.callback-form input, .callback-form select { width: 100%; padding: 10px; border-radius: 8px; border: none; font-family: 'Inter', sans-serif; font-size: 0.85rem; }
.callback-form button { width: 100%; padding: 10px; background: var(--accent); color: var(--primary); border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.9rem; }
.elderly-notice { background: #fff3cd; border-left: 6px solid #ffc107; padding: 15px; border-radius: 8px; margin: 25px 0; font-size: 0.9rem; color: #856404; }

/* === CHATBOT IRIS V3 + GLOBO === */
.chatbot-toggle { position: fixed; bottom: 20px; right: 20px; background: var(--primary); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer; z-index: 998; box-shadow: var(--shadow-lg); animation: pulse 2s infinite; border: none; transition: transform 0.3s; }
.chatbot-toggle:hover { transform: scale(1.1); }
.chatbot-window { position: fixed; bottom: 80px; right: 20px; width: 300px; height: 450px; background: white; border-radius: 10px; box-shadow: var(--shadow-lg); display: none; flex-direction: column; z-index: 998; overflow: hidden; border: 1px solid #e2e8f0; }
.chatbot-header { background: var(--primary); color: white; padding: 10px; font-weight: bold; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.chatbot-body { padding: 12px; overflow-y: auto; flex-grow: 1; background: #f9fafb; display: flex; flex-direction: column; gap: 10px; }
.chat-msg-row { display: flex; gap: 6px; align-items: flex-end; }
.chat-msg-row.bot { justify-content: flex-start; }
.chat-msg-row.user { justify-content: flex-end; }
.chat-avatar { width: 25px; height: 25px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.chat-message { padding: 8px 10px; border-radius: 10px; font-size: 0.8rem; max-width: 80%; line-height: 1.4; }
.bot .chat-message { background: white; color: var(--text-dark); border-bottom-left-radius: 2px; box-shadow: var(--shadow-sm); }
.user .chat-message { background: var(--primary); color: white; border-bottom-right-radius: 2px; }
.chat-options { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chat-btn { background: white; border: 1px solid var(--secondary); color: var(--primary); padding: 5px 8px; border-radius: 10px; cursor: pointer; text-align: left; font-size: 0.75rem; transition: all 0.2s; }
.chat-btn:hover { background: var(--secondary); color: white; }
.chat-wa-link { display: flex; align-items: center; justify-content: center; gap: 6px; background: #25d366; color: white; padding: 8px; border-radius: 6px; text-decoration: none; font-weight: 700; font-size: 0.8rem; margin-top: 8px; }
.chat-input-area { padding: 10px; background: white; border-top: 1px solid #eee; display: flex; gap: 6px; }
.chat-input-area input { flex: 1; padding: 6px 10px; border: 1px solid #ccc; border-radius: 15px; font-family: 'Inter', sans-serif; font-size: 0.8rem; outline: none; }
.chat-input-area input:focus { border-color: var(--secondary); }
.chat-input-area button { background: var(--primary); color: white; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.chat-bubble { position: fixed; bottom: 80px; right: 30px; background: white; padding: 10px 12px; border-radius: 10px 10px 0 10px; box-shadow: var(--shadow-lg); display: none; z-index: 997; max-width: 180px; font-size: 0.8rem; color: var(--text-dark); border: 1px solid #e2e8f0; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.chat-bubble::after { content: ''; position: absolute; bottom: 0; right: 12px; border: 6px solid transparent; border-top-color: white; border-bottom: 0; margin-bottom: -6px; }
.chat-bubble-close { position: absolute; top: -5px; left: -5px; background: #dc2626; color: white; border-radius: 50%; width: 15px; height: 15px; text-align: center; line-height: 15px; cursor: pointer; font-size: 0.6rem; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { 0% { transform: scale(1); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* === FOOTER (Ultra Compactado) === */
footer { background: #15315e; color: rgba(255,255,255,0.95); padding: 20px 0 0 0; font-size: 0.85rem; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 15px; padding-bottom: 12px; align-items: start; }
.footer-col h4 { color: #ffffff; margin-bottom: 8px; font-size: 0.9rem; }
.footer-col p { margin-bottom: 6px; line-height: 1.3; color: #e2e8f0; font-size: 0.85rem; }
.footer-col ul li { margin-bottom: 5px; }
.footer-col ul li a { color: #e2e8f0; text-decoration: none; transition: color 0.3s; font-size: 0.85rem; }
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding: 12px 0; text-align: center; font-size: 0.8rem; color: #e2e8f0; }
.footer-policies { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.footer-policies a { color: #e2e8f0; font-size: 0.8rem; text-decoration: none; transition: color 0.3s; }

/* Sección Legal y REPS */
.regulatory-section { text-align: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.2); }
.regulatory-title { color: #ffffff; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.reps-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); color: #ffffff; border: 2px solid var(--accent); padding: 8px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 0.85rem; transition: all 0.3s; margin-bottom: 12px; }
.reps-btn i { font-size: 1rem; }
.reps-btn:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }
.legal-links-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.legal-links-list a { color: #e2e8f0; font-size: 0.8rem; text-decoration: none; transition: color 0.3s; }
.legal-links-list a::after { content: "|"; margin-left: 8px; color: #475569; }
.legal-links-list a:last-child::after { content: ""; }
.legal-links-list a:hover { color: white; }
.supersalud-logo { max-height: 150px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; transition: opacity 0.3s; margin-top: 4px; }
.supersalud-logo:hover { opacity: 1; }

/* === BANNER DE COOKIES === */
.cookie-banner { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background: #0A2342; color: #ffffff; padding: 12px 20px; z-index: 9999; 
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3); border-top: 4px solid var(--accent); 
}
.cookie-banner p { 
    font-size: 0.85rem; margin: 0; max-width: 700px; text-align: center; line-height: 1.3; 
}
.cookie-banner a { color: var(--accent); text-decoration: underline; font-weight: 700; }
.cookie-banner button { 
    background: var(--accent); color: var(--primary); border: none; padding: 6px 18px; 
    border-radius: 6px; cursor: pointer; font-weight: 800; font-size: 0.85rem; white-space: nowrap; 
    transition: transform 0.2s; 
}
.cookie-banner button:hover { transform: scale(1.05); }

/* === RESPONSIVE DEFINITIVO Y LIMPIO === */
.cookie-banner { display: none; }

@media (max-width: 768px) {
    .header-content { position: relative; }
    .menu-icon { 
        display: block !important; 
        font-size: 1.8rem; 
        color: var(--primary); 
        cursor: pointer; 
        z-index: 1005; 
        position: absolute;
        right: 20px;
        top: 15px;
    }
    .menu-toggle { display: none; }
    
    .nav-menu { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        background: var(--white); 
        position: absolute; 
        top: 100%; 
        left: 0; 
        padding: 20px; 
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        gap: 15px;
        z-index: 1004;
    }
    #menu-toggle:checked ~ .nav-menu { display: flex; }
    
    .nav-menu ul { flex-direction: column; width: 100%; gap: 10px; }
    .nav-menu ul li { width: 100%; }
    .nav-menu ul li a { display: block; width: 100%; padding: 8px 0; }
    
    /* Submenús cerrados por defecto, se abren al tocar */
    .dropdown-content {
        position: static;
        box-shadow: none;
        display: none; /* Oculto por defecto */
        width: 100%;
        margin-left: 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 5px 0;
        border: none;
        background: transparent;
    }
    .dropdown:focus-within .dropdown-content { 
        display: block; /* Se abre al tocar */
    }
    .dropdown-content li a { font-size: 0.85rem; padding: 8px 15px; color: var(--text-light); }
    
    .hero h1 { font-size: 1.6rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 15px; }
    .top-bar-phone { display: none; }
    .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
    .callback-wrapper { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .chatbot-window { width: calc(100% - 20px); right: 10px; bottom: 70px; height: 65vh; }
    .cookie-banner { flex-direction: column; gap: 8px; padding: 12px; text-align: center; }
}