/* ---------- Top utility bar ---------- */

.topbar {
  background: var(--ink);
  color: rgba(246, 246, 242, 0.7);
  font-size: 12px;
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 6px 0;
  gap: var(--space-md);
}

.topbar__links {
  display: flex;
  gap: var(--space-md);
}

.topbar__links a:hover {
  color: #FFFFFF;
}

@media (max-width: 600px) {
  .topbar__links a:not(:first-child) {
    display: none;
  }
}

/* ---------- Newsflash ---------- */

.breaking-strip__headline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breaking-strip a {
  color: var(--bg);
  text-decoration: underline;
}

/* ---------- Ad slots ---------- */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed var(--divider);
  color: var(--ink-45);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-lg) 0;
  border-radius: var(--radius-sm);
}

.ad-slot--leaderboard {
  height: 90px;
}

.ad-slot--mpu {
  height: 250px;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Shared story card ---------- */

.story-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #DCE6F7 0%, #EDEEE7 100%);
}

.story-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story-card__tag {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
}

.story-card h3 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 4px;
}

.story-card h3 a:hover {
  color: var(--accent);
}

.story-card__excerpt {
  font-size: 14px;
  color: var(--ink-70);
  margin-bottom: 4px;
}

.story-card__meta {
  font-size: 12px;
  color: var(--ink-45);
}

/* ---------- Hero carousel ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.hero__slide {
  display: none;
}

.hero__slide.is-active {
  display: block;
}

.hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 23, 26, 0) 35%, rgba(20, 23, 26, 0.85) 100%);
}

.hero__overlay {
  position: absolute;
  left: var(--space-md);
  right: var(--space-md);
  bottom: var(--space-md);
  color: #FFFFFF;
}

.hero__overlay .tag {
  margin-bottom: var(--space-sm);
}

.hero__overlay h2 {
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .hero__overlay h2 {
    font-size: 28px;
  }
}

.hero__overlay h2 a {
  color: inherit;
}

.hero__thumbs {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.hero__thumbs::-webkit-scrollbar {
  display: none;
}

.hero__thumb {
  flex: 0 0 auto;
  width: 76px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  opacity: 0.6;
}

.hero__thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}

.hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Sidebar tabs (Trending / Latest) ---------- */

.sidebar-panel {
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  height: 100%;
}

.sidebar-tabs {
  display: flex;
  gap: var(--space-md);
  border-bottom: 1px solid var(--divider);
  margin-bottom: var(--space-md);
}

.sidebar-tabs button {
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-45);
  padding: 0 0 var(--space-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.sidebar-tabs button.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.sidebar-list[hidden] {
  display: none;
}

.sidebar-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--divider);
  align-items: flex-start;
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item__rank {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--divider);
  width: 22px;
  flex-shrink: 0;
}

.sidebar-item__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-item__title a:hover {
  color: var(--accent);
}

.sidebar-item__meta {
  font-size: 11px;
  color: var(--ink-45);
  margin-top: 2px;
}

/* ---------- Featured Stories ---------- */

.featured {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--divider);
}

.featured__main {
  margin-bottom: var(--space-md);
}

.featured__main .story-card__media {
  aspect-ratio: 21 / 9;
}

.featured__main h3 {
  font-size: 24px;
}

@media (min-width: 768px) {
  .featured__main h3 {
    font-size: 30px;
  }
}

.featured__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .featured__row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Category block: feature + list ---------- */

.category-block {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--divider);
}

.category-block__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .category-block__grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

.category-block__list {
  display: flex;
  flex-direction: column;
}

.category-block__item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--divider);
}

.category-block__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.category-block__thumb {
  width: 88px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #DCE6F7 0%, #EDEEE7 100%);
}

.category-block__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-block__item h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 2px;
}

.category-block__item h4 a:hover {
  color: var(--accent);
}

/* ---------- Dark band (Trending Now) ---------- */

.dark-band {
  background: var(--ink);
  padding: var(--space-lg) 0;
}

.dark-band__title {
  color: #FFFFFF;
  margin-bottom: var(--space-md);
}

.dark-band__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .dark-band__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dark-band__card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(246, 246, 242, 0.08);
}

.dark-band__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dark-band__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.8) 100%);
}

.dark-band__overlay {
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  bottom: var(--space-sm);
  color: #FFFFFF;
}

.dark-band__overlay .tag {
  margin-bottom: 6px;
}

.dark-band__overlay h3 {
  color: #FFFFFF;
  font-size: 15px;
  line-height: 1.25;
}

/* ---------- Latest posts + mini sidebar ---------- */

.latest-section {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--divider);
}

.latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 900px) {
  .latest-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.latest-row {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--divider);
}

.latest-row:last-child {
  border-bottom: none;
}

.latest-row .story-card__media {
  width: 140px;
  flex-shrink: 0;
  margin-bottom: 0;
  aspect-ratio: 4 / 3;
}

.latest-row__body {
  min-width: 0;
}

/* ---------- Dark footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(246, 246, 242, 0.7);
  border-top: none;
}

.site-footer .flag-tick {
  top: 0;
}

.site-footer__brand {
  color: #FFFFFF;
}

.site-footer__tagline {
  color: rgba(246, 246, 242, 0.6);
}

.site-footer__links a {
  color: rgba(246, 246, 242, 0.75);
}

.site-footer__links a:hover {
  color: #FFFFFF;
}

.site-footer__legal {
  color: rgba(246, 246, 242, 0.45);
  border-top-color: rgba(246, 246, 242, 0.15);
}

.site-footer__heading {
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.newsletter {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  max-width: 360px;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246, 246, 242, 0.25);
  background: transparent;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
}

.newsletter input::placeholder {
  color: rgba(246, 246, 242, 0.4);
}

.newsletter button {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
