/* ==========================================================================
   Hospital Municipal Dr. José Ortega Vasquez
   ========================================================================== */

.hosp-page {
    padding-bottom: 8rem;
}

.hosp-page p {
    font-size: 1.7rem;
    line-height: 1.8;
    color: #2f3640;
    margin-bottom: 1.6rem;
    text-align: justify;
}

/* ==========================================================================
   Acordeão de escalas
   ========================================================================== */

.hosp-acc {
    margin: 2.5rem 0 4rem;
    background: #FFFFFF;
    border: 1px solid #DDE3EC;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -20px rgba(16, 24, 40, .35);
    overflow: hidden;
}

/* ---------- Cabeçalho ---------- */
.hosp-acc__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #EDF0F5;
    background: linear-gradient(180deg, #FBFCFE, #FFFFFF);
}

.hosp-acc__head-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #E8F0FB;
    color: #12508F;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hosp-acc__head-text {
    display: block;
    min-width: 0;
    flex: 1;
}

.hosp-acc h2.hosp-acc__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #1B1F24;
    letter-spacing: -.01em;
}

.hosp-page .hosp-acc__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5A6472;
    text-align: left;
}

.hosp-acc__stamp {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #F1F4F9;
    border: 1px solid #E1E7F0;
    font-size: 12px;
    font-weight: 600;
    color: #45505F;
    white-space: nowrap;
}

/* ---------- Grupos ---------- */
.hosp-acc__groups {
    display: flex;
    flex-direction: column;
}

.hosp-acc__group:not(:last-child) {
    border-bottom: 1px solid #EDF0F5;
}

.hosp-acc__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: background 160ms ease;
}

.hosp-acc__trigger:hover,
.hosp-acc__trigger:focus-visible {
    background: #F7F9FC;
}

.hosp-acc__trigger:focus-visible {
    outline: 2px solid #12508F;
    outline-offset: -2px;
}

.hosp-acc__trigger:focus:not(:focus-visible) {
    outline: none;
}

.hosp-acc__chevron {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid #DDE3EC;
    background: #FFFFFF;
    color: #12508F;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 180ms ease, background 180ms ease;
}

.hosp-acc__group.is-closed .hosp-acc__chevron {
    transform: rotate(-90deg);
}

.hosp-acc__label {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1B1F24;
}

.hosp-acc__count {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #E8F0FB;
    color: #12508F;
    font-size: 12px;
    font-weight: 700;
}

.hosp-acc__state {
    flex: none;
    font-size: 13px;
    font-weight: 600;
    color: #5A6472;
}

/* ---------- Painel ---------- */
.hosp-acc__panel {
    padding: 0 24px 24px 64px;
}

/* ---------- Estado vazio ---------- */
.hosp-acc__empty {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 10px;
    background: #F7F9FC;
    border: 1px dashed #D5DDE9;
    color: #5A6472;
}

.hosp-acc__empty svg {
    flex: none;
    margin-top: 1px;
}

.hosp-page .hosp-acc__empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #45505F;
    text-align: left;
}

/* ---------- Escala semanal (imagem) ---------- */
.hosp-acc__figure {
    margin: 0;
    border: 1px solid #E3E8F0;
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
}

.hosp-acc__figure-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #EDF0F5;
    background: #F7F9FC;
}

.hosp-acc__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #E8F0FB;
    color: #12508F;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.hosp-acc__figure-caption {
    flex: 1;
    min-width: 140px;
    font-size: 13px;
    font-weight: 600;
    color: #45505F;
}

.hosp-acc__figure-actions {
    display: flex;
    gap: 8px;
}

.hosp-acc a.hosp-acc__figure-img {
    display: flex;
    justify-content: center;
    background: #F1F4F9;
    padding: 12px;
    cursor: zoom-in;
}

.hosp-acc__figure-img img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.hosp-acc__figure-foot {
    padding: 10px 16px;
    font-size: 12px;
    color: #5A6472;
    border-top: 1px solid #EDF0F5;
}

/* ---------- Documento ---------- */
.hosp-acc__doc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #E3E8F0;
    border-radius: 10px;
    background: #FFFFFF;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hosp-acc__doc + .hosp-acc__doc {
    margin-top: 10px;
}

.hosp-acc__doc:hover {
    border-color: #B9CCE6;
    box-shadow: 0 6px 18px -12px rgba(16, 24, 40, .4);
}

.hosp-acc__doc-type {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #FDECEC;
    color: #B3261E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.hosp-acc__doc-info {
    flex: 1;
    min-width: 160px;
    display: block;
}

.hosp-acc__doc-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1B1F24;
    line-height: 1.35;
}

.hosp-acc__doc-meta {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: #5A6472;
}

.hosp-acc__doc-actions {
    display: flex;
    gap: 8px;
}

/* ---------- Botões ---------- */
.hosp-acc a.hosp-acc__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 160ms ease, border-color 160ms ease;
}

.hosp-acc a.hosp-acc__btn--sm {
    padding: 7px 12px;
    font-size: 13px;
    gap: 6px;
}

.hosp-acc a.hosp-acc__btn--ghost,
.hosp-acc a.hosp-acc__btn--ghost:link,
.hosp-acc a.hosp-acc__btn--ghost:visited {
    border: 1px solid #CBD5E3;
    background: #FFFFFF;
    color: #12508F;
}

.hosp-acc a.hosp-acc__btn--ghost:hover,
.hosp-acc a.hosp-acc__btn--ghost:focus {
    background: #F2F6FC;
    border-color: #A9BFDC;
    color: #12508F;
    text-decoration: none;
}

.hosp-acc a.hosp-acc__btn--solid,
.hosp-acc a.hosp-acc__btn--solid:link,
.hosp-acc a.hosp-acc__btn--solid:visited {
    padding: 9px 16px;
    background: #12508F;
    border: 1px solid #12508F;
    color: #FFFFFF;
}

.hosp-acc a.hosp-acc__btn--solid:hover,
.hosp-acc a.hosp-acc__btn--solid:focus {
    background: #0E4176;
    border-color: #0E4176;
    color: #FFFFFF;
    text-decoration: none;
}

/* ==========================================================================
   Seções de texto
   ========================================================================== */

.hosp-section {
    margin: 4rem 0;
}

.hosp-section__title {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    color: #0b3a63;
    margin: 0 0 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 2px solid #e3ecf5;
}

.hosp-section__title::before {
    content: "";
    display: inline-block;
    width: .6rem;
    min-width: .6rem;
    height: 2.2rem;
    border-radius: .3rem;
    background: linear-gradient(180deg, #12508F 0%, #1b6fc0 100%);
    flex: 0 0 auto;
}

.hosp-page .hosp-link {
    word-break: break-word;
    text-align: left;
}

.hosp-page .hosp-link a {
    color: #12508F;
    font-weight: 600;
    text-decoration: underline;
}

.hosp-page .hosp-link a:hover,
.hosp-page .hosp-link a:focus {
    color: #0E4176;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 768px) {
    .hosp-acc__head {
        flex-wrap: wrap;
        padding: 20px;
    }

    .hosp-acc__head-text {
        flex: 1 1 100%;
        order: 2;
    }

    .hosp-acc__stamp {
        order: 3;
    }

    .hosp-acc__trigger {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .hosp-acc__label {
        flex: 1 1 auto;
    }

    .hosp-acc__panel {
        padding: 0 20px 20px;
    }

    .hosp-acc__doc-actions {
        flex: 1 1 100%;
    }

    .hosp-acc__figure-actions {
        flex: 1 1 100%;
    }

    .hosp-acc__figure-caption {
        flex: 1 1 100%;
    }

    .hosp-acc__figure-img img {
        height: auto;
        max-height: 60vh;
    }

    .hosp-acc a.hosp-acc__btn {
        flex: 1;
        justify-content: center;
    }

    .hosp-page p {
        font-size: 1.8rem;
        text-align: left;
    }

    .hosp-section__title {
        font-size: 1.9rem;
    }
}

/* ==========================================================================
   Lightbox da escala semanal (Magnific Popup)
   A animação "mfp-fade" não vem no css/magnific-popup.css do site.
   ========================================================================== */

/*
 * O site usa z-index de até 100000000 no cabeçalho fixo, no VLibras e nos botões
 * de acessibilidade; o Magnific Popup vem com 1042 e ficaria por baixo deles.
 */
.mfp-bg {
    z-index: 1000000000;
}

.mfp-wrap {
    z-index: 1000000001;
}

.mfp-fade.mfp-bg {
    opacity: 0;
    transition: opacity .3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: .85;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: opacity .3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}

/* O título do lightbox precisa acompanhar a tipografia do site */
.mfp-title {
    font-size: 14px;
    line-height: 1.5;
    color: #F1F4F9;
}

.hosp-acc a.hosp-acc__zoom {
    cursor: zoom-in;
}
