/*
Theme Name: Tema FBX
Description: Tema próprio da Federação Bahiana de Xadrez. Mesma aparência do site montado no Elementor, sem depender dele: menu preto, fundo azul com peças, rodapé em degradê, grades de notícias e o Top 10 da página inicial. Base de formulários e tabelas herdada do Hello Elementor (GPL) para os snippets PHP continuarem com a mesma cara.
Version: 0.1.8
Author: FBX - Federação Bahiana de Xadrez
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: tema-fbx
*/

/* ---------- Base (equivale ao kit do Elementor e ao CSS adicional do site) ---------- */
:root {
  --fbx-largura: 912px;          /* coluna de conteúdo do site antigo (80% de 1140) */
  --fbx-largura-larga: 1140px;
  --fbx-preto: #000;
  --fbx-azul-botao: #209FE4;
  --fbx-hover: #0450E5;
  --fbx-card: rgba(255, 255, 255, .22);
}
body.fbx-site {
  background-color: #fff;
  background-image: url("/wp-content/uploads/2023/07/background-fbx2_Prancheta-1.png");
  background-repeat: repeat-y;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.fbx-site h1, .fbx-site h2, .fbx-site h3, .fbx-site h4, .fbx-site h5, .fbx-site h6 { font-family: 'Roboto Slab', Georgia, Times, serif; }
.fbx-site p, .fbx-site div { font-family: 'Roboto', Helvetica, Arial, sans-serif; }
.fbx-site img { border-radius: 15px; }
.fbx-site button, .fbx-site input[type="button"], .fbx-site input[type="submit"] { background-color: transparent; color: #000; }
.fbx-site button:hover, .fbx-site button:focus, .fbx-site input[type="button"]:hover, .fbx-site input[type="button"]:focus,
.fbx-site input[type="submit"]:hover, .fbx-site input[type="submit"]:focus { background-color: var(--fbx-hover); color: #fff; }
.fbx-main { flex: 1 0 auto; padding-top: 72px; }
.admin-bar .fbx-main { padding-top: 72px; }
.fbx-container { width: 100%; max-width: var(--fbx-largura); margin: 0 auto; padding: 0 10px; }
.fbx-container-larga { width: 100%; max-width: var(--fbx-largura-larga); margin: 0 auto; padding: 0 10px; }
.fbx-divisor { border: 0; border-top: 1.25px solid #000; margin: 20px auto; max-width: var(--fbx-largura); }
.fbx-titulo { font-family: 'Roboto', sans-serif !important; font-weight: 600; font-size: 2rem; color: #000; text-align: center; margin: 10px 0 20px; }

/* Tabela "transparente" (CSS adicional do site antigo) */
table.transparente { border-collapse: collapse; width: 100%; font-family: sans-serif; }
.transparente th, .transparente td { padding: 10px; color: #333; }
.transparente tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0); }
.transparente tr:nth-child(even) { background-color: rgba(0, 0, 0, .05); }
.transparente tbody tr:hover { background-color: rgba(0, 0, 0, .1); cursor: pointer; }

/* ---------- Menu superior (Bootstrap 4, como no site antigo) ---------- */
#menu.navbar { background-color: var(--fbx-preto) !important; font-family: 'Roboto', Helvetica, Arial, sans-serif; padding: .5rem 1rem; }
.admin-bar #menu.fixed-top { top: 32px; }
@media (max-width: 782px) { .admin-bar #menu.fixed-top { top: 46px; } }
@media (max-width: 600px) { .admin-bar #menu.fixed-top { position: absolute; } }
#menu .navbar-brand img { border-radius: 0; box-shadow: none; }
#menu .nav-link { color: rgba(255, 255, 255, .55); }
#menu .nav-link:hover, #menu .nav-link:focus, #menu .nav-item.active > .nav-link, #menu .show > .nav-link { color: #fff; }
#menu .nav-link { white-space: nowrap; }
#menu .nav-link img { display: inline-block; border-radius: 0; margin-right: 6px; vertical-align: -3px; }
#menu .dropdown-menu { font-family: 'Roboto', Helvetica, Arial, sans-serif; }
#menu .dropdown-item:active { background-color: var(--fbx-hover); }
#menu .navbar-toggler { border-color: rgba(255, 255, 255, .3); padding: .25rem .6rem; }
#menu .navbar-toggler:hover, #menu .navbar-toggler:focus { background-color: transparent; }
#menu .fbx-busca { display: flex; flex-wrap: nowrap; gap: 8px; }
#menu .fbx-busca input[type="search"] { width: 170px; padding: .375rem .75rem; border-radius: .25rem; border: 1px solid #ced4da; }
#menu .fbx-busca button { background-color: var(--fbx-azul-botao); color: #000; border: 1px solid var(--fbx-azul-botao); border-radius: .25rem; padding: .375rem .75rem; }
#menu .fbx-busca button:hover, #menu .fbx-busca button:focus { background-color: var(--fbx-hover); border-color: var(--fbx-hover); color: #fff; }
@media (max-width: 991px) {
  #menu .navbar-collapse { max-height: calc(100vh - 70px); overflow-y: auto; }
  #menu .fbx-busca { margin: 8px 0; }
  #menu .fbx-busca input[type="search"] { flex: 1; width: auto; }
}

/* ---------- Rodapé ---------- */
.fbx-rodape { flex-shrink: 0; margin-top: 30px; }
.fbx-rodape-faixa { background-image: linear-gradient(184deg, #0E149D 0%, #8B8B8B8F 100%); display: grid; grid-template-columns: 25% 25% 1fr 22.8%; align-items: start; padding: 16px; gap: 16px; }
.fbx-rodape-logo img { width: 100%; max-width: 300px; height: auto; border-radius: 0; border: 3px solid #000; }
.fbx-rodape-menu ul { list-style: none; margin: 0; padding: 0; background-color: #00000061; }
.fbx-rodape-menu a { display: block; padding: 15px; color: #fff; font-weight: 600; font-family: 'Roboto', sans-serif; text-decoration: none; }
.fbx-rodape-menu a:hover, .fbx-rodape-menu a:focus { background-color: #000; color: #fff; }
.fbx-rodape-menu .sub-menu { display: none; }
.fbx-rodape-contato { color: #fff; padding: 0 10px; }
.fbx-rodape-contato p { margin: 0 0 .9rem; color: #fff; }
.fbx-rodape-contato .fbx-endereco { font-size: 14px; }
.fbx-rodape-social { align-self: center; text-align: center; }
.fbx-rodape-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #A638BC; color: #fff; font-size: 22px; transition: transform .3s; }
.fbx-rodape-social a:hover, .fbx-rodape-social a:focus { transform: scale(1.1); color: #fff; }
.fbx-rodape-credito { text-align: center; padding: 10px 16px 20px; color: #333; }
.fbx-rodape-credito p { margin: 0; }
@media (max-width: 767px) {
  .fbx-rodape-faixa { grid-template-columns: 1fr; }
  .fbx-rodape-logo { text-align: center; }
  .fbx-rodape-logo img { max-width: 200px; }
}

/* ---------- Página inicial ---------- */
.fbx-banner { display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 0; max-width: var(--fbx-largura); margin: 0 auto; padding: 10px; }
.fbx-banner img { display: block; margin: 0 auto; border-radius: 0 !important; height: auto; }
.fbx-banner-logo img { width: 86%; }
.fbx-banner-nome img { width: 83%; }
.fbx-banner-ruth img { width: 72%; }
.fbx-crescer { transition: transform .3s; }
.fbx-crescer:hover { transform: scale(1.1); }

.fbx-destaques { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 275px); gap: 8px; align-items: start; }
.fbx-tv iframe { display: block; width: 100%; aspect-ratio: 400 / 444; border: 0; }
@media (max-width: 767px) { .fbx-destaques { grid-template-columns: 1fr; } .fbx-tv { max-width: 400px; margin: 0 auto; width: 100%; } }

.fbx-slider { position: relative; overflow: hidden; aspect-ratio: 620 / 345; background: rgba(0, 0, 0, .15); }
.fbx-slider-trilho { display: flex; height: 100%; transition: transform .6s ease; }
.fbx-slide { flex: 0 0 100%; position: relative; height: 100%; }
.fbx-slide a { display: block; height: 100%; color: #fff; text-decoration: none; }
.fbx-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }
.fbx-slide-titulo { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px; background: rgba(0, 0, 0, .55); color: #fff; font-family: 'Roboto', sans-serif !important; font-size: 1.5rem; font-weight: 400; line-height: 1.3; }
.fbx-slider-seta { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 60px; padding: 0 !important; border: 0 !important; background: transparent !important; color: #fff !important; font-size: 34px; line-height: 1; text-shadow: 0 0 6px rgba(0, 0, 0, .6); opacity: .85; }
.fbx-slider-seta:hover, .fbx-slider-seta:focus { opacity: 1; }
.fbx-slider-ant { left: 4px; }
.fbx-slider-prox { right: 4px; }
@media (max-width: 575px) { .fbx-slide-titulo { font-size: 1.05rem; padding: 8px 10px; } }

.fbx-partidas { display: grid; grid-template-columns: 1fr 3fr; align-items: center; gap: 20px; padding: 20px 10px; }
.fbx-partidas img { display: block; width: 120px; margin: 0 auto; }
.fbx-partidas a { text-decoration: none; }
.fbx-manchete { margin: 0; text-align: center; font-family: 'Roboto', sans-serif !important; font-size: 2rem; font-weight: 600; line-height: 1.3; }
.fbx-manchete-fixo { background-color: #2a3f82; color: #fff; padding: 0 8px; }
.fbx-manchete-giro { color: #132c47; display: inline-block; min-width: 10ch; text-align: left; }
.fbx-manchete-giro b { font-weight: 600; display: none; }
.fbx-manchete-giro b.fbx-ativo { display: inline; animation: fbx-entra .5s ease; }
@keyframes fbx-entra { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }
@media (max-width: 575px) { .fbx-partidas { grid-template-columns: 1fr; } .fbx-manchete { font-size: 1.4rem; } .fbx-manchete-giro { text-align: center; } }

.fbx-municipio { padding: 10px 0; }
.fbx-municipio input[type="submit"] { margin: 10px 0; }

.fbx-top10 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fbx-top10 > div { min-width: 0; overflow-x: auto; }
.fbx-top10 .nav-tabs { flex-wrap: nowrap; }
.fbx-top10 .nav-tabs .nav-link { white-space: nowrap; }
@media (max-width: 400px) { .fbx-top10 .nav-tabs .nav-link { padding: .5rem .6rem; } }
.fbx-top10 h5 { font-weight: 500; font-size: 1.25rem; margin: .5rem 0 1rem; }
.fbx-top10 .nav-tabs .nav-link { padding: .5rem 1rem; border-radius: .25rem .25rem 0 0; }
.fbx-top10 .nav-tabs .nav-link.active { background-color: #fff; color: #495057; }
.fbx-top10 td a { word-break: break-word; }
@media (max-width: 767px) { .fbx-top10 { grid-template-columns: 1fr; } }

.fbx-secao-titulo { font-family: 'Roboto', sans-serif !important; font-weight: 600; font-size: 2rem; color: #000; text-align: center; margin: 10px 0 20px; }

/* ---------- Grade de posts (substitui o Post Grid do Essential Addons) ---------- */
.fbx-grade { display: grid; grid-template-columns: repeat(var(--fbx-colunas, 4), minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1024px) { .fbx-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .fbx-grade { grid-template-columns: 1fr; } }
.fbx-card { background-color: var(--fbx-card); }
.fbx-card-img { position: relative; display: block; overflow: hidden; border-radius: 15px; }
.fbx-card-img img { display: block; width: 100%; height: auto; }
.fbx-grade-proporcao .fbx-card-img img { aspect-ratio: 3 / 2; object-fit: cover; }
.fbx-card-img::after { content: "\f439"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 2rem; opacity: 0; transition: opacity .3s; }
.fbx-card-img:hover::after, .fbx-card-img:focus::after { opacity: 1; }
.fbx-card-corpo { padding: 15px; }
.fbx-card-titulo { margin: 0 0 8px; font-family: 'Roboto', sans-serif !important; font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.fbx-card-titulo a { color: #303133; text-decoration: none; }
.fbx-card-titulo a:hover, .fbx-card-titulo a:focus { color: #000; }
.fbx-card-resumo p { margin: 0; font-size: 14px; color: #212529; }
.fbx-card-mais { display: inline-block; font-size: 12px; color: #00f; margin-bottom: 6px; }
.fbx-card-data { display: block; font-size: 15px; color: #212529; }
.fbx-mais-wrap { text-align: center; margin: 20px 0; }
.fbx-mais { background-color: #29d8d6 !important; color: #fff !important; border: 0 !important; padding: 10px 24px !important; }
.fbx-mais:hover, .fbx-mais:focus { background-color: #2a3f82 !important; }
.fbx-mais[disabled] { opacity: .6; cursor: wait; }

/* Lista de posts com o conteúdo inteiro (Documentos, Convênios) */
.fbx-lista-item { padding: 20px 0; }
.fbx-lista-item + .fbx-lista-item { border-top: 1px solid rgba(0, 0, 0, .15); }
.fbx-lista-item h2 { font-size: 1.6rem; margin: 0 0 10px; }
.fbx-lista-item h2 a { color: #000; text-decoration: none; }

/* ---------- Páginas e posts ---------- */
.fbx-pagina, .fbx-post { padding: 10px 0 20px; }
/* Títulos que vieram dos widgets "Título" do Elementor: centralizados, Roboto 600, como antes */
.fbx-pagina .page-content > h2 { font-family: 'Roboto', sans-serif !important; font-weight: 600; font-size: 2rem; color: #000; text-align: center; margin: 10px 0 20px; }
.fbx-post .entry-title, .fbx-pagina > .entry-title { font-size: 2.5rem; margin: .5rem 0 1rem; color: #212529; }
.fbx-post .page-content a, .comments-area a { text-decoration: underline; }
.fbx-lista .wp-block-file__embed { display: none !important; } /* na lista só o link "Baixar", como antes */
.page-content .wp-block-button__link, .page-content .wp-element-button { text-decoration: none; }
.page-content::after { content: ""; display: table; clear: both; }
.fbx-post-imagem img { width: 100%; max-height: 500px; object-fit: cover; }
.fbx-botoes { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 12px 20px; margin: 10px 0 20px; }
.fbx-botoes a { display: inline-flex; align-items: center; gap: 8px; font-family: 'Roboto', sans-serif; font-weight: 500; font-size: 15px; text-decoration: none !important; padding: 12px 24px; border-radius: 3px; transition: transform .3s; }
.fbx-botoes a:hover, .fbx-botoes a:focus { transform: scale(1.1); }
.fbx-botao-icone { color: #fff; font-size: 18px; line-height: 1; }
.fbx-pesquisa-id { margin: 10px 0; }

/* Abas no estilo do widget de abas do Elementor (página Rating) */
.fbx-abas .js-tabs { display: flex; flex-wrap: wrap; }
.fbx-abas .js-tabs .nav-link { font-family: 'Roboto', sans-serif; font-size: 16px; font-weight: 600; color: #000; background: transparent; border: 1px solid transparent; border-bottom: 0; border-radius: 0; padding: 20px 25px; }
.fbx-abas .js-tabs .nav-link:hover, .fbx-abas .js-tabs .nav-link:focus { background: transparent; color: #FF2B00; }
.fbx-abas .js-tabs .nav-link.active { color: #FF2B00; border-color: #d5d8dc; margin-bottom: -1px; position: relative; z-index: 1; }
.fbx-abas .js-tabcontent { border: 1px solid #d5d8dc; padding: 20px; overflow-x: auto; }
.fbx-abas .tab-pane:not(.active) { display: none; }
.fbx-paginacao { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 20px 0; }
.fbx-paginacao .page-numbers { padding: 6px 12px; background: var(--fbx-card); color: #000; text-decoration: none; border-radius: 4px; }
.fbx-paginacao .current { background: #000; color: #fff; }

/* ---------- Perfil do atleta (/atleta/?ID=) ---------- */
.fbx-perfil-topo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: start; margin-bottom: 20px; }
.fbx-perfil-foto { text-align: center; }
.fbx-perfil-foto img { max-width: 100%; height: auto; }
.fbx-perfil-foto a { color: #0b2a6f; text-decoration: none; }
.fbx-perfil-info { color: #000; }
/* Os valores vêm do snippet "perfil" com color:darkblue, que some no fundo azul: azul-marinho escuro e negrito */
.fbx-perfil-info span[style*="darkblue"], .fbx-perfil-info a { color: #06163a !important; font-weight: 600; }
.page-content .nav-tabs .nav-link:not(.active) { color: #06163a; }
/* Abas Adversários e Resultados: nomes (links) no azul do Bootstrap somem no fundo; azul-marinho em negrito */
.fbx-perfil-bloco table a { color: #06163a; font-weight: 600; }
.fbx-perfil-bloco table a:hover, .fbx-perfil-bloco table a:focus { color: #000; text-decoration: underline; }
@media (max-width: 767px) { .fbx-perfil-topo { grid-template-columns: 1fr; } }
.fbx-perfil-bloco:empty { display: none; }

/* Card do Circuito Ruth Cardoso (snippet cardcrr): fundo claro como os demais cards, texto escuro */
.page-content .fbx-ruth-link, .page-content .fbx-ruth-link:hover { color: #000; text-decoration: none; }
.page-content .fbx-ruth-card { background: rgba(255, 255, 255, .25) !important; color: #000 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, .12) !important; border: 1px solid rgba(0, 0, 0, .08); }
.page-content .fbx-ruth-card * { color: #000 !important; }
.page-content .fbx-ruth-card .fbx-ruth-total strong, .page-content .fbx-ruth-card .fbx-ruth-etapa-pontos { color: #0b2a6f !important; }
.page-content .fbx-ruth-card .fbx-ruth-etapa { background: rgba(255, 255, 255, .45) !important; border-color: rgba(0, 0, 0, .1) !important; }

/* Comentários */
.comments-area { margin-top: 30px; }
#comments .comment-list { margin: 0; padding: 0; list-style: none; font-size: .9em; }
#comments .comment-body { padding: 20px 0; border-bottom: 1px solid rgba(0, 0, 0, .15); }
#comments .children { list-style: none; padding-left: 30px; }
#comments .avatar { border-radius: 50%; margin-right: 8px; }

/* Alinhamentos e acessibilidade (do Hello Elementor) */
.alignright { float: right; margin-left: 1rem; }
.alignleft { float: left; margin-right: 1rem; }
.aligncenter { clear: both; display: block; margin-inline: auto; }
.alignwide { margin-inline: -80px; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
@media (max-width: 1100px) { .alignwide { margin-inline: 0; } }
.wp-caption { margin-block-end: 1.25rem; max-width: 100%; }
.wp-caption img { display: block; margin-inline: auto; }
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background-color: #eee; clip: auto !important; clip-path: none; color: #333; display: block; font-size: 1rem; height: auto; left: 5px; line-height: normal; padding: 12px 24px; text-decoration: none; top: 5px; width: auto; z-index: 100000; }
.fbx-pular { position: absolute; left: -9999px; }
.fbx-pular:focus { left: 8px; top: 8px; z-index: 2000; background: #fff; padding: 8px 16px; }
