/* ============================================================
   PBN Sports — Main Stylesheet
   Fonts: Poppins (headings) / Raleway (body)
   Colors: #1a1a18 dark, #c9a84c gold, #f5f4f0 warm white
   ============================================================ */

:root {
    --dark:       #1a1a18;
    --dark-2:     #242420;
    --dark-3:     #2e2e2a;
    --gold:       #c9a84c;
    --gold-light: #e0c06a;
    --warm-white: #f5f4f0;
    --white:      #ffffff;
    --gray-1:     #e8e6e0;
    --gray-2:     #c8c5bc;
    --gray-3:     #888780;
    --gray-4:     #555450;
    --red-live:   #e0053a;
    --gap:        3px;
    --radius:     4px;
    --max-w:      1200px;
    --font-head:  'Poppins', sans-serif;
    --font-body:  'Raleway', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--warm-white); color: var(--dark); line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.125rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.sport-tag {
    font-family: var(--font-head);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: 0.375rem;
}

/* ---- Layout ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Header / Nav ---- */
.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--dark-3);
}
.nav-main {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.site-logo { display: flex; align-items: baseline; gap: 0; }
.logo-pbn {
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.04em;
}
.logo-sports {
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.04em;
}
.nav-links {
    display: flex;
    gap: 1.75rem;
    margin-left: auto;
}
.nav-links a {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-2);
    transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
    margin-left: auto;
}
.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-2);
    border-radius: 2px;
    transition: all 0.2s;
}

/* ---- Scores Ticker ---- */
.scores-ticker {
    background: var(--gold);
    display: flex;
    align-items: center;
    height: 32px;
    overflow: hidden;
}
.ticker-label {
    font-family: var(--font-head);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--dark);
    color: var(--gold);
    padding: 0 0.75rem;
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ticker-inner {
    display: flex;
    align-items: center;
    gap: 0;
    animation: ticker-scroll 40s linear infinite;
    white-space: nowrap;
}
.ticker-inner:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark);
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.ticker-item .winner { font-weight: 700; }
.ticker-item.is-live .live-dot { color: var(--red-live); font-size: 0.5rem; }
.ticker-sep { opacity: 0.4; }
.ticker-status { font-size: 0.625rem; opacity: 0.6; }
.ticker-divider { opacity: 0.3; padding: 0 0.25rem; }

/* ---- Hero Grid ---- */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
    background: var(--dark);
}
.hero-main {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: var(--dark-3);
}
.hero-main img, .hero-stack-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.hero-main:hover img { transform: scale(1.02); }

.hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.88));
}
.hero-title {
    font-family: var(--font-head);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.hero-byline { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.hero-byline strong { color: var(--gold); font-weight: 600; }

.hero-stack {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}
.hero-stack-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--dark-2);
    min-height: 0;
}
.hero-stack-item:hover img { transform: scale(1.03); }
.stack-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.stack-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--white);
    line-height: 1.3;
    margin-bottom: 2px;
}
.stack-meta { font-size: 0.6875rem; color: rgba(255,255,255,0.4); }

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.section-title {
    font-family: var(--font-head);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dark);
    white-space: nowrap;
}
.section-title.light { color: var(--white); }
.section-line { flex: 1; height: 1px; background: var(--gray-1); }
.section-line.dark { background: var(--dark-3); }
.section-more {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.section-more:hover { color: var(--gold-light); }

/* ---- Gallery Cards ---- */
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0 1.5rem 2rem;
    background: var(--warm-white);
}
.gallery-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 0.5px solid var(--gray-1);
    transition: border-color 0.15s, transform 0.15s;
}
.gallery-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.gallery-thumb {
    height: 200px;
    background: var(--gray-1);
    position: relative;
    overflow: hidden;
}
.gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-card:hover .gallery-thumb img { transform: scale(1.04); }
.gallery-photo-count {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.65);
    color: var(--white);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 2px;
}
.gallery-info { padding: 1rem; }
.gallery-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 4px;
}
.gallery-date { font-size: 0.6875rem; color: var(--gray-3); }

/* ---- Article Cards ---- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 0.5px solid var(--gray-1);
    transition: border-color 0.15s;
}
.article-card:hover { border-color: var(--gold); }
.article-card-cover {
    height: 160px;
    background: var(--gray-1);
    overflow: hidden;
}
.article-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 1rem; }
.article-card-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.article-card:hover .article-card-title { color: var(--gold); }
.article-card-meta { font-size: 0.6875rem; color: var(--gray-3); }
.article-card-meta strong { color: var(--gray-4); font-weight: 600; }

/* ---- Scores Section ---- */
.scores-section {
    background: var(--dark);
    padding: 1.5rem;
    margin-top: var(--gap);
}
.scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--dark-2);
}
.score-card {
    background: var(--dark);
    padding: 0.875rem 1rem;
}
.score-sport {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.score-teams { display: flex; flex-direction: column; gap: 3px; }
.score-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: #aaa;
    font-weight: 500;
}
.score-team.winner { color: var(--white); font-weight: 700; }
.score-num {
    font-family: var(--font-head);
    font-size: 0.9375rem;
}
.score-team.winner .score-num { color: var(--gold); }
.score-status {
    font-size: 0.625rem;
    color: var(--gray-4);
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.score-status.live { color: var(--red-live); }

/* ---- Article Page ---- */
.article-page { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.article-header { margin-bottom: 2rem; }
.article-headline {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 0.75rem;
}
.article-meta { font-size: 0.8125rem; color: var(--gray-3); display: flex; gap: 1rem; flex-wrap: wrap; }
.article-meta strong { color: var(--dark); font-weight: 600; }
.article-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.article-body { font-size: 1.0625rem; line-height: 1.75; color: #2a2a26; }
.article-body p { margin-bottom: 1.25rem; }
.article-body p:last-child { margin-bottom: 0; }
.ai-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--gray-1);
    color: var(--gray-3);
    padding: 3px 8px;
    border-radius: 2px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ---- Gallery Page ---- */
.gallery-page { padding: 2rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.gallery-page-header { margin-bottom: 2rem; }
.gallery-page-title {
    font-family: var(--font-head);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.gallery-page-meta { font-size: 0.8125rem; color: var(--gray-3); }
.photo-grid {
    columns: 3;
    column-gap: var(--gap);
}
.photo-grid-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
}
.photo-grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.25s ease;
}
.photo-grid-item:hover img { transform: scale(1.02); }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lightbox-close {
    position: fixed;
    top: 1rem; right: 1.5rem;
    color: var(--white);
    font-size: 2rem;
    opacity: 0.6;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 2rem;
    opacity: 0.5;
    cursor: pointer;
    background: none;
    border: none;
    padding: 1rem;
    user-select: none;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }
.lightbox-counter {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ---- Scores Page ---- */
.scores-page { padding: 2.5rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.scores-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--gray-2);
    border-radius: 2px;
    background: var(--white);
    color: var(--gray-4);
    cursor: pointer;
    transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--dark); color: var(--gold); border-color: var(--dark); }

/* ---- Homepage Section Wrappers ---- */
.home-galleries-section {
    background: var(--warm-white);
    padding: 1.5rem 0 0;
}
.home-galleries-header {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
}
.home-articles-section {
    background: var(--warm-white);
    padding: 1.5rem;
}

/* ---- Footer ---- */
.site-footer {
    background: #111110;
    margin-top: var(--gap);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-logo .logo-pbn { color: var(--gold); }
.footer-logo .logo-sports { color: var(--gray-4); }
.footer-tagline { font-size: 0.6875rem; color: var(--gray-4); margin-top: 4px; }
.footer-nav ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-4); transition: color 0.15s; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { font-size: 0.6875rem; color: #333; line-height: 1.6; }
.footer-copy a { color: var(--gold); }
.footer-copy a:hover { color: var(--gold-light); }

/* ---- Utilities ---- */
.text-gold  { color: var(--gold); }
.text-muted { color: var(--gray-3); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.no-cover-placeholder {
    width: 100%; height: 100%;
    background: var(--dark-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-4);
    font-size: 2rem;
}
.page-wrap { padding: 2rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-3); }
.empty-state h3 { color: var(--gray-2); margin-bottom: 0.5rem; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-stack { flex-direction: row; height: 220px; }
    .hero-stack-item { flex: 1; }
    .galleries-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .scores-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-grid { columns: 2; }
}
@media (max-width: 600px) {
    .nav-links { display: none; }
    .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--dark); padding: 1rem 1.5rem; gap: 1rem; z-index: 99; }
    .nav-mobile-toggle { display: flex; }
    .hero-stack { flex-direction: column; height: auto; }
    .hero-stack-item { height: 160px; flex: none; }
    .hero-main { height: 320px; }
    .galleries-grid { grid-template-columns: 1fr; padding: 0 1rem 1.5rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .scores-grid { grid-template-columns: 1fr 1fr; }
    .photo-grid { columns: 2; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}
