/* ==========================================================
   DR. PEDRO HURTADO
   HEADER INSTITUCIONAL
   ========================================================== */

.dr-header-ph {
    position: relative;
    z-index: 100;

    width: 100%;
    font-family: var(--font-family);
}

/* ==========================================================
   BARRA SUPERIOR STICKY
   ========================================================== */

.dr-header__topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    color: var(--white);
    background: linear-gradient(
        110deg,
        #173F5F,
        #21618C 55%,
        #287FB4
    );

    box-shadow: 0 2px 9px rgb(0 0 0 / 12%);
}

.dr-header__topbar-inner {
    width: 100%;
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    padding: 5px clamp(15px, 3vw, 45px);
}

/* Idiomas */

.dr-header__languages {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.dr-header__language {
    padding: 4px 6px;

    color: rgb(255 255 255 / 70%);
    background: transparent;

    border: 0;
    border-radius: 4px;

    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
    transition: 0.25s ease;
}

.dr-header__language.is-active {
    color: #FFFFFF;
    background: rgb(255 255 255 / 18%);
}

.dr-header__language:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dr-header__language-divider {
    width: 1px;
    height: 18px;
    background: rgb(255 255 255 / 30%);
}

/* Contacto */

.dr-header__contact {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(10px, 1.5vw, 33px);

    min-width: 0;
}

.dr-header__contact-item {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #FFFFFF;
    text-decoration: none;

    white-space: nowrap;

    font-size: 11px;
    font-weight: 700;

    transition: color 0.25s ease;
}

.dr-header__contact-item i {
    font-size: 18px;
}

.dr-header__contact-item:hover {
    color: #BDE9FF;
}

/* Tooltip */

.dr-header__appointments::after {
    content: "Citas Médicas";

    position: absolute;
    bottom: -40px;
    left: 50%;

    padding: 10px 15px;

    color: var(--blue-dark);
    background: #FFFFFF;

    border-radius: 5px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, 5px);
    transition: 0.25s ease;

    box-shadow: 0 5px 15px rgb(0 0 0 / 12%);
}

.dr-header__appointments:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* Redes */

.dr-header__social {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-shrink: 0;
}

.dr-header__social a {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #FFFFFF;
    background: rgb(255 255 255 / 12%);

    border-radius: 50%;

    text-decoration: none;

    transition: 0.3s ease;
}

.dr-header__social a:hover {
    color: var(--blue);
    background: #FFFFFF;

    transform: translateY(-3px);
}

/* ==========================================================
   HERO DEL HEADER
   ========================================================== */

.dr-header__hero {
    position: relative;
    isolation: isolate;

    width: 100%;
    min-height: clamp(590px, 55vw, 760px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background-color: #F5F5F3;

    background-image:
        linear-gradient(
            90deg,
            rgb(255 255 255 / 5%) 0%,
            rgb(255 255 255 / 2%) 65%,
            rgb(255 255 255 / 0%) 100%
        ),
        url("../../img/imgs/header_ph.webp");

    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

/* Capa ligera */

.dr-header__hero-overlay {
    position: absolute;
    z-index: -1;
    inset: 0;

    background: linear-gradient(
        180deg,
        rgb(255 255 255 / 12%) 0%,
        transparent 35%,
        rgb(255 255 255 / 5%) 100%
    );

    pointer-events: none;
}

/* ==========================================================
   IDENTIDAD Y NAVEGACIÓN
   ========================================================== */

.dr-header__container {
    position: relative;
    z-index: 5;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 18px clamp(25px, 5vw, 50px);
}

/* Identidad */

.dr-header__brand {
    display: inline-flex;
    align-items: center;

    gap: 20px;

    color: inherit;
    text-decoration: none;

    flex-shrink: 0;
}

.dr-header__logo {
    display: block;

    width: clamp(85px, 8vw, 130px);
    height: clamp(85px, 8vw, 130px);

    object-fit: contain;

    filter: drop-shadow(0 5px 8px rgb(0 0 0 / 13%));

    transition: transform 0.35s ease;
}

.dr-header__brand:hover .dr-header__logo {
    transform: scale(1.045) rotate(-2deg);
}

.dr-header__brand-text {
    display: flex;
    flex-direction: column;

    gap: 5px;
}

.dr-header__brand-text h1 {
    color: #3299DC;

    font-family: "Brush Script MT", "Segoe Script", cursive;

    font-size: clamp(28px, 3.3vw, 52px);
    font-weight: 500;
    font-style: italic;

    line-height: 1.15;

    text-shadow: 1px 2px 2px rgb(23 63 95 / 20%);
}

.dr-header__brand-text h2 {
    color: #46677F;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Navegación */

.dr-header__navigation {
    position: relative;
    z-index: 10;

    display: flex;
    align-items: center;

    padding: 10px;

    background: rgb(255 255 255 / 77%);

    border: 1px solid rgb(255 255 255 / 85%);
    border-radius: 9px;

    box-shadow:
        0 5px 20px rgb(23 63 95 / 10%),
        inset 0 1px rgb(255 255 255 / 90%);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dr-header__menu {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 0;
    margin: 0;

    list-style: none;
}

.dr-header__menu a {
    position: relative;

    display: block;

    padding: 13px 12px;

    color: #377EA9;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.8px;
    text-transform: uppercase;

    text-decoration: none;
    white-space: nowrap;

    transition: color 0.25s ease;
}

.dr-header__menu a::after {
    content: "";

    position: absolute;
    bottom: 5px;
    left: 12px;
    right: 12px;

    height: 2px;

    background: var(--blue-light);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.3s ease;
}

.dr-header__menu a:hover {
    color: var(--blue-dark);
}

.dr-header__menu a:hover::after,
.dr-header__menu a.is-active::after {
    transform: scaleX(1);
}

.dr-header__menu a.is-active {
    color: var(--blue-dark);
}

/* Menú hamburguesa */

.dr-header__menu-toggle {
    display: none;

    width: 43px;
    height: 40px;

    padding: 9px;

    background: var(--blue);
    border: 0;
    border-radius: 7px;

    cursor: pointer;
}

.dr-header__menu-toggle span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: #FFFFFF;
    border-radius: 5px;

    transition: 0.3s ease;
}

.dr-header__menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.dr-header__menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.dr-header__menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   SLIDER DE ESPECIALIDADES
   ========================================================== */

.dr-header__specialties {
    position: relative;
    z-index: 3;

    width: min(48%, 760px);

    margin: auto 5% 125px auto;

    padding: 27px 25px 20px;

    overflow: hidden;

    text-align: center;

    background: rgb(255 255 255 / 74%);

    border-bottom: 3px solid var(--blue-light);

    box-shadow: 0 8px 25px rgb(23 63 95 / 7%);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.dr-header__specialty-slider {
    position: relative;

    min-height: 55px;
}

.dr-header__specialty {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #3299DC;

    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 800;

    line-height: 1.25;

    text-shadow: 1px 2px 2px rgb(23 63 95 / 16%);

    opacity: 0;
    visibility: hidden;

    transform: translateY(15px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease,
        visibility 0.7s;
}

.dr-header__specialty.is-active {
    position: relative;

    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}

/* Barra de progreso */

.dr-header__slider-progress {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 3px;

    overflow: hidden;

    background: rgb(33 97 140 / 10%);
}

.dr-header__slider-progress span {
    display: block;

    width: 0;
    height: 100%;

    background: #21618C;
}

/* ==========================================================
   TRANSICIÓN INFERIOR
   ========================================================== */

.dr-header__bottom-wave {
    position: absolute;
    z-index: 4;

    left: -3%;
    bottom: -55px;

    width: 106%;
    height: 90px;

    background:
        radial-gradient(
            circle at 90% 5%,
            rgb(114 170 255 / 13%),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #FFFFFF 0%,
            #F2F7FB 100%
        );

    border-radius: 50% 50% 0 0 / 38% 38% 0 0;
}

/* ==========================================================
   RESPONSIVE - TABLETAS
   ========================================================== */

@media (max-width: 1200px) {

    .dr-header__topbar-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dr-header__contact {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dr-header__container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dr-header__navigation {
        width: 100%;
        justify-content: center;
    }

    .dr-header__menu a {
        padding: 12px 9px;
        font-size: 10px;
    }

}

@media (max-width: 900px) {

    .dr-header__topbar-inner {
        gap: 10px;
    }

    .dr-header__contact {
        gap: 10px 17px;
    }

    .dr-header__hero {
        min-height: 680px;
        background-position: 48% center;
    }

    .dr-header__specialties {
        width: 65%;
        margin: auto 4% 110px auto;
    }

}

/* ==========================================================
   RESPONSIVE - MÓVILES
   ========================================================== */

@media (max-width: 640px) {

    .dr-header__topbar-inner {
        min-height: 40px;
        padding: 6px 12px;
    }

    .dr-header__contact {
        width: 100%;
        gap: 9px 15px;
    }

    .dr-header__contact-item {
        font-size: 10px;
    }

    .dr-header__contact-item:nth-child(4),
    .dr-header__contact-item:nth-child(5) {
        display: none;
    }

    .dr-header__social {
        gap: 9px;
    }

    .dr-header__hero {
        min-height: 650px;
        background-position: 42% center;
    }

    .dr-header__container {
        padding: 18px 16px;
        gap: 15px;
    }

    .dr-header__brand {
        gap: 10px;
    }

    .dr-header__logo {
        width: 75px;
        height: 75px;
    }

    .dr-header__brand-text h1 {
        font-size: clamp(25px, 7vw, 34px);
    }

    .dr-header__brand-text h2 {
        font-size: 8px;
        letter-spacing: 1px;
    }

    /* Navegación móvil */

    .dr-header__navigation {
        width: auto;
        margin-left: auto;

        padding: 5px;

        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    .dr-header__menu-toggle {
        display: block;
    }

    .dr-header__menu {
        position: absolute;

        top: calc(100% + 10px);
        right: 0;

        width: min(280px, calc(100vw - 30px));

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 10px;

        background: rgb(255 255 255 / 97%);

        border: 1px solid #E1EAF0;
        border-radius: 10px;

        box-shadow: 0 15px 35px rgb(0 0 0 / 15%);

        opacity: 0;
        visibility: hidden;

        transform: translateY(-8px);

        transition: 0.25s ease;
    }

    .dr-header__menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dr-header__menu a {
        padding: 13px 14px;
        font-size: 11px;
    }

    .dr-header__menu a::after {
        display: none;
    }

    /* Slider */

    .dr-header__specialties {
        width: 90%;

        margin: auto auto 105px;

        padding: 20px 12px 17px;
    }

    .dr-header__specialty-slider {
        min-height: 65px;
    }

    .dr-header__specialty {
        font-size: clamp(19px, 5vw, 25px);
    }

    .dr-header__bottom-wave {
        height: 65px;
        bottom: -42px;
    }

}

/* ==========================================================
   MÓVILES PEQUEÑOS
   ========================================================== */

@media (max-width: 380px) {

    .dr-header__contact-item:nth-child(3) {
        display: block;
    }

    .dr-header__hero {
        min-height: 520px;
    }

    .dr-header__logo {
        width: 63px;
        height: 63px;
    }

    .dr-header__brand-text h1 {
        font-size: 24px;
    }

}

/* ==========================================================
   REDUCCIÓN DE MOVIMIENTO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .dr-header-ph *,
    .dr-header-ph *::before,
    .dr-header-ph *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}
