/* ============================================================
   Pecbol 2026 — archive-atletas.css
   Listagem de atletas — copiado fielmente de atletas-listagem.html
   ============================================================ */

/* ========== PAGE HEADER ========== */
.page-header {
	padding: 60px 40px 24px;
	max-width: var(--container-max); margin: 0 auto;
}
.page-title-row {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 40px;
	align-items: end;
}
.page-title {
	font-family: 'Fraunces', serif;
	font-weight: 500;
	font-size: clamp(64px, 10vw, 160px);
	line-height: 0.9;
	letter-spacing: -0.04em;
}
.page-title em { font-style: italic; color: var(--brand); font-weight: 400; }
.page-desc {
	font-size: 16px;
	color: var(--ink-soft);
	line-height: 1.55;
	max-width: 420px;
	padding-bottom: 16px;
}
.quick-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin-top: 40px;
}
.quick-stat {
	padding: 20px 24px 20px 0;
	border-right: 1px solid var(--line);
}
.quick-stat:last-child { border-right: none; padding-right: 0; }
.quick-stat-num {
	font-family: 'Archivo', sans-serif;
	font-weight: 900;
	font-size: 48px; line-height: 1;
	letter-spacing: -0.03em;
	color: var(--ink);
	margin-bottom: 6px;
}
.quick-stat-num .sub { font-size: 20px; color: var(--brand); }
.quick-stat-label {
	font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
	color: var(--ink-mute); font-weight: 600;
}

/* ========== FILTRO MODERNO — pills com sigla + nome + contagem ========== */
.pos-filter-wrap {
	max-width: var(--container-max);
	margin: 0 auto 32px;
	padding: 48px 40px 0;
}
.pos-filter-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	gap: 16px;
	flex-wrap: wrap;
}
.pos-filter-label {
	font-family: 'Inter Tight', sans-serif;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink-mute);
	font-weight: 700;
}
.pos-filter-meta {
	font-size: 13px;
	color: var(--ink-mute);
	font-family: 'Inter Tight', sans-serif;
}
.pos-filter-meta strong {
	color: var(--ink);
	font-weight: 700;
	font-family: 'Archivo', sans-serif;
}

.pos-filter-bar {
	display: flex;
	gap: 6px;
	padding: 6px;
	background: var(--bg-alt);
	border: 1px solid var(--line);
	border-radius: 14px;
	width: 100%;
}

/* Cada pill estica pra ocupar largura igual da barra (linha única retangular) */
.pos-pill {
	flex: 1 1 0;
	padding: 12px 16px;
	background: transparent;
	border: 1.5px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	font-family: inherit;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	transition: background 0.4s cubic-bezier(.4,0,.2,1),
	            color 0.4s cubic-bezier(.4,0,.2,1),
	            border-color 0.4s cubic-bezier(.4,0,.2,1),
	            box-shadow 0.4s cubic-bezier(.4,0,.2,1),
	            transform 0.4s cubic-bezier(.4,0,.2,1);
	color: var(--ink);
	position: relative;
	overflow: hidden;
	min-width: 0; /* permite encolher */
	white-space: nowrap;
}
.pos-pill::before {
	content: '';
	position: absolute;
	left: 50%; right: 50%;
	bottom: 0;
	height: 2px;
	background: var(--brand);
	transition: left 0.5s cubic-bezier(.4,0,.2,1), right 0.5s cubic-bezier(.4,0,.2,1), background 0.3s;
}
.pos-pill:hover {
	background: var(--bg);
	border-color: var(--line);
}
.pos-pill:hover::before { left: 30%; right: 30%; }

.pos-pill-sigla {
	font-family: 'Archivo', sans-serif;
	font-weight: 900;
	font-size: 18px;
	letter-spacing: -0.01em;
	line-height: 1;
	flex-shrink: 0;
}
.pos-pill-nome {
	font-family: 'Inter Tight', sans-serif;
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-mute);
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.4s ease;
}
.pos-pill-count {
	font-family: 'Archivo', sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--ink-mute);
	background: rgba(0, 0, 0, 0.06);
	padding: 3px 9px;
	border-radius: 999px;
	flex-shrink: 0;
	transition: background 0.4s ease, color 0.4s ease;
}

/* Estado ativo — fundo escuro, texto branco, barra inferior cyan estendida */
.pos-pill.is-active,
.pos-pill.active {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.pos-pill.is-active::before,
.pos-pill.active::before {
	left: 8%; right: 8%;
	background: var(--brand-light);
}
.pos-pill.is-active .pos-pill-nome,
.pos-pill.active .pos-pill-nome { color: rgba(255, 255, 255, 0.7); }
.pos-pill.is-active .pos-pill-count,
.pos-pill.active .pos-pill-count {
	background: var(--brand);
	color: #fff;
}

/* Primeira pill (Todas) — visualmente diferente do restante */
.pos-pill[data-value="all"] {
	flex: 0 0 auto;
	min-width: 130px;
	border-right: 1px solid var(--line);
	margin-right: 4px;
}
.pos-pill[data-value="all"] .pos-pill-sigla {
	font-family: 'Fraunces', serif;
	font-weight: 500;
	font-style: italic;
	font-size: 17px;
}
.pos-pill[data-value="all"].is-active,
.pos-pill[data-value="all"].active { border-right-color: var(--ink); }

/* Mobile — pills compactos com scroll horizontal */
@media (max-width: 768px) {
	.pos-filter-wrap { padding: 28px 20px 0; }
	.pos-filter-bar {
		overflow-x: auto;
		padding: 6px;
		gap: 6px;
		scrollbar-width: thin;
	}
	.pos-filter-bar::-webkit-scrollbar { height: 4px; }
	.pos-filter-bar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
	.pos-pill {
		flex: 0 0 auto;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		min-width: 80px;
		padding: 10px 14px;
		justify-content: flex-start;
		white-space: normal;
	}
	.pos-pill[data-value="all"] {
		min-width: 80px;
		margin-right: 4px;
	}
	.pos-pill-sigla { font-size: 16px; }
	.pos-pill-nome { font-size: 9px; flex: none; }
	.pos-pill-count { font-size: 9px; padding: 1px 7px; }
}

/* ========== FILTERS (legado — mantido pra compat se algo ainda usar) ========== */
.filters-wrap {
	position: sticky;
	top: 72px;
	z-index: 40;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
	padding: 20px 0;
	margin-bottom: 40px;
}
.filters-inner {
	max-width: var(--container-max); margin: 0 auto;
	padding: 0 40px;
	display: flex; gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}
.search-box {
	flex: 1;
	min-width: 260px;
	position: relative;
}
.search-box input {
	width: 100%;
	padding: 12px 18px 12px 44px;
	border: 1px solid var(--line);
	background: var(--paper);
	border-radius: 999px;
	font-family: inherit; font-size: 14px;
	color: var(--ink);
	transition: all 0.2s;
}
.search-box input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(0,146,188,0.15);
}
.search-box::before {
	content: '';
	position: absolute;
	left: 18px; top: 50%;
	transform: translateY(-50%);
	width: 16px; height: 16px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6760' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
	background-size: contain;
	background-repeat: no-repeat;
}
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
	padding: 8px 16px;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 12px; font-weight: 500;
	letter-spacing: 0.03em;
	color: var(--ink-soft);
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.active, .pill.is-active {
	background: var(--ink); color: var(--bg);
	border-color: var(--ink);
}
.pill.count {
	background: var(--brand-glow); color: var(--brand-deep);
	border-color: transparent;
	font-weight: 700;
	pointer-events: none;
}
.filter-group-label {
	font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
	color: var(--ink-mute); font-weight: 600;
	margin-right: 4px;
}
.view-toggle {
	display: flex;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 3px;
}
.view-toggle button {
	background: transparent;
	border: none;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 12px; font-weight: 600;
	color: var(--ink-mute);
	cursor: pointer;
	display: flex; align-items: center; gap: 6px;
	font-family: inherit;
	transition: all 0.2s;
}
.view-toggle button.active,
.view-toggle button[aria-pressed="true"] {
	background: var(--ink); color: var(--bg);
}

/* ========== RESULTS META ========== */
.results-meta {
	max-width: var(--container-max); margin: 0 auto 24px;
	padding: 0 40px;
	display: flex; justify-content: space-between; align-items: center;
	font-size: 13px; color: var(--ink-mute);
}
.results-meta strong { color: var(--ink); font-weight: 700; }
.sort-select {
	background: transparent;
	border: none;
	font-family: inherit;
	color: var(--ink);
	font-size: 13px; font-weight: 500;
	cursor: pointer;
	text-decoration: underline;
}

/* ========== GRID VIEW (4 cols) ==========
   IMPORTANTE: o estilo do .athlete-card vem de home.css (mesmo card do carrossel da home).
   Aqui só definimos o GRID — o card herda visual idêntico. */
.athletes-section {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 60px 40px 120px;
	position: relative;
	background: #1a1a1a; /* preto chumbo, igual ao rodapé */
	color: #fff;
	/* Bleed full-width — desenha o fundo escuro até as bordas da viewport sem afetar o layout */
	box-shadow: 0 0 0 100vmax #1a1a1a;
	clip-path: inset(0 -100vmax);
}

.athletes-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.athletes-grid.hidden { display: none; }

/* Transições dos cards ao mudar o filtro de posição.
   .is-filtered-out aplica fade + scale; depois o JS marca [hidden] pra remover do layout. */
.athletes-grid .athlete-card {
	transition:
		opacity 0.35s cubic-bezier(.4, 0, .2, 1),
		transform 0.45s cubic-bezier(.23, 1, .32, 1),
		box-shadow 0.4s;
	will-change: opacity, transform;
}
.athletes-grid .athlete-card.is-filtered-out {
	opacity: 0;
	transform: scale(0.94) translateY(8px);
	pointer-events: none;
}

@media (max-width: 1023px) {
	.athletes-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
	.athletes-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ========== LIST VIEW ========== */
.athletes-list { display: none; }
.athletes-list.active { display: block; }

.list-header {
	display: grid;
	grid-template-columns: 60px 2fr 1fr 80px 1.5fr 1fr 120px 40px;
	gap: 16px;
	padding: 14px 24px;
	font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55); font-weight: 700;
	border-bottom: 2px solid rgba(255, 255, 255, 0.4);
	background: #1a1a1a;
	position: sticky;
	top: 140px;
	z-index: 30;
}
.list-row {
	display: grid;
	grid-template-columns: 60px 2fr 1fr 80px 1.5fr 1fr 120px 40px;
	gap: 16px;
	padding: 16px 24px;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
	color: #fff;
}
.list-row:hover {
	background: rgba(255, 255, 255, 0.06);
	padding-left: 32px;
}
.list-jersey {
	font-family: 'Archivo', sans-serif;
	font-weight: 900;
	font-size: 32px;
	color: var(--brand);
	letter-spacing: -0.03em;
}
.list-name {
	font-family: 'Fraunces', serif;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.01em;
}
.list-pos {
	font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55); font-weight: 600;
}
.list-age {
	font-family: 'Archivo', sans-serif;
	font-weight: 900;
	font-size: 18px;
	color: #fff;
}
.list-club { font-size: 14px; font-weight: 500; }
.list-country {
	display: flex; align-items: center; gap: 8px;
	font-size: 13px;
}
.list-status {
	display: inline-block;
	padding: 4px 10px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 2px;
}
.status-pro { background: var(--brand-glow); color: var(--brand-deep); }
.status-base { background: var(--bg-alt); color: var(--ink-soft); }
.status-selection { background: var(--red); color: #fff; }
.list-arrow {
	color: var(--brand);
	font-size: 20px;
	opacity: 0.5;
	transition: all 0.2s;
}
.list-row:hover .list-arrow { opacity: 1; transform: translateX(4px); }

/* ========== PAGINATION (estilo simples adicionado) ========== */
.pagination {
	max-width: var(--container-max); margin: 0 auto;
	padding: 40px;
	display: flex; justify-content: center; gap: 8px;
}
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 13px; font-weight: 500;
	text-decoration: none; color: var(--ink);
	transition: all 0.2s;
}
.pagination .page-numbers.current {
	background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.pagination .page-numbers:hover:not(.current) { border-color: var(--brand); color: var(--brand); }

/* ========== CTA BAND ========== */
.cta-band {
	background: var(--brand-navy);
	color: #fff;
	padding: 80px 0;
	position: relative;
	overflow: hidden;
}
.cta-band::before {
	content: '';
	position: absolute; inset: 0;
	background-image:
		radial-gradient(circle at 20% 50%, rgba(0,146,188,0.28) 0%, transparent 50%),
		radial-gradient(circle at 80% 50%, rgba(0,146,188,0.15) 0%, transparent 50%);
}
.cta-band-inner {
	max-width: var(--container-max); margin: 0 auto;
	padding: 0 40px;
	position: relative; z-index: 2;
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 60px;
	align-items: center;
}
.cta-band h2 {
	font-family: 'Fraunces', serif;
	font-weight: 500;
	font-size: clamp(32px, 4vw, 54px);
	line-height: 1.05;
	letter-spacing: -0.02em;
}
.cta-band h2 em { font-style: italic; color: var(--brand-light); }
.cta-band-actions { display: flex; flex-direction: column; gap: 12px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
	.page-title-row { grid-template-columns: 1fr; gap: 24px; }
	.quick-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
	.quick-stat { border-right: none; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
	.athletes-grid { grid-template-columns: repeat(3, 1fr); }
	.cta-band-inner { grid-template-columns: 1fr; }
	.list-header, .list-row { grid-template-columns: 50px 2fr 1fr 80px 1fr 100px; }
	.list-header .col-country, .list-row .list-country,
	.list-header .col-arrow, .list-row .list-arrow { display: none; }
	.filters-wrap { position: static; }
}
@media (max-width: 640px) {
	.page-header, .results-meta, .athletes-section { padding-left: 20px; padding-right: 20px; }
	.filters-wrap { padding: 16px 0; }
	.filters-inner { padding-left: 20px; padding-right: 20px; }
	.page-title { font-size: 64px; }
	.athletes-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.athletes-grid .card-name { font-size: 18px; }
	.list-header, .list-row { grid-template-columns: 40px 1.8fr 80px; gap: 12px; padding: 14px 16px; }
	.list-header .col-age, .list-row .list-age,
	.list-header .col-club, .list-row .list-club { display: none; }
	.cta-band { padding: 60px 0; }
	.cta-band-inner { gap: 32px; padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
	/* Header da página */
	.page-header { padding: 40px 20px 16px; }
	.page-title { font-size: 52px; }
	.quick-stat-num { font-size: 36px; }
	/* Grid: 2 colunas até 480px, 1 coluna abaixo de 360px */
	.athletes-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	/* Filtro de posição: mais compacto */
	.pos-filter-wrap { padding: 20px 16px 0; }
	.pos-pill { padding: 8px 10px; min-width: 60px; }
	.pos-pill-sigla { font-size: 14px; }
	/* Section */
	.athletes-section { padding: 40px 16px 80px; }
	/* Paginação */
	.pagination { padding: 32px 20px; }
}
@media (max-width: 360px) {
	.athletes-grid { grid-template-columns: 1fr; }
}
