/*
Theme Name: Newsroom Offline
Theme URI: https://localhost/
Author: Local Newsroom
Description: A fast, responsive editorial WordPress theme for an offline news channel.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: newsroom-offline
*/

:root {
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #fff;
  --wash: #f6f7f9;
  --brand: #d71920;
  --brand-dark: #a20e13;
  --accent: #f4b400;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.topline { background: var(--ink); color: white; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.topline__inner { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.live-pill { display: inline-flex; gap: 7px; align-items: center; font-weight: 800; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 4px rgba(255,59,48,.18); }
.masthead { padding: 20px 0; border-bottom: 1px solid var(--line); }
.masthead__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.site-logo { font-size: clamp(1.7rem, 4vw, 3rem); font-weight: 950; letter-spacing: -.07em; text-transform: uppercase; }
.site-logo span { color: var(--brand); }
.site-tagline { color: var(--muted); font-size: .82rem; }
.masthead__right { justify-self: end; color: var(--muted); font-size: .82rem; }

.main-nav { border-bottom: 1px solid var(--line); background: white; position: sticky; top: 0; z-index: 20; }
.main-nav ul { display: flex; align-items: center; gap: 14px; overflow-x: auto; margin: 0; padding: 0; min-height: 48px; list-style: none; scrollbar-width: none; }
.main-nav a { display: block; padding: 14px 0 11px; white-space: nowrap; font-size: .75rem; font-weight: 800; text-transform: uppercase; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--brand); border-color: var(--brand); }

.ticker { background: var(--wash); border-bottom: 1px solid var(--line); }
.ticker__inner { display: flex; gap: 18px; align-items: center; min-height: 42px; overflow: hidden; }
.ticker__label { flex: 0 0 auto; padding: 4px 8px; color: white; background: var(--brand); font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.ticker__text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; font-weight: 700; }

.section { padding: 42px 0; }
.section--wash { background: var(--wash); }
.section-title { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; }
.section-title::before { content: ''; width: 5px; height: 22px; background: var(--brand); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 28px; }
.lead-story { position: relative; min-height: 520px; overflow: hidden; color: white; background: linear-gradient(135deg, #243447, #0b1018); }
.lead-story img { position: absolute; inset: 0; height: 100%; object-fit: cover; opacity: .78; transition: transform .5s ease; }
.lead-story:hover img { transform: scale(1.025); }
.lead-story::after { content: ''; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(5,9,14,.96)); }
.lead-story__content { position: absolute; z-index: 2; inset: auto 34px 32px; }
.kicker { color: var(--brand); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.lead-story .kicker { color: #ffcccb; }
.lead-story h1 { max-width: 850px; margin: 10px 0 12px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 4.2vw, 4rem); line-height: 1.02; letter-spacing: -.035em; }
.lead-story p { max-width: 720px; margin: 0; color: #e7ebef; }
.story-list { display: grid; gap: 0; }
.story-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.story-row:last-child { margin-bottom: 0; }
.story-thumb { aspect-ratio: 4 / 3; object-fit: cover; background: #d8dde5; }
.story-row h2 { margin: 4px 0 7px; font-family: Georgia, serif; font-size: 1.18rem; line-height: 1.2; }
.meta { color: var(--muted); font-size: .75rem; }
.source-label { display: inline-block; margin-top: 8px; color: var(--muted); font-size: .72rem; font-weight: 700; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.story-card { background: white; border-bottom: 3px solid var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.story-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(16,24,40,.1); }
.story-card__image { aspect-ratio: 16 / 10; object-fit: cover; background: #d8dde5; }
.story-card__body { padding: 18px 4px 20px; }
.story-card h3 { margin: 6px 0 9px; font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.22; }
.story-card p { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 1fr); gap: 64px; align-items: start; }
.article-header h1 { margin: 12px 0 18px; font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; }
.article-deck { color: #475467; font-size: 1.2rem; }
.article-content { font-family: Georgia, serif; font-size: 1.08rem; }
.article-content p { margin: 0 0 1.35em; }
.article-content h2 { margin-top: 1.6em; }
.sidebar { padding: 24px; background: var(--wash); border-top: 4px solid var(--brand); }
.sidebar ul { padding-left: 20px; }

.site-footer { margin-top: 48px; padding: 42px 0 26px; color: #d0d5dd; background: #0b1018; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 42px; }
.site-footer h3 { color: white; }
.site-footer ul { padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.copyright { margin-top: 34px; padding-top: 20px; border-top: 1px solid #344054; color: #98a2b3; font-size: .78rem; }

@media (max-width: 900px) {
  .hero-grid, .article-layout { grid-template-columns: 1fr; }
  .lead-story { min-height: 470px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .masthead__inner { grid-template-columns: 1fr auto; }
  .site-tagline { display: none; }
}

@media (max-width: 600px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .masthead { padding: 14px 0; }
  .masthead__right { display: none; }
  .site-logo { font-size: 1.85rem; }
  .section { padding: 28px 0; }
  .lead-story { min-height: 420px; }
  .lead-story__content { inset: auto 20px 22px; }
  .lead-story p { display: none; }
  .story-row { grid-template-columns: 96px 1fr; gap: 12px; }
  .card-grid, .footer-grid { grid-template-columns: 1fr; }
}

/* Google Translate styling */
#google_translate_element {
  display: inline-block;
  line-height: 1;
}
.goog-te-gadget {
  font-family: inherit !important;
  font-size: 0.72rem !important;
  color: #fff !important;
}
.goog-te-gadget-simple {
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}
.goog-te-gadget-simple .goog-te-menu-value {
  color: #fff !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}
.goog-te-gadget-simple img {
  display: none !important;
}
.goog-te-banner-frame.skiptranslate, .goog-te-banner-frame {
  display: none !important;
}
body {
  top: 0px !important;
}

/* Pagination Styling - Centered */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.pagination .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: white;
  transition: all 0.2s ease;
}
.pagination .page-numbers:hover, .pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* Full Width Single Article Layout */
.article-single-layout {
  max-width: 900px;
  margin-inline: auto;
}
.article-single-layout article {
  width: 100%;
}
.article-single-layout img {
  border-radius: 6px;
  max-height: 480px;
  object-fit: cover;
  margin: 28px 0;
}

/* Suggestions Dashboard Layout */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.signal-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.05);
  border-top: 4px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.signal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1);
}
.signal-card.buy { border-top-color: #10b981; }
.signal-card.avoid, .signal-card.sell { border-top-color: #ef4444; }
.signal-card.swing { border-top-color: #8b5cf6; }
.signal-card.intraday { border-top-color: #f59e0b; }

.signal-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.signal-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
}
.signal-badge.buy { background: #10b981; }
.signal-badge.avoid, .signal-badge.sell { background: #ef4444; }
.signal-badge.swing { background: #8b5cf6; }
.signal-badge.intraday { background: #f59e0b; }

.stage-badge {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.signal-card__main {
  margin-bottom: 16px;
}
.ticker-code {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
}
.company-name {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 4px 0 0 0;
}

.signal-card__title {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 20px;
  flex-grow: 1;
}
.signal-card__title a {
  color: var(--ink);
  text-decoration: none;
}
.signal-card__title a:hover {
  color: var(--brand);
}

.signal-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-lbl {
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.stat-val {
  font-size: 0.88rem;
  font-weight: 700;
}
.rating-stars {
  color: #f59e0b;
  letter-spacing: 1px;
}
.highlight-val {
  color: var(--brand);
}

.signal-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.date-lbl {
  color: var(--muted);
  font-size: 0.72rem;
}
.view-btn {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1px;
  transition: all 0.2s ease;
}
.view-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}

