/* ============================================================
   FLOW — EVENTOS ESPORTIVOS · HOME
   "Race Day Editorial" — claro + escuro (data-theme)
   Preto #0E0F12 · Amarelo #FFD200 · Barlow Condensed / DM Sans
   ============================================================ */

/* ── Tokens ── */
:root {
    --yellow:      #FFD200;
    --yellow-600:  #F5C400;
    --yellow-700:  #E0AE00;
    --yellow-soft: #FFF6CC;
    --black:       #0E0F12;
    --black-2:     #16181D;

    --bg:          #FFFFFF;
    --bg-soft:     #F4F5F7;
    --bg-soft-2:   #ECEDF0;
    --surface:     #FFFFFF;

    --ink:         #16181D;
    --ink-2:       #545B66;
    --ink-3:       #8A909C;

    --line:        #E6E8EC;
    --line-2:      #D5D8DE;

    --shadow-sm: 0 1px 2px rgba(16,18,22,.05), 0 2px 6px rgba(16,18,22,.04);
    --shadow:    0 8px 28px rgba(16,18,22,.09);
    --shadow-lg: 0 22px 60px rgba(16,18,22,.16);
    --shadow-yellow: 0 10px 28px rgba(255,210,0,.32);
    --transition: all .25s cubic-bezier(.3,.7,.3,1);

    --r:    10px;
    --r-lg: 16px;
    --r-pill: 999px;

    --nav-bg: rgba(255,255,255,.88);
    --nav-line: var(--line);
    --toggler-invert: 0;

    /* aliases legados */
    --primary: var(--yellow);
    --primary-dark: var(--yellow-700);
    --fire: var(--yellow);
    --accent: var(--yellow);
    --dark: var(--ink);
    --light: var(--bg);
    --white: #FFFFFF;
    --gray: var(--ink-2);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
}

[data-theme="dark"] {
    --bg:          #0B0C10;
    --bg-soft:     #111318;
    --bg-soft-2:   #171A21;
    --surface:     #14161C;

    --ink:         #F2F3F6;
    --ink-2:       #A9B0BC;
    --ink-3:       #6E7480;

    --line:        #23262E;
    --line-2:      #2F333D;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
    --shadow:    0 10px 30px rgba(0,0,0,.45);
    --shadow-lg: 0 24px 64px rgba(0,0,0,.6);

    --nav-bg: rgba(11,12,16,.88);
    --nav-line: #23262E;
    --toggler-invert: 1;
}

/* ── Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s ease, color .3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    line-height: 1.02;
    text-transform: uppercase;
    letter-spacing: .005em;
    color: var(--ink);
}

a { color: var(--ink); }
img { max-width: 100%; }

::selection { background: var(--yellow); color: var(--black); }

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ────────────────────────────────────────────────
   NAVBAR
──────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: .8rem 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease, padding .25s ease;
}
.navbar.scrolled {
    border-bottom-color: var(--nav-line);
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    padding: .55rem 0;
}
[data-theme="dark"] .navbar.scrolled { box-shadow: 0 8px 30px rgba(0,0,0,.5); }

.navbar .navbar-brand { padding: 0; }
.navbar .navbar-brand img { max-height: 42px; width: auto; object-fit: contain; display: block; }
/* logo tem texto preto — em fundo escuro, clareia */
[data-theme="dark"] .navbar .navbar-brand img { filter: brightness(0) invert(1) drop-shadow(0 0 0 transparent); }

.navbar .nav-link {
    color: var(--ink) !important;
    font-weight: 600;
    font-size: .95rem;
    padding: .4rem .95rem !important;
    position: relative;
    cursor: pointer;
    transition: opacity .2s ease;
}
.navbar .nav-link::after {
    content: '';
    position: absolute;
    left: .95rem; right: .95rem; bottom: .1rem;
    height: 2.5px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { transform: scaleX(1); }

.navbar .dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: .4rem;
}
.navbar .dropdown-item {
    color: var(--ink-2);
    border-radius: 8px;
    padding: .5rem .8rem;
    font-size: .9rem;
}
.navbar .dropdown-item:hover { background: var(--bg-soft); color: var(--ink); }

#badge-carrinho { background: var(--yellow) !important; color: var(--black) !important; font-weight: 700; }

.navbar .btn-outline-primary {
    color: var(--ink) !important;
    border: 1.5px solid var(--ink) !important;
    background: transparent !important;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--r-pill);
    padding: .45rem 1.35rem;
    transition: var(--transition);
    cursor: pointer;
}
.navbar .btn-outline-primary:hover {
    background: var(--yellow) !important;
    border-color: var(--yellow) !important;
    color: var(--black) !important;
    box-shadow: var(--shadow-yellow);
}

.navbar-toggler { border: 1.5px solid var(--line-2) !important; border-radius: 10px !important; }
.navbar-toggler:focus { box-shadow: none !important; }
.navbar-toggler-icon { filter: invert(var(--toggler-invert)); }

/* Mobile collapse — vence o <style> do navbar.php nos dois temas */
@media (max-width: 991px) {
    .navbar .navbar-collapse {
        background: var(--surface) !important;
        border: 1px solid var(--line) !important;
        border-radius: 14px !important;
        padding: .75rem .6rem !important;
        margin-top: .75rem !important;
        box-shadow: var(--shadow) !important;
    }
    .navbar .navbar-nav .nav-link { padding: .65rem .9rem !important; border-radius: 9px; color: var(--ink) !important; }
    .navbar .navbar-nav .nav-link::after { display: none; }
    .navbar .navbar-nav .nav-link:hover,
    .navbar .navbar-nav .nav-link.active { background: var(--bg-soft) !important; color: var(--ink) !important; }
    [data-theme="dark"] .navbar .navbar-nav .nav-link:hover,
    [data-theme="dark"] .navbar .navbar-nav .nav-link.active { background: var(--bg-soft-2) !important; }
    .navbar .navbar-nav .dropdown-menu { background: var(--bg-soft); border: 1px solid var(--line); box-shadow: none; }
    .navbar .navbar-nav .dropdown-item { color: var(--ink-2); }
    .navbar .navbar-nav .dropdown-item:hover { background: var(--bg-soft-2); color: var(--ink); }
    .navbar .navbar-nav .ms-3 { margin-left: 0 !important; margin-top: .4rem; }
}

/* ────────────────────────────────────────────────
   HERO — foto de corrida + destaque
──────────────────────────────────────────────── */
.hero-race {
    position: relative;
    background: #0B0C10;
    padding: 8.5rem 0 4.5rem;
    overflow: hidden;
    isolation: isolate;
}
.hero-race::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('../../uploads/fotos/foto1.jpg');
    background-size: cover;
    background-position: center 30%;
    filter: grayscale(45%) contrast(1.05) brightness(.85);
}
.hero-race::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(100deg, rgba(8,9,12,.96) 0%, rgba(8,9,12,.88) 38%, rgba(8,9,12,.55) 68%, rgba(8,9,12,.75) 100%),
        linear-gradient(to top, rgba(8,9,12,.95) 0%, transparent 40%);
}

.hero-race-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 3rem;
    align-items: center;
}
.hero-race-grid.no-featured { grid-template-columns: 1fr; max-width: 820px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--yellow);
    margin-bottom: 1.1rem;
}
.hero-eyebrow::before {
    content: '';
    width: 34px; height: 3px;
    background: var(--yellow);
    border-radius: 2px;
}

.hero-race h1 {
    font-size: clamp(2.9rem, 5.6vw, 4.9rem);
    font-weight: 900;
    color: #fff;
    line-height: .94;
    margin-bottom: 1.1rem;
    max-width: 13ch;
}
.hero-race h1 em {
    font-style: normal;
    color: var(--yellow);
}
.hero-race-sub {
    color: rgba(255,255,255,.78);
    font-size: 1.08rem;
    line-height: 1.65;
    max-width: 46ch;
    margin-bottom: 1.8rem;
}

.hero-race-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.2rem; }

.btn-hero-solid, .btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .92rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    padding: .85rem 1.9rem;
    border-radius: var(--r-pill);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-hero-solid { background: var(--yellow); color: var(--black); border: 1.5px solid var(--yellow); }
.btn-hero-solid:hover { background: #fff; border-color: #fff; color: var(--black); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.btn-hero-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.btn-hero-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-hero-solid i, .btn-hero-ghost i { font-size: .8em; transition: transform .25s ease; }
.btn-hero-solid:hover i, .btn-hero-ghost:hover i { transform: translateX(3px); }

/* Countdown "próxima largada" */
.hero-countdown {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(14,15,18,.55);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    overflow: hidden;
}
.hero-countdown-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .1rem;
    padding: .8rem 1.1rem;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.05;
}
.hero-countdown-label .lbl { font-size: .62rem; letter-spacing: 1.8px; opacity: .75; }
.hero-countdown-label .race { font-size: .95rem; letter-spacing: .4px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-countdown-units { display: flex; }
.hero-cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .55rem .95rem;
    min-width: 62px;
}
.hero-cd-unit + .hero-cd-unit { border-left: 1px solid rgba(255,255,255,.12); }
.hero-cd-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.hero-cd-lab { font-size: .58rem; text-transform: uppercase; letter-spacing: 1.6px; color: rgba(255,255,255,.55); font-weight: 700; margin-top: .15rem; }


/* Destaque (carrossel admin) */
.hero-featured { position: relative; }
.hero-featured-tag {
    position: absolute;
    top: -13px; left: 22px;
    z-index: 5;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: .32rem .95rem;
    border-radius: var(--r-pill);
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.featured-banner {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.14);
    background: #14161C;
}
.featured-banner .carousel-item img {
    width: 100%;
    aspect-ratio: 954 / 500;
    object-fit: cover;
    display: block;
}
.featured-caption {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 1.5rem 1.7rem;
    background: linear-gradient(to top, rgba(8,9,12,.82) 0%, rgba(8,9,12,.12) 50%, transparent 78%);
    pointer-events: none;
}
.featured-caption h2 {
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 .9rem;
    text-shadow: 0 2px 14px rgba(0,0,0,.5);
    max-width: 520px;
}
.featured-caption .btn-inscreva { pointer-events: auto; }
.btn-inscreva {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.5rem;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    border-radius: var(--r-pill);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-inscreva:hover { background: #fff; color: var(--black); transform: translateY(-2px); text-decoration: none; }

.featured-banner .carousel-indicators { z-index: 3; margin-bottom: .6rem; }
.featured-banner .carousel-indicators [data-bs-target] {
    background-color: rgba(255,255,255,.45);
    width: 22px; height: 4px; min-height: 4px;
    border-radius: 2px;
    border: none;
    transition: background-color .25s ease, width .25s ease;
}
.featured-banner .carousel-indicators .active { background-color: var(--yellow); width: 34px; }
.featured-banner .carousel-control-prev,
.featured-banner .carousel-control-next { width: 12%; z-index: 3; opacity: 0; transition: opacity .25s ease; }
.featured-banner:hover .carousel-control-prev,
.featured-banner:hover .carousel-control-next { opacity: .9; }
.featured-banner .carousel-control-prev-icon,
.featured-banner .carousel-control-next-icon {
    width: 2.2rem; height: 2.2rem;
    background-color: rgba(0,0,0,.45);
    border-radius: 50%;
    background-size: 42%;
}

/* Faixa racing diagonal */
.race-stripe {
    height: 14px;
    background: repeating-linear-gradient(
        -55deg,
        var(--yellow) 0 22px,
        var(--black) 22px 44px
    );
}

/* ────────────────────────────────────────────────
   SEÇÕES DE EVENTOS
──────────────────────────────────────────────── */
.eventos-section { padding: 4rem 0 2rem; background: var(--bg); }
.passados-section {
    padding: 3.5rem 0 4.5rem;
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
    margin-top: 3rem;
}

.eventos-head, .passados-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 2.2rem;
}
.head-left { max-width: 640px; }
.head-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--yellow-700);
    margin-bottom: .45rem;
}
[data-theme="dark"] .head-kicker { color: var(--yellow); }
.head-kicker::before { content: ''; width: 26px; height: 3px; background: var(--yellow); border-radius: 2px; }

.eventos-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 900;
    margin: 0;
}
.passados-head h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 900; margin: 0; }
.head-sub { color: var(--ink-2); font-size: .98rem; margin: .4rem 0 0; }

.btn-ver-cal {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.5rem;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--r-pill);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-ver-cal:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); box-shadow: var(--shadow-yellow); text-decoration: none; }

/* Busca */
.evento-search { position: relative; min-width: 260px; }
.evento-search input {
    width: 100%;
    padding: .68rem 1rem .68rem 2.7rem;
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--ink);
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s, background-color .3s;
}
.evento-search input::placeholder { color: var(--ink-3); }
.evento-search input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,210,0,.28); }
.evento-search i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }

/* Grade */
.evento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Card de evento (race bib) ── */
.evento-card-link { text-decoration: none; display: block; height: 100%; cursor: pointer; }
.evento-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .3s ease;
}
.evento-card-link:hover .evento-card,
.evento-card-link:focus-visible .evento-card {
    transform: translateY(-5px);
    border-color: var(--yellow);
    box-shadow: var(--shadow-lg);
}

.evento-card-media {
    position: relative;
    aspect-ratio: 954 / 500;
    overflow: visible; /* deixa o bib de data "sair" da foto */
}
.evento-card-media .media-frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--bg-soft-2);
}
.evento-card-media img {
    width: 100%; height: 100%;
    object-fit: contain;
    transition: transform .45s ease, filter .45s ease;
}
.evento-card-link:hover .evento-card-media img { transform: scale(1.045); }

/* Data estilo número de peito */
.evento-bib {
    position: absolute;
    left: .9rem;
    bottom: -1px;
    transform: translateY(50%);
    z-index: 3;
    background: var(--yellow);
    color: var(--black);
    border-radius: 12px;
    padding: .45rem .8rem .4rem;
    text-align: center;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
    border: 2px solid var(--surface);
    min-width: 62px;
    transition: border-color .3s ease;
}
.evento-bib .d {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: .01em;
}
.evento-bib .m {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-top: .1rem;
    opacity: .8;
}
.evento-bib.bib-tbd { background: var(--bg-soft-2); color: var(--ink-2); }
.evento-bib.bib-tbd .d { font-size: .82rem; padding: .32rem .1rem; white-space: nowrap; letter-spacing: 1px; text-transform: uppercase; }

.evento-badge {
    position: absolute;
    top: .75rem; right: .75rem;
    z-index: 2;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: .3rem .75rem;
    border-radius: var(--r-pill);
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.badge-aberto    { background: #17B85A; color: #04240F; }
.badge-breve     { background: var(--yellow); color: var(--black); }
.badge-esgotado  { background: #E23C3C; color: #fff; }
.badge-encerrado { background: rgba(14,15,18,.82); color: #fff; }

.evento-card-body {
    padding: 1.7rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    flex: 1;
}
.evento-card-title {
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.08;
    color: var(--ink);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.6rem;
}
.evento-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.evento-meta li { display: flex; align-items: center; gap: .55rem; color: var(--ink-2); font-size: .87rem; }
.evento-meta li i { color: var(--yellow-700); width: 15px; text-align: center; flex-shrink: 0; }
[data-theme="dark"] .evento-meta li i { color: var(--yellow); }

.evento-card-btn {
    margin-top: .4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .68rem 1.15rem;
    background: var(--yellow);
    color: var(--black);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    border-radius: var(--r-pill);
    transition: var(--transition);
}
.evento-card-btn i { transition: transform .25s ease; }
.evento-card-link:hover .evento-card-btn { background: var(--black); color: var(--yellow); }
[data-theme="dark"] .evento-card-link:hover .evento-card-btn { background: #fff; color: var(--black); }
.evento-card-link:hover .evento-card-btn i { transform: translateX(5px); }

/* Passados */
.passados-grid .evento-card { filter: grayscale(65%); opacity: .78; }
.passados-grid .evento-card-link:hover .evento-card { filter: grayscale(0); opacity: 1; }
.passados-grid .evento-card-btn { background: var(--bg-soft-2); color: var(--ink-2); }
.passados-grid .evento-card-link:hover .evento-card-btn { background: var(--yellow); color: var(--black); }
.passados-grid .evento-card-link.is-hidden { display: none; }

.passados-more { text-align: center; margin-top: 2.2rem; }
.btn-carregar {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .72rem 2.1rem;
    background: transparent;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: var(--transition);
}
.btn-carregar:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); }

.eventos-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.2rem 1rem;
    color: var(--ink-3);
    border: 1.5px dashed var(--line-2);
    border-radius: var(--r-lg);
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .95rem;
}

/* ────────────────────────────────────────────────
   POR QUE ESCOLHER — banda escura com foto
──────────────────────────────────────────────── */
.why-section {
    position: relative;
    color: #fff;
    padding: 5rem 0;
    text-align: left;
    overflow: hidden;
    isolation: isolate;
    background: #0B0C10;
}
.why-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('../../uploads/fotos/foto2.jpg');
    background-size: cover;
    background-position: center 22%;
    filter: grayscale(70%) brightness(.5);
}
.why-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, rgba(8,9,12,.97) 0%, rgba(8,9,12,.9) 55%, rgba(8,9,12,.78) 100%);
}
.why-topline { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--yellow); z-index: 1; }

.why-head { max-width: 640px; margin-bottom: 3rem; }
.why-title { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; color: #fff; margin: 0 0 .7rem; }
.why-title em { font-style: normal; color: var(--yellow); }
.why-sub { color: rgba(255,255,255,.66); font-size: 1.02rem; margin: 0; }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card {
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--r-lg);
    padding: 1.8rem 1.4rem;
    transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
    cursor: default;
}
.why-card:hover { transform: translateY(-5px); border-color: var(--yellow); background: rgba(255,255,255,.07); }
.why-card .why-icon {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--yellow);
    color: var(--black);
    font-size: 1.25rem;
    margin-bottom: 1.1rem;
}
.why-card h4 {
    font-size: 1.14rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #fff;
    margin-bottom: .45rem;
}
.why-card p { color: rgba(255,255,255,.6); font-size: .89rem; line-height: 1.55; margin: 0; }

/* ────────────────────────────────────────────────
   TOGGLE DE TEMA
──────────────────────────────────────────────── */
.theme-toggle {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 1040;
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.theme-toggle:hover { border-color: var(--yellow); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.theme-toggle svg { width: 21px; height: 21px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ────────────────────────────────────────────────
   RESPONSIVO
──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .hero-race-grid { gap: 2.2rem; }
}
@media (max-width: 992px) {
    .hero-race { padding: 7.5rem 0 3.5rem; }
    .hero-race-grid { grid-template-columns: 1fr; gap: 2.6rem; }
    .hero-race h1 { max-width: none; }
    .evento-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .hero-race { padding: 6.6rem 0 3rem; }
    .hero-race-sub { font-size: 1rem; }
    .hero-race-actions .btn-hero-solid,
    .hero-race-actions .btn-hero-ghost { width: 100%; justify-content: center; }
    .hero-countdown { width: 100%; }
    .hero-countdown-label { flex: 1; }
    .hero-cd-unit { min-width: 0; flex: 1; padding: .55rem .5rem; }
    .evento-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .evento-card-title { font-size: 1rem; min-height: 2.2rem; }
    .evento-meta li { font-size: .76rem; }
    .evento-bib { min-width: 52px; padding: .35rem .6rem .3rem; }
    .evento-bib .d { font-size: 1.25rem; }
    .evento-card-body { padding: 1.5rem .85rem .85rem; }
    .evento-card-btn { font-size: .72rem; padding: .55rem .8rem; }
    .why-grid { grid-template-columns: 1fr; }
    .eventos-head, .passados-head { margin-bottom: 1.4rem; }
    .evento-search { min-width: 0; width: 100%; }
    .theme-toggle { width: 46px; height: 46px; right: .9rem; bottom: .9rem; }
    .featured-caption { padding: 1rem 1.1rem; }
    .featured-caption h2 { margin-bottom: .6rem; }
    .btn-inscreva { padding: .5rem 1.2rem; font-size: .78rem; }
}
