/* Site público da Lunardelli Capital da Fé Running. Cores tiradas da logo da equipe:
   azul-marinho (contorno), amarelo (LUNARDELLI / Running), azul-celeste (fundo) e magenta/rosa (corredoras). */
:root {
  --navy: #0b1f3a; --navy-2: #133a6b;
  --azul: #0096d6; --azul-ink: #0369a1; --azul-soft: #e3f3fc;
  --amarelo: #ffc800; --amarelo-claro: #ffe066;
  --rosa: #e8197a; --rosa-ink: #c0135f; --rosa-claro: #f78fbf;

  --bg: #f7f9fc; --surface: #fff; --alt: #ecf4fb; --ink: #0b1f3a; --muted: #4a5b72; --line: #dbe4ee;
  --link: var(--azul-ink);
  --radius: 14px;
  --wrap: 1080px;
  --faixa: linear-gradient(90deg, var(--azul) 0 25%, var(--rosa-claro) 25% 50%, var(--amarelo) 50% 75%, var(--rosa) 75% 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071426; --surface: #0e2240; --alt: #0a1a31; --ink: #eef4fb; --muted: #9fb3cc; --line: #1d3557;
    --azul-soft: #0c2f4d; --link: #4cc3f5;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2 { line-height: 1.15; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.01em; }
h2::after { content: ""; display: block; width: 72px; height: 5px; border-radius: 3px; background: var(--faixa); margin-top: 10px; }

.pular { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.pular:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }

/* Topo: azul-marinho com a logo */
.topo { position: sticky; top: 0; z-index: 20; background: var(--navy); box-shadow: 0 2px 12px rgb(0 0 0 / 0.25); }
.topo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--faixa); }
.topo-in { max-width: var(--wrap); margin: 0 auto; padding: 4px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.marca { display: block; flex: none; }
.marca img { height: 48px; width: auto; }
nav { display: flex; gap: 2px; align-items: center; }
nav a { text-decoration: none; color: #fff; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
nav a:hover { color: var(--navy); background: var(--amarelo); }
.menu-btn { display: none; background: transparent; border: 2px solid var(--amarelo); border-radius: 8px; padding: 6px 14px; font: inherit; font-weight: 700; color: var(--amarelo); cursor: pointer; }
@media (max-width: 760px) {
  .marca img { height: 44px; }
  .menu-btn { display: block; }
  nav { display: none; position: absolute; top: calc(100% + 3px); left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy); padding: 8px 16px 16px; box-shadow: 0 8px 16px rgb(0 0 0 / 0.3); }
  nav.aberto { display: flex; }
  nav a { padding: 12px; }
}

/* Abertura compacta: logo e texto lado a lado no computador; empilhados no celular */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 70% at 25% 50%, rgb(0 150 214 / 0.5), transparent 70%),
    radial-gradient(30% 50% at 92% 90%, rgb(232 25 122 / 0.3), transparent 70%),
    radial-gradient(25% 45% at 60% 0%, rgb(255 200 0 / 0.15), transparent 70%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--faixa); }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Abertura em faixa baixa: frase à esquerda e botões à direita (a logo fica na barra do topo). */
.hero-in { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 10px 16px 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 32px; }
.hero-texto { min-width: 0; }
.hero-pre { margin: 0; color: var(--amarelo); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; }
.hero-txt { font-size: 15px; line-height: 1.4; max-width: 62ch; color: #dbe7f5; margin: 2px 0 0; }
.hero-acoes { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.so-curto { display: none; }
.hero-acoes .btn { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
@media (max-width: 760px) {
  .hero-in { flex-direction: column; text-align: center; padding: 8px 16px 14px; gap: 6px; }
  .hero-pre { display: none; }
  .hero-txt { font-size: 14px; margin: 0; }
  .hero-acoes { justify-content: center; gap: 8px; }
  .hero-acoes .btn { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
}
@media (max-width: 420px) { .so-largo { display: none; } .so-curto { display: inline; } }

.btn { display: inline-block; background: var(--amarelo); color: var(--navy); text-decoration: none; font-weight: 800; padding: 12px 22px; border-radius: 999px; }
.btn:hover { background: var(--amarelo-claro); }
.btn.sec { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.5); font-weight: 700; }
.btn.sec:hover { box-shadow: inset 0 0 0 2px #fff; background: rgb(255 255 255 / 0.08); }

/* Seções */
.secao { padding: clamp(56px, 9vw, 96px) 0; }
.secao.alt { background: var(--alt); }
.secao-in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 16px 0 32px; }
.vazio { color: var(--muted); margin: 0; grid-column: 1 / -1; }

.valores { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.valores li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-top: 5px solid var(--azul); }
.valores li:nth-child(2) { border-top-color: var(--rosa); }
.valores li:nth-child(3) { border-top-color: var(--amarelo); }
.valores b { display: block; font-size: 18px; margin-bottom: 6px; }
.valores span { color: var(--muted); }

/* Instagram: faixa de postagens que desliza para o lado */
.secao.insta { background: var(--alt); padding-top: clamp(36px, 6vw, 56px); padding-bottom: clamp(36px, 6vw, 56px); }
.insta-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.insta-topo .lead { margin-bottom: 0; }
.btn-insta { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; color: #fff; padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(90deg, var(--rosa), #f05a3c 55%, var(--amarelo)); white-space: nowrap; }
.btn-insta svg { width: 20px; height: 20px; fill: currentColor; }
.btn-insta:hover { filter: brightness(1.08); }
.insta-quadro { position: relative; }
.insta-trilho { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 26%, 280px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 2px 2px 12px; scrollbar-width: thin; }
.insta-trilho:focus-visible { outline-offset: 4px; }
.post { position: relative; display: block; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--navy);
  aspect-ratio: 4 / 5; text-decoration: none; color: #fff; box-shadow: 0 6px 16px rgb(11 31 58 / 0.15); }
.post img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post:hover img { transform: scale(1.05); }
.post-tipo { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(11 31 58 / 0.7); font-size: 13px; padding-left: 2px; }
.post-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px; background: linear-gradient(transparent, rgb(7 20 38 / 0.92)); }
.post-info time { display: block; font-size: 12px; font-weight: 700; color: var(--amarelo); text-transform: uppercase; letter-spacing: 0.06em; }
.post-info p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insta-seta { position: absolute; top: calc(50% - 30px); width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; z-index: 2;
  background: var(--surface); color: var(--ink); font-size: 28px; line-height: 1; box-shadow: 0 4px 12px rgb(0 0 0 / 0.2); }
.insta-seta.ant { left: -18px; } .insta-seta.prox { right: -18px; }
.insta-seta:hover { background: var(--amarelo); color: var(--navy); }
@media (max-width: 760px) {
  .insta-trilho { grid-auto-columns: 72%; margin: 0 -16px; padding: 2px 16px 12px; scroll-padding: 0 16px; }
  .insta-seta { display: none; }
}

/* Nossos atletas */
.numeros { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 36px; }
.numero { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 20px 22px; position: relative; overflow: hidden; }
.numero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--faixa); }
.numero b { display: block; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; color: var(--amarelo); }
.numero span { color: #dbe7f5; font-weight: 600; }
.sub2 { font-size: 22px; margin: 0 0 6px; }
.nota { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.tabela-rolagem { overflow-x: auto; margin-bottom: 36px; }
.recordes { width: 100%; min-width: 420px; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.recordes th, .recordes td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.recordes tr:last-child th, .recordes tr:last-child td { border-bottom: 0; }
.recordes thead th { background: var(--alt); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.recordes tbody th { width: 90px; }
.recordes td b { font-size: 18px; color: var(--link); margin-right: 6px; }
.recordes td span { color: var(--muted); }
.cartoes-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 16px; }
.ordenar { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.ordenar select { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.atletas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
@media (max-width: 560px) { .atletas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.atleta { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; border-top: 4px solid var(--azul); display: grid; gap: 6px; align-content: start; min-width: 0; }
.atleta:nth-child(3n+2) { border-top-color: var(--rosa); } .atleta:nth-child(3n+3) { border-top-color: var(--amarelo); }
.atleta-topo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; background: var(--navy-2); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.atleta-id { min-width: 0; }
.atleta h3 { margin: 0; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desde { margin: 0; color: var(--muted); font-size: 12px; }
.atleta-num { margin: 0; font-size: 13px; color: var(--muted); }
.atleta-num b { font-size: 15px; color: var(--rosa-ink); }
.favorita { color: var(--link); font-weight: 700; }
@media (prefers-color-scheme: dark) { .atleta-num b { color: var(--rosa-claro); } }
.prs { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.prs li { display: flex; justify-content: space-between; gap: 6px; background: var(--alt); border-radius: 6px; padding: 2px 7px; font-size: 12px; }
.prs span { color: var(--muted); }
@media (max-width: 560px) {
  .numero { padding: 14px 14px 18px; }
  .numero span { font-size: 14px; }
  .recordes { min-width: 0; }
  .recordes th, .recordes td { padding: 10px; }
  .recordes tbody th { width: auto; }
  .recordes td b { display: block; margin: 0; font-size: 17px; }
}

/* Treinos */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.treino { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; border-left: 5px solid var(--azul); }
.treino:nth-child(3n+2) { border-left-color: var(--rosa); }
.treino:nth-child(3n+3) { border-left-color: var(--amarelo); }
.treino h3 { margin: 0 0 4px; font-size: 20px; }
.treino .hora { font-size: 30px; font-weight: 800; color: var(--link); line-height: 1.2; }
.treino p { margin: 8px 0 0; color: var(--muted); }
.treino .local { color: var(--ink); font-weight: 500; }

/* Provas */
.provas { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .provas { grid-template-columns: minmax(0, 1fr); } }
.provas.passadas .prova { opacity: 0.8; }
h3.sub-provas, h2.sub-provas { font-size: 20px; margin: 28px 0 12px; }
.lead + .sub-provas { margin-top: 0; }
h2.sub-provas::after { display: none; }
.todas-provas { margin: 24px 0 0; text-align: center; }
a.btn-sec { display: inline-block; text-decoration: none; }
.pagina-provas { padding-top: clamp(28px, 5vw, 48px); }
.voltar { margin: 0 0 8px; } .voltar a { font-weight: 700; text-decoration: none; }
.titulo-pagina { font-size: clamp(28px, 4vw, 38px); font-weight: 800; margin: 0; }
.titulo-pagina::after { content: ""; display: block; width: 72px; height: 5px; border-radius: 3px; background: var(--faixa); margin-top: 10px; }
.ano-provas { font-size: 16px; color: var(--muted); margin: 20px 0 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.prova { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.prova .data { text-align: center; background: var(--navy); color: #fff; border-radius: 10px; padding: 8px 4px; line-height: 1.1; }
.prova .data b { display: block; font-size: 26px; color: var(--amarelo); }
.prova .data span { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.prova h3 { margin: 0; font-size: 18px; }
.prova p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.prova a { font-weight: 700; font-size: 15px; }
.prova .equipe { color: var(--ink); font-size: 14px; }
.prova .equipe b { color: var(--rosa-ink); }
@media (prefers-color-scheme: dark) { .prova .equipe b { color: var(--rosa-claro); } }

/* Fotos */
.galeria { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.galeria button { padding: 0; border: 0; background: var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.galeria button:hover img { transform: scale(1.04); }
dialog#foto-grande { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1200px); max-height: 92vh; }
dialog#foto-grande::backdrop { background: rgb(7 20 38 / 0.9); }
dialog#foto-grande img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 8px; }
dialog#foto-grande .legenda { color: #fff; text-align: center; margin: 8px 0 0; }
dialog#foto-grande .fechar { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / 0.15); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }

.mais-fotos { margin-top: 16px; text-align: center; }
.btn-sec { font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 10px 20px; cursor: pointer; }
.btn-sec:hover { border-color: var(--azul); }
h3.sub { font-size: 22px; margin: 40px 0 16px; }
.albuns { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
/* Fotos e álbuns em rolagem lateral: 4 à vista (1 linha no computador, 2×2 no celular). */
.carrossel { position: relative; }
.rolagem { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 3 * 10px) / 4); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 10px; }
.rolagem > * { scroll-snap-align: start; }
@media (max-width: 560px) {
  .rolagem { grid-template-rows: repeat(2, auto); grid-auto-columns: calc((100% - 34px) / 2); gap: 8px; }
  .rolagem .album-info { padding: 24px 10px 8px; }
  .rolagem .album-info b { font-size: 14px; line-height: 1.2; }
  .rolagem .album-info small { font-size: 10px; }
}
.seta { position: absolute; top: calc(50% - 27px); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(11 31 58 / 0.85); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.seta:hover { background: var(--azul); }
.seta-ant { left: -10px; } .seta-prox { right: -10px; }
@media (hover: none), (max-width: 560px) { .seta { display: none; } }
.contador { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.album { position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 4 / 3; background: var(--navy); color: #fff; text-align: left; font: inherit; }
.album img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.album:hover img { transform: scale(1.04); }
.album-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px; background: linear-gradient(transparent, rgb(7 20 38 / 0.9)); display: grid; }
.album-info b { font-size: 17px; }
.album-info small { color: var(--amarelo); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
dialog.album-dialogo { width: min(1000px, 94vw); max-height: 90vh; border: 0; border-radius: var(--radius); padding: 20px; background: var(--bg); color: var(--ink); }
dialog.album-dialogo::backdrop { background: rgb(7 20 38 / 0.85); }
.album-topo { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 14px; }
.album-topo h2::after { display: none; }
.album-topo .muted { margin: 4px 0 0; color: var(--muted); }
.album-fechar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--alt); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }

/* Aviso no topo */
.aviso { background: var(--amarelo); color: var(--navy); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 48px; position: relative; text-align: center; font-weight: 700; }
.aviso[hidden] { display: none; }
.aviso p { margin: 0; }
.aviso a { color: var(--navy); }
.aviso-fechar { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--navy); font-size: 22px; cursor: pointer; }
.aviso-fechar:hover { background: rgb(11 31 58 / 0.12); }

/* Contato */
.contatos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contato { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.contato:hover { border-color: var(--azul); }
.contato svg { width: 36px; height: 36px; fill: var(--azul); flex: none; }
.contato:nth-child(2) svg { fill: var(--rosa); }
.contato b { display: block; }
.contato small { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }

.rodape { background: var(--navy); color: #c9d7e8; padding: 32px 0; font-size: 15px; position: relative; }
.rodape::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--faixa); }
.rodape p { margin: 4px 0; }
.rodape b { color: #fff; }
.rodape a { color: var(--amarelo); }

/* Página 404 */
.erro { min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 32px 16px; }
.erro h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 12px; }
.erro p { color: var(--muted); margin: 0 0 24px; }
