/*
Theme Name: Ziarul Revolutionarul
Theme URI: https://www.ziarulrevolutionarul.ro
Author: Codex
Description: Tema editoriala pentru ziarulrevolutionarul.ro, optimizata pentru arhive mari de articole, categorii de stiri si lectura clara pe mobil.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ziarul-revolutionarul
*/

:root {
  --zr-ink: #161616;
  --zr-muted: #67615c;
  --zr-paper: #fffdf8;
  --zr-soft: #f3efe6;
  --zr-line: #d9d1c3;
  --zr-red: #b31922;
  --zr-red-dark: #7d1118;
  --zr-gold: #c79a3a;
  --zr-blue: #183b56;
  --zr-green: #466248;
  --zr-radius: 8px;
  --zr-shadow: 0 14px 36px rgba(22, 22, 22, .08);
  --zr-serif: Georgia, "Times New Roman", serif;
  --zr-sans: Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--zr-ink);
  background: var(--zr-paper);
  font-family: var(--zr-sans);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: rgba(179, 25, 34, .35);
  text-underline-offset: .18em;
}

a:hover {
  color: var(--zr-red);
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.top-strip {
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #151515;
  color: rgba(255, 255, 255, .62);
  font-size: .92rem;
}

.top-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
}

.top-strip__tag {
  color: #f5d583;
  font-weight: 800;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-actions a {
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-weight: 700;
}

.site-header {
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: #151515;
  color: #fff;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 102px;
  padding: 18px 0 20px;
  text-align: center;
}

.site-branding {
  min-width: 0;
}

.site-logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(560px, 100%);
}

.site-logo img,
.custom-logo {
  display: block;
  width: min(560px, 100%);
  max-height: 86px;
  object-fit: contain;
}

.site-title {
  margin: 0;
  font-family: var(--zr-serif);
  font-size: clamp(2.15rem, 6vw, 5.3rem);
  line-height: .9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-title a {
  text-decoration: none;
}

.site-description {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .58);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.masthead__badge {
  border: 1px solid rgba(255, 255, 255, .18);
  border-top: 5px solid var(--zr-red);
  padding: 14px 16px;
  min-width: 190px;
  text-align: right;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
}

.masthead__badge strong {
  display: block;
  font-family: var(--zr-serif);
  font-size: 1.45rem;
}

.nav-bar {
  border-top: 1px solid rgba(255, 255, 255, .14);
  background: #151515;
}

.nav-bar__inner {
  display: block;
  min-height: 70px;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, .38);
  background: transparent;
  color: #fff;
  min-height: 38px;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.primary-menu,
.primary-menu ul {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  width: 100%;
}

.primary-menu > li {
  position: relative;
  flex: 1 1 25%;
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.primary-menu > li:last-child {
  border-right: 1px solid rgba(255, 255, 255, .14);
}

.primary-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  padding: 16px 18px;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .76);
}

.primary-menu > li:hover > a,
.primary-menu > li:focus-within > a,
.primary-menu .current-menu-item > a {
  background: #101010;
  color: #fff;
}

.primary-menu .menu-item-has-children > a::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 12px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .46;
}

.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 260px;
  padding: 18px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: var(--zr-shadow);
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.primary-menu > li:hover .sub-menu,
.primary-menu > li:focus-within .sub-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.primary-menu .sub-menu a {
  justify-content: flex-start;
  min-height: 0;
  padding: 8px 22px;
  color: #333;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.primary-menu .sub-menu a:hover {
  background: transparent;
  color: var(--zr-red);
}

.header-search {
  width: 38px;
  min-width: 38px;
}

.header-search .search-form {
  display: flex;
  position: relative;
  align-items: stretch;
  gap: 0;
}

.header-search .search-field {
  position: absolute;
  right: 40px;
  top: 50%;
  width: 0;
  min-width: 0;
  padding-right: 0;
  padding-left: 0;
  border-color: transparent;
  opacity: 0;
  transform: translateY(-50%);
  transition: width .18s ease, opacity .18s ease, padding .18s ease;
}

.header-search .search-form:focus-within .search-field,
.header-search .search-form:hover .search-field {
  width: 220px;
  padding-right: 11px;
  padding-left: 11px;
  border-color: rgba(255, 255, 255, .28);
  opacity: 1;
}

.header-search .search-submit {
  width: 38px;
  height: 38px;
  overflow: hidden;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .76);
  font-size: 0;
}

.header-search .search-submit::before {
  content: "⌕";
  font-size: 1.75rem;
  line-height: 1;
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.search-field {
  width: 100%;
  border: 1px solid rgba(22, 22, 22, .18);
  border-radius: var(--zr-radius);
  padding: 10px 11px;
  background: #fff;
  color: var(--zr-ink);
}

.search-submit,
.button-link,
.wp-block-search__button,
.comment-form input[type="submit"] {
  border: 0;
  border-radius: var(--zr-radius);
  padding: 10px 14px;
  background: var(--zr-red);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.search-submit:hover,
.button-link:hover,
.wp-block-search__button:hover,
.comment-form input[type="submit"]:hover {
  background: var(--zr-red-dark);
  color: #fff;
}

.breaking {
  border-bottom: 1px solid var(--zr-line);
  background: #fff;
}

.breaking__inner {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  overflow: hidden;
}

.breaking__label {
  flex: 0 0 auto;
  background: var(--zr-red);
  color: #fff;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.breaking__viewport {
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}

.breaking__track {
  display: flex;
  width: max-content;
  animation: zr-marquee 42s linear infinite;
}

.breaking__viewport:hover .breaking__track {
  animation-play-state: paused;
}

.breaking__items {
  display: flex;
  gap: 26px;
  padding-right: 26px;
  min-width: 0;
  white-space: nowrap;
}

.breaking__items a {
  font-weight: 800;
  text-decoration: none;
}

.breaking__items a::after {
  content: "•";
  margin-left: 26px;
  color: var(--zr-red);
}

@keyframes zr-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.site-main {
  padding: 30px 0 42px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
}

.home-card-section {
  margin-bottom: 46px;
}

.home-card-section__header {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.home-card-section__header::before {
  content: "";
  order: 2;
  height: 4px;
  background: var(--zr-red);
}

.home-card-section__header h2 {
  order: 1;
  margin: 0;
  color: #090909;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.home-card-section__header a {
  order: 3;
  color: var(--zr-muted);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.home-card {
  display: flex;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(22, 22, 22, .1);
  border-radius: var(--zr-radius);
  background: #fff;
  box-shadow: 0 10px 26px rgba(22, 22, 22, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(22, 22, 22, .11);
}

.home-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--zr-soft);
}

.home-card__image img,
.home-card__image .story-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.home-card:hover .home-card__image img {
  transform: scale(1.035);
}

.home-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 15px 16px 17px;
}

.home-card__kicker {
  margin-bottom: 8px;
  color: var(--zr-red);
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.home-card h3 {
  margin: 0 0 10px;
  color: #0d0d0d;
  font-family: var(--zr-sans);
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.2;
}

.home-card h3 a {
  text-decoration: none;
}

.home-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--zr-muted);
  font-size: .82rem;
  font-weight: 750;
}

.home-card__meta span + span::before {
  content: "-";
  margin-right: 8px;
  color: rgba(103, 97, 92, .55);
}

.home-card p {
  margin: auto 0 0;
  color: #514c47;
  font-size: .94rem;
  line-height: 1.45;
}

.front-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr);
  gap: 6px;
  margin-bottom: 44px;
}

.front-hero__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.front-hero-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  background: #101010;
}

.front-hero-card--lead {
  min-height: 506px;
}

.front-hero-card__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.front-hero-card__image img,
.front-hero-card__image .story-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform .25s ease;
}

.front-hero-card:hover .front-hero-card__image img {
  transform: scale(1.035);
}

.front-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 18%, rgba(0, 0, 0, .72) 100%);
  pointer-events: none;
}

.front-hero-card__content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 22px 24px;
  color: #fff;
}

.front-hero-card--lead .front-hero-card__content {
  padding: 34px 34px;
}

.front-hero-card__kicker {
  margin-bottom: 8px;
  font-size: .84rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.front-hero-card h1,
.front-hero-card h2 {
  margin: 0;
  font-family: var(--zr-sans);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.08;
}

.front-hero-card h1 {
  max-width: 880px;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
}

.front-hero-card h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.front-hero-card a {
  color: inherit;
  text-decoration: none;
}

.front-hero-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 800;
}

.front-hero-card__meta span + span::before {
  content: "-";
  margin-right: 8px;
  opacity: .7;
}

.front-list-section {
  margin-top: 44px;
}

.front-list-section__header {
  display: grid;
  grid-template-columns: auto minmax(60px, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.front-list-section__header::before {
  content: "";
  order: 2;
  height: 4px;
  background: #2d79d8;
}

.front-list-section__header h2 {
  order: 1;
  margin: 0;
  color: #000;
  font-family: var(--zr-sans);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.front-list-section__header a {
  order: 3;
  color: #6b6b6b;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
}

.front-list-section__header h2 a {
  color: #000;
  font-size: inherit;
  font-weight: inherit;
}

.front-list {
  display: grid;
  gap: 30px;
}

.front-list-item {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.front-list-item__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--zr-soft);
}

.front-list-item__image img,
.front-list-item__image .story-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-list-item h3 {
  margin: 0 0 12px;
  color: #000;
  font-family: var(--zr-sans);
  font-size: clamp(1.65rem, 2.6vw, 2.6rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.12;
}

.front-list-item h3 a {
  text-decoration: none;
}

.front-list-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: #777;
  font-size: 1rem;
  font-weight: 800;
}

.front-list-item__meta span:first-child {
  color: #000;
  text-transform: uppercase;
}

.front-list-item__meta span + span::before {
  content: "-";
  margin-right: 10px;
  color: #bdbdbd;
}

.front-list-item p {
  margin: 0;
  color: #747474;
  font-size: 1.08rem;
  line-height: 1.55;
}

.front-edition {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.7fr) minmax(240px, .9fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 30px;
  border-top: 4px double var(--zr-ink);
  border-bottom: 4px double var(--zr-ink);
}

.front-edition__rail,
.front-edition__lead,
.front-edition__side {
  padding-top: 18px;
}

.front-edition__rail,
.front-edition__lead {
  border-right: 1px solid var(--zr-line);
  padding-right: 24px;
}

.front-section-label {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--zr-ink);
  color: var(--zr-red);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.front-brief {
  padding: 0 0 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--zr-line);
}

.front-brief:last-child,
.front-side-story:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.front-brief h3,
.front-side-story h3 {
  margin: 0 0 8px;
  font-family: var(--zr-serif);
  font-size: 1.18rem;
  line-height: 1.14;
}

.front-brief h3 a,
.front-side-story h3 a,
.front-lead-story h1 a,
.front-category-section__header a {
  text-decoration: none;
}

.front-lead-story h1 {
  margin: 0 0 12px;
  font-family: var(--zr-serif);
  font-size: clamp(2.2rem, 4.8vw, 4.85rem);
  line-height: .95;
}

.front-lead-story p {
  max-width: 760px;
  margin: 0 0 16px;
  color: #3d3935;
  font-family: var(--zr-serif);
  font-size: 1.18rem;
  line-height: 1.55;
}

.front-lead-story__image,
.front-side-story__image {
  display: block;
  overflow: hidden;
  background: var(--zr-soft);
}

.front-lead-story__image {
  margin: 16px 0 12px;
  aspect-ratio: 16 / 9;
}

.front-lead-story__image img,
.front-side-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.front-side-story {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--zr-line);
}

.front-side-story__image {
  margin-bottom: 10px;
  aspect-ratio: 16 / 9;
}

.front-side-story p {
  margin: 0;
  color: var(--zr-muted);
  font-size: .95rem;
  line-height: 1.45;
}

.story-card {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--zr-line);
  padding-bottom: 18px;
}

.story-card--featured {
  border-bottom: 0;
  padding-bottom: 0;
}

.story-card__image {
  display: block;
  overflow: hidden;
  background: var(--zr-soft);
  aspect-ratio: 16 / 9;
}

.story-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.story-card__image:hover img {
  transform: scale(1.025);
}

.story-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 150px;
  color: rgba(22, 22, 22, .2);
  font-family: var(--zr-serif);
  font-size: clamp(2.8rem, 10vw, 6rem);
  font-weight: 900;
}

.story-card__kicker,
.section-title,
.widget-title {
  color: var(--zr-red);
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.section-title,
.widget-title {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--zr-ink);
}

.story-card__title {
  margin: 0;
  font-family: var(--zr-serif);
  font-size: clamp(1.25rem, 2.5vw, 2.25rem);
  line-height: 1.08;
}

.story-card--compact .story-card__title {
  font-size: 1.18rem;
}

.story-card--newspaper {
  border-bottom: 0;
  padding-bottom: 0;
}

.story-card--newspaper .story-card__image {
  aspect-ratio: 4 / 3;
  margin-bottom: 2px;
}

.story-card--newspaper .story-card__title {
  font-size: 1.22rem;
  line-height: 1.12;
}

.story-card--newspaper .story-card__excerpt {
  font-size: .94rem;
  line-height: 1.45;
}

.story-card__title a {
  text-decoration: none;
}

.story-card__meta,
.entry-meta {
  color: var(--zr-muted);
  font-size: .88rem;
  font-weight: 700;
}

.story-card__excerpt {
  margin: 0;
  color: #3d3935;
}

.secondary-stack {
  display: grid;
  gap: 18px;
}

.front-category-section {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 2px solid var(--zr-ink);
}

.front-category-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.front-category-section__header h2 {
  margin: 0;
  font-family: var(--zr-serif);
  font-size: 1.65rem;
  line-height: 1;
}

.front-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.front-category-grid .story-card + .story-card {
  border-left: 1px solid var(--zr-line);
  padding-left: 20px;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.category-section {
  margin-top: 34px;
}

.archive-header {
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 3px double var(--zr-line);
}

.archive-header h1,
.entry-title {
  margin: 0;
  font-family: var(--zr-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.archive-description {
  max-width: 760px;
  color: var(--zr-muted);
  font-size: 1.05rem;
}

.content-feed {
  display: grid;
  gap: 22px;
}

.content-feed .story-card {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
}

.content-feed .story-card__image {
  aspect-ratio: 4 / 3;
}

.entry {
  max-width: 810px;
}

.entry-header {
  margin-bottom: 24px;
}

.entry-content {
  font-family: var(--zr-serif);
  font-size: 1.12rem;
  line-height: 1.78;
}

.entry-content p {
  margin: 0 0 1.2em;
}

.entry-content h2,
.entry-content h3 {
  font-family: var(--zr-serif);
  line-height: 1.15;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 18px;
  border-left: 5px solid var(--zr-red);
  color: #3b3834;
  font-style: italic;
}

.entry-footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--zr-line);
  color: var(--zr-muted);
}

.entry-featured-image {
  margin: 0 0 24px;
}

.entry-featured-image img {
  width: 100%;
  border-radius: var(--zr-radius);
}

.comments-area {
  max-width: 810px;
  margin-top: 34px;
}

.comment-list {
  padding-left: 22px;
}

.post-navigation,
.posts-navigation {
  margin-top: 30px;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.sidebar {
  display: grid;
  gap: 24px;
}

.widget {
  padding: 18px;
  border: 1px solid var(--zr-line);
  border-radius: var(--zr-radius);
  background: rgba(255, 255, 255, .55);
}

.widget ul {
  margin: 0;
  padding-left: 18px;
}

.widget li + li {
  margin-top: 8px;
}

.widget-ad {
  min-height: 280px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.site-footer {
  border-top: 3px solid var(--zr-ink);
  background: #161616;
  color: #f7f1e7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  padding: 32px 0;
}

.footer-title {
  margin: 0 0 8px;
  font-family: var(--zr-serif);
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.pagination {
  margin-top: 30px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  margin: 0 3px 6px 0;
  border: 1px solid var(--zr-line);
  border-radius: var(--zr-radius);
  text-decoration: none;
  font-weight: 800;
}

.page-numbers.current {
  background: var(--zr-ink);
  color: #fff;
}

@media (max-width: 920px) {
  .masthead,
  .layout,
  .front-hero,
  .front-edition,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .front-hero-card--lead,
  .front-hero-card {
    min-height: 320px;
  }

  .front-list-item {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
  }

  .home-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .front-edition__rail,
  .front-edition__lead {
    border-right: 0;
    border-bottom: 1px solid var(--zr-line);
    padding-right: 0;
    padding-bottom: 20px;
  }

  .front-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .front-category-grid .story-card + .story-card {
    border-left: 0;
    padding-left: 0;
  }

  .masthead {
    min-height: 92px;
  }

  .nav-bar__inner {
    align-items: stretch;
    padding: 10px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
  }

  .primary-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  .primary-menu.is-open {
    display: flex;
  }

  .primary-menu > li {
    flex: none;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
  }

  .primary-menu > li:last-child {
    border-right: 0;
  }

  .primary-menu a {
    justify-content: flex-start;
    min-height: 46px;
    padding: 12px 0;
    text-align: left;
  }

  .primary-menu .sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .primary-menu .sub-menu a {
    min-height: 34px;
    padding: 6px 0 6px 18px;
    color: rgba(255, 255, 255, .72);
  }

  .header-search {
    width: 38px;
  }

  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .top-strip__inner,
  .breaking__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 14px;
  }

  .header-search .search-form:focus-within .search-field,
  .header-search .search-form:hover .search-field {
    width: min(190px, calc(100vw - 128px));
  }

  .content-feed .story-card,
  .post-list,
  .home-card-grid,
  .front-category-grid,
  .front-hero__grid,
  .front-list-item {
    grid-template-columns: 1fr;
  }

  .home-card-section {
    margin-bottom: 34px;
  }

  .home-card-section__header {
    gap: 12px;
  }

  .front-hero-card--lead,
  .front-hero-card {
    min-height: 285px;
  }

  .front-hero-card__content,
  .front-hero-card--lead .front-hero-card__content {
    padding: 20px;
  }

  .front-list-section {
    margin-top: 34px;
  }

  .front-list-section__header {
    grid-template-columns: auto minmax(44px, 1fr) auto;
    gap: 12px;
    margin-bottom: 20px;
  }

  .front-list {
    gap: 26px;
  }

  .front-edition {
    border-top-width: 3px;
    border-bottom-width: 3px;
  }

  .front-lead-story h1 {
    font-size: clamp(2rem, 12vw, 3.35rem);
  }

  .content-feed .story-card__image {
    aspect-ratio: 16 / 9;
  }

  .nav-links,
  .footer-menu {
    flex-direction: column;
    justify-content: flex-start;
  }
}
