/* ================================================
   Birmingham Newsroom — Dashboard Styles
   ================================================ */

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

:root {
    --navy:        #1a2744;
    --navy-dark:   #0d1b38;
    --gold:        #e2b714;
    --text:        #1a1a2a;
    --text-sub:    #6b7280;
    --text-muted:  #9ca3af;
    --bg:          #eef0f5;
    --card:        #ffffff;
    --border:      #e5e7eb;
    --border-soft: #f0f2f5;
    --green:       #16a34a;
    --amber:       #d97706;
    --red:         #dc2626;
    --r:           8px;
    --shadow:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADER ─────────────────────────────────── */

.site-header {
    background: var(--navy-dark);
    border-bottom: 3px solid var(--gold);
    padding: 0 20px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.main-nav a {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: color .15s;
}

.main-nav a:hover { color: #fff; text-decoration: none; }

/* ── WEATHER BAR ────────────────────────────── */

.weather-bar {
    background: var(--navy);
    color: #fff;
    padding: 10px 20px;
}

.weather-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#weather-current {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .95rem;
}

.weather-icon { font-size: 1.4rem; }

.weather-temp {
    font-size: 1.3rem;
    font-weight: 700;
}

.weather-details {
    color: rgba(255,255,255,.72);
    font-size: .85rem;
}

.weather-loading {
    color: rgba(255,255,255,.4);
    font-size: .85rem;
}

.weather-forecast {
    display: flex;
    gap: 14px;
    margin-left: auto;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 40px;
    font-size: .8rem;
    color: rgba(255,255,255,.75);
}

.forecast-day-name {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.4);
}

.forecast-icon { font-size: 1rem; }

/* ── LIVE STATUS STRIP ──────────────────────────── */

.live-strip {
    background: #111d35;
    padding: 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.live-strip-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.live-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px 0 0;
}

.live-divider {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,.12);
    margin: 0 16px 0 0;
    flex-shrink: 0;
}

.live-label {
    font-size: .69rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255,255,255,.35);
    white-space: nowrap;
}

.live-value {
    font-size: .8rem;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
}

.live-link { color: rgba(255,255,255,.6) !important; transition: color .15s; }
.live-link:hover { color: #fff !important; text-decoration: none; }

/* ── DATE BAR ───────────────────────────────── */

.date-bar {
    background: var(--navy-dark);
    padding: 7px 20px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.date-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

#current-date {
    font-size: .78rem;
    color: rgba(255,255,255,.45);
}

.quick-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-links span {
    font-size: .72rem;
    color: rgba(255,255,255,.3);
}

.quick-links a {
    font-size: .76rem;
    color: rgba(255,255,255,.5);
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,.1);
    transition: all .15s;
}

.quick-links a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.2);
    text-decoration: none;
}

/* ── DASHBOARD LAYOUT ───────────────────────── */

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grid-top {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 12px;
}

.grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── MODULE ─────────────────────────────────── */

.module {
    background: var(--card);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-sub);
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.module-icon { font-size: .9rem; }

.module-source {
    margin-left: auto;
    font-size: .63rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.module-body { padding: 12px 16px 14px; }

/* ── BREAKING NEWS ──────────────────────────── */

.news-hero {
    display: block;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.news-hero-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    margin-bottom: 4px;
}

.news-hero:hover .news-hero-title { color: var(--navy); }

.news-hero-meta {
    font-size: .73rem;
    color: var(--text-muted);
}

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-soft);
}

.news-item:last-child { border-bottom: none; }

.news-item a {
    font-size: .875rem;
    color: var(--text);
    line-height: 1.35;
    flex: 1;
}

.news-item a:hover { color: var(--navy); }

.news-time {
    font-size: .71rem;
    color: var(--text-muted);
    white-space: nowrap;
    padding-top: 1px;
    min-width: 48px;
    text-align: right;
}

.feed-error {
    font-size: .85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
    line-height: 1.6;
}

/* ── REDDIT / COMMUNITY ─────────────────────── */

.reddit-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.reddit-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
    align-items: flex-start;
}

.reddit-item:last-child { border-bottom: none; }

.reddit-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 28px;
    padding-top: 2px;
    gap: 1px;
}

.reddit-arrow {
    font-size: .6rem;
    color: var(--gold);
    line-height: 1;
}

.reddit-score-num {
    font-size: .7rem;
    font-weight: 700;
    color: var(--navy);
}

.reddit-body a {
    font-size: .845rem;
    color: var(--text);
    line-height: 1.35;
    display: block;
    margin-bottom: 3px;
}

.reddit-body a:hover { color: var(--navy); }

.reddit-meta {
    font-size: .69rem;
    color: var(--text-muted);
}

.reddit-flair {
    display: inline-block;
    font-size: .64rem;
    font-weight: 600;
    background: rgba(26,39,68,.08);
    color: var(--navy);
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 2px;
    vertical-align: middle;
}

/* ── LOCAL NEWS ─────────────────────────────── */

.local-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.local-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-soft);
}

.local-item:last-child { border-bottom: none; }

.local-item a {
    font-size: .875rem;
    color: var(--text);
    line-height: 1.35;
    flex: 1;
}

.local-item a:hover { color: var(--navy); }

.news-source-badge {
    display: block;
    font-size: .63rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-bottom: 1px;
}

/* ── FOOTBALL ───────────────────────────────── */

.football-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.team-card {
    padding: 14px 16px;
    border-right: 1px solid var(--border);
}

.team-card:last-child { border-right: none; }

.team-card-inner { display: flex; flex-direction: column; }

.team-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.team-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -.01em;
}

.badge-villa  { background: #95bfe5; color: #670e36; }
.badge-blues  { background: #0000ff; color: #fff; }
.badge-wolves { background: #fdb913; color: #231f20; }

.team-name {
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
}

.team-headline {
    font-size: .78rem;
    color: var(--text-sub);
    line-height: 1.35;
    margin-bottom: 6px;
}

.team-headline a {
    color: var(--text-sub);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-headline a:hover { color: var(--navy); }

.team-headline-time {
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.team-more a {
    font-size: .73rem;
    color: var(--navy);
    display: inline-block;
    margin-top: 4px;
}

/* ── TRANSPORT ──────────────────────────────── */

.transport-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .855rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-green { background: var(--green); }
.status-amber { background: var(--amber); }
.status-red   { background: var(--red); }

.status-label { flex: 1; }

.status-link {
    font-size: .73rem;
    color: var(--navy);
    white-space: nowrap;
}

.disruption-row .status-label {
    font-size: .79rem;
    line-height: 1.35;
    white-space: normal;
}

/* Station quick-link buttons */
.station-links {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.station-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.station-btn:hover {
    background: #e8eaf0;
    border-color: #c5c9d4;
    text-decoration: none;
}

.station-btn-icon { font-size: 1rem; flex-shrink: 0; }

.station-btn-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.station-btn-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}

.station-btn-sub {
    font-size: .71rem;
    color: var(--navy);
}

/* ── EVENTS ─────────────────────────────────── */

.event-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.event-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-soft);
    align-items: baseline;
}

.event-item:last-child { border-bottom: none; }

.event-date {
    font-size: .7rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.event-name {
    font-size: .845rem;
    color: var(--text);
}

.event-venue {
    font-size: .7rem;
    color: var(--text-muted);
    text-align: right;
}

.all-events-link {
    display: inline-block;
    margin-top: 10px;
    font-size: .78rem;
    color: var(--navy);
}

/* ── CRIME ──────────────────────────────────── */

.crime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 28px;
}

.crime-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crime-label {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--text-sub);
}

.crime-count {
    font-weight: 600;
    color: var(--text);
}

.crime-track {
    height: 5px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.crime-fill {
    height: 100%;
    background: var(--navy);
    border-radius: 99px;
    width: 0;
    transition: width .6s ease;
}

.crime-period {
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ── SKELETONS ──────────────────────────────── */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

.skeleton {
    background: #e5e7eb;
    border-radius: 4px;
    height: 14px;
    margin-bottom: 10px;
    animation: pulse 1.5s ease infinite;
}

.skeleton.w80 { width: 80%; }
.skeleton.w90 { width: 90%; }

.skeleton-hero  { height: 56px; margin-bottom: 14px; }
.skeleton-team  { height: 90px; }
.skeleton-crime { height: 110px; }

.skeleton-wrap { padding: 6px 0; }
.skeleton-card { padding: 14px 16px; }

/* ── FOOTER ─────────────────────────────────── */

.site-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,.4);
    padding: 22px 20px;
    margin-top: 4px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-sources,
.footer-disclaimer {
    font-size: .74rem;
    line-height: 1.55;
}

.footer-sources strong { color: rgba(255,255,255,.55); }

.footer-nav {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

.footer-nav a {
    font-size: .74rem;
    color: rgba(255,255,255,.38);
    transition: color .15s;
}

.footer-nav a:hover {
    color: rgba(255,255,255,.65);
    text-decoration: none;
}

/* ── RESPONSIVE ─────────────────────────────── */

@media (max-width: 900px) {
    .grid-top { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .grid-bottom        { grid-template-columns: 1fr; }
    .football-grid      { grid-template-columns: 1fr; }
    .team-card          { border-right: none; border-bottom: 1px solid var(--border); }
    .team-card:last-child { border-bottom: none; }
    .weather-forecast   { display: none; }
}

@media (max-width: 480px) {
    .dashboard          { padding: 10px 12px 20px; gap: 10px; }
    .date-bar-inner     { flex-direction: column; align-items: flex-start; gap: 6px; }
    .crime-grid         { grid-template-columns: 1fr; }
    .event-item         { grid-template-columns: 58px 1fr; }
    .event-venue        { display: none; }
}
