/* ball24live news v1.0 - magazine layout (data: /data/news.json from Sanook RSS) */
:root { --n-card:#fff; --n-border:#e3e9f3; --n-text:#0f172a; --n-muted:#64748b; --n-soft:#f3f6fb; --n-blue:#0052cc; --n-red:#e11d2e; --n-shadow:0 4px 18px rgba(15,35,80,.07); }
[data-theme="dark"] { --n-card:#0b1630; --n-border:rgba(56,189,248,.18); --n-text:#f1f5f9; --n-muted:#94a3b8; --n-soft:#0f1d3d; --n-blue:#60a5fa; --n-shadow:0 6px 22px rgba(0,0,0,.45); }

/* Fixture ticker */
.b24n-ticker { display:flex; align-items:stretch; gap:0; margin:0 0 18px; border-radius:14px; overflow:hidden; border:1px solid var(--n-border); background:var(--n-card); box-shadow:var(--n-shadow); }
.b24n-ticker-label { flex-shrink:0; display:flex; align-items:center; gap:6px; padding:0 14px; background:linear-gradient(135deg,#0a1f4d,#1450c8); color:#fff; font-weight:700; font-size:13px; white-space:nowrap; text-decoration:none; }
.b24n-ticker-label .dot { width:7px; height:7px; border-radius:50%; background:#ff4d5e; box-shadow:0 0 0 3px rgba(255,77,94,.25); }
.b24n-ticker-viewport { overflow:hidden; flex:1; min-width:0; position:relative; }
.b24n-ticker-track { display:flex; width:max-content; animation:b24n-marquee 40s linear infinite; }
.b24n-ticker:hover .b24n-ticker-track { animation-play-state:paused; }
@keyframes b24n-marquee { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .b24n-ticker-track { animation:none; } .b24n-ticker-viewport { overflow-x:auto; } }
.b24n-fx { display:flex; align-items:center; gap:8px; padding:10px 16px; border-right:1px solid var(--n-border); white-space:nowrap; font-size:13px; color:var(--n-text); text-decoration:none; }
.b24n-fx .t { font-weight:800; color:var(--n-blue); font-family:'Inter',sans-serif; }
.b24n-fx .lg { font-size:11px; color:var(--n-muted); }
.b24n-fx img { width:18px; height:18px; object-fit:contain; }
.b24n-fx .vs { font-size:10px; font-weight:700; color:var(--n-muted); }

/* Chips */
.b24n-chips { display:flex; gap:8px; overflow-x:auto; padding:2px 0 12px; margin-bottom:6px; scrollbar-width:none; }
.b24n-chips::-webkit-scrollbar { display:none; }
.b24n-chip { flex-shrink:0; border:1px solid var(--n-border); background:var(--n-card); color:var(--n-text); border-radius:999px; padding:7px 14px; font:600 13px/1 inherit; font-family:inherit; cursor:pointer; white-space:nowrap; }
.b24n-chip.active { background:var(--n-blue); border-color:var(--n-blue); color:#fff; }
.b24n-chip .c { opacity:.7; font-size:11px; margin-left:4px; }

/* Cards */
.b24n-card { position:relative; display:flex; flex-direction:column; background:var(--n-card); border:1px solid var(--n-border); border-radius:14px; overflow:hidden; text-decoration:none; color:var(--n-text); box-shadow:var(--n-shadow); transition:transform .2s ease, box-shadow .2s ease; min-width:0; }
.b24n-card:hover { transform:translateY(-3px); box-shadow:0 10px 26px rgba(15,35,80,.14); }
.b24n-thumb { position:relative; aspect-ratio:16/9; background:#0a1f4d; overflow:hidden; }
.b24n-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.b24n-card:hover .b24n-thumb img { transform:scale(1.04); }
.b24n-tag { position:absolute; left:10px; top:10px; background:var(--n-blue); color:#fff; font-size:11px; font-weight:700; padding:3px 9px; border-radius:6px; }
[data-theme="dark"] .b24n-tag { background:#1d63e8; }
.b24n-tag[data-l="ucl"] { background:#0b2a6b; } .b24n-tag[data-l="uel"] { background:#f97316; } .b24n-tag[data-l="thai"] { background:#e11d2e; }
.b24n-tag[data-l="laliga"] { background:#ea580c; } .b24n-tag[data-l="seriea"] { background:#0f766e; } .b24n-tag[data-l="bundesliga"] { background:#b91c1c; } .b24n-tag[data-l="ligue1"] { background:#334155; }
.b24n-body { padding:12px 14px 14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.b24n-title { font-size:15px; font-weight:700; line-height:1.45; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.b24n-sum { font-size:12.5px; color:var(--n-muted); line-height:1.5; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.b24n-meta { margin-top:auto; display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--n-muted); }
.b24n-src { font-weight:700; color:#16a34a; }
.b24n-src::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:#16a34a; margin-right:5px; vertical-align:1px; }

/* Hero */
.b24n-hero { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:16px; margin-bottom:16px; }
.b24n-side { display:grid; grid-template-rows:1fr 1fr; gap:16px; min-width:0; }
.b24n-card--hero, .b24n-card--side { border:0; }
.b24n-card--hero .b24n-thumb, .b24n-card--side .b24n-thumb { aspect-ratio:auto; height:100%; min-height:100%; position:absolute; inset:0; }
.b24n-card--hero { min-height:420px; }
.b24n-card--side { min-height:202px; }
.b24n-card--hero::after, .b24n-card--side::after { content:''; position:absolute; inset:0; background:linear-gradient(180deg,rgba(4,10,30,.05) 15%,rgba(4,10,30,.7) 52%,rgba(4,10,30,.96) 100%); pointer-events:none; }
.b24n-card--hero .b24n-body, .b24n-card--side .b24n-body { position:absolute; left:0; right:0; bottom:0; z-index:2; color:#fff; padding:18px 20px; }
.b24n-card--hero .b24n-title { font-size:26px; line-height:1.35; -webkit-line-clamp:3; text-shadow:0 2px 12px rgba(0,0,0,.4); }
.b24n-card--side .b24n-title { font-size:16px; }
.b24n-card--hero .b24n-sum { color:rgba(226,236,255,.85); font-size:14px; }
.b24n-card--side .b24n-sum { display:none; }
.b24n-card--hero .b24n-meta, .b24n-card--side .b24n-meta { color:rgba(226,236,255,.8); }
.b24n-card--hero .b24n-src, .b24n-card--side .b24n-src { color:#4ade80; }
.b24n-card--hero .b24n-src::before, .b24n-card--side .b24n-src::before { background:#4ade80; }

/* Grids, sections, carousels */
.b24n-row4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:26px; }
.b24n-sec { margin:0 0 26px; }
.b24n-sec-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.b24n-sec-title { display:flex; align-items:center; gap:8px; font-size:19px; font-weight:800; color:var(--n-text); margin:0; }
.b24n-sec-title::before { content:''; width:5px; height:20px; border-radius:3px; background:var(--n-blue); }
.b24n-more { background:none; border:0; color:var(--n-blue); font:600 13px inherit; font-family:inherit; cursor:pointer; white-space:nowrap; padding:4px 0; }
.b24n-carousel { display:grid; grid-auto-flow:column; grid-auto-columns:calc((100% - 48px)/4); gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; padding-bottom:6px; scrollbar-width:thin; }
.b24n-carousel > * { scroll-snap-align:start; }
.b24n-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.b24n-loadmore { display:block; margin:18px auto 0; border:1px solid var(--n-border); background:var(--n-card); color:var(--n-blue); font:700 14px inherit; font-family:inherit; border-radius:12px; padding:11px 28px; cursor:pointer; }
.b24n-note { font-size:12px; color:var(--n-muted); margin:6px 0 18px; }
.b24n-note a { color:var(--n-blue); }
.b24n-empty { padding:30px; text-align:center; color:var(--n-muted); border:1px dashed var(--n-border); border-radius:14px; }

@media (max-width: 1100px) {
  .b24n-row4, .b24n-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .b24n-carousel { grid-auto-columns:calc((100% - 32px)/3); }
  .b24n-card--hero { min-height:360px; }
}
@media (max-width: 760px) {
  .b24n-hero { grid-template-columns:minmax(0,1fr); gap:12px; }
  .b24n-card--hero { min-height:0; aspect-ratio:4/3.4; }
  .b24n-card--hero .b24n-title { font-size:19px; }
  .b24n-card--hero .b24n-sum { display:none; }
  .b24n-side { grid-template-rows:none; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
  .b24n-card--side { min-height:0; aspect-ratio:1/1; }
  .b24n-card--side .b24n-body { padding:10px 12px; }
  .b24n-card--side .b24n-title { font-size:13px; -webkit-line-clamp:3; }
  .b24n-card--side .b24n-meta { font-size:10.5px; }
  .b24n-row4, .b24n-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .b24n-body { padding:9px 10px 11px; gap:4px; }
  .b24n-title { font-size:13.5px; }
  .b24n-sum { display:none; }
  .b24n-meta { font-size:10.5px; flex-wrap:wrap; gap:4px; }
  .b24n-carousel { grid-auto-columns:72%; gap:12px; }
  .b24n-sec-title { font-size:17px; }
  .b24n-fx { padding:9px 12px; font-size:12px; }
}

/* Mobile bottom bar: 6 items incl. ข่าว */
.mobile-bottom-nav .bottom-nav-item { width:16.666% !important; max-width:16.666% !important; }
.mobile-bottom-nav .bottom-nav-item span { font-size:9px !important; }
