/* assets/css/style.css */

:root {
    --primary: #005596; 
    --secondary: #00A8E8; 
    --accent: #25d366;
    --dark-blue: #0a192f;
    --text-main: #1e293b;
    --bg-light: #f1f5f9;
    --pure-white: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

body { 
    font-family: 'Inter', sans-serif; 
    font-size: clamp(1rem, 1rem + 0.2vw, 1.15rem); /* Responsive font sizing */
    line-height: 1.7; 
    color: var(--text-main);
    background-color: #fff;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5 { 
    color: var(--primary); 
    font-weight: 800; 
}
.text-justify { 
    text-align: justify; 
}

/* --- NAVBAR & TOPBAR --- */
.top-bar {
    background: var(--primary);
    color: var(--pure-white);
    padding: 8px 0;
    font-size: 0.95rem;
}
.top-bar a { 
    color: var(--pure-white); 
    text-decoration: none; 
    font-weight: 600; 
}

/* Dropdown para teléfonos */
.phone-dropdown-wrapper .dropdown-menu {
    border-radius: 12px;
    padding: 8px 0;
    z-index: 1030;
}
.phone-dropdown-wrapper .dropdown-item {
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}
.phone-dropdown-wrapper .dropdown-item:hover {
    background-color: var(--secondary) !important;
}

/* Navbar Sticky y Animado */
.navbar {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 12px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.navbar-brand img { 
    height: 55px; 
    width: auto; 
    transition: height 0.3s ease;
}

/* Navbar al scrollear */
.navbar.navbar-scrolled {
    padding: 8px 0;
    box-shadow: 0 8px 30px rgba(0,85,150,0.12);
}
.navbar.navbar-scrolled .navbar-brand img {
    height: 48px;
}

.nav-link { 
    color: var(--dark-blue) !important; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    margin: 0 8px; 
    cursor: pointer; 
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}
.nav-link:hover { 
    color: var(--secondary) !important; 
}

/* Indicador de menú activo */
.nav-link.active {
    color: var(--primary) !important;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}
.nav-link.active::after {
    width: 100%;
}

/* Botón de Reservar en Nav */
.nav-reserve-btn {
    transition: all 0.3s ease;
    font-size: 0.9rem;
}
.nav-reserve-btn:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 85, 150, 0.2) !important;
}

/* --- HERO SLIDESHOW --- */
#heroCarousel { background: #000; }
.carousel-item { height: 75vh; min-height: 550px; }
.hero-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,20,40,0.85) 0%, rgba(0,20,40,0.3) 100%);
    display: flex;
    align-items: center;
}
.hero-content { 
    color: var(--pure-white); 
    max-width: 850px; 
    padding: 30px; 
    text-shadow: 2px 2px 15px rgba(0,0,0,0.7); 
}
.hero-content h1 { 
    color: var(--pure-white); 
    font-size: clamp(2.2rem, 4vw, 3.8rem); 
    line-height: 1.15; 
    margin-bottom: 20px; 
}
.hero-content p { 
    font-family: 'Lora', serif; 
    font-size: clamp(1.2rem, 2vw, 1.5rem); 
    font-style: italic; 
    color: var(--pure-white); 
    opacity: 0.95; 
    margin-bottom: 2rem; 
}
.hero-content .text-tag { 
    color: var(--secondary); 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    display: block; 
    margin-bottom: 10px; 
}

/* --- SECCIÓN RESULTADOS --- */
.results-access { padding: 80px 0; background: var(--bg-light); }
.result-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    height: 100%;
    border: 1px solid rgba(0,85,150,0.08);
}
.result-card:hover { 
    transform: translateY(-8px); 
    border-color: var(--secondary); 
    box-shadow: 0 20px 40px rgba(0,85,150,0.12); 
}

/* Mejora de Iconografía en Acceso a Resultados */
.result-card .icon-container {
    width: 90px;
    height: 90px;
    background: rgba(0, 168, 232, 0.07);
    color: var(--secondary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}
.result-card:hover .icon-container {
    background: var(--secondary);
    color: var(--pure-white);
}
.result-card i { 
    font-size: 2.4rem; 
}
.result-card h3 { 
    color: var(--primary); 
    margin-bottom: 15px; 
    font-size: 1.5rem;
}
.result-card p { 
    color: var(--text-main); 
}

/* --- NOSOTROS & HISTORIA --- */
.about-section { padding: 90px 0; }
.about-img { border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; object-fit: cover; }
.super-logo-responsive {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-top: 35px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

/* --- MISIÓN, VISIÓN, VALORES --- */
.mvv-container { padding: 80px 0; background: var(--bg-light); }
.mvv-card {
    background: var(--pure-white);
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03);
    border-top: 5px solid var(--primary);
    transition: 0.3s ease;
}
.mvv-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0,85,150,0.08); }
.mvv-icon { font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; }

/* --- SERVICIOS --- */
.services-grid { padding: 90px 0; background: var(--bg-light); }
.service-box {
    background: white;
    padding: 35px;
    border-radius: 24px;
    height: 100%;
    border-bottom: 6px solid var(--secondary);
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.service-box:hover { 
    background: var(--primary); 
    transform: translateY(-6px); 
    box-shadow: 0 15px 35px rgba(0,85,150,0.15);
}
.service-box i { 
    font-size: 2.8rem; 
    color: var(--primary); 
    margin-bottom: 20px; 
    transition: 0.3s; 
    display: inline-block; 
}
.service-box h4 { 
    transition: 0.3s; 
    font-weight: 700; 
    margin-bottom: 15px; 
    font-size: 1.3rem;
}
.service-box p { 
    color: var(--text-main); 
    transition: 0.3s; 
    font-size: 0.95rem; 
}
.service-box:hover i, .service-box:hover h4, .service-box:hover p { 
    color: var(--pure-white); 
}

/* Iconos "+" estéticos */
.service-box .btn-outline-primary, .team-card .btn-outline-primary {
    font-size: 0.85rem;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 700;
}
.service-box:hover .btn-outline-primary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--pure-white);
}

/* --- NUESTRO EQUIPO --- */
.team-section { padding: 90px 0; background: var(--bg-light); }
.team-card {
    background: var(--pure-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,85,150,0.05);
    transition: 0.4s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.team-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,85,150,0.1); }
.team-img-wrapper {
    height: 300px;
    overflow: hidden;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}
.team-card:hover .team-img {
    transform: scale(1.06);
}
.team-info { 
    padding: 25px; 
    text-align: center; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}
.team-role { 
    color: var(--secondary); 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 1px; 
    margin-bottom: 8px; 
    display: block; 
}
.team-info h4 { 
    font-size: 1.25rem; 
    font-weight: 800; 
    margin-bottom: 5px; 
}
.team-specialty { 
    font-size: 0.95rem; 
    color: var(--text-main); 
    font-weight: 600; 
    margin-bottom: 8px; 
}
.team-schedule-preview { 
    font-size: 0.85rem; 
    color: #64748b; 
    margin-bottom: 12px; 
    font-weight: 600; 
}
.team-bio { 
    font-size: 0.9rem; 
    color: #64748b; 
    line-height: 1.6; 
    margin-bottom: 15px; 
}

/* --- CONTACTO & SUCURSALES --- */
.contact-section { background: var(--dark-blue); color: var(--pure-white); padding: 90px 0; }
.branch-info { 
    background: rgba(255,255,255,0.06); 
    padding: 25px; 
    border-radius: 20px; 
    margin-bottom: 25px; 
    border-left: 5px solid var(--secondary);
    transition: 0.3s;
}
.branch-info:hover { background: rgba(255,255,255,0.1); }
.branch-info i { color: var(--secondary); font-size: 2rem; }
.branch-info h5 { color: var(--pure-white); font-weight: 700; margin-bottom: 8px; font-size: 1.2rem; }
.branch-info p { margin-bottom: 0; font-size: 0.95rem; color: var(--pure-white); line-height: 1.5; }
.branch-info strong { color: var(--secondary); }

.map-wrapper {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    height: 280px;
    margin-top: 20px;
}

/* --- FOOTER & CONVENIOS --- */
.convenios-bar { background: #fff; padding: 40px 0; border-top: 1px solid #e2e8f0; }
.logo-fonasa { max-width: 180px; width: 100%; height: auto; }
footer { background: #030812; color: #e2e8f0; padding: 80px 0 40px; }
.footer-logo { height: 50px; filter: brightness(0) invert(1); margin-bottom: 25px; }
.footer-links h5 { 
    color: var(--pure-white); 
    font-weight: 700; 
    border-bottom: 2px solid var(--secondary); 
    display: inline-block; 
    padding-bottom: 5px; 
    margin-bottom: 20px; 
}
.footer-links a { 
    color: #cbd5e1; 
    text-decoration: none; 
    display: block; 
    margin-bottom: 12px; 
    transition: 0.2s; 
    cursor: pointer; 
}
.footer-links a:hover { 
    color: var(--secondary); 
    padding-left: 6px; 
}

/* Botones de WhatsApp en footer */
.whatsapp-btn {
    background-color: #25d366;
    border-color: #25d366;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.whatsapp-btn:hover {
    background-color: #1ebd5a !important;
    border-color: #1ebd5a !important;
    transform: translateY(-2px);
    color: white !important;
}

/* --- AGENDAR CITA CHATBOT FLOTANTE --- */
.floating-booking {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2100;
    display: flex;
    align-items: center;
    background: var(--accent);
    color: var(--pure-white);
    padding: 8px 20px 8px 8px;
    border-radius: 60px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
}
.floating-booking:hover { 
    transform: scale(1.08); 
    color: var(--pure-white); 
    background: #1eb950; 
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.45); 
}
.booking-icon {
    width: 48px;
    height: 48px;
    background: var(--pure-white);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 14px;
}
.booking-text { 
    font-weight: 800; 
    font-size: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
}

/* --- CHATBOT CONTAINER --- */
.chatbot-container {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 360px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 85, 150, 0.15);
    border: 1px solid rgba(0, 85, 150, 0.1);
    z-index: 2110;
    display: none;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.chatbot-header {
    background: var(--primary);
    color: var(--pure-white);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chatbot-header h5 { 
    color: var(--pure-white); 
    font-size: 1.1rem; 
    margin: 0; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.chatbot-body {
    padding: 20px;
    max-height: 380px;
    overflow-y: auto;
    background-color: #fafbfc;
}
.chat-bubble {
    background: var(--pure-white);
    padding: 12px 16px;
    border-radius: 18px;
    border-top-left-radius: 4px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-btn {
    background: var(--pure-white);
    color: var(--primary);
    border: 1px solid rgba(0,85,150,0.15);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.chat-btn:hover {
    background: var(--primary);
    color: var(--pure-white) !important;
    border-color: var(--primary);
    transform: translateX(4px);
}
.chat-btn:hover i {
    color: var(--pure-white) !important;
}

/* --- SPA VIEWPORT --- */
.page-content { display: none; }
.page-active { display: block; animation: fadeIn 0.4s ease-in-out; }

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

/* --- PREMIUM DOCTOR MODAL STYLE --- */
.doctor-modal .modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.doctor-modal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #003e70 100%);
    color: var(--pure-white);
    border-bottom: none;
    padding: 22px 28px;
}
.doctor-modal .modal-header h5 {
    color: var(--pure-white);
    font-weight: 800;
    font-size: 1.35rem;
}
.doctor-modal .modal-body {
    padding: 35px;
}
.doctor-profile-header {
    display: flex;
    gap: 25px;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 25px;
    margin-bottom: 25px;
}
.doctor-profile-img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-light);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.doctor-profile-intro h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--primary);
}
.doctor-profile-intro .specialty-badge {
    display: inline-block;
    background: rgba(0, 168, 232, 0.1);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 10px;
}
.info-block {
    margin-bottom: 22px;
}
.info-block h6 {
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-block h6 i {
    color: var(--secondary);
    font-size: 1rem;
}
.info-block p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: justify;
}
.info-highlight-box {
    background-color: var(--bg-light);
    border-left: 5px solid var(--secondary);
    padding: 18px;
    border-radius: 12px;
    margin-top: 25px;
}
.info-highlight-box p {
    margin-bottom: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-blue);
}

/* --- ESTILOS DE ADMINISTRACIÓN --- */
.admin-login-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 15px 35px rgba(0,85,150,0.1);
}
.admin-card {
    border-radius: 16px;
    border: 1px solid rgba(0,85,150,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.admin-table th {
    background-color: var(--primary) !important;
    color: white !important;
    font-weight: 700;
}

/* --- RESPONSIVE --- */
@media (max-width: 991.98px) {
    .nav-link {
        padding: 10px 0;
        margin: 0;
        font-size: 0.95rem;
    }
    .nav-link::after {
        display: none;
    }
    .nav-reserve-btn {
        width: 100%;
        margin-top: 15px;
        text-align: center;
        padding: 12px 0;
    }
    .navbar-collapse {
        padding: 15px 0 5px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1.05rem;
    }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.15rem; }
    .carousel-item { height: 65vh; min-height: 450px; }
    .floating-booking { padding: 8px 15px; }
    .booking-text { display: none; }
    .chatbot-container { right: 15px; bottom: 85px; width: 330px; }
    .doctor-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .doctor-profile-img {
        width: 110px;
        height: 110px;
    }
    .results-access, .about-section, .mvv-container, .services-grid, .team-section, .contact-section {
        padding: 60px 0;
    }
}
