/* --- 1. Palette ------------------------------------------------------------ */

:root {
    --sand: #f5f1e8;
    --cream: #fffdf8;
    --white: #ffffff;
    --ink: #241f1b;
    --text: #4a423a;
    --muted: #6b6157;
    --line: #e0d9c7;
    --border: #d8d0be;
    --border-strong: #c9c0ac;
    --blue: #279bce;
    --blue-dark: #1b6f94;
    --blue-light: #e9f4fa;
    --blue-line: #bfe0f0;
    --wine: #870400;
    --wine-dark: #6b0300;
    --gold: #e6a83a;
    --green: #4fa58d;
    --green-bg: #eaf5f1;
    --green-ink: #2f7a66;
    --pdf-bg: #fbedec;
    --pdf-line: #f0d4d2;
    --footer-bg: #2b2b2b;
    --footer-text: #ede6d6;
    --footer-muted: #b8ae9e;
    --footer-line: #3a332c;
    --footer-faint: #9a9083;
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sans: "Public Sans", Helvetica, Arial, sans-serif;
}

/* --- 2. Bootstrap, re-skinned ---------------------------------------------- */

:root,
[data-bs-theme="light"] {
    --bs-body-bg: var(--cream);
    --bs-body-color: var(--ink);
    --bs-body-font-family: var(--sans);
    --bs-body-font-size: 18px;
    --bs-body-line-height: 1.6;
    --bs-emphasis-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--cream);
    --bs-border-color: var(--line);
    --bs-border-radius: 9px;
    --bs-border-radius-lg: 12px;
    --bs-primary: var(--blue);
    --bs-primary-rgb: 39, 155, 206;
    --bs-danger: var(--wine);
    --bs-danger-rgb: 135, 4, 0;
    --bs-success: var(--green);
    --bs-success-rgb: 79, 165, 141;
    --bs-dark: var(--ink);
    --bs-dark-rgb: 36, 31, 27;
    --bs-link-color: var(--wine-dark);
    --bs-link-color-rgb: 107, 3, 0;
    --bs-link-hover-color: var(--wine);
    --bs-link-hover-color-rgb: 135, 4, 0;
    --bs-link-decoration: none;
    --bs-link-hover-decoration: underline;
    --bs-heading-color: var(--wine);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height, 143px) + 16px);
}

body {
    -webkit-font-smoothing: antialiased;
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: -0.01em;
}

:focus-visible {
    outline: 3px solid var(--blue-dark);
    outline-offset: 2px;
}

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 22px;
    --bs-btn-padding-y: 13px;
}

.btn-primary {
    --bs-btn-bg: var(--blue);
    --bs-btn-border-color: var(--blue);
    --bs-btn-hover-bg: var(--blue-dark);
    --bs-btn-hover-border-color: var(--blue-dark);
    --bs-btn-active-bg: var(--blue-dark);
    --bs-btn-active-border-color: var(--blue-dark);
    --bs-btn-disabled-bg: var(--blue);
    --bs-btn-disabled-border-color: var(--blue);
}

.btn-danger {
    --bs-btn-bg: var(--wine);
    --bs-btn-border-color: var(--wine);
    --bs-btn-hover-bg: var(--wine-dark);
    --bs-btn-hover-border-color: var(--wine-dark);
    --bs-btn-active-bg: var(--wine-dark);
    --bs-btn-active-border-color: var(--wine-dark);
    font-size: 18px;
    border-radius: 8px;
}

.btn-outline-secondary {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--border-strong);
    --bs-btn-hover-color: var(--blue-dark);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: var(--blue);
    --bs-btn-active-color: var(--blue-dark);
    --bs-btn-active-bg: var(--blue-light);
    --bs-btn-active-border-color: var(--blue);
}

/* The filter chips. */
.btn-chip {
    --bs-btn-font-size: 15px;
    --bs-btn-padding-x: 16px;
    --bs-btn-padding-y: 8px;
    --bs-btn-color: var(--text);
    --bs-btn-bg: var(--white);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-color: var(--blue-dark);
    --bs-btn-hover-bg: var(--white);
    --bs-btn-hover-border-color: var(--blue);
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--blue);
    --bs-btn-active-border-color: var(--blue);
}

.card {
    --bs-card-bg: var(--cream);
    --bs-card-border-color: var(--line);
    --bs-card-border-radius: 12px;
    --bs-card-cap-bg: transparent;
}

.news-card {
    --bs-card-bg: var(--sand);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .news-card:hover .news-more-label {
        color: var(--wine);
    }

    .news-card:focus-within {
        outline: 3px solid var(--blue-dark);
        outline-offset: 2px;
    }

    .news-card .news-link:focus-visible {
        outline: none;
    }

    .news-card .news-image {
        transition: transform 0.3s ease;
    }

    .news-card:hover, .recruitment-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
        transition: ease-in all 0.15s;
    }

        .news-card:hover .news-image {
            transform: scale(1.05);
        }

.badge {
    --bs-badge-padding-y: 5px;
}

.form-control,
.form-select {
    border-color: var(--border);
    border-width: 1.5px;
    padding: 12px 16px;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3.2px rgba(39, 155, 206, 0.22);
    }

.list-group {
    --bs-list-group-bg: white;
    --bs-list-group-border-color: var(--line);
    --bs-list-group-action-hover-color: var(--ink);
    --bs-list-group-action-hover-bg: var(--blue-light);
    --bs-list-group-border-radius: 12px;
}

.topbar {
    font-size: 14.4px;
    letter-spacing: 0.01em;
    background: color-mix(in srgb, var(--wine-dark) 80%, black) !important;
}

    .topbar a {
        color: var(--sand);
        text-decoration: none;
    }

        .topbar a:hover {
            color: var(--white);
            text-decoration: underline;
        }

.site-header {
    background: rgba(245, 241, 232, 0.80);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

    .site-header img {
        max-width: 150px;
        transition: max-width 0.3s ease;
    }

    .site-header.scrolled {
        background-color: rgba(255, 255, 255, 0.80);
    }

        .site-header.scrolled img {
            max-width: 100px;
        }

.text-block {
    width: 100% !important;
}

.lead {
    font-weight: 500;
}

.brand__websiteLogo {
    max-width: 150px;
    height: auto;
}

.brand__websiteLogo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    text-align: center;
    background: var(--cream);
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.brand__name {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--blue-dark);
}

.navbar-nav .nav-link {
    border-radius: 8px;
    padding: 9px 25px !important;
    font-weight: 600;
    font-size: 18px;
    color: var(--ink);
    gap: 30px !important;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        background: color-mix(in srgb, var(--wine) 20%, transparent);
        color: var(--wine);
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link[aria-current="page"] {
        background: color-mix(in srgb, var(--wine) 20%, transparent);
        color: var(--wine);
    }

.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.60)), var(--hero-image, none) center / cover no-repeat;
    align-items: center;
    display: flex;
    padding-block: 100px;
}

    .hero h1 {
        font-size: clamp(36px, 5vw, 54px);
        line-height: 1.08;
        letter-spacing: -0.015em;
        color: var(--white);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    .hero .lead {
        font-size: 20.5px;
        line-height: 1.55;
        color: var(--sand);
        max-width: 34em;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    .hero .btn-outline-secondary {
        --bs-btn-color: var(--white);
        --bs-btn-border-color: rgba(255, 255, 255, 0.72);
        --bs-btn-hover-color: var(--white);
        --bs-btn-hover-bg: rgba(255, 255, 255, 0.14);
        --bs-btn-hover-border-color: var(--white);
    }

.members-card {
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.72) 20%, rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.18) 100% ), var(--members-image, none) center / cover no-repeat;
    border: 0;
    color: var(--white);
}

    .members-card .text-body-secondary {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .members-card .members-title span {
        color: var(--cream);
    }

    .members-card .members-link {
    }

.recruitment-card {
    border-radius: 5px;
    justify-content: space-between;
    background-color: white;
}
    .recruitment-card:hover .recruitment-label {
        color: var(--blue);
        transition: ease-in all 0.15s;
    }
   
.portal-badge {
    background: var(--blue-light);
    border: 1px solid var(--blue-line);
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-head {
    border-bottom: 2px solid var(--ink);
    padding-bottom: 16px;
}

    .section-head h1,
    .section-head h2 {
        font-size: clamp(30px, 3.5vw, 38px);
        margin: 0;
    }

.stat-value {
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}

.doc-type {
    width: 56px;
    height: 62px;
    border-radius: 7px;
    background: var(--pdf-bg);
    border: 1px solid var(--pdf-line);
    color: var(--wine);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.document-row {
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .document-row:hover {
        border-color: var(--blue) !important;
        box-shadow: 0 3px 14px rgba(39, 155, 206, 0.13);
        z-index: 1;
    }

    .document-row + .document-row:hover {
        border-top-width: var(--bs-list-group-border-width);
        margin-top: calc(-1 * var(--bs-list-group-border-width));
    }

    .document-row .document-title {
        transition: color 0.15s;
    }

    .document-row:hover .document-title,
    .document-row:focus-visible .document-title {
        color: var(--wine-dark);
    }

.border-dashed {
    border-style: dashed !important;
}

.document-years {
    --bs-accordion-btn-focus-box-shadow: none;
    --bs-accordion-active-bg: var(--cream);
    --bs-accordion-active-color: var(--wine-dark);
}

    .document-years .accordion-item {
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 12px;
    }

    .document-years .accordion-button {
        font-size: 1.15rem;
        padding: 1rem 1.25rem;
    }

        /* Bootstrap puts the chevron last; the count has to sit before it. */
        .document-years .accordion-button::after {
            margin-left: 0;
        }

    .document-years .document-row {
        border-left: 0;
        border-right: 0;
    }

.news-stamp {
    width: 78px;
    border-radius: 10px;
    background: var(--cream);
    padding: 12px 0 14px;
    text-align: center;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 16px;
    max-height: fit-content;
}

.news-image {
    width: 100%;
}

@media (min-width: 576px) {
    .news-image {
        max-height: 225px;
        display: flex;
        flex-wrap: nowrap;
        width: 450px;
        flex: none;
    }
}

.news-stamp .day {
    display: block;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.news-stamp .month {
    display: block;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.9;
}

.news-stamp .year {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    line-height: 1;
}

.news-more-label {
    display: inline-block;
    margin-top: 16px;
    color: var(--blue-dark);
    font-weight: 600;
    font-size: 16.5px;
    border-bottom: 1.5px solid var(--gold);
}

.news-article-body .lead {
    color: var(--text);
}

.news {
    background-color: var(--cream);
}

.stat-card {
    display: flex;
    align-items: center;
}

/* Footer. */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 5px solid var(--blue);
}

    .site-footer .footer-heading {
        font-size: 13.4px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--gold);
        font-weight: 600;
    }

    .site-footer .footer-about {
        color: var(--footer-muted);
        max-width: 34ch;
    }

    .site-footer .footer-bottom {
        border-top: 1px solid var(--footer-line);
        color: var(--footer-faint);
        font-size: 14.4px;
    }

        .site-footer .footer-bottom a {
            color: var(--footer-faint);
        }

            .site-footer .footer-bottom a:hover {
                color: var(--gold);
            }

    .site-footer .btn-outline-light {
        --bs-btn-border-color: var(--text);
        --bs-btn-color: var(--footer-text);
        --bs-btn-hover-bg: transparent;
        --bs-btn-hover-color: var(--gold);
        --bs-btn-hover-border-color: var(--gold);
    }

.skip-link:focus {
    display: inline-block;
    padding: 12px 20px;
    background: var(--ink);
    color: var(--white);
    border-radius: 0 0 8px 0;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.aboutUs-text {
    margin-bottom: 50px;
}

.index .container {
    padding-block: 100px;
}

.card-img-top {
    aspect-ratio: 400 / 270;
    object-fit: cover;
}

.subtitle {
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 15px;
}

.card {
}

.card-img, .card-img-top {
    border-top-left-radius: var(--bs-card-inner-border-radius);
    border-top-right-radius: var(--bs-card-inner-border-radius);
}

/* Swiper */

.instalacoes-swiper {
    padding-bottom: 0;
}

    .instalacoes-swiper .swiper-slide {
        height: auto;
    }

    .instalacoes-swiper .card {
        height: 100%;
        overflow: hidden;
    }

    .instalacoes-swiper .card-img-top {
        width: 100%;
        height: 220px;
        object-fit: cover;
    }

    .instalacoes-swiper .card-body {
        padding: 20px;
    }

    .instalacoes-swiper .swiper-controls {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 32px;
        align-items: center;
        gap: 16px;
        width: 240px;
        margin: 28px auto 0;
    }

    .instalacoes-swiper .swiper-button-prev,
    .instalacoes-swiper .swiper-button-next {
        --swiper-navigation-size: 14px;
        position: static;
        width: 32px;
        height: 32px;
        margin-top: 0;
        border-radius: 999px;
        background-color: color-mix(in srgb, var(--bs-primary), transparent 80%);
        color: var(--ink);
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .instalacoes-swiper .swiper-button-prev:hover,
        .instalacoes-swiper .swiper-button-next:hover {
            background-color: var(--bs-primary);
            color: var(--white);
        }

    .instalacoes-swiper .swiper-pagination {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-top: 0;
        width: 100%;
    }

    .instalacoes-swiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        background-color: color-mix(in srgb, var(--bs-primary), transparent 80%);
        opacity: 1;
        margin: 0 !important;
        transition: width 0.25s ease, background-color 0.25s ease;
    }

        .instalacoes-swiper .swiper-pagination-bullet:hover {
            background: var(--bs-primary);
        }

    .instalacoes-swiper .swiper-pagination-bullet-active {
        width: 32px;
        background: var(--bs-primary);
    }

/* Fundo */

.section-aboutUs, .section-documents {
    background-color: var(--cream);
}

.section-instalacoes, .section-activities {
    background-color: var(--sand);
}

.section-aboutUs-page {
    background-color: var(--sand);
}

/* AboutUs Cartões */

@media (min-width: 992px) {
    .card-aboutUs .card-img {
        height: 100%;
        min-height: 250px;
        object-fit: cover;
        border-radius: 0px;
    }
}

.card-aboutUs {
    overflow: hidden;
    font-weight: 100;
}

    .card-aboutUs .subtitle {
        font-weight: 600;
    }

.card-link, .news-card {
    text-decoration: none;
    color: inherit;
}

    .card-link .card, .news-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .card-link:hover .card {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

.line-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--lines, 3);
    line-clamp: var(--lines, 3);
    overflow: hidden;
}

.pagination .active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: var(--cream);
}

.pagination .page-link {
    color: var(--blue-dark);
}

.pager-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pager-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 14px;
    border: 0;
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--bs-primary), transparent 80%);
    color: var(--ink);
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .pager-arrow:hover:not(:disabled) {
        background-color: var(--bs-primary);
        color: var(--white);
    }

    .pager-arrow:disabled {
        opacity: 0.35;
        cursor: default;
    }

.pagination {
    --bs-pagination-color: var(--text);
    --bs-pagination-bg: transparent;
    --bs-pagination-border-color: transparent;
    --bs-pagination-hover-color: var(--ink);
    --bs-pagination-hover-bg: color-mix(in srgb, var(--bs-primary), transparent 80%);
    --bs-pagination-hover-border-color: transparent;
    --bs-pagination-focus-color: var(--ink);
    --bs-pagination-focus-bg: color-mix(in srgb, var(--bs-primary), transparent 80%);
    --bs-pagination-active-bg: var(--bs-primary);
    --bs-pagination-active-border-color: var(--bs-primary);
    --bs-pagination-border-radius: 999px;
    gap: 6px;
}

    .pagination .page-item .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        height: 32px;
        margin-left: 0;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 15px;
        font-weight: 600;
    }

.news-aside {
    position: sticky;
    top: calc(var(--header-height, 143px) + 16px);
}

.footer-map iframe {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    border: 1px solid var(--footer-line);
    border-radius: 8px;
}

/* Igual ao do rodapé, mas para fundo claro e numa caixa mais larga. */
.contacts-map iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}

.map-link {
    color: var(--blue);
    font-size: 14px;
}

@media (min-width: 992px) {
    .site-footer .row > [class*="col-"] {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.opening-hours {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
