/* ===== Reset & base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ===== Ad slots ===== */
.ad-wrap { display: flex; flex-direction: column; align-items: center; padding: 16px 0; gap: 6px; }
.ad-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar .ad-label { display: block; text-align: center; margin-top: 20px; }
.ad-slot {
  display: block;
  object-fit: cover;
}
.ad-link { display: block; width: 100%; }
.ad-mobile { display: none; }
@media (max-width: 700px) {
  .ad-pc { display: none; }
  .ad-mobile { display: block; }
}
.ad-leaderboard { width: 100%; max-width: 970px; height: 250px; }
.ad-banner { width: 100%; max-width: 970px; height: 90px; }
.ad-inline { width: 100%; max-width: 300px; height: 250px; margin: 24px auto; }
.ad-rect { width: 100%; max-width: 300px; height: 250px; margin: 0 auto; }

/* ===== Utility bar ===== */
.utility-bar { background: #1a1a1a; color: #ccc; font-size: 12px; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 12px; }
.utility-left { flex-shrink: 0; color: #ff5a3c; font-weight: 700; }
.utility-date { flex: 1; text-align: center; }
.utility-right { flex-shrink: 0; font-weight: 600; }
.utility-right a { color: #fff; }
.accent-bar { height: 4px; background: #cc0000; }

/* ===== Masthead ===== */
.masthead { border-bottom: 1px solid #eee; }
.masthead-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; gap: 16px; }
.masthead-inner .weather-widget { grid-column: 1; justify-self: start; }
.masthead-inner .logo { grid-column: 2; justify-self: center; }
.masthead-inner .masthead-actions { grid-column: 3; justify-self: end; }
.weather-widget { font-size: 13px; color: #444; white-space: nowrap; }
.weather-city { font-weight: 700; color: #1a1a1a; }
.weather-temp { font-weight: 700; }

.logo { display: flex; align-items: center; }
.logo-img { height: 46px; width: auto; display: block; }

.masthead-actions { display: flex; align-items: center; gap: 10px; }
.btn { font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 4px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-outline { background: #fff; color: #1a1a1a; border-color: #ccc; }

.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #1a1a1a; }
.icon-btn svg { width: 20px; height: 20px; }
.hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 36px; height: 36px; background: none; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; }
.hamburger span { display: block; width: 18px; height: 2px; background: #1a1a1a; }

.main-nav { display: flex; align-items: center; gap: 22px; border-top: 1px solid #eee; padding: 0 16px; max-width: 1180px; margin: 0 auto; overflow-x: auto; }
.nav-home { font-size: 16px; padding: 12px 0; }
.main-nav a:not(.nav-home) { padding: 12px 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav a.active, .main-nav a:hover { color: #cc0000; border-bottom-color: #cc0000; }
.main-nav .search-btn { margin-left: auto; }

/* ===== Page grid ===== */
.page-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 24px 16px 48px; }
.article-col, .sidebar { min-width: 0; }

/* ===== Article ===== */
.category-tag {
  display: inline-block;
  background: #cc0000; color: #fff;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 4px 10px; margin-bottom: 10px;
}
.now-playing-label { font-size: 20px; font-weight: 800; text-transform: uppercase; margin-bottom: 14px; }

.hero-media { margin-bottom: 20px; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.caption-box { background: #1a1a1a; color: #fff; padding: 20px 24px; }
.caption-box .headline { font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 10px; }
.caption-box .deck { font-size: 14px; color: #ccc; margin: 0; }

.byline-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 14px 0; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.byline-name { font-weight: 700; font-size: 14px; display: block; }
.byline-date { font-size: 12px; color: #777; }
.share-row { display: flex; gap: 8px; }
.share-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ccc; background: #fff; cursor: pointer; font-weight: 700; font-size: 13px; }
.bottom-share { margin: 20px 0; }

.article-body p { font-size: 17px; margin-bottom: 18px; color: #222; }
.pull-quote { border-left: 4px solid #cc0000; padding-left: 16px; font-size: 22px; font-weight: 700; font-style: italic; margin: 28px 0; color: #1a1a1a; }

.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tag { background: #f2f2f2; font-size: 12px; padding: 6px 12px; border-radius: 16px; color: #444; }


/* ===== Sidebar ===== */
.sidebar-title { font-size: 18px; font-weight: 800; color: #cc0000; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #eee; }
.upnext-list { list-style: none; }
.upnext-list li { margin-bottom: 16px; }
.upnext-list a { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; }
.upnext-text { display: flex; flex-direction: column; gap: 4px; }
.upnext-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #cc0000; }
.thumb-placeholder { flex-shrink: 0; display: block; width: 90px; height: 60px; background: #e2e2e2; border-radius: 4px; object-fit: cover; }

/* ===== Recommended grid ===== */
.section-title { font-size: 20px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid #1a1a1a; padding-bottom: 10px; margin-bottom: 20px; }
.recommended { padding: 32px 16px; border-top: 8px solid #f2f2f2; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.story-card { display: flex; flex-direction: column; }
.card-thumb { display: block; width: 100%; aspect-ratio: 4/3; background: #e2e2e2; margin-bottom: 10px; object-fit: cover; }
.card-cat { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #cc0000; margin-bottom: 4px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.3; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #1a73e8; color: #fff; border: none; font-size: 18px;
  cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.2s;
  z-index: 10;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ===== Footer ===== */
.site-footer { background: #fff; color: #1a1a1a; margin-top: 32px; border-top: 8px solid #f2f2f2; }
.footer-top { display: flex; align-items: center; justify-content: space-between; padding: 24px 16px; flex-wrap: wrap; gap: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ccc; display: flex; align-items: center; justify-content: center; color: #1a1a1a; }
.footer-social svg { width: 16px; height: 16px; }
.footer-actions { display: flex; gap: 10px; }

.footer-inner { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; padding: 8px 16px 32px; }
.footer-col h4, .footer-col summary { font-size: 13px; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.3px; list-style: none; }
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col a { display: block; font-size: 13px; margin-bottom: 8px; margin-top: 8px; color: #555; }
.footer-apps { text-align: center; }
.app-badges-row { display: flex; justify-content: center; align-items: center; gap: 12px; }
.app-badge-img { height: 40px; display: block; }
.footer-home-link { display: none; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: #1a1a1a; }

.footer-legal { border-top: 1px solid #eee; padding: 16px; font-size: 11px; color: #888; }
.footer-legal p { margin-bottom: 8px; }
.footer-legal a { color: #1a73e8; }
.footer-bottom { border-top: 1px solid #eee; padding: 16px; font-size: 12px; text-align: center; color: #888; }

/* ===== Mobile sticky ad ===== */
.sticky-ad {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #1a1a1a; color: #fff;
  flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 10px 10px;
}
.sticky-ad .ad-label { color: #aaa; }
.sticky-ad-close { position: absolute; top: 4px; right: 8px; background: none; border: none; color: #aaa; font-size: 18px; cursor: pointer; line-height: 1; }
.ad-sticky-banner { width: 100%; height: 50px; background: #2a2a2a; border-color: #555; color: #ccc; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(3, 1fr); }

  /* Up Next becomes a horizontal-scroll carousel once the sidebar drops below the article */
  .upnext-list { display: flex; flex-direction: row; overflow-x: auto; gap: 14px; padding-bottom: 10px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .upnext-list li { margin-bottom: 0; flex: 0 0 150px; scroll-snap-align: start; }
  .upnext-list a { flex-direction: column; }
  .thumb-placeholder { width: 100%; height: 100px; }
}

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .main-nav { display: none; flex-direction: column; align-items: stretch; padding: 0; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a, .main-nav .search-btn { width: 100%; text-align: left; margin: 0; }
  .main-nav a:not(.nav-home), .nav-home, .main-nav .search-btn { padding: 14px 16px; border-bottom: 1px solid #eee; }

  .utility-date { display: none; }
  .weather-widget { display: none; }
  .masthead-actions .btn { display: none; }
  .masthead-inner { padding: 12px 16px; }
  .logo-img { height: 34px; }

  .caption-box .headline { font-size: 20px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .sticky-ad { display: flex; }
  body { padding-bottom: 78px; }

  .top-ad { display: none; }
  .masthead { position: sticky; top: 0; z-index: 15; background: #fff; }
  .recommended { display: none; }
  .bottom-banner-ad { display: none; }

  /* Footer: stack logo/social/actions, and turn each section into a full-width accordion row */
  .footer-top { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .footer-home-link, .footer-col { display: block; border-top: 1px solid #eee; padding: 14px 16px; margin: 0; }
  .footer-col summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; }
  .footer-col summary::after { content: '\25BE'; transition: transform 0.2s; }
  .footer-col[open] summary::after { transform: rotate(180deg); }
  .footer-col a { padding-left: 4px; }
  .footer-apps { border-top: 1px solid #eee; padding: 20px 16px; }
}
