﻿
/* ==========================================================
   DR. JUAN PABLO ESPINOZA SOZA
   Diseño médico profesional: ortopedia y traumatología
   CSS unificado y sin bloques duplicados
   ========================================================== */

/* ==========================================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================================== */

:root {
    --azul: #0866c6;
    --azul-oscuro: #092e62;
    --azul-claro: #edf6ff;
    --celeste: #22a9f5;
    --texto: #263b57;
    --gris: #64748b;
    --blanco: #ffffff;
    --radio: 22px;
    --sombra: 0 12px 35px rgba(9, 46, 98, 0.08);
    --sombra-hover: 0 22px 45px rgba(9, 46, 98, 0.14);
    --fondo-hospital: url("/images/fondo_hospitalario.jpg");
    --fondo-anatomico: url("/images/fondo_anatomico_pie_tobillo.jpg");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 105px;
}

body {
    margin: 0;
    color: var(--texto);
    background: #f5faff;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--blanco);
    background: var(--azul);
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

section[id] {
    scroll-margin-top: 100px;
}

/* ==========================================================
   2. NAVEGACIÓN Y LOGOTIPO
   ========================================================== */

.navbar-doctor {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(8, 102, 198, 0.10);
    box-shadow: 0 5px 24px rgba(9, 46, 98, 0.045);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

    .navbar-doctor > .navbar {
        min-height: 100px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

.brand-doctor {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    margin-right: 30px;
    padding: 0;
}

    .brand-doctor img {
        display: block;
        width: 225px;
        height: 82px;
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
        transition: transform 0.25s ease;
    }

    .brand-doctor:hover img {
        transform: scale(1.025);
    }

    .brand-doctor strong,
    .brand-doctor small {
        display: block;
    }

    .brand-doctor strong {
        font-size: 15px;
    }

    .brand-doctor small {
        color: var(--azul);
        font-size: 12px;
    }

.navbar-nav {
    align-items: center;
    gap: 8px;
}

.navbar-doctor .nav-link {
    position: relative;
    padding: 12px 13px;
    color: #344963;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.25s ease;
}

    .navbar-doctor .nav-link::after {
        position: absolute;
        right: 13px;
        bottom: 5px;
        left: 13px;
        height: 2px;
        background: var(--celeste);
        content: "";
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s ease;
    }

    .navbar-doctor .nav-link:hover {
        color: var(--azul);
    }

        .navbar-doctor .nav-link:hover::after {
            transform: scaleX(1);
        }

.navbar-toggler {
    padding: 10px;
    border: 1px solid #dce8f5;
    border-radius: 12px;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(8, 102, 198, 0.12);
    }

/* ==========================================================
   3. BOTONES
   ========================================================== */

.btn-primary-doctor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 52px;
    padding: 14px 25px;
    border: 1px solid var(--azul);
    border-radius: 50px;
    background: linear-gradient(135deg, #0876db, #075bb4);
    box-shadow: 0 7px 18px rgba(8, 102, 198, 0.18);
    color: var(--blanco);
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

    .btn-primary-doctor:hover {
        border-color: var(--azul-oscuro);
        background: var(--azul-oscuro);
        box-shadow: 0 12px 25px rgba(8, 45, 97, 0.20);
        color: var(--blanco);
        transform: translateY(-2px);
    }

.btn-outline-doctor {
    margin-top: 8px;
    padding: 14px 23px;
    border: 1px solid #b8d8f7;
    border-radius: 50px;
    color: var(--azul);
    font-weight: 700;
    transition: all 0.25s ease;
}

    .btn-outline-doctor:hover {
        border-color: var(--azul);
        background: var(--azul);
        color: var(--blanco);
        transform: translateY(-2px);
    }

.btn-whatsapp {
    padding: 12px 16px;
    color: #1475c9;
    font-weight: 600;
}

    .btn-whatsapp:hover {
        background: var(--blanco);
        color: var(--azul-oscuro);
    }

/* ==========================================================
   4. BANNER PRINCIPAL
   Conserva la imagen doctor.png completa, sin recortarla
   ========================================================== */

.hero-banner {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #edf7ff;
    background-image: linear-gradient( 120deg, rgba(235, 247, 255, 0.25), rgba(255, 255, 255, 0.20) ), var(--fondo-hospital);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-banner-container {
    position: relative;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0;
}

.hero-banner-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.hero-doctor {
    position: relative;
    overflow: hidden;
    padding: 65px 0 55px;
    background: radial-gradient(circle at 85% 15%, #ffffff 0, transparent 35%), linear-gradient(115deg, #eaf6ff 0%, #f8fbff 55%, #e4f2ff 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--azul);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.eyebrow-line {
    width: 32px;
    height: 4px;
    border-radius: 10px;
    background: var(--celeste);
}

.hero-content h1 {
    margin: 0 0 16px;
    color: var(--azul-oscuro);
    font-size: clamp(36px, 4.3vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
}

    .hero-content h1 span {
        display: block;
        color: var(--azul);
    }

.hero-content h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}

.hero-subtitle {
    margin-bottom: 18px;
    color: var(--azul);
    font-size: 16px;
    font-weight: 600;
}

.hero-description {
    max-width: 500px;
    margin-bottom: 26px;
    color: var(--gris);
    font-size: 16px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 27px;
    color: var(--gris);
    font-size: 13px;
}

    .hero-trust i {
        color: var(--azul);
        font-size: 20px;
    }

.hero-image-column {
    position: relative;
    display: flex;
    align-items: stretch;
    padding: 0;
}

.hero-image-frame {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 540px;
    margin: 0;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(8, 45, 97, 0.12);
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 540px;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

.floating-note {
    display: none;
}

    .floating-note i {
        color: var(--azul);
        font-size: 28px;
    }

    .floating-note strong,
    .floating-note small {
        display: block;
        line-height: 1.4;
    }

    .floating-note strong {
        color: var(--azul-oscuro);
    }

    .floating-note small {
        color: var(--gris);
    }

/* ==========================================================
   5. FONDOS DE LAS SECCIONES
   Cada sección tiene un fondo definido una sola vez
   ========================================================== */

.specialties-section {
    position: relative;
    padding: 40px 0;
    border-top: 1px solid #dceeff;
    border-bottom: 1px solid #dceeff;
    background-image: linear-gradient( 180deg, rgba(247, 251, 255, 0.88), rgba(255, 255, 255, 0.91) ), var(--fondo-hospital);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#doctor {
    background-image: linear-gradient( 110deg, rgba(255, 255, 255, 0.91), rgba(239, 248, 255, 0.84) ), var(--fondo-hospital);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.mission-section {
    position: relative;
    padding: 100px 0;
    background-image: linear-gradient( 120deg, rgba(231, 244, 255, 0.90), rgba(255, 255, 255, 0.88) ), var(--fondo-hospital);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.treatments-background {
    background-image: linear-gradient( 180deg, rgba(255, 255, 255, 0.91), rgba(235, 247, 255, 0.86) ), var(--fondo-anatomico);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

/* ==========================================================
   6. ESPECIALIDADES
   ========================================================== */

.section-mini-title {
    margin: 0;
    color: var(--azul-oscuro);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.specialty-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    padding: 22px 12px;
    border: 1px solid transparent;
    border-radius: 20px;
    text-align: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

    .specialty-item:hover {
        border-color: #e0edfa;
        background: rgba(255, 255, 255, 0.94);
        transform: translateY(-4px);
    }

.specialty-icon,
.value-icon,
.treatment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--azul);
}

.specialty-icon {
    width: 72px;
    height: 72px;
    border: 1px solid #d9eafa;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff, #e8f4ff);
    box-shadow: 0 8px 20px rgba(8, 102, 198, 0.08);
    font-size: 31px;
}

.specialty-item h3 {
    margin: 0;
    color: var(--azul-oscuro);
    font-size: 15px;
    font-weight: 750;
}

/* ==========================================================
   7. TÍTULOS Y SECCIONES GENERALES
   ========================================================== */

.section-padding {
    padding: 100px 0;
}

.section-title {
    max-width: 720px;
    margin: 0 0 24px;
    color: var(--azul-oscuro);
    font-size: clamp(30px, 3.2vw, 43px);
    font-weight: 800;
    line-height: 1.17;
    letter-spacing: -1.1px;
}

.section-description {
    margin-bottom: 18px;
    color: #62748b;
    font-size: 16px;
    line-height: 1.9;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 35px;
    text-align: center;
}

    .section-heading .section-description {
        max-width: 650px;
        margin: 0 auto;
    }

/* ==========================================================
   8. FOTOGRAFÍA DEL DOCTOR
   ========================================================== */

.medical-image {
    overflow: hidden;
    border: 1px solid #dcecff;
    border-radius: 28px;
    background: #edf7ff;
    box-shadow: var(--sombra);
}

    .medical-image img {
        display: block;
        width: 100%;
        height: auto;
        max-height: 620px;
        object-fit: contain;
        object-position: center;
    }

/* ==========================================================
   9. MISIÓN Y VALORES
   ========================================================== */

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.value-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 130px;
    padding: 25px 21px;
    border: 1px solid #dfedfb;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 25px rgba(8, 45, 97, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

    .value-card:hover {
        border-color: #cce5ff;
        box-shadow: var(--sombra-hover);
        transform: translateY(-5px);
    }

.value-icon {
    width: 52px;
    height: 52px;
    border: 1px solid #dcecff;
    border-radius: 16px;
    background: #edf6ff;
    font-size: 24px;
}

.value-card h3 {
    margin: 2px 0 7px;
    color: var(--azul-oscuro);
    font-size: 16px;
    font-weight: 800;
}

.value-card p {
    margin: 0;
    color: var(--gris);
    font-size: 13px;
    line-height: 1.8;
}

/* ==========================================================
   10. TRATAMIENTOS
   ========================================================== */

.treatment-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    padding: 32px 25px;
    border: 1px solid #dfedfb;
    border-radius: 23px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 26px rgba(9, 46, 98, 0.045);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

    .treatment-card::before {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--azul), var(--celeste));
        content: "";
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.28s ease;
    }

    .treatment-card:hover {
        border-color: #d7eaff;
        box-shadow: var(--sombra-hover);
        transform: translateY(-6px);
    }

        .treatment-card:hover::before {
            transform: scaleX(1);
        }

.treatment-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 25px;
    border: 1px solid #dbeafa;
    border-radius: 19px;
    background: linear-gradient(145deg, #f5faff, #e3f1ff);
    font-size: 28px;
}

.treatment-card h3 {
    margin-bottom: 12px;
    color: var(--azul-oscuro);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
}

.treatment-card p {
    margin: 0;
    color: var(--gris);
    font-size: 14px;
    line-height: 1.85;
}

/* ==========================================================
   11. SOLICITUD DE CITAS Y CONTACTO
   ========================================================== */

.appointment-section {
    position: relative;
    overflow: hidden;
    padding: 65px 0;
    background-image: radial-gradient( circle at 90% 15%, rgba(75, 186, 255, 0.28), transparent 28% ), linear-gradient( 120deg, rgba(8, 45, 97, 0.95), rgba(8, 102, 198, 0.91) ), var(--fondo-hospital);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--blanco);
}

.appointment-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.appointment-eyebrow {
    color: #a9dcff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.appointment-content h2 {
    max-width: 680px;
    margin: 8px 0;
    color: var(--blanco);
    font-size: clamp(27px, 3vw, 37px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.7px;
}

.appointment-content p {
    margin: 0;
    color: #dcecff;
    line-height: 1.8;
}

.appointment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.appointment-button {
    padding: 15px 25px;
    border-radius: 50px;
    background: var(--blanco);
    color: var(--azul-oscuro);
    font-weight: 750;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .appointment-button:hover {
        background: #edf7ff;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
        color: var(--azul-oscuro);
        transform: translateY(-2px);
    }

.appointment-phone {
    color: var(--blanco);
    font-weight: 750;
    white-space: nowrap;
}

/* ==========================================================
   12. PIE DE PÁGINA
   ========================================================== */

.footer-doctor {
    padding-top: 65px;
    background: linear-gradient(120deg, #041c3d, #063363);
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--blanco);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.footer-doctor h3 {
    margin-bottom: 18px;
    color: var(--blanco);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.footer-doctor p {
    color: #b8cde7;
    font-size: 13px;
    line-height: 1.9;
}

.footer-note {
    margin-top: 20px;
}

.footer-doctor .col-lg-3 a,
.footer-doctor .col-lg-4 a {
    display: block;
    margin-bottom: 10px;
    color: #c6d9f0;
    font-size: 13px;
    line-height: 1.9;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .footer-doctor .col-lg-3 a:hover,
    .footer-doctor .col-lg-4 a:hover {
        color: #65c7ff;
        transform: translateX(3px);
    }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 45px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #a9bfdc;
    font-size: 12px;
}

/* ==========================================================
   13. TABLETAS Y PANTALLAS MEDIANAS
   ========================================================== */

@media (max-width: 1199.98px) {
    .brand-doctor {
        margin-right: 15px;
    }

        .brand-doctor img {
            width: 185px;
            height: 72px;
        }

    .navbar-nav {
        gap: 0;
    }

    .navbar-doctor .nav-link {
        padding-right: 9px;
        padding-left: 9px;
        font-size: 13px;
    }

    .btn-primary-doctor {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 991.98px) {
    .navbar-doctor > .navbar {
        min-height: 82px;
    }

    .brand-doctor img {
        width: 185px;
        height: 65px;
    }

    .navbar-nav {
        align-items: stretch;
        padding: 15px 0;
    }

    .navbar-doctor .nav-link {
        padding: 12px 5px;
        font-size: 15px;
    }

        .navbar-doctor .nav-link::after {
            display: none;
        }

    .navbar-collapse .btn-primary-doctor {
        width: 100%;
        margin: 5px 0 15px;
    }

    .hero-doctor {
        padding: 45px 0;
    }

    .hero-image {
        height: 430px;
        min-height: 430px;
    }

    .section-padding,
    .mission-section {
        padding: 65px 0;
    }

    .medical-image img {
        max-height: 560px;
    }

    .appointment-content {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==========================================================
   14. TELÉFONOS
   ========================================================== */

@media (max-width: 575.98px) {
    html {
        scroll-padding-top: 80px;
    }

    section[id] {
        scroll-margin-top: 80px;
    }

    .navbar-doctor > .navbar {
        min-height: 75px;
        padding: 8px 15px;
    }

    .brand-doctor img {
        width: 155px;
        height: 55px;
    }

    .hero-banner-image {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .hero-doctor {
        padding: 35px 0;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content h2 {
        font-size: 19px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

        .hero-actions .btn {
            width: 100%;
        }

    .hero-image {
        height: 350px;
        min-height: 350px;
        border-radius: 130px 130px 20px 20px;
    }

    .specialties-section {
        padding: 28px 0;
    }

    .section-mini-title {
        font-size: 21px;
        text-align: center;
    }

    .section-padding,
    .mission-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 30px;
        letter-spacing: -0.7px;
    }

    .section-description {
        font-size: 15px;
    }

    .medical-image {
        border-radius: 20px;
    }

        .medical-image img {
            width: 100%;
            height: auto;
            max-height: none;
            object-fit: contain;
        }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .value-card {
        min-height: auto;
        padding: 20px 17px;
    }

    .treatment-card {
        padding: 25px 21px;
    }

    .appointment-section {
        padding: 45px 0;
    }

    .appointment-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

        .appointment-actions .btn {
            width: 100%;
        }

    .footer-doctor {
        padding-top: 45px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 7px;
    }
}

/* ==========================================================
   15. ACCESIBILIDAD: REDUCIR ANIMACIONES
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
