/* ============================================
   CSN Theme — Global Styles
   ============================================ */

:root {
    /* Brand colors from CSN logo */
    --csn-navy:       #1a2744;
    --csn-navy-deep:  #0f1a2e;
    --csn-red:        #c8102e;
    --csn-red-dark:   #a00d24;
    --csn-gold:       #d4a843;

    /* Surfaces */
    --surface-dark:   #0f1a2e;
    --surface-mid:    #1a2744;
    --surface-light:  #f5f6f8;
    --surface-white:  #ffffff;
    --surface-card:   #ffffff;

    /* Text */
    --text-primary:   #1a1a1a;
    --text-secondary: #555555;
    --text-light:     #ffffff;
    --text-muted:     rgba(255, 255, 255, 0.7);

    /* Borders */
    --border-light:   #e2e5ea;
    --border-dark:    rgba(255, 255, 255, 0.1);

    /* Type */
    --font-display:   'Barlow Condensed', 'Impact', sans-serif;
    --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Sizing */
    --container-max:  1280px;
    --container-wide: 1440px;
    --gap:            1.5rem;
    --radius:         8px;
    --radius-lg:      12px;

    /* Transitions */
    --ease:           cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--surface-white);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.container--wide {
    max-width: var(--container-wide);
}

/* ---- Typography ---- */
.display-xl {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.display-lg {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.display-md {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.15;
    text-transform: uppercase;
}

.heading-lg {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.3;
}

.heading-md {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.35;
}

.body-lg { font-size: 1.125rem; }
.body-sm { font-size: 0.875rem; }
.body-xs { font-size: 0.75rem; }

.text-upper { text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Section spacing ---- */
.section {
    padding: 4rem 0;
}

.section--dark {
    background: var(--surface-dark);
    color: var(--text-light);
}

.section--mid {
    background: var(--surface-mid);
    color: var(--text-light);
}

.section--light {
    background: var(--surface-light);
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.section__header .see-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--csn-red);
    white-space: nowrap;
    transition: color 0.2s var(--ease);
}

.section__header .see-all:hover {
    color: var(--csn-red-dark);
}

.section--dark .section__header .see-all {
    color: var(--csn-gold);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.btn--primary {
    background: var(--csn-red);
    color: white;
}
.btn--primary:hover {
    background: var(--csn-red-dark);
    transform: translateY(-1px);
}

.btn--live {
    background: var(--csn-red);
    color: white;
    animation: pulse-live 2s infinite;
}

.btn--outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
}
.btn--outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn--gold {
    background: var(--csn-gold);
    color: var(--csn-navy-deep);
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(200, 16, 46, 0); }
}

/* ---- Cards ---- */
.card {
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card--dark {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
}
.card--dark:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ---- Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
}

.badge--live {
    background: var(--csn-red);
    color: white;
}
.badge--live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: blink 1.5s infinite;
}

.badge--upcoming {
    background: var(--csn-gold);
    color: var(--csn-navy-deep);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- Grid helpers ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---- Utility ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---- News Page (Sports News) ---- */
.news-filter {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.news-filter__label { white-space: nowrap; }
.news-filter__pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    transition: all 0.15s var(--ease);
}
.news-filter__pill:hover {
    border-color: var(--csn-navy);
    color: var(--csn-navy);
}
.news-filter__pill--active {
    background: var(--csn-navy);
    color: white;
    border-color: var(--csn-navy);
}
.news-filter__pill--active:hover { color: white; }

.news-page__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    align-items: start; /* don't stretch cards to match neighbors */
}
.news-page__card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    transform: none;
}
.news-page__card:hover {
    border-color: var(--csn-navy);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: none;
}
.news-page__card:hover .news-page__cover img,
.news-page__card .news-page__cover img {
    transform: none !important;
    transition: none !important;
}
/* Featured card: spans 2 columns but only 1 row — no forced stretch */
.news-page__card--featured {
    grid-column: span 2;
}
.news-page__cover {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-light);
}
.news-page__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-page__card--featured .news-page__cover { aspect-ratio: 16/7; }

/* Branded fallback when source has no image */
.news-page__cover--fallback {
    background: linear-gradient(135deg, var(--csn-navy-deep) 0%, var(--csn-navy) 60%, #1e3050 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.news-page__cover--fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(200, 16, 46, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 168, 67, 0.10) 0%, transparent 50%);
}
.news-page__cover--fallback::after {
    /* Subtle CSN watermark in bottom-right corner */
    content: 'CSN';
    position: absolute;
    bottom: 0.5rem;
    right: 0.85rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: -0.02em;
    z-index: 2;
}
.news-page__source-badge {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 1.5rem;
    text-align: center;
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.95);
}
.news-page__source-badge::before {
    content: 'via';
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--csn-gold);
    margin-bottom: 0.4rem;
}
.news-page__card--featured .news-page__source-badge { font-size: 2.25rem; }
.news-page__card--featured .news-page__source-badge::before { font-size: 0.75rem; margin-bottom: 0.5rem; }

.news-page__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.news-page__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .news-page__grid { grid-template-columns: repeat(2, 1fr); }
    .news-page__card--featured { grid-column: span 2; }
}
@media (max-width: 640px) {
    .news-page__grid { grid-template-columns: 1fr; }
    .news-page__card--featured { grid-column: span 1; }
    .news-page__card--featured .news-page__source-badge { font-size: 1.5rem; }
}

/* ---- Single Broadcast Page ---- */
.broadcast-hero {
    position: relative;
    background: var(--csn-navy-deep);
    color: white;
    padding: 4rem 0 3rem;
    overflow: hidden;
}
.broadcast-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    filter: blur(2px);
}
.broadcast-hero__inner {
    position: relative;
    z-index: 1;
}
.broadcast-hero__inner::before {
    content: '';
    position: absolute;
    inset: -4rem 0;
    left: -100vw;
    right: -100vw;
    background: linear-gradient(180deg, rgba(15,26,46,0.5) 0%, rgba(15,26,46,0.85) 100%);
    z-index: -1;
}
.broadcast-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.broadcast-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    max-width: 900px;
}
.broadcast-hero__meta {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}
.broadcast-hero__sep { opacity: 0.4; }

.broadcast-player {
    background: var(--surface-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
}
.broadcast-credits {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--surface-light);
    border-left: 3px solid var(--csn-red);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.broadcast-tag {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    margin: 0.2rem 0.3rem 0.2rem 0;
    background: var(--surface-light);
    color: var(--csn-navy);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s var(--ease);
    text-decoration: none !important;
}
.broadcast-tag:hover {
    background: var(--csn-navy);
    color: white;
}

/* ---- Page content (inner pages) ---- */
.page-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--csn-navy);
}
.page-content h3 {
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}
.page-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}
.page-content ul, .page-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.page-content a {
    color: var(--csn-red);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(200, 16, 46, 0.3);
    transition: text-decoration-color 0.15s;
}
.page-content a:hover {
    text-decoration-color: var(--csn-red);
}
.page-content strong { font-weight: 700; }
