/* --- Variables y Reset --- */
:root {
    --primary-blue: #3AA9E0;
    --dark-blue: #0F3D58;
    --accent-green: #C5E052;
    --text-gray: #555;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-blue);
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Botones --- */
.btn-primary {
    background-color: var(--accent-green);
    color: var(--dark-blue);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: scale(1.05);
}

/* --- Header --- */
.site-header {
    background: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo {
    height: 90px;
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(90deg, rgba(58, 169, 224, 1) 0%, rgba(58, 169, 224, 0.9) 35%, rgba(58, 169, 224, 0) 100%),
                url('img/doctor-hero.webp');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    width: 100%;
    padding: 140px 0; 
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    height: 100%;
    justify-content: flex-start;
}

.hero-text {
    color: var(--white);
    max-width: 550px;
    position: relative;
    z-index: 2;
}

.hero-text h3 {
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.hero-text h1 {
    font-size: 3rem; 
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    font-weight: 500;
    max-width: 90%;
}

/* --- Info Section (Zig Zag) --- */
.info-section {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 3.0rem; 
    color: #333;
    margin-bottom: 60px;
    text-transform: uppercase;
    font-weight: 700;
}

.section-title .highlight {
    color: #A4C848;
}

.row {
    display: flex;
    align-items: stretch; 
    gap: 40px;
    margin-bottom: 80px;
    max-width: 1000px; 
    margin-left: auto;
    margin-right: auto;
}

.col-img {
    flex: 1;
    display: flex; 
}

.col-img img {
    border-radius: 10px;
    width: 100%;
    height: 100%; 
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.col-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.col-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.col-text ul li {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.3rem;
    display: flex;
    align-items: flex-start; 
}

.col-text ul li::before {
    content: '\2714';
    color: #A4C848;
    margin-right: 12px;
    font-size: 1.1rem;
    line-height: 1.3;
    flex-shrink: 0;
}

/* --- Specialties --- */
.specialties {
    padding: 50px 0;
    text-align: center;
}

.icons-grid {
    display: flex;
    justify-content: center;
    gap: 180px; 
    flex-wrap: wrap;
    margin: 50px 0;
}

.icon-item {
    width: 200px;
    text-align: center;
}

.icon-circle {
    background-color: var(--primary-blue);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle img {
    width: 140px;
}

.icon-item p {
    font-weight: 600;
    font-size: 0.9rem;
}

.cta-center h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* --- Testimonials --- */
.testimonials {
    padding: 60px 0 100px 0;
    background-color: #FAFAFA;
}

.text-left-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark-blue);
    font-weight: 700;
}

.testimonials-fixed-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.testimonio-img-fixed {
    flex: 0 0 60%;
}

.testimonio-img-fixed img {
    width: 100%;
    border-radius: 5px;
    height: 450px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.carousel-text-only {
    flex: 1;
    position: relative;
    margin-left: -100px;
    z-index: 2;
    max-width: 550px;
}

.testimonio-content-slide {
    display: none;
    animation: fadeEffect 1s;
}

.testimonio-box {
    background: var(--white);
    padding: 40px 50px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonio-box h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-blue);
    font-weight: 700;
}

.testimonio-box p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.dots {
    color: #FFD700;
    font-size: 1.3rem;
}

@keyframes fadeEffect {
    from {opacity: 0; transform: translateY(20px);} 
    to {opacity: 1; transform: translateY(0);}
}

.prev-btn-text, .next-btn-text {
    cursor: pointer;
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    background-color: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.next-btn-text { right: 20px; }
.prev-btn-text { right: 70px; }

.prev-btn-text:hover, .next-btn-text:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* --- Footer Mejorado --- */
.site-footer {
    background-color: #fff;
    padding-top: 50px;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    /* Grid dinámico para manejar las 4 columnas (Logo + 2 Direcciones + Contacto) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}

.footer-info h5 {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-blue);
    text-transform: uppercase;
    font-size: 1rem;
}

.footer-bar {
    background-color: #0088CC;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.8rem;
}

/* --- OPTIMIZACIÓN RESPONSIVA --- */
@media (max-width: 992px) {
    .carousel-text-only { margin-left: -50px; }
    .testimonio-img-fixed img { height: 400px; }
    .hero { background-position: 70% center; }
    .hero-text h1 { font-size: 2.2rem; }
    .section-title { font-size: 2.2rem; }
    .row { gap: 30px; margin-bottom: 60px; }
    .icons-grid { gap: 80px; } 
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding: 100px 0; 
        background: linear-gradient(180deg, rgba(58, 169, 224, 0.9) 0%, rgba(58, 169, 224, 0.4) 100%),
                    url('img/doctor-hero.webp');
        background-position: 75% top; 
        background-size: cover;
    }

    .hero-content { justify-content: center; }
    .hero-text { max-width: 100%; padding: 0 20px; }
    .hero-text h1 { 
        font-size: 1.8rem; 
        text-shadow: 0 2px 4px rgba(0,0,0,0.6); 
    }
    
    .section-title { 
        font-size: 1.8rem; 
    }

    .row { 
        flex-direction: column; 
        align-items: center; 
        gap: 40px;
    }
    .reverse-mobile { flex-direction: column-reverse; }
    .col-img img { height: auto; max-height: 300px; }
    .col-text { padding: 0; justify-content: flex-start; }

    .icons-grid { gap: 40px; } 

    .testimonials-fixed-wrapper { flex-direction: column; }
    .testimonio-img-fixed { flex: 100%; width: 100%; }
    .testimonio-img-fixed img { height: auto; max-height: 300px; }
    
    .carousel-text-only {
        margin-left: 0;
        margin-top: -30px;
        width: 95%; 
    }
    .testimonio-box { padding: 30px; min-height: auto; }

    /* Footer en móvil: una columna centrada */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo img {
        margin: 0 auto;
    }
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999; 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.logo-loader {
    width: 120px; 
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- BOTÓN FLOTANTE WHATSAPP --- */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.3s;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}