/* =========================
   ROOT VARIABLES
========================= */

:root {
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-primary: #d71920;
  --color-primary-dark: #a90f15;
  --color-dark: #0f172a;

  --font-main: Arial, Helvetica, sans-serif;

  --container-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.1);

  --transition: 0.25s ease;
}


/* =========================
   RESET / BASE
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(215, 25, 32, 0.35);
  outline-offset: 3px;
}

p {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text);
  line-height: 1.15;
  margin-top: 0;
}


/* =========================
   LAYOUT
========================= */

.container {
  width: min(100% - 32px, var(--container-width));
  margin-inline: auto;
  padding-block: 24px 48px;
}

.site-main {
  min-height: 70vh;
}


/* =========================
   BLOCK TITLES
========================= */

.block-title {
  position: relative;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
}

.block-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 64px;
  height: 2px;
  background: var(--color-primary);
}

.block-title a:hover {
  color: var(--color-primary);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.block-header .block-title {
  margin-bottom: 0;
  flex: 1;
}


/* =========================
   HERO
========================= */

.hero {
  margin-bottom: 36px;
}

.hero__article,
.hero {
  position: relative;
}

.hero__link,
.hero > a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-dark);
  box-shadow: var(--shadow-md);
}

.hero__image,
.hero img {
  width: 100%;
  height: clamp(320px, 46vw, 560px);
  object-fit: cover;
  transition: transform var(--transition), opacity var(--transition);
}

.hero__link:hover .hero__image,
.hero > a:hover img {
  transform: scale(1.035);
  opacity: 0.92;
}

.hero__overlay,
.hero-overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: clamp(22px, 4vw, 42px);
  color: #fff;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.58) 45%,
      rgba(0, 0, 0, 0.08) 100%
    );
}

.hero__title,
.hero h1 {
  max-width: 850px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero__date,
.hero-cat {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* =========================
   AD BANNER
========================= */

.ad-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 96px;
  margin: 36px 0;
  padding: 20px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  background: #e5e7eb;
  color: var(--color-muted);
  font-size: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* =========================
   NEWS CARD BASE
========================= */

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(215, 25, 32, 0.25);
}

.news-card__image-link {
  display: block;
  overflow: hidden;
  background: #d1d5db;
}

.news-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform var(--transition), opacity var(--transition);
}

.news-card:hover .news-card__image {
  transform: scale(1.045);
  opacity: 0.94;
}

.news-card__content {
  padding: 14px;
}

.news-card__date {
  display: block;
  margin-bottom: 7px;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.news-card__title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.news-card__title a {
  color: var(--color-text);
}

.news-card__title a:hover {
  color: var(--color-primary);
}


/* =========================
   TRENDING
========================= */

.trending-block,
.trending {
  margin: 36px 0 44px;
}

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

.trending-card .news-card__title,
.trending h4 {
  font-size: 0.98rem;
}

.trending img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.trending h4 {
  margin: 9px 0 0;
  line-height: 1.25;
}


/* =========================
   CATEGORY BLOCKS
========================= */

.category-block {
  margin-top: 46px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}


/* =========================
   FEATURED STORY
========================= */

.news-card.featured,
.featured {
  min-height: 100%;
}

.news-card.featured .news-card__image,
.featured img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}

.news-card.featured .news-card__content {
  padding: 18px;
}

.news-card.featured .news-card__title,
.featured h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.featured img {
  border-radius: var(--radius-md);
}

.featured h3 {
  margin: 12px 0 0;
  letter-spacing: -0.035em;
}


/* =========================
   SMALL LIST
========================= */

.small-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.small-list .news-card,
.small-list article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.small-list .news-card__image-link {
  border-radius: var(--radius-sm);
}

.small-list .news-card__image,
.small-list img {
  width: 112px;
  height: 82px;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.small-list .news-card__content {
  padding: 0;
}

.small-list .news-card__date {
  margin-bottom: 5px;
  font-size: 0.72rem;
}

.small-list .news-card__title,
.small-list h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}


/* =========================
   LEGACY ARTICLE STYLES
========================= */

.trending-grid article:not(.news-card),
.featured:not(.news-card) {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.trending-grid article:not(.news-card) a,
.featured:not(.news-card) a {
  display: block;
}

.trending-grid article:not(.news-card) h4,
.featured:not(.news-card) h3 {
  padding-inline: 12px;
  padding-bottom: 12px;
}


/* =========================
   WORDPRESS CONTENT HELPERS
========================= */

.alignwide {
  max-width: var(--container-width);
  margin-inline: auto;
}

.alignfull {
  width: 100%;
  max-width: 100%;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.85rem;
}

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


/* =========================
   RESPONSIVE
========================= */

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

  .editorial-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .container {
    width: min(100% - 24px, var(--container-width));
    padding-block: 16px 36px;
  }

  .hero {
    margin-bottom: 28px;
  }

  .hero__link,
  .hero > a {
    border-radius: var(--radius-md);
  }

  .hero__image,
  .hero img {
    height: 360px;
  }

  .hero__overlay,
  .hero-overlay {
    padding: 20px;
  }

  .hero__title,
  .hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
  }

  .trending-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .small-list {
    grid-template-columns: 1fr;
  }

  .small-list .news-card,
  .small-list article {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .small-list .news-card__image,
  .small-list img {
    width: 100px;
    height: 76px;
  }

  .block-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero__image,
  .hero img {
    height: 300px;
  }

  .hero__title,
  .hero h1 {
    font-size: 1.75rem;
  }

  .news-card__content {
    padding: 12px;
  }

  .small-list .news-card,
  .small-list article {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .small-list .news-card__image,
  .small-list img {
    width: 92px;
    height: 70px;
  }

  .small-list .news-card__title,
  .small-list h4 {
    font-size: 0.9rem;
  }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero__link:hover .hero__image,
  .hero > a:hover img,
  .news-card:hover .news-card__image,
  a:hover img {
    transform: none;
  }
}

/* =========================
   SINGLE POST LAYOUT
========================= */

.single-article {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

/* Header & Meta */
.single-categories {
  margin-bottom: 16px;
}

.single-categories a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.single-categories a:hover {
  background: var(--color-primary);
  color: #fff;
}

.single-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 16px;
  text-wrap: balance;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.meta-separator {
  opacity: 0.4;
}

/* Featured Image */
.single-featured-image-wrapper {
  margin: 0 0 32px;
}

.single-featured-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.image-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
  font-style: italic;
}

/* Content Typography (Crucial for readability) */
.single-content {
  /* 65-75 characters per line is optimal for reading */
  max-width: 75ch;
  margin-inline: auto;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-text);
}

.single-content p {
  margin-bottom: 1.5em;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.single-content h2 { font-size: 1.75rem; }
.single-content h3 { font-size: 1.4rem; }

.single-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-content a:hover {
  color: var(--color-primary-dark);
}

.single-content blockquote {
  margin: 2em 0;
  padding: 20px 24px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-dark);
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}

/* Tags */
.single-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.single-tags {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.single-tags a {
  color: var(--color-text);
  margin-right: 8px;
}

.single-tags a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* =========================
   AUTHOR BIO
========================= */

.author-bio {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--color-bg);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  border: 1px solid var(--color-border);
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  flex: 1;
}

.author-name {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.author-description {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* =========================
   POST NAVIGATION
========================= */

.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.post-navigation a {
  display: block;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.post-navigation a:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.post-navigation .nav-next {
  text-align: right;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 700px) {
  .single-article {
    padding: 20px;
  }

  .author-bio {
    flex-direction: column;
    text-align: center;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .post-navigation .nav-next {
    text-align: left;
  }
}

/* =========================
   SITE HEADER
========================= */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 100;
}

/* Top Bar */
.top-bar {
  background: var(--color-dark);
  color: #fff;
  font-size: 0.8rem;
  padding: 8px 0;
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar__date { opacity: 0.8; }

.top-bar__cta {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-bar__cta:hover { color: var(--color-primary); }

/* Main Header */
.main-header { padding: 20px 0; }

.main-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.site-title a { color: var(--color-text); }
.site-title a:hover { color: var(--color-primary); }

.site-description {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.custom-logo {
  max-height: 60px;
  width: auto;
}

/* Hamburger Icon */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.hamburger-box {
  display: block;
  width: 24px;
  height: 18px;
  position: relative;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  position: absolute;
  transition: var(--transition);
}
.hamburger-inner { top: 8px; }
.hamburger-inner::before { content: ""; top: -8px; }
.hamburger-inner::after { content: ""; top: 8px; }

/* Hamburger "X" animation when open */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner { background: transparent; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::before { transform: rotate(45deg); top: 0; }
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::after { transform: rotate(-45deg); top: 0; }

/* Navigation */
.main-navigation { border-top: 1px solid var(--color-border); }

.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.primary-menu a {
  display: block;
  padding: 16px 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color var(--transition);
}
.primary-menu a:hover,
.primary-menu li:focus-within > a {
  color: var(--color-primary);
}

/* Desktop Dropdowns (CSS-only, accessible via hover AND keyboard focus) */
.primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  list-style: none;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 99;
}

/* Show dropdown on hover OR when a link inside is focused via keyboard */
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.9rem;
}
.primary-menu .sub-menu a:hover {
  background: var(--color-bg);
}

/* =========================
   RESPONSIVE HEADER
========================= */

@media (max-width: 900px) {
  .mobile-menu-toggle { display: block; }

  .main-navigation {
    display: none; /* Hidden by default on mobile */
    border-top: none;
  }
  
  /* JS will toggle this class */
  .main-navigation.is-open { display: block; }

  .primary-menu {
    flex-direction: column;
    padding: 16px 0;
  }

  .primary-menu a {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  /* On mobile, submenus are always visible and indented. 
     This is more accessible than nested toggle buttons. */
  .primary-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--color-bg);
    padding: 0 0 0 16px;
    display: block;
  }
}

/* =========================
   SITE FOOTER
========================= */

.site-footer {
  background: var(--color-dark);
  color: #cbd5e1;
  font-size: 0.9rem;
  margin-top: 60px;
}

.site-footer a {
  color: #e2e8f0;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: var(--color-primary);
}

/* Footer Widgets */
.footer-widgets {
  padding: 48px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-widget-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.footer-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-widget li {
  margin-bottom: 10px;
}

/* Footer Bottom Bar */
.footer-bottom {
  padding: 24px 0;
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Footer Menu */
.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-menu a {
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-menu a:hover {
  opacity: 1;
}

/* Back to Top Button */
.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
  color: #fff;
}

/* =========================
   RESPONSIVE FOOTER
========================= */

@media (max-width: 900px) {
  .footer-widgets__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-widgets__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-menu {
    justify-content: center;
  }
}

/* =========================
   ARCHIVE HEADER
========================= */

.archive-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  line-height: 1.2;
}

.page-title span {
  color: var(--color-primary);
}

.archive-description {
  max-width: 70ch;
  color: var(--color-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =========================
   POSTS GRID
========================= */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Meta badges inside cards */
.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.75rem;
}

/* Style category links as small badges */
.news-card__meta a {
  display: inline-block;
  padding: 3px 8px;
  background: var(--color-bg);
  color: var(--color-primary);
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  transition: var(--transition);
}

.news-card__meta a:hover {
  background: var(--color-primary);
  color: #fff;
}

.news-card__meta time {
  color: var(--color-muted);
  font-weight: 500;
  margin-left: auto; /* Pushes date to the right if space allows */
}

/* Excerpt styling */
.news-card__excerpt {
  margin: 12px 0 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: var(--transition);
}

.read-more:hover {
  gap: 4px; /* Slight movement effect on hover */
}

/* =========================
   PAGINATION
========================= */

.navigation.pagination {
  margin: 48px 0;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 600;
  transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.page-numbers.dots {
  background: transparent;
  border: none;
  color: var(--color-muted);
  cursor: default;
}

/* =========================
   NO POSTS FOUND
========================= */

.no-posts-found {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.no-posts-found h2 {
  margin-bottom: 12px;
}

.no-posts-found p {
  color: var(--color-muted);
  margin-bottom: 24px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .news-card__meta time {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
}