/* ===== NYT-inspired news layout ===== */

:root {
  --black: #121212;
  --red: #d0021b;
  --gray-line: #dcdcdc;
  --gray-text: #666;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--black);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top utility bar */
.top-bar {
  background: var(--black);
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}
.lang-switch select {
  background: transparent;
  color: #fff;
  border: 1px solid #555;
  font-size: 12px;
  padding: 2px 4px;
}

/* Language bar */
.lang-bar {
  background: #f7f7f7;
  border-bottom: 1px solid var(--gray-line);
  font-family: var(--sans);
}
.lang-bar-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  overflow-x: auto;
  padding: 14px 20px;
  scrollbar-width: thin;
}
.lang-bar a {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  padding: 6px 16px;
  border-radius: 4px;
  border: 1px solid #ddd;
  white-space: nowrap;
}
.lang-bar a:not(.active) { border-color: #e2e2e2; }
.lang-bar a:hover { background: #eee; text-decoration: none; }
.lang-bar a.active { background: var(--black); color: #fff; }

/* Masthead */
.masthead {
  border-bottom: 1px solid var(--black);
  padding: 22px 0 14px;
  text-align: center;
}
.masthead .logo {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: 46px;
  letter-spacing: -0.5px;
}

/* Nav */
.main-nav {
  border-bottom: 1px solid var(--gray-line);
  font-family: var(--sans);
}
.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 8px;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.main-nav a { white-space: nowrap; }
.main-nav a:hover { color: var(--black); text-decoration: none; }

.main-nav li { position: relative; }
.main-nav li.has-children > a::after { content: ' \25BE'; font-size: 9px; }
.main-nav .subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--gray-line);
  border-top: 2px solid var(--black);
  min-width: 160px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.main-nav li.has-children:hover .subnav { display: block; }
.main-nav .subnav li { display: block; }
.main-nav .subnav a {
  display: block;
  padding: 8px 16px;
  text-transform: none;
  font-size: 13px;
  white-space: nowrap;
}
.main-nav .subnav a:hover { background: #f7f7f7; color: var(--black); }

main.wrap { padding-top: 24px; padding-bottom: 60px; }

/* Lead story */
.lead-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--gray-line);
  margin-bottom: 26px;
}
.lead-story {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
}
.lead-side { display: flex; flex-direction: column; }
.lead-side-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}
.lead-image-link { grid-row: span 2; }
.lead-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
}
.lead-story h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.lead-story .dek {
  font-size: 17px;
  color: #333;
  line-height: 1.4;
  margin: 0 0 10px;
}

/* New 5-row homepage blueprint */
.homepage-row {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-line);
}
.row-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.row-6col {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.row-75-25 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 30px;
}
/* On small screens (where every grid has already collapsed to a single
   column), show the main feature story (Row 2) before the Row 1 grid,
   since it's the more prominent story -- Row 2's order:-1 sorts it ahead
   of Row 1's default order without needing to touch Row 1's markup. */
.row1-row2-wrap { display: flex; flex-direction: column; }
.slot-card { position: relative; display: flex; flex-direction: column; }
.slot-card .story-image-link img { height: var(--slot-image-height, 150px); margin-top: 8px; }
.slot-card h2 {
  font-size: 16px;
  margin: 10px 0 6px;
  line-height: var(--slot-title-line-height, 21px);
  height: var(--slot-title-height, 42px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slot-card .dek {
  font-size: 13px;
  color: #555;
  margin: 0;
  height: var(--slot-dek-height, 51px);
  line-height: var(--slot-dek-line-height, 17px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Fixed-height label area, present on every card whether or not it shows
   text -- this is what keeps rows the same height even though some rows
   have no label, some have a small plain label, and Row 4 uses the larger
   heading font for its label. */
.slot-label-area {
  display: block;
  height: var(--slot-label-height, 22px);
  line-height: var(--slot-label-height, 22px);
  overflow: hidden;
  margin-bottom: 4px;
}
.slot-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-text);
  text-decoration: none;
}
.slot-label:hover { color: var(--black); text-decoration: none; }
.slot-label-heading {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-text);
  text-decoration: none;
}
.slot-label-heading:hover { color: var(--black); text-decoration: none; }

.feature-main-image { width: 100%; height: 420px; object-fit: cover; }
.feature-main h1 { font-size: 32px; line-height: 1.15; margin: 14px 0 10px; }
.feature-main .dek { font-size: 17px; color: #333; margin-bottom: 8px; }
.feature-side { display: flex; flex-direction: column; gap: 20px; }
.feature-side-ad { position: sticky; top: 20px; }
.feature-side-ad .ad-placeholder { min-height: 250px; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 900px) {
  .row-4col { grid-template-columns: 1fr 1fr; }
  .row-6col { grid-template-columns: repeat(3, 1fr); }
  .row-2col { grid-template-columns: 1fr; }
  .row-75-25 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .row-4col { grid-template-columns: 1fr; }
  .row-6col { grid-template-columns: 1fr; }
  .row1-row2-wrap > .row-75-25 { order: -1; }
}

/* Story grid */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 26px;
}
.section-large-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.section-small-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.story-card-small h2 { font-size: 15px; margin: 8px 0 4px; line-height: 1.25; }
.story-card-small .story-image-link img { height: 110px; }
.story-card-large .story-image-link img { height: 220px; }
@media (max-width: 900px) {
  .lead-row { grid-template-columns: 1fr; }
  .section-large-row { grid-template-columns: 1fr 1fr; }
  .section-small-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .section-large-row { grid-template-columns: 1fr; }
  .section-small-row { grid-template-columns: 1fr 1fr; }
}
.home-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-line);
}
.home-section-no-border { margin-top: 0; padding-top: 0; border-top: none; }
.home-row {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-line);
}
.home-row-news-ad {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}
.home-square-ad {
  position: sticky;
  top: 20px;
}
.home-square-ad .ad-placeholder {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-row-split {
  display: grid;
  gap: 40px;
}
.home-row-split-1 { grid-template-columns: 1fr; }
.home-row-split-2 { grid-template-columns: 1fr 1fr; }
.home-row-split-3 { grid-template-columns: repeat(3, 1fr); }
.story-grid-2col {
  grid-template-columns: repeat(2, 1fr) !important;
}
@media (max-width: 900px) {
  .home-row-news-ad, .home-row-split { grid-template-columns: 1fr; }
  .home-square-ad { position: static; }
}
@media (max-width: 600px) {
  .story-grid-2col { grid-template-columns: 1fr !important; }
}
.home-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.home-section-heading h2 {
  font-size: 22px;
  margin: 0;
  border-bottom: 3px solid var(--black);
  padding-bottom: 6px;
}
.home-section-more {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--black);
  white-space: nowrap;
}
.story-card h2 {
  font-size: 19px;
  line-height: 1.25;
  margin: 10px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-image-link img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.story-card .dek {
  font-size: 14px;
  color: #444;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.byline {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-text);
  letter-spacing: 0.3px;
  margin: 0;
}

.section-heading {
  font-size: 28px;
  border-bottom: 3px solid var(--black);
  padding-bottom: 8px;
  margin-bottom: 24px;
}
.breadcrumb {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 6px;
}
.subcategory-links { margin: -10px 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.subcategory-pill {
  font-family: var(--sans);
  font-size: 12px;
  background: #f0f0f0;
  padding: 5px 12px;
  border-radius: 14px;
}
.subcategory-pill:hover { background: #e2e2e2; text-decoration: none; }

/* Full article */
.full-article {
  max-width: 900px;
  margin: 0 auto;
}
.full-article h1 {
  font-size: 38px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.full-article .dek {
  font-size: 19px;
  color: #333;
  font-style: italic;
  margin-bottom: 12px;
}
.article-figure { margin: 20px 0 8px; }
.article-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 4px;
}
.article-figure figcaption {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gray-text);
  padding-top: 6px;
}
.article-body {
  font-size: 19px;
  line-height: 1.7;
  margin-top: 8px;
}
.article-body p { margin: 0 0 20px; }
.translation-note {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gray-text);
  border-top: 1px solid var(--gray-line);
  padding-top: 12px;
  margin-top: 30px;
}
.tag-list {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pill {
  font-family: var(--sans);
  font-size: 12px;
  background: #f0f0f0;
  color: #444;
  padding: 4px 10px;
  border-radius: 14px;
}
.tag-pill:hover { background: #e2e2e2; text-decoration: none; }
.category-pill {
  font-family: var(--sans);
  font-size: 12px;
  background: #eee;
  color: #333;
  padding: 4px 10px;
  border-radius: 14px;
  font-weight: 600;
}
.category-pill:hover { background: #ddd; text-decoration: none; }
.share-row {
  font-family: var(--sans);
  font-size: 13px;
  margin-top: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.share-row a { color: var(--black); font-weight: 600; }

/* Ad units */
.ad-unit {
  margin: 26px 0;
  text-align: center;
}
.ad-label {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.ad-placeholder {
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 24px;
  text-align: center;
  background: #fafafa;
}
.ad-placeholder-name {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: #999;
  font-weight: 600;
}

.empty-state {
  font-family: var(--sans);
  color: var(--gray-text);
  padding: 40px 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--gray-line);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--gray-text);
  padding: 24px 0;
  text-align: center;
}
.footer-links a { color: var(--gray-text); }

/* Responsive */
@media (max-width: 800px) {
  .masthead .logo { font-size: 30px; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-image-link { grid-row: auto; }
  .lead-story h1 { font-size: 26px; }
  .story-grid { grid-template-columns: 1fr 1fr; }
  .full-article h1 { font-size: 28px; }
}
@media (max-width: 500px) {
  .story-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .masthead { padding: 16px 0 10px; }
  .masthead .logo { font-size: 22px; letter-spacing: 0; }
  .top-bar-inner { flex-wrap: wrap; gap: 6px; }
  .main-nav ul { gap: 16px; font-size: 12px; }
  .lead-story h1 { font-size: 22px; }
  .lead-story .dek { font-size: 15px; }
  .full-article h1 { font-size: 24px; }
  .full-article .dek { font-size: 16px; }
  .article-body { font-size: 17px; }
  .section-heading { font-size: 22px; }
  .story-card h2 { font-size: 17px; }
  .share-row { flex-wrap: wrap; }
}

/* Large / wide screens: use the extra width instead of just widening margins */
@media (min-width: 1600px) {
  :root { --max-width: 1320px; }
  .story-grid { grid-template-columns: repeat(4, 1fr); }
  .lead-story h1 { font-size: 38px; }
}
