/* ===========================================
   ANOSTC — Site Institucional (www2)
   Paleta inspirada na logo: azul institucional + verde + amarelo
   =========================================== */

:root {
    --primary: #0d3b66;          /* azul institucional ANOSTC */
    --primary-dark: #07294a;
    --primary-light: #1d5f9e;
    --accent: #fcbf49;           /* amarelo da bandeira */
    --accent-dark: #e09b00;
    --green: #2d6a4f;            /* verde */
    --red: #d62828;              /* vermelho */
    --bg: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.18s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }

/* ============== CONTAINER ============== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}
@media (max-width: 540px) { .container { padding: 0 14px; } }

/* ============== HEADER ============== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    font-weight: 700; color: var(--primary);
    font-size: 1.1rem;
}
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { color: var(--text-muted); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* Menu desktop */
.nav-menu {
    display: flex; gap: 4px; align-items: center;
}
.nav-menu a {
    color: var(--text); font-weight: 500; font-size: 0.95rem;
    padding: 8px 14px; border-radius: 8px;
    transition: var(--transition);
}
.nav-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.nav-menu a.active { color: var(--primary); background: var(--bg-soft); }

.btn-cta {
    background: var(--accent);
    color: var(--primary-dark) !important;
    font-weight: 700 !important;
    padding: 9px 18px !important;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-cta:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-cta i { margin-left: 4px; }

/* CTA principal da home — botão grande sob o título do hero */
.hero-cta-pre {
    margin-top: 22px;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 14px rgba(252, 191, 73, 0.35);
    transition: var(--transition);
}
.hero-cta-pre:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(252, 191, 73, 0.45); }
.hero-cta-pre i { font-size: 1.2rem; }

/* Grupo de CTAs (Regulamento + Pré-Inscrição) — flex centralizado, mantém os botões lado a lado */
.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.hero-cta-group .hero-cta-pre { margin-top: 22px; }

/* CTA secundário "Regulamento" — branco translúcido para contraste com o hero azul */
.hero-cta-reg {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
}
.hero-cta-reg:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--primary) !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25) !important;
}

/* Menu mobile */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    font-size: 1.6rem; color: var(--primary); padding: 6px;
}
@media (max-width: 900px) {
    .menu-toggle { display: block; }
    .nav-menu {
        position: absolute; top: 100%; right: 0; left: 0;
        background: #fff; flex-direction: column; gap: 0;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        padding: 8px 14px 16px;
        max-height: 0; overflow: hidden;
        transition: max-height 0.25s ease;
    }
    .nav-menu.open { max-height: 600px; }
    .nav-menu a { padding: 12px 14px; border-radius: 6px; width: 100%; }
    .btn-cta { margin-top: 8px; text-align: center; }
}

/* ============== HERO / BANNER ============== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 50px 0 60px;
    text-align: center;
}
.hero-banner {
    max-width: 720px; width: 100%; margin: 0 auto 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.hero h1 {
    font-size: 2rem; font-weight: 800; margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.hero p { font-size: 1.05rem; opacity: 0.92; max-width: 640px; margin: 0 auto; }
@media (max-width: 540px) {
    .hero { padding: 32px 0 40px; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.95rem; }
}

/* ============== SEÇÕES ============== */
.section { padding: 60px 0; }
.section-title {
    text-align: center;
    font-size: 1.75rem; font-weight: 700;
    color: var(--primary); margin-bottom: 8px;
}
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 36px; font-size: 0.95rem; }
.section-soft { background: var(--bg-soft); }
@media (max-width: 540px) {
    .section { padding: 40px 0; }
    .section-title { font-size: 1.4rem; }
}

/* ============== CARDS DE NOTÍCIAS ============== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card-news {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column;
}
.card-news:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.card-news-img {
    width: 100%; aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    background: var(--bg-soft);
}
.card-news-img-fallback {
    width: 100%; aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.card-news-img-fallback img {
    max-width: 70%; max-height: 70%;
    width: auto; height: auto;
    object-fit: contain;
    opacity: 0.95;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
}
.card-news-img-fallback i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 3rem;
}
.card-news-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-news-title {
    font-size: 1rem; font-weight: 600; color: var(--text);
    line-height: 1.35; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-news-meta {
    margin-top: auto;
    display: flex; gap: 12px; flex-wrap: wrap;
    font-size: 0.78rem; color: var(--text-muted);
}
.card-news-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ============== GRID DE EVENTOS / EDIÇÕES ============== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex; flex-direction: column; align-items: center;
}
.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.event-card img {
    width: 110px; height: 110px;
    object-fit: contain;
    background: var(--bg-soft); padding: 10px;
    border-radius: 50%;
    border: 2px solid var(--border);
    margin-bottom: 14px;
}
.event-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 4px; }
.event-card p { font-size: 0.85rem; color: var(--text-muted); }
.event-card-stats {
    display: flex; gap: 14px; margin-top: 12px; font-size: 0.8rem;
}
.event-card-stats span { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }

/* ============== GALERIA — GRID DE FOTOS ============== */
.fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.foto-thumb {
    aspect-ratio: 1 / 1;
    background: var(--bg-soft);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.foto-thumb:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}
.foto-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}
@media (max-width: 540px) {
    .fotos-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ============== SELECT (categorias) ============== */
.form-control {
    width: 100%; padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font-size: 0.95rem;
    color: var(--text);
    font-family: inherit;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}
.select-pill {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    padding: 14px 20px !important;
    border-radius: var(--radius);
    cursor: pointer;
}

/* ============== BOTÕES ============== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border: none; border-radius: var(--radius);
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--primary-dark); font-weight: 700; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-secondary {
    background: #fff; color: var(--primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-soft); border-color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }

/* ============== ARTIGO / NOTÍCIA DETALHE ============== */
.article-wrap { max-width: 880px; margin: 0 auto; }
.article-hero {
    width: 100%;
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    overflow: hidden;
    line-height: 0;       /* remove gap embaixo do <img> inline */
}
.article-hero img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.article-title {
    font-size: 1.9rem; line-height: 1.25;
    color: var(--primary); margin-bottom: 12px; font-weight: 700;
}
.article-meta {
    display: flex; gap: 16px; flex-wrap: wrap;
    color: var(--text-muted); font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px; margin-bottom: 24px;
}
.article-meta span { display: inline-flex; align-items: center; gap: 4px; }
.article-body {
    font-size: 1rem; line-height: 1.7; color: #334155;
}
.article-body p { margin-bottom: 16px; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: var(--primary-light); }
.article-body a:hover { text-decoration: underline; }
.article-body img {
    max-width: 100%; height: auto;
    margin: 20px auto; border-radius: 8px;
    box-shadow: var(--shadow-sm);
}
.article-body h2 { font-size: 1.4rem; color: var(--primary); margin: 28px 0 12px; }
.article-body h3 { font-size: 1.2rem; color: var(--primary); margin: 24px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 16px; margin: 16px 0;
    color: var(--text-muted); font-style: italic;
}
@media (max-width: 540px) { .article-title { font-size: 1.4rem; } }

/* ============== LIGHTBOX (galeria) ============== */
#lightbox {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9999; align-items: center; justify-content: center;
}
#lightbox.show { display: flex; }
#lightbox img {
    max-width: 92vw; max-height: 88vh;
    object-fit: contain;
    border-radius: 4px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.lb-btn {
    position: absolute; background: rgba(255, 255, 255, 0.15);
    border: none; color: #fff; cursor: pointer;
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; transition: background 0.15s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.3); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-counter {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6); color: #fff;
    padding: 6px 16px; border-radius: 20px; font-size: 0.85rem;
}

/* ============== PAGINAÇÃO ============== */
.pagination {
    display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
    margin-top: 32px;
}
.pagination button {
    background: #fff; border: 1px solid var(--border);
    color: var(--text); padding: 8px 14px; border-radius: 6px;
    cursor: pointer; font-size: 0.88rem; font-weight: 500;
    transition: var(--transition);
}
.pagination button:hover:not(.disabled) { background: var(--bg-soft); border-color: var(--primary); }
.pagination button.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.pagination button.disabled { opacity: 0.4; cursor: not-allowed; }

/* ============== FOOTER ============== */
.site-footer {
    background: #fff;
    color: var(--text-muted);
    padding: 48px 0 28px;
    margin-top: 80px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}
.site-footer .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.site-footer .footer-logo {
    width: 110px;
    height: auto;
    display: block;
}
.site-footer .footer-social {
    display: flex;
    gap: 12px;
}
.site-footer .footer-social a {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f1f5f9;
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.25rem;
    text-decoration: none;
    transition: background 0.18s, color 0.18s, transform 0.12s;
}
.site-footer .footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.site-footer p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-muted);
}
.site-footer .footer-links {
    margin-top: 8px;
    font-size: 0.82rem;
}
.site-footer .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}
.site-footer .footer-links a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
@media (max-width: 540px) {
    .site-footer .footer-logo { width: 88px; }
    .site-footer .footer-social a { width: 38px; height: 38px; font-size: 1.1rem; }
}

/* ============== UTILITIES ============== */
.loading {
    text-align: center; padding: 40px; color: var(--text-muted);
}
.loading i { font-size: 1.6rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px; color: var(--text-muted); }
.error { text-align: center; padding: 40px; color: var(--red); }

/* Diretoria — cards de membros */
.diretor-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px; }
.diretor-card img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); background: #e2e8f0; }
.diretor-card strong { font-size: 1rem; color: var(--text); font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.diretor-card span { font-size: 0.88rem; color: var(--primary-light, #1d5f9e); line-height: 1.4; }

/* Estatuto — card destaque */
.estatuto-card { display: flex; align-items: center; gap: 20px; padding: 24px 32px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(13,59,102,0.08); text-decoration: none; color: inherit; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; max-width: 540px; width: 100%; }
.estatuto-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(13,59,102,0.16); border-color: var(--primary); }
.estatuto-icon { width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, #dc2626, #b91c1c); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.estatuto-icon i { font-size: 1.8rem; color: #fff; }
.estatuto-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.estatuto-text strong { font-size: 1.05rem; color: var(--primary); font-weight: 700; }
.estatuto-text span { font-size: 0.88rem; color: var(--text-muted); }
.estatuto-action { color: var(--primary); font-size: 1.3rem; flex-shrink: 0; }
@media (max-width: 480px) { .estatuto-card { padding: 18px 20px; gap: 14px; } .estatuto-icon { width: 46px; height: 46px; } .estatuto-icon i { font-size: 1.4rem; } }

/* Edição — abas (linha única + scroll horizontal) */
.edicao-tabs { display: flex; gap: 4px; flex-wrap: nowrap; border-bottom: 2px solid var(--border); margin-bottom: 32px; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.edicao-tabs::-webkit-scrollbar { height: 4px; }
.edicao-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.edicao-tabs button { background: transparent; border: none; padding: 12px 18px; font-size: 0.92rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color 0.15s ease, border-color 0.15s ease; white-space: nowrap; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.edicao-tabs button:hover { color: var(--primary); }
.edicao-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.edicao-tabs button i { font-size: 1.05rem; }
.edicao-panel { margin-bottom: 48px; min-height: 200px; }
/* Sobre — wrapper que alinha imagens + texto na mesma largura */
.edicao-sobre-wrap { max-width: 820px; margin: 0 auto; }
.edicao-sobre-wrap > img { width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow-sm); display: block; }
.edicao-sobre-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 32px; }
.edicao-sobre-imgs img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: block; aspect-ratio: 1 / 1; }
.edicao-panel .article-body p { margin-bottom: 18px; line-height: 1.75; color: #334155; font-size: 1rem; }

/* Edição — bloco de Apoios */
.edicao-apoios { margin-top: 24px; padding-top: 32px; border-top: 1px solid var(--border); text-align: center; }
.edicao-apoios h3 { font-size: 0.92rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 24px; }
.apoios-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 40px; }
.apoios-grid img { max-height: 64px; max-width: 140px; width: auto; height: auto; object-fit: contain; opacity: 0.85; transition: opacity 0.15s ease, transform 0.15s ease; filter: grayscale(0%); }
.apoios-grid a:hover img { opacity: 1; transform: scale(1.04); }
@media (max-width: 480px) { .apoios-grid { gap: 20px 24px; } .apoios-grid img { max-height: 48px; max-width: 110px; } }

/* Calendário/Tabelas — lista de PDFs por modalidade (edições antigas) */
.cal-mods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.cal-mod-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
}
.cal-mod-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: var(--primary); }
.cal-mod-card > i:first-child {
    font-size: 1.6rem;
    color: #d62828;
    flex-shrink: 0;
}
.cal-mod-card span {
    flex: 1;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.3;
}
.cal-mod-card .cal-mod-dl { color: var(--primary); font-size: 1.2rem; opacity: 0.6; }
.cal-mod-card:hover .cal-mod-dl { opacity: 1; }
.cal-mod-card-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
}
.cal-mod-card-disabled small { color: var(--text-muted); font-size: 0.75rem; font-style: italic; }
.cal-mod-card-disabled:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* Calendário/Tabelas — filtros */
.cal-filtros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; align-items: center; }
.cal-filtros select { padding: 8px 12px; font-size: 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-family: inherit; min-width: 180px; cursor: pointer; }
.cal-filtros select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Calendário/Tabelas — cards de confronto */
.cal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.cf-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.cf-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 0.78rem; color: var(--text-muted); }
.cf-head i { margin-right: 4px; }
.cf-prova { font-size: 0.85rem; font-weight: 600; color: var(--primary); line-height: 1.3; }
.cf-fase { display: inline-block; align-self: flex-start; font-size: 0.7rem; font-weight: 700; color: var(--primary); background: #e0eaf5; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.cf-confronto { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.cf-eq { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: center; }
.cf-eq-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; line-height: 1; }
.cf-eq-row { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.cf-eq-row strong { font-size: 1rem; color: var(--text); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-bandeira { width: 32px; height: 22px; object-fit: contain; flex-shrink: 0; border-radius: 3px; background: #f1f5f9; }
.cf-bandeira-empty { background: #e2e8f0; }
.cf-parciais { font-size: 0.78rem; color: #2563eb; font-weight: 600; line-height: 1.3; }
.cf-atletas { font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; word-break: break-word; padding: 0 4px; }
.cf-vencedor .cf-eq-row strong { color: var(--primary); }
.cf-vencedor .cf-bandeira { box-shadow: 0 0 0 2px var(--accent); }
.cf-placar { text-align: center; min-width: 80px; }
.cf-placar-num { font-size: 1.2rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.cf-placar-num .cf-x { color: var(--text-muted); font-weight: 400; margin: 0 4px; }
.cf-tag { display: inline-block; margin-top: 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 10px; }
.cf-tag-wo { background: #fee2e2; color: #b91c1c; }
.cf-tag-pen { background: #e0f2fe; color: #075985; text-transform: none; font-weight: 600; letter-spacing: 0; }

/* Indicadores W/O alinhados com o placar (1 letra por lado) */
.cf-wo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; font-size: 0.95rem; font-weight: 800; line-height: 1; }
.cf-wo { text-align: center; }
.cf-wo-w { color: var(--green); }
.cf-wo-o { color: var(--red); }

@media (max-width: 480px) {
    .cal-cards { grid-template-columns: 1fr; }
    .cf-eq-info small { max-width: 90px; }
}

/* Ranking — cards e tabela */
.rk-select { padding: 8px 12px; font-size: 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-family: inherit; min-width: 240px; cursor: pointer; }
.rk-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.rk-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.rk-card h3 { font-size: 1rem; color: var(--primary); margin-bottom: 12px; font-weight: 700; }
.rk-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rk-table thead th { text-align: left; padding: 8px 6px; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; border-bottom: 1px solid var(--border); font-weight: 600; }
.rk-table tbody td { padding: 8px 6px; border-bottom: 1px solid #f1f5f9; }
.rk-table tbody td.rk-pos { font-weight: 700; color: var(--primary); }
.rk-table tbody td.rk-pts { text-align: right; font-weight: 700; }
.rk-table tbody td small { color: var(--text-muted); }
.rk-bandeira { width: 22px; height: 14px; object-fit: contain; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.rk-detail-btn { background: #3b82f6; color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.rk-detail-btn:hover { background: #2563eb; }
.rk-detail-cell { padding: 8px 20px 12px 56px !important; background: var(--bg-soft); font-size: 0.82rem; color: var(--text-muted); }
@media (max-width: 540px) { .rk-select { min-width: 100%; margin-left: 0 !important; } }

/* ============== PRÉ-INSCRIÇÃO ============== */
.page-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 40px 0 50px;
    text-align: center;
    margin-bottom: 0;
}
.page-hero h1 { font-size: 2rem; margin: 0 0 8px; font-weight: 800; }
.page-hero p { opacity: 0.92; max-width: 640px; margin: 0 auto; font-size: 1rem; }

.btn-lg { padding: 14px 28px; font-size: 1rem; }

.pre-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.pre-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
}
.pre-step-num {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.92rem;
    transition: var(--transition);
}
.pre-step-active { color: var(--primary); font-weight: 700; }
.pre-step-active .pre-step-num { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(13, 59, 102, 0.15); }
.pre-step-done .pre-step-num { background: #16a34a; color: #fff; }
.pre-step-done .pre-step-num::after { content: '✓'; }
.pre-step-done .pre-step-num > span { display: none; }
.pre-step-divider {
    width: 40px; height: 2px; background: #e2e8f0; border-radius: 2px;
}

.card-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.pre-fieldset { border: 0; padding: 0; margin: 0 0 8px 0; }
.pre-legend {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
.form-col-full { grid-column: 1 / -1; }
.form-col label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.req { color: #dc2626; }
.form-col input,
.form-col select {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s;
    font-family: inherit;
}
.form-col input:focus,
.form-col select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}
.form-col input:disabled,
.form-col select:disabled {
    background: #f1f5f9;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Botões desabilitados — visual claramente inativo */
.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    filter: grayscale(20%);
}

/* ============== SKELETON LOADING (pré-inscrição) ============== */
@keyframes skeleton-pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.55; }
    100% { opacity: 1; }
}
.pre-loading {
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-line, .skeleton-circle, .skeleton-bar, .skeleton-field {
    background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-size: 200% 100%;
    border-radius: 6px;
}
.skeleton-line { height: 16px; margin-bottom: 12px; }
.skeleton-line-title    { height: 28px; width: 200px; margin: 0 auto 24px; }
.skeleton-line-section  { height: 20px; width: 220px; margin-bottom: 22px; }
.skeleton-line-button   { height: 44px; width: 200px; margin-left: auto; border-radius: 8px; }

.skeleton-stepper {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; margin-bottom: 24px;
}
.skeleton-circle { width: 32px; height: 32px; border-radius: 50%; }
.skeleton-bar    { width: 40px; height: 4px; }

.skeleton-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.skeleton-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
.skeleton-field { height: 70px; }            /* label + input */
.skeleton-field-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .skeleton-row { grid-template-columns: 1fr; gap: 12px; }
}
.form-actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
}
.form-actions-row {
    justify-content: space-between;
}

.pre-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text);
}
.pre-alert i { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .pre-step-divider { width: 24px; }
    .page-hero h1 { font-size: 1.5rem; }
    .card-form { padding: 20px; }
}
