/*
Theme Name: Pulse
Theme URI: https://dotly.ir
Author: Dotly
Description: Strategic research homepage theme with Customizer-driven sections (post type + category).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: pulse
*/

    @font-face {
      font-family: "IRANSansX";
      src: url("assets/fonts/IRANSansX-Regular.woff") format("woff");
      font-weight: 400;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "Abar";
      src: url("assets/fonts/AbarLow-Bold.woff2") format("woff2");
      font-weight: 600 700;
      font-style: normal;
      font-display: swap;
    }

    @font-face {
      font-family: "Abar";
      src: url("assets/fonts/AbarLow-Black.woff2") format("woff2");
      font-weight: 800 900;
      font-style: normal;
      font-display: swap;
    }

    :root {
      --bg: #f5f5f2;
      --text: #111111;
      --muted: #666666;
      --line: #e8e8e8;
      --green: #3a7e45;
      --green-hover: #3d7341;
      --card-radius: 0;

      --font-body: "IRANSansX", sans-serif;
      --font-title: "Abar", "IRANSansX", sans-serif;

      --layout-max: 1200px;
      --container-pad: clamp(16px, 3vw, 32px);
      --header-h: 100px;
      --gallery-img-ratio: 1 / 1;

      /* Typography scale */
      --text-xs: 0.6875rem;
      --text-sm: 0.8125rem;
      --text-base: 0.9375rem;
      --text-md: 1.0625rem;
      --text-title-sm: clamp(1.125rem, 0.6vw + 1rem, 1.5rem);
      --text-title: clamp(1.75rem, 1.2vw + 1.25rem, 2.5rem);
      --text-display: clamp(2rem, 2vw + 1rem, 3.25rem);

      /* Vertical rhythm */
      --space-section-y: clamp(3rem, 4.5vw, 4.5rem);
      --space-section-head: clamp(1.25rem, 2.5vw, 2rem);
      --space-stack-xs: 0.375rem;
      --space-stack-sm: 0.5rem;
      --space-stack-md: 1rem;
      --space-stack-lg: 1.5rem;
      --space-stack-xl: 2rem;
      --leading-tight: 1.25;
      --leading-snug: 1.4;
      --leading-normal: 1.65;
      --leading-relaxed: 1.8;
    }

    @media (min-width: 1400px) {
      :root {
        --layout-max: 1440px;
      }
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font-body);
      background: var(--bg);
      color: var(--text);
      overflow-x: hidden;
      min-height: 100dvh;
      display: flex;
      flex-direction: column;
    }

    img {
      width: 100%;
      display: block;
      object-fit: cover;
      border-radius: var(--card-radius);
    }

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

    button {
      border: none;
      outline: none;
      font-family: inherit;
      cursor: pointer;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-family: var(--font-title);
    }

    .container {
      width: 100%;
      max-width: var(--layout-max);
      margin-inline: auto;
      padding-inline: var(--container-pad);
    }

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

    .site-header {
      flex-shrink: 0;
      background: rgba(245, 245, 242, 0.96);
      backdrop-filter: blur(12px);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-inner {
      display: flex;
      flex-direction: column;
      padding-top: 12px;
    }

    .header-row-top {
      direction: ltr;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      column-gap: 24px;
      padding-bottom: 12px;
    }

    .header-left {
      justify-self: start;
      display: flex;
      align-items: center;
      gap: 36px;
    }

    .header-right {
      justify-self: end;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 36px;
    }

    .header-row-nav {
      display: flex;
      justify-content: center;
      border-top: 1px solid var(--line);
      padding: 10px 0 12px;
    }

    .header-row-nav nav {
      width: 100%;
      scrollbar-width: none;
    }

    .header-row-nav nav::-webkit-scrollbar {
      display: none;
    }

    .header-row-nav nav ul {
      justify-content: center;
      flex-wrap: nowrap;
      width: max-content;
      max-width: 100%;
      margin: 0 auto;
      gap: 6px;
    }


    .social-side {
      display: flex;
      gap: 36px;
    }

    .menu-side i,
    .social-side i {
      font-size: 17px;
    }

    .menu-side i,
    .social-side i {
      cursor: pointer;
      transition: 0.3s ease;
    }

    .menu-side i:hover,
    .social-side i:hover {
      color: var(--green);
      transform: translateY(-1px);
    }

    .logo img {
      width: 100px;
    }

    nav ul {
      display: flex;
      align-items: center;
      list-style: none;
    }

    nav a {
      padding: 8px 36px;
      border-radius: 999px;
      font-size: var(--text-base);
      font-weight: 500;
      white-space: nowrap;
      transition: 0.3s ease;
      color: #222;
    }

    nav a:hover {
      background: #ecece8;
    }

    nav .active {
      background: var(--green);
      color: white;
    }

    .nav-toggle,
    .header-search-mobile,
    .mobile-nav-close {
      display: none;
    }

    .mobile-nav-head,
    .mobile-nav-meta {
      display: none;
    }

    .mobile-nav-shell {
      width: 100%;
    }

    .nav-backdrop {
      display: none;
    }

    body.pulse-nav-open {
      overflow: hidden;
    }

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

    .hero {
      flex: 1;
      min-height: 0;
      display: flex;
      align-items: center;
      gap: clamp(24px, 4vw, 56px);
      overflow: hidden;
      padding-block: var(--space-stack-md) var(--space-stack-sm);
    }

    .hero > * {
      min-width: 0;
      min-height: 0;
    }

    .hero .content {
      flex: 0 1 53%;
    }

    .hero .gallery-wrapper {
      flex: 1 1 47%;
    }

    /* =========================
       GALLERY
    ========================== */

    .gallery-wrapper {
      height: calc(100dvh - var(--header-h));
      max-height: calc(100dvh - var(--header-h));
      overflow: hidden;
      position: relative;
      isolation: isolate;
    }


    .gallery {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      height: 100%;
      width: 100%;
      overflow: hidden;
    }

    .column {
      display: flex;
      flex-direction: column;
      gap: 14px;
      min-width: 0;
      will-change: transform;
    }

    .column a {
      display: block;
      flex-shrink: 0;
    }

    .column img {
      width: 100%;
      aspect-ratio: var(--gallery-img-ratio);
      height: auto;
      flex-shrink: 0;
      object-fit: cover;
      transition: opacity 0.3s ease, box-shadow 0.3s ease;
      box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.06),
        0 2px 5px rgba(0, 0, 0, 0.03);
    }

    .column img:hover {
      opacity: 0.92;
      box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.05);
    }

    .column-up {
      animation: scrollUp 24s linear infinite;
    }

    .column-down {
      animation: scrollDown 24s linear infinite;
    }

    .gallery:hover .column {
      animation-play-state: paused;
    }

    @keyframes scrollUp {
      from {
        transform: translateY(0);
      }

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

    @keyframes scrollDown {
      from {
        transform: translateY(-50%);
      }

      to {
        transform: translateY(0);
      }
    }

    /* =========================
       CONTENT
    ========================== */

    .content {
      max-width: 720px;
      padding-inline-start: 12px;
      overflow: hidden;
    }


    .content h1 {
      font-size: var(--text-display);
      line-height: var(--leading-tight);
      font-weight: 900;
      letter-spacing: -0.02em;
      margin-bottom: var(--space-stack-lg);
      overflow-wrap: anywhere;
    }

    .content p {
      font-size: var(--text-base);
      line-height: var(--leading-relaxed);
      color: var(--muted);
      max-width: 90%;
      margin-bottom: var(--space-stack-xl);
    }

    .buttons {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .btn {
      padding: 10px 56px;
      font-size: var(--text-base);
      font-weight: 700;
      transition: 0.3s ease;
    }

    .btn-primary {
      background: var(--green);
      color: white;
      box-shadow: 0 10px 25px rgba(79, 143, 83, 0.18);
    }

    .btn-primary:hover {
      background: var(--green-hover);
      transform: translateY(-2px);
    }

    .btn-secondary {
      background: white;
      border: 1px solid #e3e3e3;
      color: #222;
    }

    .btn-secondary:hover {
      background: #f0f0f0;
    }

    /* =========================
       SECTIONS (shared)
    ========================== */

    .section {
      padding-top: var(--space-section-y);
      padding-bottom: var(--space-section-y);
      z-index: 1;
    }

    .section + .section,
    .hero + .section {
      /*padding-top: 0;*/
    }

    .section-head {
      margin-bottom: var(--space-section-head);
    }

    .section-head h2 {
      font-size: var(--text-title);
      font-weight: 800;
      line-height: var(--leading-tight);
      letter-spacing: -0.02em;
      margin-bottom: var(--space-stack-sm);
    }

    .section-head p {
      font-size: var(--text-base);
      color: var(--muted);
      line-height: var(--leading-normal);
    }

    .section-head-center {
      text-align: center;
      max-width: 520px;
      margin-inline: auto;
    }

    .section-head-right {
      text-align: right;
      max-width: none;
      margin-inline: 0;
    }

    /* =========================
       SECTION 1 — Filter cards
    ========================== */

    .filter-bar {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px;
      margin-bottom: var(--space-section-head);
    }

    .filter-btn {
      padding: 8px 36px;
      font-size: var(--text-sm);
      font-weight: 600;
      background: transparent;
      color: #333;
      transition: 0.25s ease;
    }

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

    .filter-btn.active {
      background: var(--green);
      border-color: var(--green);
      color: white;
    }

    .filter-cards {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: clamp(16px, 2.8vw, 36px);
    }

    .filter-card {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transition: opacity 0.35s ease, transform 0.35s ease;
    }

    .filter-card.is-hidden {
      display: none;
    }

    .filter-card-img {
      aspect-ratio: 1.85 / 1;
      overflow: hidden;
    }

    .filter-card-img img {
      height: 100%;
      transition: transform 0.5s ease;
    }

    .filter-card:hover .filter-card-img img {
      transform: scale(1.04);
    }

    .filter-card-body {
      padding-top: clamp(18px, 2.5vw, 28px);
      display: flex;
      flex-direction: column;
      flex: 1;
      gap: 10px;
    }

    .filter-card-tag {
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--green);
      letter-spacing: 0.02em;
    }

    .filter-card-body h3 {
      font-size: var(--text-title-sm);
      font-weight: 800;
      line-height: var(--leading-snug);
    }

    .filter-card-body p {
      font-size: var(--text-sm);
      color: var(--muted);
      line-height: var(--leading-normal);
      flex: 1;
    }

    .filter-card-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: var(--text-sm);
      font-weight: 700;
      color: var(--text);
      margin-top: 6px;
      transition: color 0.25s ease, gap 0.25s ease;
    }

    .filter-card-link:hover {
      color: var(--green);
      gap: 12px;
    }

    /* =========================
       SECTION 2 — 2×2 grid blocks
    ========================== */

    .blocks-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: clamp(14px, 2vw, 24px);
    }

    .block-item {
      direction: ltr;
      display: flex;
      align-items: stretch;
      min-height: 0;
      overflow: hidden;
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .block-item:hover {
      border-color: rgba(79, 143, 83, 0.35);
      box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
    }

    .block-item-media {
      flex: 0 0 40%;
      width: 40%;
      aspect-ratio: 1;
      overflow: hidden;
    }

    .block-item-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 0;
      transition: transform 0.45s ease;
    }

    .block-item:hover .block-item-media img {
      transform: scale(1.05);
    }

    .block-item-body {
      direction: rtl;
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 10px;
      padding: clamp(14px, 2vw, 22px);
    }

    .block-item-tag {
      align-self: flex-start;
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--green);
      letter-spacing: 0.02em;
    }

    .block-item h3 {
      font-size: var(--text-title-sm);
      font-weight: 800;
      line-height: var(--leading-snug);
      margin: 0;
    }

    .block-item-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 4px;
    }

    .block-item-author-img {
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      border-radius: 50%;
      object-fit: cover;
    }

    .block-item-author-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 0;
    }

    .block-item-author-name {
      font-size: var(--text-sm);
      font-weight: 700;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .block-item-date {
      font-size: var(--text-xs);
      color: var(--muted);
      font-family: var(--font-body);
    }

    /* =========================
       SECTION 3 — Green banner
    ========================== */

    .section-banner {
      padding: 0;
      margin-bottom: var(--space-section-y);
    }

    .section + .section-banner {
      margin-top: 0;
    }

    .section-banner + .section {
      padding-top: 0;
    }

    .banner-shell {
      width: 100%;
      background: var(--green);
      color: white;
      padding-block: clamp(2.5rem, 4vw, 3.5rem);
    }

    .banner-inner {
      direction: ltr;
      display: grid;
      grid-template-columns: .9fr 1.1fr;
      align-items: center;
      gap: clamp(24px, 4vw, 56px);
    }

    .banner-content {
      direction: rtl;
      text-align: right;
    }

    .banner-media {
      width: 100%;
      aspect-ratio: 1;
      overflow: hidden;
      justify-self: stretch;
    }

    .banner-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    }


    .banner-content h2 {
      font-size: var(--text-title);
      font-weight: 900;
      line-height: var(--leading-tight);
      margin-bottom: var(--space-stack-md);
    }

    .banner-content p {
      font-size: var(--text-base);
      line-height: var(--leading-relaxed);
      opacity: 0.92;
      margin-bottom: var(--space-stack-lg);
      max-width: 52ch;
    }

    .btn-banner {
      background: white;
      color: var(--green);
      padding: 10px 40px;
      font-size: var(--text-base);
      font-weight: 800;
      transition: 0.3s ease;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    }

    .btn-banner:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
    }

    /* =========================
       SECTION 4 — Carousel
    ========================== */

    .section-carousel {
      overflow: hidden;
    }

    .section-carousel .section-head {
      margin-bottom: var(--space-section-head);
    }

    .carousel-viewport {
      overflow: hidden;
      margin-right: max(
        var(--container-pad),
        calc((100vw - var(--layout-max)) / 2 + var(--container-pad))
      );
    }

    .carousel-track {
      display: flex;
      gap: clamp(16px, 2vw, 24px);
      width: max-content;
      padding-inline-end: var(--container-pad);
      animation: carouselScroll 42s linear infinite;
      will-change: transform;
    }

    .carousel-viewport:hover .carousel-track {
      animation-play-state: paused;
    }

    @keyframes carouselScroll {
      from {
        transform: translateX(0);
      }
      to {
        transform: translateX(-50%);
      }
    }

    .carousel-slide {
      flex: 0 0 clamp(260px, 28vw, 340px);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .carousel-slide-media {
      overflow: hidden;
      background: #111;
      box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .carousel-slide img {
      aspect-ratio: 3 / 2;
      height: auto;
      transition: transform 0.6s ease;
    }

    .carousel-slide:hover img {
      transform: scale(1.05);
    }

    .carousel-slide-caption {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      text-align: right;
      direction: rtl;
      padding-inline: 2px;
    }

    .carousel-slide-tag {
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--green);
      letter-spacing: 0.02em;
    }

    .carousel-slide-caption h3 {
      font-size: var(--text-title-sm);
      font-weight: 800;
      line-height: var(--leading-snug);
      margin: 0;
      color: var(--text);
    }

    .carousel-slide-caption time {
      font-size: var(--text-xs);
      color: var(--muted);
      font-family: var(--font-body);
    }

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

    .site-footer {
      margin-top: auto;
      background: var(--bg);
      color: var(--text);
      padding-block: clamp(32px, 4vw, 48px);
    }

    .footer-inner {
      display: flex;
      flex-direction: column;
      gap: clamp(20px, 3vw, 28px);
    }

    .footer-top {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
    }

    .footer-brand {
      justify-self: start;
      display: block;
      line-height: 0;
    }

    .footer-brand img {
      width: 88px;
      height: auto;
    }

    .footer-nav {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: clamp(8px, 2vw, 32px);
    }

    .footer-nav a {
      font-size: var(--text-sm);
      font-weight: 500;
      color: var(--text);
      white-space: nowrap;
      transition: color 0.25s ease;
    }

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

    .footer-social {
      justify-self: end;
      display: flex;
      align-items: center;
      gap: 18px;
      font-size: 17px;
    }

    .footer-social a {
      color: var(--muted);
      transition: color 0.25s ease, transform 0.25s ease;
    }

    .footer-social a:hover {
      color: var(--green);
      transform: translateY(-2px);
    }

    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding-top: clamp(16px, 2.5vw, 24px);
      border-top: 1px solid var(--line);
    }

    .footer-copy,
    .footer-credit {
      font-size: var(--text-xs);
      color: var(--muted);
      margin: 0;
    }

    .footer-credit a {
      color: var(--text);
      font-weight: 600;
      transition: color 0.25s ease;
    }

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

    /* =========================
       Article detail page
    ========================== */

    .article-page {
      flex: 1;
      padding-block: clamp(24px, 4vw, 48px);
    }

    .article-breadcrumb {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
      font-size: var(--text-sm);
      color: var(--muted);
      margin-bottom: var(--space-section-head);
    }

    .article-breadcrumb a:hover {
      color: var(--green);
    }

    .article-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
      gap: clamp(32px, 5vw, 56px);
      align-items: start;
    }

    .article-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .article-tags--below {
      margin-top: clamp(28px, 4vw, 40px);
      padding-top: clamp(20px, 3vw, 28px);
      border-top: 1px solid var(--line);
    }

    .article-tag {
      display: inline-block;
      padding: 4px 12px;
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--green);
      background: rgba(58, 126, 69, 0.08);
      border: 1px solid rgba(58, 126, 69, 0.2);
    }

    .article-tag:hover {
      background: rgba(58, 126, 69, 0.14);
    }

    .article-title {
      font-family: var(--font-title);
      font-size: var(--text-display);
      font-weight: 800;
      line-height: var(--leading-tight);
      margin-bottom: var(--space-stack-md);
    }

    .article-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: clamp(24px, 3vw, 36px);
    }

    .article-author-avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .article-author-name {
      display: block;
      font-size: var(--text-base);
      font-weight: 700;
    }

    .article-date {
      font-size: var(--text-xs);
      color: var(--muted);
    }

    .article-hero-image {
      margin-bottom: clamp(28px, 4vw, 40px);
      aspect-ratio: 16 / 9;
      overflow: hidden;
    }

    .article-hero-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .article-content {
      font-size: var(--text-md);
      line-height: var(--leading-relaxed);
      color: var(--text);
    }

    .article-content > * + * {
      margin-top: 1.25em;
    }

    .article-content h2 {
      font-family: var(--font-title);
      font-size: var(--text-title-sm);
      font-weight: 800;
      margin-top: 2em;
    }

    .article-sidebar {
      position: sticky;
      top: calc(var(--header-h) + 24px);
      padding: clamp(20px, 2.5vw, 28px);
      background: #fff;
      border: 1px solid var(--line);
    }

    .article-sidebar-title {
      font-family: var(--font-title);
      font-size: var(--text-title-sm);
      font-weight: 800;
      margin-bottom: var(--space-stack-md);
      padding-bottom: var(--space-stack-sm);
      border-bottom: 2px solid var(--green);
    }

    .related-articles {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .related-article {
      display: grid;
      grid-template-columns: 88px 1fr;
      gap: 12px;
      align-items: start;
    }

    .related-article img {
      aspect-ratio: 1;
      height: auto;
    }

    .related-article-tag {
      display: block;
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--green);
      margin-bottom: var(--space-stack-xs);
    }

    .related-article h3 {
      font-size: var(--text-base);
      font-weight: 700;
      line-height: var(--leading-snug);
      margin-bottom: var(--space-stack-xs);
    }

    .related-article time {
      font-size: var(--text-xs);
      color: var(--muted);
    }

    .related-article:hover h3 {
      color: var(--green);
    }

    .article-sidebar-empty {
      font-size: 14px;
      color: var(--muted);
    }

    /* =========================
       404 page
    ========================== */

    .error-page {
      flex: 1;
      display: flex;
      align-items: center;
      padding-block: clamp(48px, 10vw, 120px);
    }

    .error-page-inner {
      text-align: center;
      max-width: 560px;
      margin-inline: auto;
    }

    .error-code {
      font-family: var(--font-title);
      font-size: clamp(72px, 12vw, 120px);
      font-weight: 900;
      line-height: 1;
      color: var(--green);
      opacity: 0.25;
      margin-bottom: 8px;
    }

    .error-page h1 {
      font-family: var(--font-title);
      font-size: clamp(24px, 3.5vw, 36px);
      font-weight: 800;
      margin-bottom: 16px;
    }

    .error-lead {
      font-size: var(--text-md);
      line-height: var(--leading-relaxed);
      color: var(--muted);
      margin-bottom: var(--space-stack-lg);
    }

    .error-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      justify-content: center;
    }

    /* =========================
       TABLET / MOBILE (≤991px)
    ========================== */

    @media (max-width: 991px) {

      .header-tools-desktop {
        display: none !important;
      }

      .header-search-mobile {
        display: none;
      }

      .header-row-top {
        grid-template-columns: 44px 1fr 44px;
        column-gap: 12px;
        padding-bottom: 12px;
      }

      .header-logo-bar {
        grid-column: 2;
        justify-self: center;
      }

      .nav-toggle {
        display: inline-flex;
        grid-column: 3;
        justify-self: end;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        background: transparent;
        color: var(--text);
        cursor: pointer;
      }

      .nav-toggle-box {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 7px;
        width: 24px;
      }

      .nav-toggle-line {
        display: block;
        height: 1.5px;
        width: 100%;
        border-radius: 1px;
        background: currentColor;
        transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
      }

      .site-header.is-nav-open .nav-toggle-line:nth-child(1) {
        transform: translateY(4.25px) rotate(45deg);
      }

      .site-header.is-nav-open .nav-toggle-line:nth-child(2) {
        transform: translateY(-4.25px) rotate(-45deg);
      }

      .header-row-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        z-index: 101;
        width: min(300px, 88vw);
        margin: 0;
        padding: 0;
        border: none;
        background: #fff;
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.08);
        visibility: hidden;
        transform: translateX(100%);
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
      }

      .site-header.is-nav-open .header-row-nav {
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
      }

      .mobile-nav-shell {
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        height: 100%;
        padding: 28px 28px 32px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: white;
      }

      .mobile-nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 28px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--line);
      }

      .mobile-nav-logo {
        display: block;
        flex-shrink: 0;
      }

      .mobile-nav-logo img {
        width: 92px;
        height: auto;
        display: block;
      }

      .mobile-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: var(--bg);
        color: var(--muted);
        font-size: 18px;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease;
      }

      .mobile-nav-close:hover {
        color: var(--text);
        background: #ecece8;
      }

      .mobile-nav-main {
        flex: 1;
        padding-block: 8px 24px;
      }

      .header-row-nav nav ul {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: none;
        margin: 0;
        gap: 0;
      }

      .header-row-nav nav li {
        border-bottom: 1px solid var(--line);
      }

      .header-row-nav nav li:last-child {
        border-bottom: none;
      }

      .header-row-nav nav a {
        display: block;
        width: 100%;
        padding: 18px 4px;
        font-size: 15px;
        font-weight: 500;
        letter-spacing: 0.01em;
        text-align: right;
        white-space: normal;
        border-radius: 0;
        background: transparent;
        color: var(--text);
        transition: color 0.2s ease;
      }

      .header-row-nav nav a:hover {
        background: transparent;
        color: var(--green);
      }

      .header-row-nav nav .active {
        background: transparent;
        color: var(--green);
        font-weight: 700;
      }

      .mobile-nav-meta {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: auto;
        padding-top: 28px;
        border-top: 1px solid var(--line);
      }

      .mobile-nav-social {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
      }

      .mobile-nav-social-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: #fff;
        color: var(--text);
        font-size: 16px;
        transition: border-color 0.2s ease, color 0.2s ease;
      }

      .mobile-nav-social-link:hover {
        border-color: var(--green);
        color: var(--green);
        transform: none;
      }

      .mobile-nav-login {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        border-radius: 999px;
        border: 1px solid var(--green);
        background: transparent;
        color: var(--green);
        font-size: 14px;
        font-weight: 700;
        transition: background 0.25s ease, color 0.25s ease;
      }

      .mobile-nav-login:hover {
        background: var(--green);
        color: #fff;
        transform: none;
      }

      .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100;
        background: rgba(17, 17, 17, 0.4);
        backdrop-filter: blur(3px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
      }

      .nav-backdrop:not([hidden]) {
        opacity: 1;
        pointer-events: auto;
      }

      .article-layout {
        grid-template-columns: 1fr;
      }

      .article-sidebar {
        position: static;
      }

      .filter-cards,
      .blocks-grid {
        grid-template-columns: 1fr;
      }

      .block-item {
        flex-direction: column;
      }

      .block-item-media {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 10;
      }

      .filter-btn {
        padding: 8px 18px;
      }

      .section-head-right {
        text-align: center;
      }

      .banner-inner {
        grid-template-columns: 1fr;
        direction: ltr;
      }

      .banner-content {
        direction: rtl;
        text-align: center;
      }

      .banner-media {
        max-width: min(100%, 400px);
        margin-inline: auto;
      }

      .carousel-slide {
        flex: 0 0 clamp(240px, 72vw, 300px);
      }
    }

    @media (max-width: 767px) {
      :root {
        --space-section-y: clamp(2.5rem, 6vw, 3.25rem);
        --space-section-head: clamp(1rem, 3vw, 1.5rem);
        --text-display: clamp(1.75rem, 5vw + 0.5rem, 2.25rem);
        --text-title: clamp(1.5rem, 3vw + 0.75rem, 2rem);
      }

      .header-row-top {
        grid-template-columns: 44px 1fr 44px;
      }

      .header-search-mobile {
        display: inline-flex;
        grid-column: 1;
        justify-self: start;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: none;
        background: transparent;
        color: var(--text);
        font-size: 17px;
        cursor: pointer;
        transition: color 0.2s ease;
      }

      .header-search-mobile:hover {
        color: var(--green);
      }

      .header-logo-bar {
        grid-column: 2;
        justify-self: center;
      }

      .nav-toggle {
        grid-column: 3;
        justify-self: end;
      }

      .hero {
        flex: none;
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
        padding-block: var(--space-stack-sm) var(--space-section-y);
        gap: var(--space-stack-xl);
        overflow: visible;
      }

      .hero .gallery-wrapper {
        order: -1;
        flex: none;
        width: 100%;
        height: min(400px, 52vh);
        max-height: none;
      }

      .hero .content {
        flex: none;
        width: 100%;
        max-width: 100%;
        padding-inline: 0;
        text-align: center;
        padding-inline: var(--container-pad);
      }

      .hero .content p {
        max-width: 100%;
        margin-inline: auto;
      }

      .hero .buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
      }

      .hero .buttons .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 14px 24px;
        box-sizing: border-box;
      }

      .gallery {
        gap: 10px;
      }

      .column {
        gap: 10px;
      }
    }

    @media (max-width: 768px) {

      .header-inner {
        padding-top: 10px;
      }

      .logo img {
        width: 80px;
        height: auto;
      }

      .footer-top {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: var(--space-stack-md);
      }

      .footer-brand,
      .footer-social {
        justify-self: center;
      }

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

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

      .error-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .error-actions .btn {
        width: 100%;
      }
    }

    @media (max-width: 480px) {

      .header-left,
      .header-right {
        gap: 10px;
      }

      .menu-side i,
      .social-side i {
        font-size: 15px;
      }

      .nav-toggle {
        width: 40px;
        height: 40px;
      }

      .filter-bar {
        justify-content: center;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
      
      }

      .filter-bar::-webkit-scrollbar {
        display: none;
      }

      .filter-btn {
        flex-shrink: 0;
      }
    }