/*
Theme Name: MenuTouch Blog
Theme URI: https://menutouch.ir/blog/
Author: MenuTouch
Description: Lightweight RTL blog theme for MenuTouch SEO content.
Version: 1.3.0
Requires at least: 6.0
Text Domain: menutouch-blog
*/

@font-face {
  font-family: Ravi;
  src: url('assets/fonts/RaviFaNum-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Ravi;
  src: url('assets/fonts/RaviFaNum-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Ravi;
  src: url('assets/fonts/RaviFaNum-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --white: #fff;
  --ink: #111318;
  --muted: #5d6068;
  --line: #dddde1;
  --soft: #f6f6f7;
  --red: #c60024;
  --red-dark: #99001c;
  --gold: #f5b800;
  --max: 1280px;
  --measure: 800px;
  --radius: 6px;
  font-family: Ravi, Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  direction: rtl;
  font-family: inherit;
  overflow-x: hidden;
}

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

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

button,
input,
textarea {
  font: inherit;
}

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

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  background: var(--ink);
  color: var(--white);
  z-index: 1000;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.site-header {
  width: min(var(--max), calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 180px;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-weight: 900;
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.45rem;
  line-height: 1;
}

.nav {
  height: 78px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(12px, 2.2vw, 34px);
  font-weight: 700;
}

.nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

.header-cta,
.btn,
.blog-search button {
  min-height: 50px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.header-cta {
  justify-self: end;
}

.header-cta,
.btn-red {
  background: var(--red);
  color: var(--white);
}

.header-cta:hover,
.header-cta:focus-visible,
.btn-red:hover,
.btn-red:focus-visible,
.blog-search button:hover,
.blog-search button:focus-visible {
  background: var(--red-dark);
}

.btn:hover,
.btn:focus-visible,
.header-cta:hover,
.header-cta:focus-visible {
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}

.mobile-menu {
  display: none;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--red);
}

.blog-hero,
.blog-main,
.article-shell,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.blog-hero {
  padding: clamp(56px, 8vw, 104px) 0 clamp(46px, 7vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.4fr);
  gap: clamp(34px, 7vw, 92px);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.compact-hero {
  grid-template-columns: minmax(0, 820px);
  padding-bottom: clamp(42px, 6vw, 68px);
}

.not-found-hero {
  min-height: calc(100vh - 300px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.blog-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(3rem, 6.9vw, 6.4rem);
  line-height: 1.02;
  font-weight: 900;
}

.blog-hero p {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  font-weight: 700;
}

.blog-search {
  max-width: 640px;
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--ink);
  background: var(--white);
}

.blog-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.blog-search input::placeholder {
  color: #8b8d94;
}

.blog-search button {
  min-height: 56px;
  border-radius: 0;
  background: var(--red);
  color: var(--white);
}

.hero-feature {
  display: grid;
  gap: 14px;
  align-self: stretch;
  padding: 14px;
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--gold);
}

.hero-feature-image,
.featured-image,
.post-card-image,
.post-row-image,
.article-cover-image,
.related-image {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--soft);
}

.hero-feature span {
  width: max-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 900;
}

.hero-feature strong {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.3;
  font-weight: 900;
}

.blog-main {
  padding: clamp(54px, 7vw, 92px) 0;
}

.featured-article {
  display: grid;
  grid-template-columns: minmax(320px, 0.47fr) minmax(0, 1fr);
  align-items: stretch;
  border-top: 2px solid var(--red);
  border-bottom: 1px solid var(--line);
}

.featured-media {
  min-height: 100%;
  display: block;
  background: var(--soft);
}

.featured-image {
  height: 100%;
  min-height: 360px;
}

.featured-copy {
  padding: clamp(28px, 5vw, 62px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta,
.article-meta-grid,
.post-card-top,
.post-card-foot,
.post-row-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.post-meta span,
.article-meta-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.featured-copy h2,
.section-head h2 {
  margin: 18px 0 0;
  font-size: clamp(2.05rem, 4vw, 4rem);
  line-height: 1.12;
  font-weight: 900;
}

.featured-copy p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.read-more,
.section-head > a {
  width: max-content;
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  font-weight: 900;
}

.section-head {
  margin: clamp(54px, 7vw, 92px) 0 28px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
}

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

.post-card {
  min-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  background: var(--white);
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover,
.post-card:focus-within {
  border-color: var(--ink);
  box-shadow: 8px 8px 0 var(--gold);
  transform: translateY(-2px);
}

.post-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card-media {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.post-card-body {
  min-width: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.post-card h3,
.post-row h2,
.related-card h3 {
  margin: 18px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.25;
  font-weight: 900;
}

.post-card h3 a,
.post-row h2 a,
.related-card h3 a {
  position: relative;
  z-index: 2;
}

.post-card p,
.post-row p,
.related-card span {
  margin: 0;
  color: var(--muted);
}

.post-card-foot {
  justify-content: space-between;
  margin-top: auto;
  padding-top: 24px;
  color: var(--red);
  font-weight: 900;
}

.post-list {
  display: grid;
}

.post-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 54px;
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.post-row:last-child {
  border-bottom: 1px solid var(--line);
}

.post-row-media {
  border: 1px solid var(--line);
  background: var(--soft);
}

.post-row-image {
  min-height: 116px;
}

.post-row-date {
  margin-bottom: 10px;
}

.post-row h2 {
  margin-top: 0;
}

.row-arrow {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--red);
}

.row-arrow:hover,
.row-arrow:focus-visible {
  border-color: var(--red);
}

.pagination,
.nav-links {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.page-numbers.current {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.empty-state {
  padding: clamp(32px, 5vw, 58px);
  border: 1px solid var(--ink);
  background: var(--gold);
}

.empty-state h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.2;
  font-weight: 900;
}

.empty-state p {
  max-width: 680px;
  margin: 14px 0 24px;
}

.empty-state .blog-search {
  margin-top: 22px;
}

.not-found-link {
  margin-top: 24px;
}

.article-shell {
  padding: clamp(46px, 7vw, 92px) 0;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
  gap: clamp(32px, 6vw, 84px);
  align-items: end;
  padding-bottom: clamp(42px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
}

.article-title {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.8rem, 5.7vw, 5.75rem);
  line-height: 1.08;
  font-weight: 900;
}

.article-lead {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.6vw, 1.22rem);
  font-weight: 700;
}

.article-meta-grid {
  margin-top: 28px;
}

.article-cover {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--soft);
  box-shadow: 10px 10px 0 var(--gold);
}

.article-top-cta {
  margin-top: 24px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.article-top-cta strong {
  display: block;
  font-size: 1.08rem;
  font-weight: 900;
}

.article-top-cta p {
  margin: 4px 0 0;
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: clamp(34px, 6vw, 84px);
  align-items: start;
  padding-top: clamp(44px, 6vw, 78px);
}

.article-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}

.toc-box,
.topic-box {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

.toc-box h2,
.topic-box h2 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 900;
}

.toc-box ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.toc-box a {
  display: block;
  padding-right: 12px;
  border-right: 3px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.toc-box a:hover,
.toc-box a:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 800;
}

.topic-links a:hover,
.topic-links a:focus-visible {
  color: var(--red);
  border-color: var(--red);
}

.article-main {
  min-width: 0;
}

.article-content {
  max-width: var(--measure);
  font-size: clamp(1.02rem, 1.15vw, 1.1rem);
  line-height: 2.05;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content table,
.article-content figure {
  margin: 0 0 24px;
}

.article-content h2 {
  margin: 56px 0 16px;
  padding-top: 10px;
  font-size: clamp(1.85rem, 3vw, 3.2rem);
  line-height: 1.2;
  font-weight: 900;
}

.article-content h2::before {
  content: '';
  width: 54px;
  height: 3px;
  display: block;
  margin-bottom: 18px;
  background: var(--red);
}

.article-content h3 {
  margin: 34px 0 12px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.35;
  font-weight: 900;
}

.article-content ul,
.article-content ol {
  padding-right: 1.3rem;
}

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

.article-content a {
  color: var(--red);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-content blockquote {
  padding: 20px 24px;
  border-right: 4px solid var(--red);
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
}

.article-content img {
  margin: 32px 0;
  border: 1px solid var(--line);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

.article-content th,
.article-content td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: right;
}

.article-content th {
  background: var(--soft);
  font-weight: 900;
}

.article-cta {
  max-width: var(--measure);
  margin-top: clamp(44px, 7vw, 78px);
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--ink);
  background: var(--red);
  color: var(--white);
}

.article-cta h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 3.35rem);
  line-height: 1.2;
  font-weight: 900;
}

.article-cta p {
  max-width: 680px;
  margin: 14px 0 0;
}

.article-cta-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-cta .btn-red {
  background: var(--white);
  color: var(--red);
}

.article-cta .btn-outline {
  color: var(--white);
  border-color: rgb(255 255 255 / 80%);
  background: transparent;
}

.related-posts {
  max-width: var(--measure);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.related-card {
  min-height: 250px;
  padding: 0 0 20px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
}

.related-card:hover,
.related-card:focus-within {
  border-color: var(--red);
}

.related-media {
  display: block;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.related-card span,
.related-card h3 {
  display: block;
  margin-right: 18px;
  margin-left: 18px;
}

.post-nav {
  max-width: var(--measure);
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.post-nav a {
  min-height: 100px;
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.post-nav strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1rem;
}

.site-footer {
  padding: 56px 0 24px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.55fr 0.8fr 0.7fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer h2 {
  margin: 0 0 13px;
  font-size: 1rem;
  font-weight: 900;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 7px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--red);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 18px;
  }

  .nav {
    gap: 16px;
    font-size: 0.94rem;
  }

  .blog-hero,
  .article-hero,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-feature,
  .article-cover,
  .toc-box,
  .topic-box {
    max-width: var(--measure);
  }

  .article-sidebar {
    position: static;
  }

  .featured-article {
    grid-template-columns: 300px minmax(0, 1fr);
  }

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

@media (max-width: 760px) {
  .site-header {
    width: min(100% - 24px, var(--max));
    min-height: 70px;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding-top: 8px;
  }

  .nav {
    display: none;
  }

  .header-cta {
    min-height: 42px;
    padding-inline: 13px;
    font-size: 0.88rem;
  }

  .mobile-menu {
    display: block;
    position: relative;
  }

  .mobile-menu summary {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(280px, calc(100vw - 24px));
    padding: 10px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--ink);
    background: var(--white);
    box-shadow: 8px 8px 0 var(--gold);
    z-index: 120;
  }

  .mobile-menu nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 800;
  }

  .mobile-call {
    background: var(--red);
    color: var(--white);
    justify-content: center;
  }

  .blog-hero,
  .blog-main,
  .article-shell,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .blog-hero {
    padding-top: 42px;
  }

  .blog-hero h1,
  .article-title {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }

  .blog-search {
    grid-template-columns: 1fr;
  }

  .blog-search button {
    width: 100%;
  }

  .hero-feature {
    box-shadow: none;
  }

  .featured-article,
  .post-grid,
  .related-grid,
  .post-nav {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-card {
    min-height: auto;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .post-row-media {
    max-width: 420px;
  }

  .row-arrow {
    width: 46px;
    height: 46px;
  }

  .article-meta-grid {
    display: grid;
  }

  .article-cover {
    box-shadow: none;
  }

  .article-top-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-top-cta .btn {
    width: 100%;
  }

  .toc-box,
  .topic-box {
    padding: 20px;
  }

  .article-content {
    line-height: 1.95;
  }

  .article-content h2 {
    margin-top: 44px;
  }

  .article-cta-actions .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text {
    font-size: 1.18rem;
  }

  .header-cta .icon {
    display: none;
  }

  .blog-hero p,
  .article-lead {
    font-size: 0.96rem;
  }

  .topic-links a {
    font-size: 0.82rem;
  }
}

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

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