/* ================================================================
   INDEX STYLES - Estilos específicos da página index.php
   Inclui: Footer, News Articles, Agenda, Facts Cards
   ================================================================ */

/* Classe para texto longo/resumo */
.texto-conteudo {
    color: #111923;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
}

/* Títulos de notícias/artigos */
.titulo-artigo {
    color: #4D1C21;
    font-family: 'Libre Baskerville', serif;
    font-size: 180%;
}

/* Classes de texto do slider (do index2.html) */
.fonText {
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
    font-style: normal;
}

.fonText2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-style: normal;
}

.fonText3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-style: normal;
}

.fonText4 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 90%;
}

/* Paleta de cores */
.bg-color-1 { background-color: #c18046; }
.bg-color-2 { background-color: #f37263; }
.bg-color-3 { background-color: #a5684e; }
.bg-color-4 { background-color: #a98c78; }
.bg-color-5 { background-color: #5a443d; }

/* Botões arrow */
.btn-arrow-only {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 250px;
    border-bottom: 1px solid #111923;
    padding-top: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-arrow-only i {
    position: absolute;
    right: 0;
    top: 0;
    color: #111923;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-arrow-only:hover {
    transform: translateX(5px);
}

.btn-arrow-only:hover i {
    transform: translateX(5px);
}

/* Links com underline no hover */
a.linkSublinhado {
    font-weight: 500 !important;
}

a.linkSublinhado:hover {
    text-decoration: underline !important;
}

/* Paddings reduzidos */
.facts {
    padding-bottom: 2rem !important;
    margin-top: -105px !important; /* Metade dos cards sobre o slider */
    position: relative;
    z-index: 10;
    pointer-events: none; /* Permite cliques passarem para o slider debaixo */
}

.section-noticias {
    padding-top: 1rem !important;
    padding-bottom: 3rem !important;
}

/* News article images - same height */
.blog-item .blog-img {
    height: 200px;
    overflow: hidden;
}

.blog-item .blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Agenda redesenhada */
.agenda-background-icon {
    position: absolute;
    top: 20px;
    right: 50px;
    z-index: 1;
    opacity: 0.05;
    font-size: 15rem;
    color: #B1A276;
    pointer-events: none;
}


.agenda-data-container {
    border-right: 2px solid #f0f0f0;
    padding-right: 2rem;
}

.agenda-conteudo-container {
    padding-left: 2rem;
}

/* Responsivo para agenda */
@media (max-width: 991.98px) {
    .agenda-data-container {
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
        padding-right: 1rem;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .agenda-conteudo-container {
        padding-left: 1rem;
    }

    .agenda-background-icon {
        font-size: 8rem;
        top: 10px;
        right: 20px;
    }
}

/* Facts cards */
.facts-card {
    display: flex;
    flex-direction: column;
    height: 210px;
    padding: 2rem;
    padding-top: 30px;
    pointer-events: auto; /* Restaura os cliques nos cartões */
}

.facts-title {
    display: flex;
    align-items: center;
    height: 50px;
    margin-bottom: 20px;
}

.facts-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Mobile specific styles */
.mobile-contacts {
    line-height: 1.2;
}

.contact-line {
    margin-bottom: 0.1rem;
    font-size: 0.75rem;
    line-height: 1.1;
}

.contact-line:last-child {
    margin-bottom: 0;
}

/* Mobile navbar - corrigir layout do botão menu */
@media (max-width: 991.98px) {
    #header-carousel-mobile .carousel-item {
        min-height: 85vh; /* Ajustado para equilíbrio entre 75vh e 100vh */
    }

    #header-carousel-mobile .carousel-caption {
        top: 72% !important; /* Posição inicial preferida */
        bottom: auto !important;
        padding: 0 3.5rem;
        z-index: 1040;
    }

    /* LÓGICA DINÂMICA: Descer as setas apenas quando o menu está aberto */
    #header-carousel-mobile:has(.navbar-collapse.show) .carousel-control-prev,
    #header-carousel-mobile:has(.navbar-collapse.show) .carousel-control-next {
        top: 85% !important; /* Desloca as setas para acompanhar a expansão do menu */
        transition: top 0.3s ease;
    }

    /* Corrigir z-index do botão para aparecer acima do conteúdo e fact-cards */
    #header-carousel-mobile .carousel-caption .btn {
        position: relative;
        z-index: 1050;
    }

    /* Garantir que a secção Facts não interfira with o carousel */
    .container-fluid.facts {
        position: relative;
        z-index: 5;
    }

    /* Reduzir padding-bottom da secção Facts para diminuir espaço até Artigos */
    .container-fluid.facts {
        padding-top: 2rem !important;
        padding-bottom: 0rem !important;
    }

    /* Reduzir também o padding-bottom do container interno da secção Facts */
    .container-fluid.facts .container {
        padding-bottom: 0rem !important;
    }

    /* Dar respiro na mobile/tablet para Notícias - Corrigido (não colado) */
    .section-noticias-index {
        margin-top: 1rem !important; 
        padding-top: 2.5rem !important;
    }

    /* Dar respiro na mobile/tablet para Agenda - Corrigido (não colado) */
    .section-agenda-index {
        margin-top: 1.5rem !important;
        padding-top: 2rem !important;
    }

    .section-noticias-index .container {
        padding-top: 1rem !important;
    }

    /* Reduzir margin-bottom da última fact-card se existir */
    .container-fluid.facts .facts-card:last-child {
        margin-bottom: 0 !important;
    }

    /* Reduzir brutalmente espaço entre final dos artigos e início da secção Eventos */
    .container-fluid.section-noticias .container {
        padding-bottom: 0rem !important;
    }
    
    .container-fluid.section-noticias {
        padding-bottom: 0rem !important;
    }

    /* Estilos fixos problemáticos da Agenda foram removidos. A nova agenda lida com o seu próprio layout. */
}

/* ========================================================================================= */
/* TEXTOS SECTIONS - Restaurar controlo tipográfico das descrições (Artigos e Agenda)        */
/* ========================================================================================= */
.section-noticias .texto-conteudo, 
.agenda-evento-novo .texto-conteudo {
    line-height: 1.3 !important;
    font-size: 0.9rem !important;
    color: #111923 !important;
    margin-bottom: 0.5rem !important;
}

.section-noticias .titulo-artigo a, 
.agenda-evento-novo .titulo-artigo a {
    line-height: 1.25 !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #4D1C21 !important;
}

/* Desktop navbar scroll effect - INDEX specific adjustments */
@media (min-width: 992px) {
    #header-carousel {
        margin-top: 0;
        position: relative;
        top: 0;
    }

    #header-carousel .carousel-item {
        min-height: 650px;
        height: 650px;
    }

    /* Baixar o conteúdo do carousel */
    #header-carousel .carousel-caption {
        top: 55% !important;
        bottom: auto !important;
        transform: translateY(-50%);
    }
}

@media (max-width: 991.98px) {
    .navbar-dark .navbar-nav .nav-link {
        color: white !important;
    }

    /* Adicionar espaçamento no título e breadcrumbs mobile restrito ao page header */
    .container-fluid.page-header .text-center, .container-fluid.bg-header .text-center {
        padding-top: 8rem !important;
    }
}

/* Footer overrides foram movidos diretamente para css/footer-styles.css */

.mobile-contacts {
    line-height: 1.2;
}

.contact-line {
    margin-bottom: 0.1rem;
    font-size: 0.85rem;
    line-height: 1.1;
}

.contact-line:last-child {
    margin-bottom: 0;
}
