/* Ligas y selecciones: rejillas de escudos (page-templates/ligas.php y selecciones.php). Usa los tokens de main.css. */
.lg { padding-bottom: clamp(48px, 8vw, 96px); }
.lg-head { padding: clamp(24px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); }
.lg-head h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
.lg-head .crumbs { padding-top: 0; }
.lg-hero { display: flex; align-items: center; gap: clamp(14px, 3vw, 24px); }
.lg-hero-icon { width: clamp(64px, 12vw, 96px); height: auto; aspect-ratio: 1; border-radius: var(--r-m); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); flex: none; }

.lg-switch { display: inline-flex; gap: 4px; margin-top: 20px; padding: 4px; background: var(--bg-2); border-radius: var(--pill); }
.lg-switch a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: var(--pill); font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: background-color .25s, color .25s; }
.lg-switch a[aria-current] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.lg-switch a:not([aria-current]):hover { color: var(--brand-600); }

.lg-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .lg-grid-clubs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .lg-grid { gap: 16px; } .lg-grid-clubs { grid-template-columns: repeat(5, minmax(0, 1fr)); } .lg-grid-leagues { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lg-grid-clubs { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.lg-card { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 12px 18px; background: var(--bg); border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--line); -webkit-tap-highlight-color: transparent;
	transition: transform .45s var(--ease), box-shadow .3s; }
.lg-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1.5px var(--brand), 0 14px 34px rgba(10, 132, 255, .14); }
.lg-card:active { transform: scale(.97); }
.lg-card:focus-visible { outline-offset: 2px; border-radius: var(--r-m); }

.crest { width: 72px; height: 72px; object-fit: contain; transition: transform .45s var(--ease); }
.lg-card:hover .crest, .lg-card:hover .lg-icon { transform: scale(1.07); }
.crest-flag { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.crest-fallback { display: grid; place-items: center; border-radius: 50%; font: 800 1.4rem/1 var(--font-d); letter-spacing: -.02em; color: #fff; background: hsl(var(--h) 55% 42%); }

.lg-league { padding: 18px 14px 20px; }
.lg-icon { width: 100%; max-width: 132px; height: auto; aspect-ratio: 1; border-radius: var(--r-m); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); transition: transform .45s var(--ease); }
.lg-league .lg-icon.crest-fallback { width: 100%; max-width: 132px; height: auto; border-radius: var(--r-m); font-size: 2.2rem; }
.lg-league .lg-name { font: 700 1.05rem/1.2 var(--font-d); font-stretch: 112%; }

.lg-name { font-weight: 650; font-size: .95rem; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.lg-n { font-size: .8rem; color: var(--ink-3); margin-top: -4px; }
.lg-all { margin-top: clamp(28px, 5vw, 44px); text-align: center; }

@media (prefers-reduced-motion: no-preference) {
	.lg-grid > li { animation: lg-in .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
	@keyframes lg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
}
@media (prefers-reduced-motion: reduce) {
	.lg-card, .crest, .lg-icon, .lg-hero-icon { transition: none; }
	.lg-card:hover, .lg-card:active, .lg-card:hover .crest, .lg-card:hover .lg-icon { transform: none; }
}
