/*
 Theme Name: Fundação Cultural de Jacarehy
 Template: hello-elementor
 Text Domain: fundacao-cultural-child
*/


/* ================================================= */
/* ESTILOS ATUALIZADOS PARA O CALENDÁRIO DE EVENTOS  */
/* ================================================= */

.calendario-eventos-container {
    position: relative;
    overflow: visible; 
}

/* Abas dos meses */
.calendario-tabs {
    list-style-type: none;
    margin: 0 0 15px 0;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #ddd;
}

.tab-link {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #555;
    position: relative;
    top: 2px;
    border: 2px solid transparent;
    border-bottom: none;
}

.tab-link.current {
    background: #fff;
    border-color: #ddd;
    border-bottom-color: #fff;
    border-radius: 5px 5px 0 0;
}

/* Conteúdo de cada mês */
.calendario-content {
    display: none;
}

.calendario-content.current {
    display: block;
    /* CORREÇÃO 3: A correção mais importante para o tooltip não gerar scroll */
    overflow: visible; 
}

.calendario-dias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Boxes dos dias */
.dia-box {
    /* CORREÇÃO 1: Layout para 10 itens por linha no desktop */
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: calc(6% - 7.2px); 
    
    height: 65px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
    box-sizing: border-box; /* Garante que padding e border não afetem a largura final */
}

.dia-box.com-evento {
	background-color: #03A9F4;
    color: #FFF;
    cursor: pointer;
    border: 1px solid #03A9F4;
}

.dia-box.com-evento:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dia-box.sem-evento {
    background-color: #e3e3e3;
    color: #666;
    border: 1px solid #e3e3e3;
}

.dia-numero {
    font-size: 22px;
    font-weight: bold;
}

.dia-semana {
    font-size: 12px;
    text-transform: uppercase;
}

/* Tooltip */
#evento-tooltip {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    z-index: 1001; /* Aumentado para garantir que fique sobre tudo */
    width: 300px;
    max-width: 90%;
    padding: 15px;
}

/* NOVO: Flecha do Tooltip */
#evento-tooltip::after, #evento-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-style: solid;
    border-color: transparent; /* Padrão */
}
/* Flecha de borda (fica atrás) */
#evento-tooltip::before {
    top: 100%;
    border-width: 11px;
    border-top-color: #ddd;
}
/* Flecha de preenchimento (fica na frente) */
#evento-tooltip::after {
    top: calc(100% - 1px);
    border-width: 10px;
    border-top-color: #fff;
}


.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#tooltip-title { font-size: 16px; font-weight: bold; color: #333; }
#tooltip-close { font-size: 24px; cursor: pointer; color: #888; line-height: 1; }
#tooltip-close:hover { color: #333; }
#tooltip-content a { display: block; padding: 8px 0; color: #0073aa; text-decoration: none; border-bottom: 1px solid #f2f2f2; }
#tooltip-content a:last-child { border-bottom: none; }
#tooltip-content a:hover { color: #005a87; background-color: #f9f9f9; }

/* Media Queries para responsividade do layout */
@media (max-width: 1200px) {
    .dia-box { flex-basis: calc(6% - 7px); } /* 8 por linha */
}
@media (max-width: 992px) {
    .dia-box { flex-basis: calc(6 - 7px); } /* 6 por linha */
}
@media (max-width: 768px) {
    .dia-box { flex-basis: calc(16% - 6px); } /* 4 por linha */
}
@media (max-width: 480px) {
    .dia-box { flex-basis: calc(14% - 6px); } /* 3 por linha */
}



/* Estilos para o Arquivo de Agendas */
.agendas-ano h2 {
    font-size: 28px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 40px;
}

.agendas-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.agenda-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 160px;
    transition: transform 0.2s ease;
}

.agenda-item:hover {
    transform: translateY(-5px);
    color: #0073aa;
}

.agenda-thumbnail {
    width: 150px;
    height: 210px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
	border-radius: 15px;
}

.agenda-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agenda-title {
    font-size: 17px;
    text-align: center;
}


/* Estilos para a lista de subcategorias do shortcode */

.lista-subcategorias-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.subcategoria-item {
    display: flex; 
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    font-size: 18px; 
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    box-sizing: border-box; 
    flex-basis: calc(20% - 12px);
    flex-grow: 1; 
	line-height: 1.2;
	min-height: 125px;
}

.subcategoria-item:hover {
    background-color: #FFF;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .subcategoria-item {
        flex-basis: calc(50% - 7.5px);
    }
}

/* Estilos para a listagem de posts por ano */

.ano-secao {
    margin-bottom: 50px;
}

.ano-secao h2 {
    font-size: 28px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.post-item-box {
    box-sizing: border-box;
    flex-basis: calc(50% - 15px);
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-item-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.post-item-box h3 {
    margin-top: 0;
    font-size: 20px;
    line-height: 1.4;
}

.post-item-box h3 a {
    text-decoration: none;
    color: #333;
}

.post-item-box h3 a:hover {
    color: #0073aa;
}

.post-item-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.post-item-link {
    margin-top: auto;
    font-weight: 500;
    color: #ed3237;
    align-self: flex-start;
}

.post-item-link:hover {
    text-decoration: underline;
}

/* --- MEDIA QUERY PARA DISPOSITIVOS MÓVEIS --- */
@media (max-width: 768px) {
    .post-item-box {
        flex-basis: 100%; /* 1 coluna no mobile */
    }
}