.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--brand);
    z-index: 2000;
}

/* tokens, reset e base do body vêm de base.css.
   Aqui só os tokens extras usados nesta página. */
:root {
    --brandh:   #269b03;
    --brandh-d: #80e82a;

    /* Faixa/cabeçalho do evento — gradiente escuro.
       Era laranja->preto; agora um cinza-azulado (slate) -> preto.
       Pra testar outra cor, troque só o #454e5e:
         #363d49 (mais escuro) | #515b6c (mais claro) | #4a5568 (azul mais visível)
         var(--brand-d) volta ao laranja original */
    --event-header-bg: linear-gradient(0deg, var(--dark) 0%, #454e5e 100%);
}

/* Header com logo */
.logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    height: 50px;
    width: auto;
}

.login-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.inscricoes-link {
    text-align: right;
    color: var(--brand);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

.inscricoes-link:hover {
    text-decoration: underline;
    color: var(--brand-d);
}

/* Header do evento */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: var(--event-header-bg);
    color: white;
    gap: 30px;
}

.event-info {
    flex: 1;
    max-width: 60%;
}

.event-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: 15px;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.event-datetime .icon {
    font-size: 14px;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.event-location .icon {
    font-size: 14px;
}

.event-banner {
    flex: 1;
    max-width: 40%;
    display: flex;
    justify-content: center;
}

.banner-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    object-fit: cover;
    border-top: 3px solid var(--brand);
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Conteúdo principal (esquerda) */
.main-content {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
    width: 0;
    overflow-wrap: break-word;
}

.info-section, .regulamento-section {
    background-color: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
}

.info-title, .regulamento-title {
    font-family: 'Barlow Condensed', sans-serif;
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--brand);
    padding-bottom: 10px;
}

.event-description, .regulamento-content {
    color: var(--mid);
    line-height: 1.7;
    font-size: 14px;
}

.event-description p, .regulamento-content p {
    margin-bottom: 14px;
}

.info, .termo {
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    color: var(--mid);
}

.info *, .termo * {
    max-width: 100% !important;
    box-sizing: border-box;
    word-wrap: break-word;
}

.info img, .termo img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px 0;
}

.info table, .termo table {
    max-width: 100% !important;
    table-layout: fixed;
    word-wrap: break-word;
}

.info table td, .termo table td,
.info table th, .termo table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* O reset global (base.css: * { margin:0; padding:0; }) zera o recuo
   padrão de listas, o que faz a "bolinha"/número ser desenhado fora da
   caixa de conteúdo — devolve um recuo pra ela ficar dentro. */
.info ul, .termo ul, .info ol, .termo ol {
    padding-left: 24px;
    margin: 8px 0;
}

.info li, .termo li {
    margin-bottom: 4px;
}

/* Formulário de inscrição (direita) */
.inscription-form-container {
    flex: 0 0 350px;
    min-width: 350px;
    max-width: 350px;
}

.registration-form {
    background-color: white;
    border-radius: 14px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 20px;
    overflow: hidden;
    width: 100%;
}

.form-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 14px 25px;
    background: var(--brand);
    margin: 0;
}

button.form-title {
    display: block;
    width: 100%;
    border: 0;
    cursor: pointer;
}

button.form-title:hover {
    background: var(--brand-dark, var(--brand));
}

/* Lotes */
.lotes-container {
    padding: 20px;
}

.lote-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    transition: all 0.3s ease;
}

.lote-item:last-child {
    border-bottom: none;
}

.lote-item:hover {
    background-color: #faf6f4;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.lote-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.lote-title-categoria {
    font-family: 'Barlow', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.lote-title-separador {
    color: var(--muted);
    font-weight: 500;
}

.lote-title-numero {
    font-weight: 600;
    color: var(--muted);
}

/* Status dos lotes */
.lote-status {
    font-weight: 700;
    text-align: left;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    display: inline-block;
}

.status-nao-iniciado {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-size: 0.9rem;
}

.status-esgotado, .status-encerrado {
    background-color: #f8d7da;
    color: var(--err);
    border: 1px solid #f5c6cb;
}

/* Preços */
.lote-pricing {
    margin-bottom: 10px;
}

.price-breakdown {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}

.price-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-d);
}

.price-tax {
    font-size: 0.8rem;
    color: var(--muted);
}

.price-total-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.price-total {
    font-size: 0.95rem;
    color: var(--ok);
    font-weight: 700;
}

.lote-deadline {
    font-size: 0.8rem;
    color: var(--err);
    font-weight: 700;
}

/* Botão de inscrição */
.inscricao-btn {
    padding: 8px 16px;
    background-color: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    white-space: nowrap;
}

.inscricao-btn:hover {
    background-color: var(--brand-d);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.inscricao-btn:active {
    transform: translateY(0);
}

/* Footer (.footer / .bible-verse / .footer-logo / .footer-text) vem de base.css */

.imagens-container {
    margin-top: 15px;
}

.imagem-item {
    margin-bottom: 25px;
}

.imagem-titulo {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--dark);
}

.evento-imagem {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.evento-imagem:hover {
    transform: scale(1.02);
}

/* Responsividade */
@media (min-width: 769px) {
    .container {
        flex-direction: row;
    }

    .inscription-form-container {
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .logo-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        box-sizing: border-box;
    }

    .event-header {
        max-width: 1200px;
        margin: 0 auto;
        padding: 30px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--event-header-bg);
        color: white;
        gap: 30px;
        box-sizing: border-box;
    }

    .event-info {
        flex: 2;
        max-width: 60%;
    }

    .event-banner {
        flex: 1;
        max-width: 40%;
        display: flex;
        justify-content: flex-end;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .container {
        max-width: 100%;
        padding: 30px 15px;
    }

    .inscription-form-container {
        flex: 0 0 300px;
        min-width: 300px;
        max-width: 300px;
    }

    .main-content {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    body {
        background-color: #fff;
    }

    .logo-container {
        padding: 10px 15px;
        order: 1;
    }

    .logo {
        height: 40px;
    }

    .event-header {
        flex-direction: column;
        text-align: center;
        padding: 10px 15px 20px 15px;
        order: 3;
    }

    .event-info {
        max-width: 100%;
        order: 2;
    }

    .event-banner {
        max-width: 100%;
        order: 1;
        margin-bottom: 10px;
        padding: 0 10px;
    }

    .event-title {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .event-datetime, .event-location {
        justify-content: center;
        font-size: 14px;
    }

    .container {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    .inscription-form-container {
        order: 1;
        flex: none;
        width: 100%;
        min-width: auto;
        max-width: none;
    }

    .main-content {
        order: 2;
        flex: none;
        width: 100%;
        min-width: auto;
    }

    .registration-form {
        position: static;
        margin-top: 0;
    }

    .inscricao-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        width: auto;
    }

    .price-total-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .info-section, .regulamento-section {
        padding: 20px;
    }

    .info-title, .regulamento-title {
        font-size: 1.3rem;
    }

    .form-title {
        font-size: 1.1rem;
        padding: 12px 20px;
    }

    .lotes-container {
        padding: 15px;
    }

    .lote-title {
        font-size: 0.9rem;
    }

    .price-value {
        font-size: 0.95rem;
    }

    .banner-image {
        max-height: 200px;
        width: 100%;
    }

    .lote-item:hover {
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .imagem-item {
        margin-bottom: 20px;
    }

    .imagem-titulo {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .event-title {
        font-size: 1.3rem;
    }

    .container {
        padding: 15px 10px;
    }

    .info-section, .regulamento-section {
        padding: 15px;
    }

    .lotes-container {
        padding: 12px;
    }

    .lote-item {
        padding: 10px 0;
    }

    .inscricao-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .banner-image {
        max-height: 200px;
        width: 100%;
    }

    .lote-item:hover {
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lote-item {
    animation: fadeIn 0.5s ease-out;
}

.lote-item:nth-child(1) { animation-delay: 0.1s; }
.lote-item:nth-child(2) { animation-delay: 0.2s; }
.lote-item:nth-child(3) { animation-delay: 0.3s; }
.lote-item:nth-child(4) { animation-delay: 0.4s; }

/* Estados especiais */
.lote-item.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.inscricao-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.inscricao-btn:disabled:hover {
    background-color: #6c757d;
    transform: none;
    box-shadow: none;
}

.status-nao-iniciado::before {
    content: '⏳ ';
}

.status-esgotado::before {
    content: '❌ ';
}

.status-encerrado::before {
    content: '🔒 ';
}

/* Lote atual — em destaque */
.lote-atual {
    border: 2px solid var(--brand);
    border-radius: 10px;
    padding: 14px !important;
    background: #faf6f4;
}

.lote-atual:hover {
    margin: 0 !important;
    padding: 14px !important;
}

/* Bloco de cada categoria (7km, 14km, 21km...) */
.categoria-bloco {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.categoria-bloco:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.categoria-titulo {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--dark);
    margin-bottom: 10px;
}

/* Lista compacta de lotes já encerrados/esgotados */
.lotes-encerrados {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.lotes-encerrados-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    margin-bottom: 8px;
}

.lote-fechado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.lote-fechado .lote-fechado-nome {
    flex: 1;
    opacity: .8;
}

.lote-fechado .lote-status {
    margin-bottom: 0;
    font-size: 0.7rem;
    padding: 3px 8px;
    white-space: nowrap;
}

/* ===== Contador regressivo — abertura do próximo lote ===== */
.countdown-banner {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--brandh) 0%, var(--brandh-d) 100%);
    border-top: 3px solid var(--dark);
    border-radius: 12px;
    padding: 12px 18px;
    box-shadow: 0 8px 24px rgba(232, 82, 42, .35);
    color: white;
    font-family: 'Barlow', sans-serif;
    text-align: center;
    animation: countdownFadeIn .5s ease-out, countdownPulse 2.5s ease-in-out infinite;
}

.countdown-banner.hidden {
    display: none;
}

.countdown-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.9);
    margin-bottom: 6px;
    white-space: nowrap;
}

.countdown-units {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 34px;
}

.countdown-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-unit-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .75;
    margin-top: 2px;
}

.countdown-sep {
    font-size: 18px;
    font-weight: 700;
    opacity: .4;
    margin-bottom: 12px;
}

.countdown-banner.countdown-done {
    background: var(--ok);
    border-top-color: #1b5e20;
    animation: countdownFadeIn .5s ease-out;
}

.countdown-banner.countdown-done .countdown-label {
    color: white;
    font-size: 14px;
    margin-bottom: 0;
}

@keyframes countdownFadeIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes countdownPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,.30); }
    50% { box-shadow: 0 8px 30px rgba(191, 61, 23, .55); }
}

@media (max-width: 768px) {
    .countdown-banner {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 12px 12px 0 0;
        border-top: 3px solid var(--brand);
        padding: 10px 14px;
    }

    .countdown-value {
        font-size: 27px;
    }

    .countdown-unit {
        min-width: 30px;
    }

    .countdown-sep {
        margin-bottom: 10px;
    }

    body.countdown-active {
        padding-bottom: 92px;
    }
}
