/**
 * Estilos Públicos do JEIF Manager.
 * Todos os seletores são encapsulados estritamente sob .jeif-portal-wrapper
 * para evitar qualquer interferência ou conflito com o tema ativo do portal do IF Baiano.
 *
 * @package JEIF_Manager
 */

:root {
    --jeif-primary: #166123;
    --jeif-secondary: #e2ff6e;
    --jeif-accent: #b80c0c;
    --jeif-bg-light: #f6fff3;
    --jeif-border-color: #d2e1dc;
    --jeif-gold: #ffd700;
    --jeif-silver: #c0c0c0;
    --jeif-bronze: #cd7f32;
}

/* ==========================================================================
   Base e Estrutura Principal
   ========================================================================== */
body.jeif-landing-page {
    margin: 0;
    padding: 0;
    background-color: var(--jeif-bg-light);
    background-repeat: repeat;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333333;
    scroll-behavior: smooth;
}

.jeif-portal-wrapper {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333333;
}

.jeif-portal-wrapper * {
    box-sizing: border-box;
}

.jeif-portal-wrapper #wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background-color: transparent;
}

.jeif-portal-wrapper #main-border {
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: top center;
    border-radius: 8px 8px 0 0;
}

.jeif-portal-wrapper #main {
    padding-top: 57%; /* Mantém a proporção exata da imagem Hero do tema oficial */
    margin: 0 auto;
}

.jeif-portal-wrapper #container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 25px 20px;
    margin-top: 10px;
}

.jeif-portal-wrapper #content {
    margin: 0 auto;
}

/* ==========================================================================
   Marcas do Topo (Campanha Anual + IF Baiano Perene)
   ========================================================================== */
.jeif-portal-wrapper .jeif-topo-marcas {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.jeif-portal-wrapper .jeif-logo-evento {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.jeif-portal-wrapper .jeif-logo-evento:hover {
    transform: scale(1.02);
}

.jeif-portal-wrapper .jeif-marca-institucional {
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================================================
   Menu Âncora Rápido
   ========================================================================== */
.jeif-portal-wrapper #menu {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 25px auto 35px auto;
}
.jeif-portal-wrapper #menu a {
  font-size: 1.05rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #1a1a1a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  border: 3px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
      135deg,
      var(--jeif-primary) 50%,
      var(--jeif-secondary) 50%
    ) border-box;
}

.jeif-portal-wrapper #menu a:hover {
    background: var(--jeif-primary);
    border-color: var(--jeif-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Títulos de Seção
   ========================================================================== */
.jeif-portal-wrapper .titutloSecao {
    font-size: 1.25rem;
    text-align: center;
    margin: 40px 10px 25px 10px;
    color: var(--jeif-primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==========================================================================
   Apresentação / Avisos
   ========================================================================== */
.jeif-portal-wrapper #apresentacao {
    padding: 15px 25px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    background-color: #fafff8;
    border: 1px solid #e1f0dc;
    border-radius: 8px;
    margin-bottom: 25px;
}

.jeif-portal-wrapper #apresentacao p {
    margin-bottom: 12px;
}

.jeif-portal-wrapper #apresentacao p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Barra de Filtro Rápido no Front-end
   ========================================================================== */
.jeif-portal-wrapper .jeif-frontend-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    background: #f4faf2;
    border: 1px solid #dbead8;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 0 auto 20px auto;
    max-width: 700px;
}

.jeif-portal-wrapper .jeif-filtro-campo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jeif-portal-wrapper .jeif-filtro-campo label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2f5d34;
}

.jeif-portal-wrapper .jeif-filtro-campo select {
    padding: 6px 12px;
    border: 1px solid #b6d4b2;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.85rem;
    color: #333333;
    outline: none;
    cursor: pointer;
}

.jeif-portal-wrapper .jeif-filtro-campo select:focus {
    border-color: var(--jeif-primary);
}

/* ==========================================================================
   Acordeão de Programação por Dias (Fiel ao tema 2025)
   ========================================================================== */
.jeif-portal-wrapper #programacao {
    padding: 10px 0;
}

.jeif-portal-wrapper .jeif-dia-lista-ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.jeif-portal-wrapper li.textTab {
    position: relative;
    padding: 16px 20px;
    margin: 0;
    border-top: 1px dotted #97cf79;
    border-radius: 6px;
    background-color: #fafdf9;
    transition: background-color 0.2s ease;
}

.jeif-portal-wrapper li.textTab:hover {
    background-color: #f2f9f0;
}

.jeif-portal-wrapper li.textTab h2 {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--jeif-primary);
    cursor: pointer;
}

/* Indicador de Chevron / Sanfona */
.jeif-portal-wrapper li.textTab i {
    position: absolute;
    transform: translate(-6px, 0);
    margin-top: 4px;
    right: 20px;
    top: 18px;
    width: 14px;
    height: 14px;
}

.jeif-portal-wrapper li.textTab i:before,
.jeif-portal-wrapper li.textTab i:after {
    content: "";
    position: absolute;
    background-color: var(--jeif-accent);
    width: 3px;
    height: 10px;
    transition: transform 0.3s ease;
}

.jeif-portal-wrapper li.textTab i:before {
    transform: translate(-2px, 0) rotate(45deg);
}

.jeif-portal-wrapper li.textTab i:after {
    transform: translate(2px, 0) rotate(-45deg);
}

/* Checkbox invisível para alternar sanfona CSS */
.jeif-portal-wrapper li.textTab input[type="checkbox"] {
    position: absolute;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    top: 0;
    left: 0;
    margin: 0;
}

.jeif-portal-wrapper li.textTab input[type="checkbox"]:checked ~ .jeif-acordeon-conteudo {
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    display: none;
    transform: translate(0, 20px);
}

.jeif-portal-wrapper li.textTab input[type="checkbox"]:checked ~ i:before {
    transform: translate(2px, 0) rotate(45deg);
}

.jeif-portal-wrapper li.textTab input[type="checkbox"]:checked ~ i:after {
    transform: translate(-2px, 0) rotate(-45deg);
}

/* Conteúdo Expandido do Dia */
.jeif-portal-wrapper .jeif-acordeon-conteudo {
    transition: all 0.4s ease-in-out;
    margin-top: 15px;
}

.jeif-portal-wrapper .jeif-acordeon-conteudo ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jeif-portal-wrapper .jeif-item-jogo {
    padding: 16px 12px;
    margin: 0;
    border-top: 1px dotted #c9e4c0;
    text-align: center;
    font-size: 0.95rem;
}

.jeif-portal-wrapper .jeif-item-jogo:first-child {
    border-top: none;
}

.jeif-portal-wrapper .jeif-jogo-linha-topo {
    margin-bottom: 8px;
    color: #444444;
    display: flex; 
    justify-content: center;
    align-items: center;
}

.jeif-portal-wrapper .jeif-svg-icone {
    width: 22px;
    height: 22px;
    vertical-align: middle;
    color: var(--jeif-accent);
    margin-right: 4px;
}

/* ==========================================================================
   Placares, Confrontos e Partidas
   ========================================================================== */
.jeif-portal-wrapper div.partida {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Parkinsans', 'Open Sans', sans-serif;
    font-weight: 700;
    color: var(--jeif-primary);
    font-size: 1.1rem;
    margin: 10px 0;
    flex-wrap: wrap;
}

.jeif-portal-wrapper div.partida .jeif-nome-time {
    color: var(--jeif-primary);
    flex: 1;
    line-height: normal;
}

.jeif-portal-wrapper div.partida .jeif-nome-time small {
    font-weight: normal;
    color: #555555;
    font-size: 0.85rem;
}

.jeif-portal-wrapper span.placar {
    padding: 4px 12px;
    white-space: nowrap;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 0 0 3px var(--jeif-secondary);
    font-size: 1.15rem;
    color: var(--jeif-primary);
}

.jeif-portal-wrapper .jeif-svg-vs {
    width: 22px;
    height: 22px;
    color: #888888;
}

/* W.O. */
.jeif-portal-wrapper .jeif-partida-wo {
    color: var(--jeif-accent);
    font-weight: 800;
    font-size: 1.05rem;
}

/* Provas de Atletismo / Natação */
.jeif-portal-wrapper .jeif-partida-vencedor {
    background-color: #f7fceb;
    border-radius: 6px;
    padding: 8px 14px;
    display: inline-block;
}

.jeif-portal-wrapper .jeif-vencedor-destaque {
    color: var(--jeif-primary);
    font-weight: 700;
}

.jeif-portal-wrapper .jeif-vencedor-campus-badge {
    background: var(--jeif-secondary);
    color: #1a1a1a;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 6px;
}

.jeif-portal-wrapper .jeif-jogo-local {
    margin-top: 6px;
    font-size: 0.88rem;
    color: #555555;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jeif-portal-wrapper .obs {
    margin-top: 6px;
    font-style: italic;
    font-size: 0.85rem;
    color: #666666;
    display: block;
}

.jeif-portal-wrapper .obs.aviso {
    border: 2px dotted #e1e1e1;
    padding: 10px;
    margin-top: 10px;
    background-color: #ffffffeb;
    border-radius: 10px;
}

/* ==========================================================================
   Seção: Quem Venceu
   ========================================================================== */
.jeif-portal-wrapper .vencedores {
    margin: 35px auto 20px auto;
    max-width: 900px;
}

.jeif-portal-wrapper .vencedores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.jeif-portal-wrapper .vencedores-grid button {
    padding: 8px 14px;
    font-weight: 700;
    border: 1px solid var(--jeif-primary);
    background-color: #ffffff;
    color: #222222;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.jeif-portal-wrapper .vencedores-grid button:hover,
.jeif-portal-wrapper .vencedores-grid button.ativo {
    background-color: var(--jeif-secondary);
    border-color: var(--jeif-primary);
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.jeif-portal-wrapper .vencedores-content {
    display: none;
    margin-bottom: 25px;
    text-align: center;
    font-size: 0.95rem;
    padding: 20px;
    border: 1px solid #d4ebd0;
    border-radius: 8px;
    background-color: #f9ffef;
    animation: jeifFadeIn 0.35s ease;
}

.jeif-portal-wrapper .vencedores-content .modalidade-quem-venceu {
    font-family: 'Parkinsans', 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
}

.jeif-portal-wrapper .jeif-vencedores-flex-cat {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-around;
    margin-top: 15px;
}

.jeif-portal-wrapper .categoria {
    flex: 1 1 250px;
    background: #ffffff;
    border: 1px solid #e2f0df;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
}

.jeif-portal-wrapper .categoria h4 {
    font-size: 1rem;
    color: var(--jeif-primary);
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--jeif-secondary);
}

.jeif-portal-wrapper .categoria ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jeif-portal-wrapper .categoria ul li {
    padding: 6px 0;
    border-bottom: 1px dotted #e0e0e0;
    font-size: 0.9rem;
}

.jeif-portal-wrapper .categoria ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Tabela do Quadro de Medalhas (Fiel ao tema 2025)
   ========================================================================== */
.jeif-portal-wrapper figure.medalhas {
    font-size: 0.95rem;
    max-width: 600px;
    margin: 20px auto 10px auto;
}

.jeif-portal-wrapper figure.medalhas table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.jeif-portal-wrapper figure.medalhas table th,
.jeif-portal-wrapper figure.medalhas table td {
    padding: 8px 12px;
    border: 0;
    text-align: center;
}

.jeif-portal-wrapper figure.medalhas table th:first-child,
.jeif-portal-wrapper figure.medalhas table td:first-child {
    width: 40px;
    text-align: center;
    font-weight: 700;
}

.jeif-portal-wrapper figure.medalhas table th:nth-child(2),
.jeif-portal-wrapper figure.medalhas table td:nth-child(2) {
    text-align: left;
}

.jeif-portal-wrapper figure.medalhas table thead tr {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    background-color: #e8d193;
    font-weight: 700;
}

/* Cores dos cabeçalhos de medalhas */
.jeif-portal-wrapper figure.medalhas table th:nth-child(3) {
    background-color: var(--jeif-gold);
    color: #554400;
}

.jeif-portal-wrapper figure.medalhas table th:nth-child(4) {
    background-color: var(--jeif-silver);
    color: #333333;
}

.jeif-portal-wrapper figure.medalhas table th:nth-child(5) {
    background-color: var(--jeif-bronze);
    color: #ffffff;
}

.jeif-portal-wrapper figure.medalhas table tbody tr {
    background-color: transparent;
    transition: background-color 0.15s ease;
}

.jeif-portal-wrapper figure.medalhas table tbody tr:nth-of-type(odd) {
    background-color: #f3f3f3;
}

.jeif-portal-wrapper figure.medalhas table tbody tr:hover {
    background-color: #dbdbdb;
}

/* Nota Técnica abaixo da tabela de medalhas */
.jeif-portal-wrapper .jeif-nota-tecnica {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 600px;
    margin: 15px auto 30px auto;
    background: #fffdf5;
    border: 1px solid #f0e2b6;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #634d0b;
    line-height: 1.5;
}

.jeif-portal-wrapper .jeif-nota-tecnica-icone {
    font-size: 1.2rem;
    line-height: 1;
}

/* ==========================================================================
   Rodapé Institucional do IF Baiano (Perene)
   ========================================================================== */
.jeif-portal-wrapper #footer {
    width: 100%;
    margin-top: 40px;
    padding: 30px 20px;
    background-color: #f7f9f7;
    border-top: 2px solid #e1ebe0;
    text-align: center;
}

.jeif-portal-wrapper #site-info {
    max-width: 800px;
    margin: 0 auto;
}

.jeif-portal-wrapper #site-info .marca-if-baiano img {
    margin-bottom: 15px;
    display: inline-block;
}

.jeif-portal-wrapper #site-info .textorodape {
    font-size: 0.85rem;
    color: #555555;
    line-height: 1.6;
}

.jeif-portal-wrapper #site-info .textorodape a {
    color: var(--jeif-primary);
    text-decoration: none;
}

.jeif-portal-wrapper #site-info .textorodape a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Barra de Homologação / Visualização Interna Flutuante
   ========================================================================== */
.jeif-barra-homologacao {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #1d2327;
    color: #ffffff;
    z-index: 999999;
    padding: 8px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    font-size: 0.88rem;
    font-weight: 600;
}

.jeif-barra-homologacao-conteudo {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.jeif-barra-texto {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f0f6fc;
}

.jeif-barra-btn {
    background: #2271b1;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: background 0.2s ease;
}

.jeif-barra-btn:hover {
    background: #135e96;
}

body.jeif-landing-page:has(.jeif-barra-homologacao) {
    padding-top: 42px;
}

/* ==========================================================================
   Tela de Bloqueio Institucional (Privado, Rascunho ou Senha)
   ========================================================================== */
.jeif-portal-wrapper .jeif-bloqueio-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.jeif-portal-wrapper .jeif-bloqueio-box {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    max-width: 520px;
    width: 100%;
    padding: 40px 30px;
    text-align: center;
}

.jeif-portal-wrapper .jeif-bloqueio-marca {
    max-width: 220px;
    height: auto;
    margin-bottom: 25px;
}

.jeif-portal-wrapper .jeif-bloqueio-icone {
    font-size: 3rem;
    margin-bottom: 12px;
}

.jeif-portal-wrapper .jeif-bloqueio-box h2 {
    font-size: 1.4rem;
    color: var(--jeif-primary);
    margin: 0 0 8px 0;
}

.jeif-portal-wrapper .jeif-bloqueio-box h3 {
    font-size: 1.1rem;
    color: #555555;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.jeif-portal-wrapper .jeif-bloqueio-msg {
    font-size: 0.95rem;
    color: #646970;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Animação Fade In */
@keyframes jeifFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsividade Mobile (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .jeif-portal-wrapper #wrapper {
        width: 100% !important;
        padding: 0 !important;
    }

    .jeif-portal-wrapper #container {
        padding: 15px 10px;
        margin-top: 0;
        border-radius: 0;
    }

    .jeif-portal-wrapper #menu {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .jeif-portal-wrapper #menu a {
        width: 100%;
        text-align: center;
    }

    .jeif-portal-wrapper .jeif-frontend-filtros {
        flex-direction: column;
        align-items: stretch;
    }

    .jeif-portal-wrapper .jeif-filtro-campo {
        flex-direction: column;
        align-items: stretch;
    }

    .jeif-portal-wrapper div.partida {
        font-size: 1rem;
    }

    .jeif-portal-wrapper figure.medalhas table th,
    .jeif-portal-wrapper figure.medalhas table td {
        padding: 6px 4px;
        font-size: 0.85rem;
    }
}