/* =============================================================================
   Homepage (Front Page) — Rede de Bibliotecas de Barcelos
   ============================================================================= */

.rdeb-front-page {
    padding-bottom: 80px;
}

/* ─── Banner (shortcode): 800px de largura ─────────────────────────────────── */

.rdeb-banner-destaque {
    width: 100%;
}

.rdeb-banner-destaque--800 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Estilos do slider (uma notícia de cada vez, texto por cima da imagem) ── */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rdeb-destaque {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.rdeb-destaque__slider {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    min-height: 280px;
    max-height: 56vw;
}

.rdeb-destaque__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.rdeb-destaque__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #1a3650;
}

.rdeb-destaque__overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: clamp(24px, 4vw, 48px);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 70%);
}

.rdeb-destaque__slide-link {
    display: block;
    max-width: 900px;
    text-decoration: none;
    color: #fff;
}

.rdeb-destaque__slide-date {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 0.35em;
    font-family: "Bricolage Grotesque", sans-serif;
}

.rdeb-destaque__slide-title {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(22px, 3.5vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.35em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.rdeb-destaque__slide-excerpt {
    font-size: clamp(14px, 1.8vw, 17px);
    line-height: 1.45;
    margin: 0 0 0.5em;
    opacity: 0.95;
    max-width: 60ch;
}

.rdeb-destaque__slide-cta {
    font-size: 15px;
    font-weight: 600;
    font-family: "Bricolage Grotesque", sans-serif;
    text-decoration: underline;
}

/* Setas prev/next */
.rdeb-destaque__prev,
.rdeb-destaque__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.rdeb-destaque__prev:hover,
.rdeb-destaque__next:hover {
    background: #fff;
    color: #1a3650;
}

.rdeb-destaque__prev {
    left: 16px;
}

.rdeb-destaque__next {
    right: 16px;
}

.rdeb-destaque__prev svg,
.rdeb-destaque__next svg {
    width: 24px;
    height: 24px;
}

/* Dots */
.rdeb-destaque__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rdeb-destaque__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.rdeb-destaque__dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.rdeb-destaque__dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

.rdeb-destaque__empty {
    padding: 2rem 24px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* ─── Notícias na homepage ─────────────────────────────────────────────────── */

.rdeb-noticias {
    padding: clamp(40px, 6vw, 56px) 24px 0;
}

.rdeb-noticias__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.rdeb-noticias__title {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 1.5rem;
}

.rdeb-noticias__grid {
    margin-bottom: 2rem;
}

.rdeb-noticias__more {
    text-align: center;
    margin: 0;
}

.rdeb-noticias__more-link {
    display: inline-block;
    padding: 12px 24px;
    background: #1a3650;
    color: #fff;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, transform 0.2s;
}

.rdeb-noticias__more-link:hover {
    background: #2d5a87;
    color: #fff;
    transform: translateY(-2px);
}

.rdeb-noticias__empty {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* ─── Contacte-nos ─────────────────────────────────────────────────────────── */

.rdeb-contacto {
    margin-top: clamp(48px, 8vw, 64px);
    padding: clamp(32px, 5vw, 48px) 24px;
    background: linear-gradient(135deg, #1a3650 0%, #2d5a87 100%);
    color: #fff;
}

.rdeb-contacto__inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.rdeb-contacto__title {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
}

.rdeb-contacto__nome {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.rdeb-contacto__info {
    margin: 0;
    font-size: clamp(15px, 2vw, 17px);
}

.rdeb-contacto__info a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    transition: border-color 0.2s;
}

.rdeb-contacto__info a:hover {
    border-bottom-color: #fff;
}

.rdeb-contacto__sep {
    margin: 0 0.5rem;
    opacity: 0.8;
}

/* Responsivo ───────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .rdeb-destaque__slider {
        aspect-ratio: 16 / 9;
        min-height: 220px;
    }

    .rdeb-noticias__grid.nl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rdeb-destaque__slider {
        aspect-ratio: 4 / 3;
        min-height: 200px;
    }

    .rdeb-destaque__prev,
    .rdeb-destaque__next {
        width: 40px;
        height: 40px;
        left: 8px;
        right: 8px;
    }

    .rdeb-destaque__next {
        right: 8px;
    }

    .rdeb-noticias__grid.nl-grid {
        grid-template-columns: 1fr;
    }

    .rdeb-contacto__info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .rdeb-contacto__sep {
        display: none;
    }
}
