/* =========================================================
   DESTAQUES - HOMEPAGE
   ========================================================= */

.dac-destaques,
.dac-destaques * {
    box-sizing: border-box;
}

.dac-destaques {
    position: relative;
    width: 100%;
    padding: 32px 20px;
    background: transparent;
    z-index: 0;
}

/* Fundo a ocupar toda a largura do ecrã */
.dac-destaques::before {
    content: "";
    position: absolute;
    z-index: -1;

    top: 0;
    bottom: 0;

    left: 50%;
    width: 100vw;

    transform: translateX(-50%);

    background: #f2f2f2;
}

.dac-destaques__grid {
    width: min(100%, 1050px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dac-card {
    min-width: 0;
}

.dac-card__title {
    min-height: 52px;
    margin: 0 15px 10px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 800 !important;
}

.dac-card__title a {
    color: #063b77;
    text-decoration: none !important;
}

.dac-card__title a:hover,
.dac-card__title a:focus-visible {
    text-decoration: none !important;
}

.dac-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #111;
    text-decoration: none;
}

.dac-card__image,
.dac-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

.dac-card__image {
    object-fit: cover;
    object-position: center;
    transition: transform .45s ease;
}

.dac-card__media:hover .dac-card__image,
.dac-card__media:focus-visible .dac-card__image {
    transform: scale(1.035);
}

.dac-card__placeholder {
    background: #28313b;
}

.dac-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 38%,
        rgba(0, 0, 0, .10) 56%,
        rgba(0, 0, 0, .88) 100%
    );
    pointer-events: none;
}

.dac-card__summary {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 18px;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 400;
}

.dac-card__media:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.dac-message {
    margin: 1rem 0;
}

/* =========================================================
   SINGLE DO DESTAQUE
   Ordem: título -> imagem 16:9 -> corpo
   ========================================================= */

.dac-single,
.dac-single * {
    box-sizing: border-box;
}

.dac-single {
    width: 100%;
    padding: 60px 20px 100px;
}

.dac-single__article {
    width: min(100%, 1200px);
    margin: 0 auto;
}

.dac-single__header {
    width: min(100%, 950px);
    margin: 0 auto 35px;
}

.dac-single__title {
    margin: 0;
    color: #063b77;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 700;
}

.dac-single__figure {
    width: 100%;
    margin: 0 0 50px;
}

.dac-single__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.dac-single__content {
    width: min(100%, 850px);
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.7;
}

.dac-single__content > :first-child {
    margin-top: 0;
}

.dac-single__content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    .dac-destaques__grid {
        gap: 18px;
    }

    .dac-card__title {
        font-size: 16px;
    }

    .dac-card__summary {
        left: 16px;
        right: 16px;
        bottom: 16px;
        font-size: 14px;
    }
}

@media (max-width: 650px) {
    .dac-destaques {
        padding-inline: 16px;
    }

    .dac-destaques__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .dac-card__title {
        min-height: auto;
        margin-bottom: 10px;
        font-size: 18px;
    }

    .dac-card__media {
        aspect-ratio: 16 / 10;
    }

    .dac-single {
        padding: 40px 16px 70px;
    }

    .dac-single__figure {
        margin-bottom: 32px;
    }

    .dac-single__content {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dac-card__image {
        transition: none;
    }
}
