
/* ═══════════════════════════════════════════════════════════════════════════
   STADIUM EDITORIAL THEME - Public League Hub
   Premium sports-media inspired design for fan engagement
   ═══════════════════════════════════════════════════════════════════════════ */

/* Disable scroll anchoring — prevents browser from shifting the viewport
   down when the ticker injects content above the navbar after initial paint */
html {
    overflow-anchor: none;
}

/* Override base template container padding for league hub */
#main-content > .container,
#main-content > .container.pt-3 {
    padding-top: 0 !important;
    padding-bottom: 1rem !important;
}

:root {
    --hub-bg: var(--slms-background, #f8fafc);
    --hub-surface: #ffffff;
    --hub-surface-alt: #f1f5f9;
    --hub-border: rgba(15, 23, 42, 0.08);
    --hub-border-strong: rgba(15, 23, 42, 0.12);

    --hub-text: #0f172a;
    --hub-text-muted: #64748b;
    --hub-text-dim: #94a3b8;

    --hub-emerald: #10b981;
    --hub-emerald-light: #d1fae5;
    --hub-amber: #f59e0b;
    --hub-amber-light: #fef3c7;
    --hub-blue: #3b82f6;
    --hub-blue-light: #dbeafe;

    --hub-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --hub-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --hub-shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1), 0 8px 16px rgba(15, 23, 42, 0.06);
    --hub-shadow-xl: 0 25px 50px rgba(15, 23, 42, 0.15);

    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-display);
    background: var(--hub-bg);
    color: var(--hub-text);
    -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SECTION - Immersive Banner
   ───────────────────────────────────────────────────────────────────────────── */

.hub-hero {
    --hub-hero-radius: 24px;
    --hub-hero-edge-bleed: 2px;
    position: relative;
    min-height: 540px;
    background-size: cover;
    background-position: center;
    border-radius: var(--hub-hero-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

/* "Fit full image" mode: a dedicated media frame owns the image and overlay,
   while actions can sit in normal flow beneath it without touching artwork. */
.hub-hero.hub-hero-fit-image {
    min-height: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: visible;
    isolation: auto;
    clip-path: none;
    transform: none;
}

.hub-hero-fit-image .hub-hero-media {
    position: relative;
    isolation: isolate;
    width: 100%;
    overflow: hidden;
    border-radius: var(--hub-hero-radius);
    clip-path: inset(0 round var(--hub-hero-radius));
    transform: translateZ(0);
}

.hub-hero.hub-hero-fit-image::after {
    display: none;
}

.hub-hero-fit-image .hub-hero-bgimg {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    object-fit: contain;
    object-position: var(--hub-image-focus, 50% 50%);
    /* Round the image to match the card. Without this the rounded parent's
       overflow:hidden leaves a 1px anti-aliased light seam along the top/left
       edges (a known Chrome artifact) where it clips the square image. */
    border-radius: inherit;
    background: transparent;
    vertical-align: top;
    transform: scale(var(--hub-image-zoom-scale, 1)) translateZ(0);
    transform-origin: var(--hub-image-focus, 50% 50%);
}

.hub-hero-bgimg-cover {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: var(--hub-image-fit, cover);
    object-position: var(--hub-image-focus, 50% 50%);
    transform: scale(var(--hub-image-zoom-scale, 1)) translateZ(0);
    transform-origin: var(--hub-image-focus, 50% 50%);
    pointer-events: none;
}

.hub-hero-fit-image .hub-hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-hero-fullwidth {
    border-radius: 0;
    margin-bottom: 0;
    min-height: 580px;
}

.hub-hero-fullwidth .hub-hero-content {
    padding-left: 5vw;
    padding-right: 5vw;
}

.hub-hero-fullscreen-image {
    border-radius: 0 !important;
    margin-bottom: 0;
}

.hub-hero-fullscreen-image .hub-hero-content {
    padding: 4rem 5vw;
}

.hub-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7, 16, 31, 0.9) 0%, rgba(7, 16, 31, 0.4) 100%);
}

/* Subtle animated grain effect */
.hub-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

.hub-hero-content {
    position: relative;
    z-index: 2;
    color: var(--hero-text-color, #fff);
    padding: 3rem 2.5rem;
}

.hub-hero-content h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hub-hero-content .lead {
    font-weight: 500;
    opacity: 0.9;
    max-width: 600px;
}

/* Season Pill in Hero */
.hero-season-pill {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: var(--hub-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-season-pill .season-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hub-emerald);
    margin-bottom: 0.25rem;
}

.hero-season-pill .season-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hub-text);
    line-height: 1.2;
}

.hero-season-pill .season-date {
    font-size: 0.85rem;
    color: var(--hub-text-muted);
    margin-top: 0.25rem;
}

/* Hero CTAs */
.hub-hero .btn {
    font-weight: 700;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    transition: all var(--transition-smooth);
}

.hub-hero .btn:hover {
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BLOCK CARDS - Content Sections
   ───────────────────────────────────────────────────────────────────────────── */

.hub-block-card {
    background: var(--hub-surface);
    border-radius: 20px;
    box-shadow: var(--hub-shadow-md);
    border: 1px solid var(--hub-border);
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.hub-block-card:hover {
    box-shadow: var(--hub-shadow-lg);
    transform: translateY(-2px);
}

.hub-block-card + .hub-block-card {
    margin-top: 1.5rem;
}

/* Whole-section link (blockLinkUrl) */
.hub-block-card--linked {
    position: relative;
    cursor: pointer;
}
.hub-block-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
}
/* Keep buttons, links, and tappable elements inside a linked section above the overlay */
.hub-block-card--linked :is(a, button, [onclick], input, select, textarea, summary, [role="button"]):not(.hub-block-link-overlay) {
    position: relative;
    z-index: 5;
}

/* Clickable feature cards (per-item linkUrl) */
.hub-feature-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.hub-feature-card-link:hover,
.hub-feature-card-link:focus {
    color: inherit;
    text-decoration: none;
}
.hub-feature-card-link:hover .hub-feature-card {
    transform: translateY(-4px);
    box-shadow: var(--hub-shadow-md);
    border-color: color-mix(in srgb, var(--hub-accent, var(--hub-emerald)) 35%, var(--hub-border));
}

/* Container/Split Layout */
.hub-container-block {
    width: 100%;
}
.hub-container-block .hub-block-card {
    margin-top: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hub-container-block .hub-profiles-grid {
    grid-template-columns: 1fr;
}
.hub-container-block + .hub-block-card,
.hub-block-card + .hub-container-block,
.hub-container-block + .hub-container-block {
    margin-top: 1.5rem;
}

/* Profile / Download / Registration / Sponsor Card Grids */
.hub-profiles-grid,
.hub-download-grid,
.hub-registration-grid,
.hub-sponsor-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.hub-sponsor-spotlight-grid--grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hub-team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.hub-team-grid .hub-team-card {
    width: 100%;
    height: 100%;
    position: relative;
}

.hub-team-card__profile-link {
    border-radius: inherit;
    cursor: pointer;
    inset: 0;
    position: absolute;
    z-index: 1;
}

.hub-team-card__profile-link:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--hub-accent) 55%, transparent);
    outline-offset: -3px;
}

.hub-team-card :is(a, button):not(.hub-team-card__profile-link) {
    position: relative;
    z-index: 2;
}

.hub-team-grid .hub-profile-card__top {
    align-items: center;
}

.hub-sponsor-spotlight-card--grid .hub-sponsor-spotlight-card__top {
    flex-direction: column;
    align-items: flex-start;
}

.hub-sponsor-spotlight-card--grid .hub-sponsor-spotlight-card__media {
    width: 64px;
    height: 64px;
    min-width: 64px;
    max-width: 64px;
    min-height: 64px;
    max-height: 64px;
    border-radius: 14px;
}

.hub-profile-card,
.hub-download-card,
.hub-registration-card,
.hub-sponsor-spotlight-card,
.hub-lead-form-shell {
    background: var(--hub-surface-alt);
    border: 1px solid var(--hub-border);
    border-radius: 18px;
    padding: 1.25rem;
}

.hub-profile-card__top,
.hub-event-card__top,
.hub-sponsor-spotlight-card__top {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hub-profile-media,
.hub-sponsor-spotlight-card__media {
    width: 72px;
    height: 72px;
    min-width: 72px;
    max-width: 72px;
    min-height: 72px;
    max-height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hub-profile-media img,
.hub-sponsor-spotlight-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-team-card .hub-team-logo-media--image {
    background: transparent;
    border-radius: 0;
    overflow: visible;
}

/* Teams without a logo get a branded monogram instead of a gray disc.
   The letters use a readable shade of the accent (--slms-accent-text) unless
   the homepage design sets its own accent. */
.hub-profile-media.hub-team-logo-media--placeholder {
    background: color-mix(in srgb, var(--hub-accent, var(--slms-accent)) 14%, var(--hub-surface));
    color: var(--hub-accent-text, var(--slms-accent-text));
    letter-spacing: 0.04em;
}

.hub-team-card .hub-team-logo-media--image img {
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .hub-team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hub-profile-card__meta,
.hub-download-meta,
.hub-registration-card__body,
.hub-sponsor-spotlight-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.hub-profile-card__name,
.hub-sponsor-spotlight-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hub-text);
    margin: 0;
}

.hub-profile-card__role,
.hub-registration-card__badge,
.hub-sponsor-spotlight-card__tier {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slms-accent);
}

.hub-profile-card__chips,
.hub-download-meta__chips,
.hub-registration-card__actions,
.hub-sponsor-spotlight-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hub-profile-chip,
.hub-download-chip,
.hub-registration-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    background: rgba(15, 23, 42, 0.06);
    color: var(--hub-text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

/* Staff profile cards */
.hub-staff-grid {
    gap: 0.85rem;
}

.hub-staff-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 1.15rem;
    background: linear-gradient(
        180deg,
        var(--hub-surface) 0%,
        color-mix(in srgb, var(--hub-surface-alt) 72%, var(--hub-surface)) 100%
    );
    border: 1px solid color-mix(in srgb, var(--slms-accent) 18%, var(--hub-border));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--hub-text) 8%, transparent);
    overflow: hidden;
}

.hub-staff-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--slms-accent);
}

.hub-staff-card__top {
    align-items: flex-start;
}

.hub-staff-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
    max-width: 64px;
    min-height: 64px;
    max-height: 64px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--slms-accent) 14%, var(--hub-surface));
    border: 1px solid color-mix(in srgb, var(--slms-accent) 28%, transparent);
}

.hub-staff-avatar img {
    border-radius: inherit;
}

.hub-staff-avatar__initials {
    color: var(--hub-text);
    font-size: 1.05rem;
    font-weight: 800;
}

.hub-staff-card__meta {
    min-width: 0;
    flex: 1;
}

