/* =========================================
   1. FONTES, CORES E TOKENS GRUPO BEX
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

:root {
    /* Cores Oficiais */
    --bex-teal: #00a19c;
    --bex-blue: #015cab;
    --bex-gray: #54565b;
    --bex-black: #000000;
    --bex-white: #ffffff;
    
    /* TOKENS DE HARMONIA VISUAL */
    --bex-radius: 12px;       
    --bex-radius-lg: 16px;    
    --bex-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);       
    --bex-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.09); 
}

/* =========================================
   2. CONFIGURAÇÕES GLOBAIS E ESTRUTURA
   ========================================= */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f4f4f4;
    color: var(--bex-black);
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.jo-container {
    max-width: 900px;
    margin: 40px auto;
    background: var(--bex-white);
    min-height: 100vh;
    box-shadow: var(--bex-shadow);
    border-radius: var(--bex-radius);
    padding-bottom: 80px;
    overflow: hidden; 
}

/* Centralizando o cabeçalho para ficar igual ao modelo visual */
header {
    text-align: center;
}

@media (max-width: 950px) {
    .jo-container { margin: 0 auto; border-radius: 0; }
}

/* =========================================
   3. CARDS DE NAVEGAÇÃO E HOME (REFINADO)
   ========================================= */
.jo-nav-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    padding: 30px 40px 50px 40px; 
}

@media (max-width: 768px) {
    .jo-nav-grid { grid-template-columns: 1fr; }
}

.jo-nav-grid a { text-decoration: none; display: block; height: 100%; }

.card-teal, .card-blue, .card-gray {
    padding: 25px;
    border-radius: var(--bex-radius-lg); 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
    height: 100%; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: var(--bex-shadow); 
    text-align: left; 
}

.card-teal:hover, .card-blue:hover, .card-gray:hover {
    transform: translateY(-5px);
    box-shadow: var(--bex-shadow-hover); 
}

.card-teal { background-color: #e0f5f4; color: var(--bex-teal); border: 1px solid rgba(0,161,156,0.15); }
.card-blue { background-color: #e0eff8; color: var(--bex-blue); border: 1px solid rgba(1,92,171,0.15); }
.card-gray { background-color: #ecedee; color: var(--bex-gray); border: 1px solid rgba(84,86,91,0.15); }

.card-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }

.card-title { 
    font-size: clamp(0.9rem, 2vw, 1.15rem); 
    font-weight: 900; 
    line-height: 1.3; 
    text-transform: uppercase; 
    overflow-wrap: break-word; 
}

.card-icon { font-size: 1.8rem; opacity: 0.8; flex-shrink: 0; }
.card-action { font-size: 0.95rem; font-weight: 700; margin-top: 25px; opacity: 0.9; }

h1.jo-main-title { 
    font-size: 3.5rem; 
    font-weight: 900; 
    margin: 10px 0 0 0; 
    letter-spacing: -1.5px; 
    line-height: 1; 
    color: var(--bex-black);
}
.jo-tagline { color: var(--bex-teal); font-weight: 700; font-size: 1rem; margin-top: 10px; letter-spacing: 0.5px; }

/* =========================================
   4. ELEMENTOS DE AGENDA & ESTRUTURA CLEAN
   ========================================= */
.jo-section-clean { padding: 30px 50px; }
@media (max-width: 768px) { .jo-section-clean { padding: 20px 25px; } }

.jo-article-title { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--bex-black); 
    line-height: 1.3; 
    margin-bottom: 20px; 
    border: none; 
    padding: 0; 
    text-transform: none; 
}

.jo-agenda-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
}
@media (max-width: 768px) { .jo-agenda-grid { grid-template-columns: 1fr; } }

.jo-agenda-card { text-align: left; }

.jo-agenda-title { 
    font-weight: 700; 
    font-size: 1.1rem; 
    margin: 0; 
    color: var(--bex-black); 
    display: -webkit-box; 
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}
.jo-agenda-subtitle { 
    font-size: 0.9rem; 
    color: var(--bex-gray); 
    margin: 5px 0 0 0; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.jo-img-wrapper { 
    width: 100%; 
    aspect-ratio: 4 / 3; 
    border-radius: var(--bex-radius); 
    overflow: hidden; 
    background-color: #f8f9fa; 
    box-shadow: var(--bex-shadow); 
    margin-bottom: 15px; 
}

.jo-img-wrapper img { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block; transition: transform 0.3s ease; }
.jo-img-wrapper img:hover { transform: scale(1.03); }

/* =========================================
   5. AURORA REFACTOR: MURALS & NOTÍCIAS
   ========================================= */

/* AURORA FIX: Espaçamento enxuto para os Murais, colando no menu */
.jo-section-padding { padding: 20px 50px 80px 50px; } 
@media (max-width: 768px) { .jo-section-padding { padding: 15px 25px; } }

.jo-page-title { font-size: 2rem; font-weight: 700; color: var(--bex-teal); border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 30px; } 

.jo-paragraph { font-size: 1.1rem; line-height: 1.7; color: var(--bex-gray); margin-bottom: 25px; text-align: justify; }

.mural-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; max-width: 100%; } 
@media (max-width: 900px) { .mural-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; } }
@media (max-width: 600px) { .mural-grid { grid-template-columns: 1fr; gap: 20px; } }

.evento-card-link { text-decoration: none; color: inherit; display: block; height: 100%; outline: none; }
.evento-card { 
    background: #fff; 
    padding: 25px; 
    border-radius: var(--bex-radius); 
    box-shadow: var(--bex-shadow); 
    /* Borda verde removida para o visual premium */
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    box-sizing: border-box; 
    width: 100%; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.evento-card:hover { transform: translateY(-5px); box-shadow: var(--bex-shadow-hover); }

.evento-imagem { width: 100%; aspect-ratio: 2 / 1; height: auto; object-fit: contain; background-color: #f8f9fa; border-radius: calc(var(--bex-radius) - 4px); margin-bottom: 25px; display: block; padding: 10px; box-sizing: border-box; max-width: 100% !important; }

.evento-titulo { 
    font-size: 1.15rem; 
    font-weight: 700; 
    color: var(--bex-black); 
    line-height: 1.4; 
    margin-bottom: 10px; 
    display: -webkit-box; 
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    text-align: left; 
}

.evento-resumo {
    font-size: 0.95rem; 
    color: var(--bex-gray); 
    line-height: 1.5; 
    margin-bottom: 15px;
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    text-align: left;
}

.evento-btn-falso { display: block; text-align: center; margin-top: 25px; padding: 12px; background: var(--bex-blue); color: white; font-weight: bold; border-radius: 6px; font-size: 0.95rem; transition: background 0.2s; }
.evento-card-link:hover .evento-btn-falso { background: #014682; }

/* NOTÍCIA DETALHADA / DESTAQUE HOME */
.jo-article-wrapper { max-width: 900px; margin: 0 auto; }

.jo-article-header { text-align: center; margin-bottom: 40px; }
.jo-article-meta { font-size: 0.95rem; color: var(--bex-gray); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.jo-article-hero-title { font-size: 2.8rem; font-weight: 900; line-height: 1.1; margin-bottom: 30px; color: var(--bex-black); text-transform: uppercase; }

.jo-article-hero-img { 
    width: 100%; 
    aspect-ratio: 2 / 1; 
    height: auto; 
    object-fit: contain; 
    background-color: #f8f9fa; 
    border-radius: var(--bex-radius); 
    margin-bottom: 40px; 
    box-shadow: var(--bex-shadow); 
    display: block; 
    max-width: 100% !important; 
}

.jo-article-content { max-width: 750px; margin: 0 auto; }

.jo-info-box { background: #f9f9f9; padding: 30px; border-radius: var(--bex-radius); margin-top: 50px; border-left: 5px solid var(--bex-teal); }
.jo-info-box h3 { margin-top: 0; margin-bottom: 15px; color: var(--bex-teal); }
.jo-btn-external { display: inline-block; padding: 15px 30px; background: var(--bex-teal); color: white; text-decoration: none; font-weight: bold; border-radius: 6px; font-size: 1.1rem; transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--bex-shadow); }
.jo-btn-external:hover { transform: translateY(-3px); box-shadow: var(--bex-shadow-hover); }

/* BOTÕES E ESTADOS */
.jo-btn-outline { display: inline-block; color: var(--bex-gray); font-weight: bold; text-decoration: none; font-size: 1.05rem; padding: 12px 25px; border: 2px solid #ddd; border-radius: 6px; transition: all 0.2s; background: transparent; cursor: pointer; }
.jo-btn-outline:hover { background: #f4f4f4; border-color: var(--bex-gray); color: var(--bex-black); }

/* PAGINAÇÃO */
.jo-pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.jo-page-link { padding: 10px 18px; border: 1px solid #ccc; border-radius: 6px; text-decoration: none; color: var(--bex-gray); font-weight: bold; }
.jo-page-link.active { background: var(--bex-teal); color: white; border-color: var(--bex-teal); box-shadow: var(--bex-shadow); }
.jo-page-link:hover:not(.active) { background: #eee; }

/* =========================================
   6. MODAL PREMIUM (POP-UP GLASSMORPHISM)
   ========================================= */
.jo-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    padding: 20px; box-sizing: border-box;
}
.jo-modal-overlay.active { opacity: 1; visibility: visible; }

.jo-modal-box {
    background: #fff;
    width: 100%; max-width: 750px; 
    border-radius: var(--bex-radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateY(20px) scale(0.95); 
    transition: all 0.3s ease;
    position: relative;
    display: flex; flex-direction: column;
    max-height: 90vh; 
}
.jo-modal-overlay.active .jo-modal-box { transform: translateY(0) scale(1); }

.jo-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: rgba(0,0,0,0.5); color: #fff;
    border: none; border-radius: 50%; width: 36px; height: 36px;
    font-size: 1.5rem; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.jo-modal-close:hover { background: var(--bex-teal); }

.jo-modal-img { width: 100%; aspect-ratio: 2/1; object-fit: cover; display: block; background: #eee; }

.jo-modal-content {
    padding: 30px;
    overflow-y: auto; 
}

.jo-modal-title { font-size: 1.8rem; font-weight: 900; color: var(--bex-black); margin-top: 0; margin-bottom: 15px; line-height: 1.2; text-transform: uppercase; }
.jo-modal-text { font-size: 1.05rem; line-height: 1.6; color: var(--bex-gray); margin-bottom: 20px; text-align: justify; }

.jo-modal-btn { display: inline-block; padding: 12px 25px; background: var(--bex-teal); color: white; text-decoration: none; font-weight: bold; border-radius: 6px; text-align: center; width: 100%; box-sizing: border-box; transition: background 0.2s; }
.jo-modal-btn:hover { background: #008783; }

/* =========================================
   7. ANIMAÇÕES (MICRO-INTERAÇÕES)
   ========================================= */
@keyframes fadeInSuave {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.jo-fade-in {
    animation: fadeInSuave 0.4s ease forwards;
}

/* =========================================
   8. AURORA UX FIX: MOBILE & LEGIBILIDADE
   ========================================= */

/* 1. LIBERTANDO AS IMAGENS DO MODAL */
.jo-article-hero-img {
    aspect-ratio: auto !important; 
    max-height: 550px;
    object-fit: contain !important;
}

/* 2. HIERARQUIA E SOBREPOSIÇÃO NO CELULAR (Apenas Mobile) */
@media (max-width: 768px) {
    .jo-destaque-link .jo-article-title { font-size: 1.8rem !important; font-weight: 900; }
    
    .jo-article-hero-img { 
        width: 100% !important; 
        height: 180px !important; 
        object-fit: cover !important; 
        max-height: none !important;
    }
    
    .jo-img-wrapper { 
        width: 100% !important; 
        height: 100px !important; 
        margin-bottom: 0 !important;
        overflow: hidden; 
        border-radius: var(--bex-radius);
    }
    
    .jo-img-wrapper img { 
        width: 100% !important; 
        height: 100% !important; 
        object-fit: cover !important; 
    }
    
    .jo-agenda-title { 
        position: relative;
        background: #ffffff;
        margin: -25px 10px 0 10px !important;
        padding: 15px 15px 5px 15px;
        border-radius: 12px 12px 0 0;
        font-size: 1.1rem !important;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.06);
        z-index: 2;
    }
    
    .jo-agenda-subtitle { 
        position: relative;
        background: #ffffff;
        margin: 0 10px 0 10px !important;
        padding: 0 15px 15px 15px;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.06);
        z-index: 2;
    }
} /* <--- A CHAVE MÁGICA QUE FALTAVA ESTÁ AQUI! FECHANDO O MOBILE */

/* 3. O MODO "LEITURA DE CARTAZ" NO MODAL */
.jo-modal-box { overflow-y: auto !important; }
.jo-modal-content { overflow-y: visible !important; }
.jo-modal-img {
    aspect-ratio: auto !important; 
    height: auto !important; 
    max-height: none !important; 
    object-fit: contain !important;
}
.jo-modal-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: rgba(0,0,0,0.7) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* =========================================
   9. AURORA UX FIX: MURAIS MODERNOS (Desktop e Mobile)
   ========================================= */

/* 1. O fundo do cartão fica invisível para destacar o conteúdo */
.evento-card {
    padding: 0 !important; 
    background: transparent !important; 
    box-shadow: none !important;
    transition: transform 0.3s ease;
}

/* 2. A imagem respeita 100% a proporção 2:1 sem cortes (Desktop e Mobile) */
.evento-imagem {
    width: 100% !important;
    height: auto !important; /* Altura automática para não esmagar */
    aspect-ratio: 2 / 1 !important; /* Força a proporção da sua imagem (600x300) */
    object-fit: contain !important; /* Garante que a foto aparece inteira */
    padding: 0 !important; 
    margin-bottom: 0 !important;
    border-radius: var(--bex-radius) !important;
    box-shadow: var(--bex-shadow);
    display: block;
}

/* 3. Título flutuante com trava inteligente de 3 linhas */
.evento-titulo {
    position: relative;
    background: #ffffff;
    margin: -40px 15px 0 15px !important; 
    padding: 20px 20px 5px 20px !important;
    border-radius: 12px 12px 0 0 !important;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 2;
    /* Mágica da Tipografia: Máximo de 3 linhas e pontinhos no final (...) */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
    word-break: normal !important; /* Quebra apenas nos espaços entre as palavras */
}

/* 4. Cola o resumo logo abaixo do título */
.evento-resumo {
    position: relative;
    background: #ffffff;
    margin: 0 15px 0 15px !important;
    padding: 0 20px 10px 20px !important;
    z-index: 2;
}

/* 5. Cola o botão no final para fechar a parte de baixo do "cartão branco" */
.evento-card > div:last-child {
    position: relative;
    background: #ffffff;
    margin: 0 15px 0 15px !important;
    padding: 0 20px 20px 20px !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    z-index: 2;
}

/* 6. Efeito de flutuar ao passar o rato */
.evento-card:hover {
    transform: translateY(-8px);
}