/* =====================================================
   THE LOADING TIMES — Main Stylesheet
   Dark theme | Green accent | Newspaper typography
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg:        #0d0d0d;
  --bg2:       #141414;
  --bg3:       #1a1a1a;
  --border:    #2a2a2a;
  --border2:   #333;
  --green:     #3ddc84;
  --green-dim: #2ab86a;
  --green-bg:  rgba(61,220,132,0.08);
  --text:      #e8e8e8;
  --text-muted:#888;
  --text-dim:  #bbb;
  --white:     #ffffff;
  --red:       #e63946;

  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-ui:   'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--green); }
img { max-width: 100%; display: block; }

/* =====================================================
   HEADER
===================================================== */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: 106px; /* Reserve space to prevent CLS */
}

.header-top {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-logo img {
  height: 26px;
  width: auto;
}

.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 400px;
}

.search-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--surface);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
  border-radius: 4px 0 0 4px;
}

.search-form button {
  padding: 8px 16px;
  background: var(--green);
  color: #000;
  border: 1px solid var(--green);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
}
.search-form button:hover {
  background: var(--green-dim);
  border-color: var(--green-dim);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-menu {
  display: flex;
  gap: 25px;
  font-family: var(--font-ui);
  font-size: 12px;
}

.header-menu a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
}

.header-menu a:hover,
.header-menu a.active {
  color: var(--green);
}

.header-right .date {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #000;
  background: var(--green);
  padding: 6px 12px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--green);
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu-dropdown {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-dropdown a {
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
}

.mobile-menu-dropdown a:last-child {
  border-bottom: none;
}

/* ---- Category Pills Row ---- */
.nav-pills-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 2px solid var(--green);
  padding: 10px 0;
}

.nav-pills-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.nav-pill {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}

.nav-pill > a {
  display: block;
  padding: 12px 10px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.nav-pill:hover {
  background: var(--green-bg);
  border-color: var(--green);
}

.nav-pill:hover > a {
  color: var(--green);
}

.nav-pill:hover .subnav {
  display: flex;
}

.subnav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 2px solid var(--green);
  min-width: 180px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  margin-top: 2px;
}

.subnav a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  text-align: left;
}

.subnav a:last-child { border-bottom: none; }
.subnav a:hover { background: var(--green-bg); color: var(--green); }

/* =====================================================
   LAYOUT
===================================================== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
}

.layout-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 36px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  aspect-ratio: 16/10;
}

.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: transform 0.4s;
}

.hero-main:hover img { transform: scale(1.02); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
}

.hero-content .cat-tag {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  margin-bottom: 8px;
}

.hero-content h2 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-content .meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: #aaa;
}

/* Hero stack — right side 2 smaller stories */
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-small {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  flex: 1;
}

.hero-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.4s;
}

.hero-small:hover img { transform: scale(1.03); }

.hero-small .hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 70%);
}

.hero-small .hero-content h2 {
  font-size: 15px;
}

/* =====================================================
   SECTION DIVIDERS
===================================================== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
}

.section-header h2 {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border2);
}

/* =====================================================
   ARTICLE CARDS
===================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.cards-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover { border-color: var(--green); }

.card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg3);
  flex-shrink: 0;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.card:hover .card-thumb img { transform: scale(1.05); }

.card-thumb .cat-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.card-body h3:hover { color: var(--green); }

.card-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 10px;
}

.card-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-meta .dot { color: var(--border2); }

/* List style card (for sidebar / secondary sections) */
.list-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list-card:last-child { border-bottom: none; }

.list-card .thumb {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg3);
}

.list-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-card .info h4 {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text);
}

.list-card .info h4:hover { color: var(--green); }

.list-card .info .meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}

/* =====================================================
   CAT TAG BADGE
===================================================== */
.cat-tag {
  display: inline-block;
  background: var(--green);
  color: #000;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 7px;
}

/* =====================================================
   AD BLOCKS
===================================================== */
.ad-block {
  background: var(--bg2);
  border: 1px dashed var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}

.ad-block-leaderboard {
  width: 100%;
  height: 90px;
  margin: 20px 0;
}

.ad-block-rectangle {
  width: 100%;
  height: 250px;
  margin-bottom: 20px;
}

.ad-block-inline {
  width: 100%;
  height: 120px;
  margin: 24px 0;
}

/* =====================================================
   SIDEBAR
===================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  padding: 16px;
}

.sidebar-widget-title {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* =====================================================
   ARTICLE PAGE
===================================================== */
.article-header {
  margin-bottom: 24px;
}

.article-header .cat-tag {
  margin-bottom: 12px;
}

.article-header h1 {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 14px;
}

.article-header .article-meta {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.article-header .article-meta .author {
  color: var(--green);
  font-weight: 600;
}

.article-cover {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  margin-bottom: 28px;
}

.article-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.85;
  color: var(--text-dim);
}

.article-body p { margin-bottom: 20px; }

.article-body h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  margin: 32px 0 14px;
}

.article-body h3 {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--white);
  margin: 24px 0 10px;
}

.article-body img {
  width: 100%;
  margin: 20px 0;
}

.article-body blockquote {
  border-left: 3px solid var(--green);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--green-bg);
  font-style: italic;
  color: var(--text);
}

.article-body a { color: var(--green); text-decoration: underline; }

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body li { margin-bottom: 6px; }

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tag-pill {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 4px 12px;
}

.tag-pill:hover {
  border-color: var(--green);
  color: var(--green);
}

/* =====================================================
   PAGINATION
===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0 8px;
}

.pagination button {
  padding: 8px 18px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.pagination button:hover { border-color: var(--green); color: var(--green); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* =====================================================
   FOOTER
===================================================== */
.site-footer {
  background: var(--bg2);
  border-top: 2px solid var(--green);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 20px 20px;
  display: grid;
  grid-template-columns: 300px 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo img { height: 44px; margin-bottom: 10px; }

.footer-logo p {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.footer-col a:hover { color: var(--green); }

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
}

/* =====================================================
   EMPTY / LOADING STATE
===================================================== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1024px) {
  .layout-main { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 768px) {
  .header-search { display: none; }
  .header-menu { display: none; }
  .mobile-menu-toggle { display: block; }
  .hero-section { grid-template-columns: 1fr; }
  .hero-stack { flex-direction: row; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .cards-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 26px; }
  .hero-stack { flex-direction: column; }
}

/* =====================================================
   DROPDOWN MENU
===================================================== */
.nav-pill {
  position: relative;
}

.nav-pill-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  min-width: 150px;
  z-index: 100;
  flex-direction: column;
}

.nav-pill:hover .nav-pill-dropdown {
  display: flex;
}

.nav-pill-dropdown a {
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-pill-dropdown a:hover {
  background: var(--bg3);
  color: var(--green);
}
