/*
 Theme Name:   Fepesba
 Theme URI:    https://github.com/seu-usuario/fepesba-theme
 Author:       Seu Nome
 Author URI:   https://seusite.com.br
 Version:      1.3.7
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Tags:         blog, custom-logo, responsive-layout, two-columns
 Text Domain:  fepesba
*/

/*--------------------------------------------------------------
# 1. Font Face & Variaveis de Cor
--------------------------------------------------------------*/
@font-face {
    font-family: "rawline", helvetica, arial, sans-serif;
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --fepesba-blue: #5289C5;
    --fepesba-blue-dark: #416d9e;
    --fepesba-white: #ffffff;
    --fepesba-gray: #f8f9fa;
    --fepesba-text: #333;
}

/*--------------------------------------------------------------
# 2. Globals & Acessibilidade
--------------------------------------------------------------*/
body {
    font-family: "rawline", helvetica, arial, sans-serif;
    color: var(--fepesba-text);
    background-color: #f1f1f1;
    margin: 0;
    line-height: 1.6;
    letter-spacing: 1px; /* NOVO: Adiciona um leve espaçamento entre as letras */
}

body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
body.menu-open {
    overflow: hidden;
}

a {
    color: var(--fepesba-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/*--------------------------------------------------------------
# 3. Layout
--------------------------------------------------------------*/
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

#content.site-content > .container {
    background-color: transparent;
    box-shadow: none;
    padding-top: 40px;
    padding-bottom: 40px;
}

/*--------------------------------------------------------------
# 4. Cabeçalho
--------------------------------------------------------------*/
.site-header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: var(--fepesba-white);
}

.header-top-bar {
    background-color: var(--fepesba-blue-dark);
    color: var(--fepesba-white);
    padding: 5px 0;
    font-size: 12px;
}
.header-top-bar .widget { margin: 0; text-align: right; }
.header-top-bar a { color: var(--fepesba-white); text-decoration: none; margin-left: 15px; }
.header-main { padding: 20px 0; background: var(--fepesba-blue); color: var(--fepesba-white); position: relative; }
.header-main-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-branding .custom-logo-link img { max-height: 60px; width: auto; }
.search-form { position: relative; display: flex; width: 300px; }
.search-form .search-field { width: 100%; padding: 10px 45px 10px 15px; border-radius: 5px; border: 1px solid #ccc; font-size: 1rem; }
.search-form .search-submit { position: absolute; right: 0; top: 0; height: 100%; width: 45px; border: none; color: var(--fepesba-white); border-radius: 0 5px 5px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; background-color: var(--fepesba-blue-dark); }
.search-form .search-submit:hover { background-color: var(--fepesba-blue); }

/* Navegação Principal (Desktop) */
.main-navigation .primary-menu-container > ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.main-navigation li a { display: block; padding: 15px 20px; color: var(--fepesba-text); text-transform: uppercase; font-weight: bold; font-size: 14px; border-right: 1px solid #e9ecef; }
.main-navigation li:last-child a { border-right: none; }
.main-navigation li:first-child a { border-left: 1px solid #e9ecef; }
.main-navigation li a:hover, .main-navigation .current-menu-item > a { background-color: var(--fepesba-gray); color: var(--fepesba-blue); text-decoration: none; }

.menu-toggle { display: none; }

/*--------------------------------------------------------------
# 5. Conteúdo
--------------------------------------------------------------*/
article { border-bottom: 1px solid #eee; padding-bottom: 2em; margin-bottom: 2em; }
article:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.entry-title { font-size: 28px; margin-top: 0; margin-bottom: 0.5em; }
.entry-title a { color: var(--fepesba-text); }
.entry-title a:hover { color: var(--fepesba-blue-dark); }

/*--------------------------------------------------------------
# 6. Homepage Slider
--------------------------------------------------------------*/
.slider-container {
    margin-bottom: 40px;
}

.homepage-slider {
    width: 100%;
    height: 500px;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

.slide-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.no-posts-slide {
    background-color: var(--fepesba-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-posts-slide::after {
    content: 'Adicione posts à categoria "Destaques" com uma Imagem Destacada.';
    color: var(--fepesba-text);
    text-align: center;
    padding: 20px;
}

.swiper-button-prev,
.swiper-button-next {
    color: var(--fepesba-white);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.swiper-pagination-bullet {
    background: var(--fepesba-white);
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--fepesba-white);
    opacity: 1;
}

/*--------------------------------------------------------------
# 7. Homepage Cards
--------------------------------------------------------------*/
.homepage-cards-section {
    padding: 40px 0;
}

.cards-heading {
    text-align: center;
    color: var(--fepesba-text);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-top: 40px;
    margin-bottom: 20px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card-item {
    display: block;
    text-decoration: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card-imagem {
    aspect-ratio: 368 / 272; /* CORREÇÃO: Proporção exata para as suas imagens */
    background-size: cover;
    background-position: center;
}

.card-imagem-missing {
    aspect-ratio: 368 / 272;
    background-color: var(--fepesba-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: var(--fepesba-text);
    font-size: 14px;
    border-radius: 15px;
}

.card-acesso-rapido {
    background-color: var(--fepesba-blue);
    color: var(--fepesba-white);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    min-height: 150px;
    box-sizing: border-box;
}


/*--------------------------------------------------------------
# 8. Rodapé
--------------------------------------------------------------*/
.site-footer { background-color: var(--fepesba-blue-dark); color: var(--fepesba-white); font-size: 14px; padding: 0; }
.site-footer .widget-title { color: var(--fepesba-white); font-size: 16px; text-transform: uppercase; border-bottom: 2px solid var(--fepesba-blue); padding-bottom: 10px; margin-top: 0; margin-bottom: 20px; }
.site-footer a { color: var(--fepesba-white); opacity: 0.9; }
.site-footer a:hover { opacity: 1; text-decoration: none; }
.footer-widgets-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.footer-about .custom-logo-link img { max-width: 200px; height: auto; margin-bottom: 20px; background-color: transparent; border-radius: 0; }
.footer-about .site-description { line-height: 1.7; opacity: 0.9; }
.footer-menus-group .row { display: flex; gap: 30px; }
.institutional-col { flex: 2; }
.news-col { flex: 1; }
.institutional-menus { display: flex; gap: 20px; }
.institutional-menu-left, .institutional-menu-right { flex: 1; }
.footer-menu { list-style: none; padding: 0; margin: 0; text-align: left; }
.footer-menu li { margin-bottom: 10px; }
.footer-menu a::before { content: "•"; color: var(--fepesba-white); opacity: 0.8; margin-right: 10px; font-weight: bold; }
.footer-bottom { background-color: var(--fepesba-blue); border-top: 1px solid var(--fepesba-blue-dark); padding: 20px 0; }
.footer-bottom-container { display: flex; justify-content: space-between; align-items: center; }
.site-info { text-align: right; color: var(--fepesba-white); opacity: 0.9; }
.footer-socials .widget { display: flex; gap: 15px; }
.footer-socials .wpzoom-social-icons-list a svg { fill: var(--fepesba-white) !important; }

/*--------------------------------------------------------------
# 8. Rodapé (Adição para o Endereço)
--------------------------------------------------------------*/
.footer-address {
    display: inline-flex; 
    align-items: flex-start; 
    line-height: 1.6;
    margin-bottom: 10px; 
}

/* Ajustes no container do rodapé inferior */
.footer-bottom-container {
    display: flex;
    justify-content: center; /* Centraliza o bloco principal */
    align-items: center;
    flex-wrap: wrap; 
    gap: 20px;
    position: relative; /* Necessário para o posicionamento absoluto dos ícones sociais */
}

.footer-center-block {
    text-align: center; /* Centraliza o conteúdo (endereço e copyright) */
}

/* Garante que o texto do copyright não quebre a linha em telas maiores */
.site-info {
    white-space: nowrap;
}

/* Estilos para Desktop (a partir de 992px) */
@media (min-width: 992px) {
    .footer-socials {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .footer-bottom-container {
        justify-content: center; /* Garante a centralização em desktop */
    }
}

/*--------------------------------------------------------------
# 9. Responsividade
--------------------------------------------------------------*/
@media (max-width: 992px) {
    .header-main-container {
        flex-wrap: wrap; 
        gap: 15px;
    }
    .site-branding {
        flex-basis: 70%; 
        flex-grow: 1; 
    }
    .header-search {
        order: 3; 
        width: 100%;
        margin-top: 10px;
    }
    .menu-toggle {
        display: block; background: none; border: 2px solid var(--fepesba-white);
        padding: 10px; cursor: pointer; z-index: 10000; flex-shrink: 0;
    }
    .hamburger-icon {
        display: block; width: 22px; height: 2px;
        background: var(--fepesba-white); position: relative;
    }
    .hamburger-icon::before, .hamburger-icon::after {
        content: ''; display: block; width: 100%; height: 2px;
        background: var(--fepesba-white); position: absolute;
        left: 0; transition: all 0.3s ease;
    }
    .hamburger-icon::before { top: -7px; }
    .hamburger-icon::after { bottom: -7px; }
    
    .menu-toggle[aria-expanded="true"] .hamburger-icon { background: transparent; }
    .menu-toggle[aria-expanded="true"] .hamburger-icon::before { transform: rotate(45deg); top: 0; }
    .menu-toggle[aria-expanded="true"] .hamburger-icon::after { transform: rotate(-45deg); bottom: 0; }

    .main-navigation {
        position: fixed; top: 0; right: 0;
        width: 280px; height: 100%;
        background-color: var(--fepesba-white);
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 9999;
        padding: 80px 20px 20px;
        overflow-y: auto;
        border: none;
        display: block; 
    }

    .main-navigation.toggled { transform: translateX(0); }
    .main-navigation .primary-menu-container > ul { flex-direction: column; }
    .main-navigation.toggled li a, .main-navigation.toggled li:first-child a {
        border: none; border-bottom: 1px solid #eee;
        text-align: left; color: var(--fepesba-text);
    }
    
    .slider-container {
        padding: 0; 
    }

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

@media (max-width: 768px) {
    .site-branding { flex-basis: auto; }
    .search-form { width: 100%; }
    
    .homepage-slider { 
        height: 300px; 
    }
    
    .slider-container {
        margin-bottom: 15px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets-container,
    .footer-menus-group .row,
    .institutional-menus {
        grid-template-columns: 1fr;
        display: block;
        text-align: center;
    }
    .footer-menu { text-align: center; }
    .footer-column { margin-bottom: 30px; }
    .footer-about .custom-logo-link { display: inline-block; }
    .footer-bottom-container { flex-direction: column; gap: 15px; }
    .site-info { text-align: center; }
}

/*--------------------------------------------------------------
# 10. Padrão de Bloco: Corpo Diretivo
--------------------------------------------------------------*/
.fepesba-diretoria-wrapper {
    padding: 2rem 0;
}

.fepesba-diretoria-header {
    text-align: center;
    margin-bottom: 48px;
}

.fepesba-diretoria-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    margin-bottom: 8px;
}

.fepesba-diretoria-subtitle {
    font-size: 1.2rem;
    color: var(--fepesba-blue);
}

.fepesba-diretoria-grid {
    gap: 40px;
}

.fepesba-membro-card {
    background-color: var(--fepesba-white);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fepesba-membro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.fepesba-membro-imagem img {
    border: 4px solid var(--fepesba-blue);
    padding: 4px; /* Espaçamento interno opcional */
}

.fepesba-membro-nome {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    margin-top: 24px;
    margin-bottom: 4px;
}

.fepesba-membro-cargo {
    font-size: 1rem;
    color: var(--fepesba-text);
    text-transform: uppercase;
}

/*--------------------------------------------------------------
# 11. Padrão de Bloco: Entidades
--------------------------------------------------------------*/
.fepesba-entidades-wrapper {
    padding: 2rem 0;
}

.fepesba-entidades-header {
    text-align: center;
    margin-bottom: 48px;
}

.fepesba-entidades-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.fepesba-entidades-subtitle {
    font-size: 1.2rem;
    color: var(--fepesba-blue);
    max-width: 600px;
    margin: 0 auto;
}

.fepesba-entidades-section-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    margin-top: 60px;
    margin-bottom: 24px;
    border-bottom: 3px solid var(--fepesba-blue);
    padding-bottom: 12px;
}

/* Tabela de Entidades */
.fepesba-entidades-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.fepesba-entidades-table th,
.fepesba-entidades-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.fepesba-entidades-table thead th {
    background-color: var(--fepesba-blue);
    color: white;
    font-size: 1rem;
    text-transform: uppercase;
}

.fepesba-entidades-table tbody tr:nth-of-type(even) {
    background-color: var(--fepesba-gray);
}

.fepesba-entidades-table tbody tr:hover {
    background-color: #e9ecef;
}

/*--------------------------------------------------------------
# 12. Página de Projetos (FEPESBA FEZ)
--------------------------------------------------------------*/
.fepesba-fez-wrapper {
  padding: 2rem 0;
}

.fepesba-fez-header {
  text-align: center;
  margin-bottom: 48px;
}

.fepesba-fez-title {
  font-size: 2.8rem;
  font-weight: bold;
  color: #416d9e; /* var(--fepesba-blue-dark) */
  margin-top: 0;
  margin-bottom: 8px;
  line-height: 1.2;
  text-transform: uppercase;
}

.fepesba-fez-subtitle {
  font-size: 1.2rem;
  color: #5289C5; /* var(--fepesba-blue) */
  max-width: 600px;
  margin: 0 auto;
}

/* Grelha para as notícias */
.fepesba-fez-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr); /* 1 coluna em mobile */
  gap: 40px;
}

/* Card de cada notícia */
.fepesba-fez-card {
  background-color: #ffffff; /* var(--fepesba-white) */
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.fepesba-fez-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.fepesba-fez-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.fepesba-fez-card-content {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz esta área crescer para ocupar o espaço */
}

.fepesba-fez-card-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.fepesba-fez-card-title a {
    color: #416d9e; /* var(--fepesba-blue-dark) */
    text-decoration: none;
}

.fepesba-fez-card-title a:hover {
    text-decoration: underline;
}

.fepesba-fez-card-text {
  font-size: 1rem;
  color: #333; /* var(--fepesba-text) */
  line-height: 1.7;
  flex-grow: 1; /* Ocupa o espaço disponível, empurrando o botão para baixo */
}

.fepesba-fez-card-button {
  display: inline-block;
  background-color: #5289C5; /* var(--fepesba-blue) */
  color: #ffffff !important; /* var(--fepesba-white) */
  font-weight: bold;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease;
  margin-top: 24px; /* Espaço entre o texto e o botão */
  align-self: flex-start; /* Alinha o botão à esquerda */
}

.fepesba-fez-card-button:hover {
  background-color: #416d9e; /* var(--fepesba-blue-dark) */
  color: #ffffff; /* var(--fepesba-white) */
  text-decoration: none;
}

/* Regras para ecrãs de tablet */
@media (min-width: 640px) {
  .fepesba-fez-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Regras para ecrãs de desktop */
@media (min-width: 1024px) {
  .fepesba-fez-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/*--------------------------------------------------------------
# 13. Single Projeto (Página Individual)
--------------------------------------------------------------*/
.single-projeto-container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.projeto-article {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.projeto-featured-image {
    margin-bottom: 30px;
}

.projeto-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.projeto-title {
    font-size: 2.5rem;
    color: var(--fepesba-blue-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.projeto-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.projeto-content p {
    margin-bottom: 1.5em;
}

.projeto-content h2,
.projeto-content h3,
.projeto-content h4 {
    color: var(--fepesba-blue-dark);
    margin-top: 2em;
    margin-bottom: 1em;
}

/* Ajustes para telas menores */
@media (max-width: 768px) {
    .projeto-title {
        font-size: 2rem;
    }
    .projeto-article {
        padding: 20px;
    }
}


/*--------------------------------------------------------------
# 14. Página da Agenda
--------------------------------------------------------------*/
.agenda-page-wrapper {
    padding: 40px 0;
}

.agenda-header {
    text-align: center;
    margin-bottom: 48px;
}

.agenda-title {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.agenda-subtitle {
    font-size: 1.2rem;
    color: var(--fepesba-blue);
}

.agenda-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .agenda-layout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Estilos do Calendário */
.agenda-calendar-wrap {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.calendar-month-year {
    background-color: var(--fepesba-blue);
    color: #fff;
    padding: 15px;
    font-size: 1.5rem;
    font-weight: bold;
}

.calendar-day-names th {
    padding: 15px 5px;
    font-weight: bold;
    color: var(--fepesba-blue-dark);
    border-bottom: 1px solid #eee;
}

.calendar-day {
    padding: 10px;
    vertical-align: middle;
    border: 1px solid #f5f5f5;
    height: 60px;
}

.calendar-day .day-number {
    font-size: 1rem;
}

.calendar-day.has-event .day-number {
    background-color: var(--fepesba-blue-dark);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 30px;
    display: inline-block;
    font-weight: bold;
}

.calendar-day-np {
    background-color: #f8f9fa;
    border: 1px solid #f5f5f5;
}

/* Estilos da Lista de Eventos */
.agenda-list-title {
    font-size: 1.8rem;
    color: var(--fepesba-blue-dark);
    border-bottom: 3px solid var(--fepesba-blue);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.event-item {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.event-item:hover {
    background-color: #f8f9fa;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item-date {
    display: block;
    font-size: 0.9rem;
    color: var(--fepesba-blue);
    margin-bottom: 5px;
    font-weight: bold;
}

.event-item-title {
    font-size: 1.2rem;
    color: var(--fepesba-text);
    margin: 0;
    line-height: 1.4;
}