/*
Theme Name: Dr. Entertainment
Theme URI: https://drentertainment.studio
Author: Dr. Entertainment Studio
Description: Professional trilingual (Persian/English/French) studio theme with RTL support, package pricing, and content services.
Version: 3.2.0
Requires at least: 6.0
Tested up to: 6.6
License: Proprietary
Text Domain: dr-entertainment
*/

/* ================================================
   FONTS
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300..900&display=swap');

/* ================================================
   TOKENS
   ================================================ */
:root {
  --paper:        #f2ede1;
  --paper-deep:   #e7dfcc;
  --ink:          #17150f;
  --ink-soft:     #3a362b;
  --muted:        #7a7261;
  --accent:       #e04422;
  --accent-soft:  #f0733f;
  --accent-bg:    rgba(224,68,34,.10);
  --line:         #cec3aa;

  --font-display: 'Fraunces', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-fa:      'Vazirmatn', system-ui, sans-serif;

  --radius-pill:  9999px;
  --radius-card:  1rem;

  --max-w: 72rem;
  --px:    1.25rem;
}

/* ================================================
   RESET / BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--paper); }

* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0; height: 0; }

/* ================================================
   RTL
   ================================================ */
html[lang='fa'] body { font-family: var(--font-fa); }

html[lang='fa'] .font-display { font-family: var(--font-fa); font-weight: 800; }

/* ================================================
   TYPOGRAPHY HELPERS
   ================================================ */
.font-display    { font-family: var(--font-display); }
.italic          { font-style: italic; }
.tracking-wide   { letter-spacing: .05em; }
.uppercase       { text-transform: uppercase; }

/* ================================================
   MARQUEE ANIMATION
   ================================================ */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 32s linear infinite; }
html[lang='fa'] .animate-marquee { animation-direction: reverse; }

/* ================================================
   LAYOUT HELPERS
   ================================================ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
}

/* ================================================
   HEADER
   ================================================ */
#site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
#site-header.scrolled {
  border-bottom-color: rgba(206,195,170,.6);
  background: rgba(242,237,225,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand { display: flex; align-items: baseline; gap: .5rem; }
.brand-dr {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
}
html[lang='fa'] .brand-dr,
html[lang='fa'] .brand-name { font-family: var(--font-fa); }

/* Nav */
.site-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-nav a {
  font-size: .875rem;
  color: var(--ink-soft);
  transition: color .2s;
}
.site-nav a:hover { color: var(--accent); }

/* Header right */
.header-right { display: flex; align-items: center; gap: .75rem; }

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(206,195,170,.7);
  background: rgba(242,237,225,.6);
  padding: 2px;
  backdrop-filter: blur(4px);
}
.lang-btn {
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.lang-btn.active { background: var(--ink); color: var(--paper); }
.lang-btn:not(.active):hover { color: var(--ink); }

/* CTA button */
.btn-cta {
  display: none;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--paper);
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s;
}
.btn-cta:hover { background: var(--ink); }
@media (min-width: 640px) { .btn-cta { display: inline-block; } }

/* ================================================
   HERO
   ================================================ */
#hero {
  position: relative;
  overflow: hidden;
  padding-top: 8rem;
  padding-bottom: 4rem;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-kicker::before {
  content: '';
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--ink);
}
html[lang='fa'] .hero-title { font-family: var(--font-fa); font-weight: 700; }
.hero-title em { font-style: italic; font-weight: 300; }
html[lang='fa'] .hero-title em { font-style: normal; }

.hero-bottom {
  margin-top: 2rem;
  display: grid;
  gap: 2rem;
  align-items: end;
}
@media (min-width: 768px) {
  .hero-bottom { grid-template-columns: 1.2fr 1fr; }
}

.hero-lead { font-size: 1.125rem; line-height: 1.7; color: var(--ink-soft); max-width: 40rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 768px) { .hero-actions { justify-content: flex-end; } }

.btn-primary, .btn-outline {
  border-radius: var(--radius-pill);
  padding: .75rem 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
  display: inline-block;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }
.btn-outline {
  border: 1px solid rgba(23,21,15,.25);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  color: var(--ink);
}
html[lang='fa'] .stat-value { font-family: var(--font-fa); }
.stat-label { margin-top: .25rem; font-size: .75rem; color: var(--muted); }
@media (min-width: 640px) { .stat-label { font-size: .875rem; } }

/* Marquee band */
.marquee-band {
  margin-top: 4rem;
  border-top: 1px solid rgba(23,21,15,.15);
  border-bottom: 1px solid rgba(23,21,15,.15);
  background: var(--ink);
  padding: 1rem 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
}
.marquee-item {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--paper);
  margin: 0 2rem;
}
html[lang='fa'] .marquee-item { font-family: var(--font-fa); font-style: normal; }
.marquee-dot { margin: 0 2rem; color: var(--accent); }

/* ================================================
   SECTION COMMONS
   ================================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-label.light { color: rgba(240,115,63,.8); }
.section-label-line { display: block; width: 1.5rem; height: 1px; background: currentColor; }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
  max-width: 48rem;
}
.section-heading.light { color: var(--paper); }
html[lang='fa'] .section-heading { font-family: var(--font-fa); font-weight: 700; }

.section-wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 5rem var(--px);
  scroll-margin-top: 5rem;
}

/* ================================================
   SERVICES
   ================================================ */
.services-grid {
  margin-top: 3rem;
  display: grid;
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--line);
}
@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; } }

.service-card {
  background: var(--paper);
  padding: 2rem;
  transition: background .2s;
  cursor: default;
}
.service-card:hover { background: var(--paper-deep); }
.service-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.service-no { font-family: var(--font-display); font-size: .875rem; color: var(--accent); }
.service-arrow {
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform .2s, color .2s;
  display: inline-block;
}
.service-card:hover .service-arrow { color: var(--accent); transform: translateX(4px); }

.service-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 1.5rem;
}
html[lang='fa'] .service-title { font-family: var(--font-fa); }

.service-body { margin-top: .75rem; line-height: 1.65; color: var(--ink-soft); }

/* ================================================
   PACKAGES SECTION
   ================================================ */
#packages {
  scroll-margin-top: 5rem;
  padding-block: 5rem;
}

.packages-header {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}
@media (min-width: 768px) {
  .packages-header { flex-direction: row; align-items: flex-end; }
}

/* Billing toggle */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.billing-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 2px;
}
.billing-btn {
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: .5rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.billing-btn.active { background: var(--ink); color: var(--paper); }
.billing-save {
  border-radius: var(--radius-pill);
  background: var(--accent-bg);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--accent);
}

/* Sub-section labels */
.pkg-sub-label {
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4rem;
}
html[lang='fa'] .pkg-sub-label { font-family: var(--font-fa); }
.pkg-sub-heading {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--ink);
  margin-top: .25rem;
}
html[lang='fa'] .pkg-sub-heading { font-family: var(--font-fa); font-weight: 700; }

/* Price cards grid */
.cards-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

/* Dark band for content packages */
.dark-band {
  margin-top: 5rem;
  background: var(--ink);
  padding-block: 5rem;
}
.dark-band .pkg-sub-label { color: rgba(242,237,225,.5); }
.dark-band .pkg-sub-heading { color: var(--paper); }

/* Price card */
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.75rem;
  transition: transform .3s;
}
.price-card:hover { transform: translateY(-4px); }

.price-card.featured {
  border-color: var(--accent);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 25px 50px rgba(23,21,15,.2);
}
.price-card.dark-mode {
  border-color: rgba(242,237,225,.2);
  background: transparent;
  color: var(--paper);
}

.card-badge {
  position: absolute;
  top: -12px;
  inset-inline-start: 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--paper);
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}
html[lang='fa'] .card-name { font-family: var(--font-fa); }

.card-tag { margin-top: .25rem; font-size: .875rem; color: var(--muted); }
.price-card.featured .card-tag { color: rgba(242,237,225,.6); }
.price-card.dark-mode .card-tag { color: rgba(242,237,225,.6); }

.card-price {
  display: flex;
  align-items: baseline;
  gap: .25rem;
  margin-top: 1.5rem;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}
html[lang='fa'] .price-amount { font-family: var(--font-fa); }
.price-per { font-size: .875rem; color: var(--muted); }
.price-card.featured .price-per { color: rgba(242,237,225,.6); }
.price-card.dark-mode .price-per { color: rgba(242,237,225,.6); }

.card-features { margin-top: 1.75rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.card-feature { display: flex; align-items: flex-start; gap: .75rem; font-size: .875rem; }
.feature-dot { color: var(--accent); flex-shrink: 0; font-size: .625rem; padding-top: .35rem; }
.price-card.featured .feature-dot { color: var(--accent-soft); }
.feature-text { color: var(--ink-soft); }
.price-card.featured .feature-text { color: rgba(242,237,225,.85); }
.price-card.dark-mode .feature-text { color: rgba(242,237,225,.8); }

.card-cta {
  margin-top: 2rem;
  display: block;
  text-align: center;
  border-radius: var(--radius-pill);
  padding: .75rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s, color .2s, border-color .2s;
}
.price-card:not(.featured):not(.dark-mode) .card-cta { background: var(--ink); color: var(--paper); }
.price-card:not(.featured):not(.dark-mode) .card-cta:hover { background: var(--accent); }
.price-card.featured .card-cta { background: var(--accent); color: var(--paper); }
.price-card.featured .card-cta:hover { background: var(--paper); color: var(--ink); }
.price-card.dark-mode .card-cta { border: 1px solid rgba(242,237,225,.3); color: var(--paper); }
.price-card.dark-mode .card-cta:hover { background: var(--paper); color: var(--ink); }

/* ================================================
   PRICE LIST
   ================================================ */
.pricelist-grid {
  margin-top: 3rem;
  display: grid;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 768px) { .pricelist-grid { grid-template-columns: 1.4fr 1fr; } }

.pricelist-table { overflow: hidden; border-radius: var(--radius-card); border: 1px solid var(--line); }
.pricelist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  transition: background .2s;
}
.pricelist-row + .pricelist-row { border-top: 1px solid var(--line); }
.pricelist-row:hover { background: var(--paper-deep); }
.pricelist-service { color: var(--ink-soft); }
.pricelist-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
}
html[lang='fa'] .pricelist-price { font-family: var(--font-fa); }

.pricelist-note-box {
  border-radius: var(--radius-card);
  background: var(--accent-bg);
  padding: 2rem;
}
.note-star { font-size: 2rem; color: var(--accent); }
.note-text { margin-top: 1rem; line-height: 1.65; color: var(--ink-soft); }
.note-cta {
  display: inline-block;
  margin-top: 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s;
}
.note-cta:hover { background: var(--accent); }

/* ================================================
   APPS
   ================================================ */
#apps {
  scroll-margin-top: 5rem;
  background: var(--ink);
  padding-block: 5rem;
  color: var(--paper);
}
.apps-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) { .apps-grid { grid-template-columns: 1fr 1fr; } }

.apps-lead { max-width: 30rem; font-size: 1.125rem; line-height: 1.7; color: rgba(242,237,225,.7); }
.apps-points { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.apps-point { display: flex; align-items: flex-start; gap: .75rem; }
.apps-point-dot { color: var(--accent-soft); flex-shrink: 0; font-size: .625rem; padding-top: .4rem; }
.apps-point-text { color: rgba(242,237,225,.85); }

.apps-cta {
  display: inline-block;
  margin-top: 2.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--paper);
  padding: .75rem 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .2s, color .2s;
}
.apps-cta:hover { background: var(--paper); color: var(--ink); }

.apps-cards { display: grid; gap: 1rem; }
.apps-card {
  border-radius: var(--radius-card);
  border: 1px solid rgba(242,237,225,.15);
  background: rgba(242,237,225,.05);
  padding: 2rem;
}
.apps-card-icon { font-size: 2.5rem; }
.apps-card-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-top: 1rem;
}
html[lang='fa'] .apps-card-name { font-family: var(--font-fa); }

/* ================================================
   CONTACT
   ================================================ */
.contact-grid {
  margin-top: 3rem;
  display: grid;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1.3fr; } }

.contact-lead { font-size: 1.125rem; line-height: 1.7; color: var(--ink-soft); }
.contact-details { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  transition: color .2s;
}
html[lang='fa'] .contact-link { font-family: var(--font-fa); }
.contact-link:hover { color: var(--accent); }
.contact-phone {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  direction: ltr;
}

/* Form */
.contact-form {
  display: grid;
  gap: 1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: rgba(231,223,204,.4);
  padding: 2rem;
}
@media (min-width: 640px) { .contact-form { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: .375rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 500; color: var(--ink-soft); }
.field input,
.field textarea {
  width: 100%;
  border-radius: .75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: .75rem 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: .9375rem;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }

.btn-submit {
  grid-column: 1 / -1;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--paper);
  padding: .875rem;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
  font-family: inherit;
}
.btn-submit:hover { background: var(--ink); }
.btn-submit.sent { background: #2e7d32; cursor: default; }

/* Form messages */
.form-message {
  grid-column: 1 / -1;
  padding: .75rem 1rem;
  border-radius: .75rem;
  font-size: .875rem;
  display: none;
}
.form-message.success { background: rgba(46,125,50,.1); color: #2e7d32; display: block; }
.form-message.error   { background: rgba(224,68,34,.1);  color: var(--accent); display: block; }

/* ================================================
   FOOTER
   ================================================ */
#site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--px);
}
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .875rem;
  color: var(--muted);
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}
html[lang='fa'] .footer-brand { font-family: var(--font-fa); }
.footer-brand em { font-style: italic; color: var(--accent); }


/* WordPress content templates */
.wp-site-blocks-fallback{max-width:72rem;margin:0 auto;padding:8rem 1.25rem 4rem}.wp-site-blocks-fallback article{max-width:52rem}.wp-site-blocks-fallback h1{font-family:var(--font-display);font-size:clamp(2.4rem,6vw,5rem);line-height:1.05;margin-bottom:1.5rem}.wp-site-blocks-fallback .entry-content>*+*{margin-top:1rem}.wp-site-blocks-fallback .entry-content a{color:var(--accent);text-decoration:underline}.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}.hp-field{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}.custom-logo{max-height:42px;width:auto}.brand.has-logo .brand-dr,.brand.has-logo .brand-name{display:none}


/* ================================================
   RESPONSIVE + LAYOUT CORRECTION — v2.2
   Desktop baseline preserved; shared shell aligned.
   ================================================ */
:root {
  --shell-max: 72rem;
  --shell-gutter: clamp(1.25rem, 3vw, 2rem);
  --header-h: 4.75rem;
  --section-y: clamp(4rem, 7vw, 5.75rem);
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body { min-width: 320px; }

/* Every major section uses the same centered shell. */
.container,
.header-inner,
.section-wrap,
.packages-header,
.footer-inner,
.wp-site-blocks-fallback {
  width: 100%;
  max-width: var(--shell-max);
  margin-left: auto;
  margin-right: auto;
}

.container,
.header-inner,
.packages-header {
  padding-left: var(--shell-gutter);
  padding-right: var(--shell-gutter);
}

.section-wrap {
  padding-left: var(--shell-gutter);
  padding-right: var(--shell-gutter);
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.footer-inner { padding-left: 0; padding-right: 0; }
#site-footer { padding-left: var(--shell-gutter); padding-right: var(--shell-gutter); }

/* Grid/flex children must be allowed to shrink instead of forcing overflow. */
.hero-bottom > *,
.hero-stats > *,
.services-grid > *,
.cards-grid > *,
.pricelist-grid > *,
.apps-grid > *,
.contact-grid > *,
.contact-form > * { min-width: 0; }

section[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Header */
.header-inner { min-height: var(--header-h); }
.brand { min-width: 0; flex: 0 1 auto; white-space: nowrap; }
.header-right { min-width: 0; flex: 0 0 auto; }
.custom-logo { width: auto; height: 2rem; max-width: 9rem; object-fit: contain; }
.lang-short { display: none; }
.menu-toggle, .mobile-nav { display: none; }

/* Keep full-width bands full width; center only their contents. */
#hero, #packages, #apps, .dark-band, .marquee-band { width: 100%; }

/* Long content safety without changing desktop visual hierarchy. */
.section-heading,
.pkg-sub-heading,
.service-title,
.card-name,
.apps-card-name,
.contact-link,
.contact-phone { overflow-wrap: anywhere; }

.pricelist-row { gap: 1.25rem; }
.pricelist-service { min-width: 0; }
.pricelist-price { flex: 0 0 auto; white-space: nowrap; }
.contact-link { display: inline-block; max-width: 100%; }
.contact-form { width: 100%; max-width: 100%; }
.field input, .field textarea { min-width: 0; max-width: 100%; }

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --shell-gutter: 1.75rem; }

  .site-nav, .btn-cta { display: none; }
  .menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    border: 1px solid var(--line);
    border-radius: 9999px;
    background: rgba(242,237,225,.82);
    cursor: pointer;
  }
  .menu-toggle span { width: 1.1rem; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-toggle.active span:first-child { transform: translateY(.22rem) rotate(45deg); }
  .menu-toggle.active span:last-child { transform: translateY(-.22rem) rotate(-45deg); }
  .mobile-nav {
    display: block;
    border-top: 1px solid rgba(206,195,170,.65);
    background: rgba(242,237,225,.98);
  }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav-inner {
    width: 100%; max-width: var(--shell-max); margin: 0 auto;
    padding: .75rem var(--shell-gutter) 1.25rem;
    display: grid; gap: .2rem;
  }
  .mobile-nav-link { padding: .8rem 0; border-bottom: 1px solid rgba(206,195,170,.45); }
  .mobile-menu-cta { margin-top: .7rem; padding: .8rem 1rem; text-align: center; border-radius: var(--radius-pill); background: var(--accent); color: var(--paper); }

  .cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cards-grid .price-card:last-child:nth-child(odd) { grid-column: 1 / -1; width: min(100%, calc(50% - .75rem)); justify-self: center; }
  .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --shell-gutter: clamp(1rem, 5vw, 1.35rem);
    --header-h: 4.5rem;
    --section-y: 3.75rem;
  }

  .header-inner { gap: .65rem; padding-top: .7rem; padding-bottom: .7rem; }
  .brand { gap: .32rem; }
  .brand-dr, .brand-name { font-size: clamp(1rem, 4.8vw, 1.2rem); }
  .custom-logo { height: 1.75rem; max-width: 7rem; }
  .header-right { gap: .45rem; }
  .site-nav, .btn-cta { display: none; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .lang-switch { gap: 1px; padding: 2px; flex-shrink: 0; }
  .lang-btn { min-width: 2rem; padding: .32rem .45rem; font-size: .68rem; letter-spacing: .01em; }

  .menu-toggle {
    width: 2.5rem; height: 2.5rem; flex: 0 0 auto;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    border: 1px solid var(--line); border-radius: 9999px; background: rgba(242,237,225,.82); cursor: pointer;
  }
  .menu-toggle span { width: 1rem; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-toggle.active span:first-child { transform: translateY(.205rem) rotate(45deg); }
  .menu-toggle.active span:last-child { transform: translateY(-.205rem) rotate(-45deg); }

  .mobile-nav { display: block; border-top: 1px solid rgba(206,195,170,.65); background: rgba(242,237,225,.98); }
  .mobile-nav[hidden] { display: none; }
  .mobile-nav-inner { width:100%; max-width:var(--shell-max); margin:0 auto; padding:.65rem var(--shell-gutter) 1rem; display:grid; }
  .mobile-nav-link { padding:.75rem 0; border-bottom:1px solid rgba(206,195,170,.45); font-size:.95rem; }
  .mobile-menu-cta { margin-top:.75rem; padding:.8rem 1rem; text-align:center; border-radius:var(--radius-pill); background:var(--accent); color:var(--paper); font-weight:600; }

  /* Hero */
  #hero { padding-top: calc(var(--header-h) + 2.25rem); padding-bottom: 0; }
  .hero-kicker { margin-bottom: 1.2rem; gap: .55rem; font-size: .68rem; letter-spacing: .16em; }
  .hero-kicker::before { width: 1.25rem; }
  .hero-title { font-size: clamp(2.45rem, 11vw, 3.65rem); line-height: 1.02; letter-spacing: -.035em; }
  .hero-bottom { margin-top: 1.6rem; gap: 1.35rem; grid-template-columns: 1fr; }
  .hero-lead { font-size: 1rem; line-height: 1.68; }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; gap: .65rem; }
  .btn-primary, .btn-outline { width: 100%; min-height: 3rem; display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1rem; }
  .hero-stats { margin-top: 2.5rem; padding-top: 1.5rem; gap: .65rem; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stat-value { font-size: clamp(1.35rem, 6.8vw, 1.8rem); white-space: nowrap; }
  .stat-label { font-size: .69rem; line-height: 1.45; overflow-wrap: anywhere; }
  .marquee-band { margin-top: 2.75rem; padding: .8rem 0; }
  .marquee-item { font-size: 1.25rem; margin: 0 1.25rem; }
  .marquee-dot { margin: 0 1.25rem; }

  /* Shared section typography */
  .section-label { gap: .55rem; letter-spacing: .16em; font-size: .68rem; }
  .section-label-line { width: 1.25rem; }
  .section-heading { font-size: clamp(2rem, 9.5vw, 2.75rem); line-height: 1.08; }

  /* Services */
  .services-grid { margin-top: 2rem; grid-template-columns: 1fr; }
  .service-card { padding: 1.5rem; }
  .service-title { margin-top: 1.15rem; font-size: clamp(1.35rem,6.5vw,1.65rem); line-height:1.15; }
  .service-body { font-size: .95rem; }

  /* Packages */
  #packages { padding-block: var(--section-y); }
  .packages-header { gap: 1.4rem; align-items: stretch; }
  .packages-header > div:first-child { min-width:0; }
  .billing-toggle-wrap { flex-wrap: wrap; gap: .65rem; align-items: center; }
  .billing-toggle { flex: 0 1 auto; }
  .billing-btn { padding: .48rem 1rem; }
  .pkg-sub-label { margin-top: 3rem; }
  .pkg-sub-heading { font-size: clamp(1.8rem, 8vw, 2.35rem); line-height: 1.12; }
  .cards-grid { margin-top: 1.5rem; grid-template-columns: 1fr; gap: 1.5rem; }
  .price-card { padding: 1.5rem; min-width: 0; }
  .price-card:hover { transform: none; }
  .price-amount { font-size: clamp(2.75rem, 13vw, 3.6rem); }
  .card-feature { font-size: .9rem; }
  .dark-band { margin-top: 3.5rem; padding-block: 3.5rem; }
  .dark-band .pkg-sub-label { margin-top: 0; }

  /* Price list: service can wrap, price stays visible. */
  .pricelist-grid { margin-top: 2rem; grid-template-columns: 1fr; gap: 1.5rem; }
  .pricelist-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .8rem; padding: 1rem 1.05rem; }
  .pricelist-service { font-size: .91rem; line-height: 1.45; overflow-wrap: anywhere; }
  .pricelist-price { font-size: 1.08rem; text-align: end; }
  .pricelist-note-box { padding: 1.5rem; }
  .note-cta { width: 100%; text-align:center; }

  /* Apps */
  #apps { padding-block: var(--section-y); }
  .apps-grid { margin-top: 2rem; grid-template-columns: 1fr; gap: 2rem; }
  .apps-lead { font-size: 1rem; }
  .apps-points { margin-top: 1.5rem; gap: .8rem; }
  .apps-cta { width: 100%; text-align: center; }
  .apps-card { padding: 1.4rem; }
  .apps-card-name { font-size: 1.3rem; }

  /* Contact */
  .contact-grid { margin-top: 2rem; grid-template-columns: 1fr; gap: 2rem; }
  .contact-lead { font-size: 1rem; }
  .contact-details { margin-top: 1.35rem; gap: .6rem; }
  .contact-link, .contact-phone { font-size: clamp(1.05rem, 5.4vw, 1.35rem); line-height: 1.4; }
  .contact-link { word-break: break-word; overflow-wrap: anywhere; }
  .contact-form { grid-template-columns: 1fr; padding: 1.25rem; gap: .9rem; }
  .field-full, .btn-submit, .form-message { grid-column: 1; }
  .field input, .field textarea { font-size: 16px; padding: .75rem .85rem; }

  #site-footer { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .footer-inner { align-items: flex-start; }
}

@media (max-width: 380px) {
  :root { --shell-gutter: .9rem; }
  .brand-dr, .brand-name { font-size: 1rem; }
  .lang-btn { min-width: 1.82rem; padding-left: .36rem; padding-right: .36rem; }
  .menu-toggle { width: 2.35rem; height: 2.35rem; }
  .hero-title { font-size: 2.35rem; }
  .hero-stats { gap: .4rem; }
  .stat-label { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ================================================
   TARGETED MOBILE FIXES — v2.3
   Header + WP admin bar, contact, footer, stat safety.
   ================================================ */

/* WordPress admin toolbar offsets for fixed site header. */
:root { --wp-adminbar-h: 0px; }
body.admin-bar { --wp-adminbar-h: 32px; }
body.admin-bar #site-header { top: var(--wp-adminbar-h); }
body.admin-bar section[id] { scroll-margin-top: calc(var(--wp-adminbar-h) + var(--header-h) + 1rem); }

/* Keep the header itself opaque enough to remain readable before scroll. */
#site-header {
  background: rgba(242,237,225,.94);
  border-bottom-color: rgba(206,195,170,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#site-header.scrolled { background: rgba(242,237,225,.96); }

/* Footer should never collapse/become visually absent. */
#site-footer {
  display: block !important;
  visibility: visible !important;
  background: var(--paper);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex !important;
  visibility: visible !important;
  min-height: 2.5rem;
}
.footer-brand,
#footerText { display: inline-block; visibility: visible; }

@media (max-width: 782px) {
  body.admin-bar { --wp-adminbar-h: 46px; }
}

@media (max-width: 767px) {
  /* The hero must start below both WordPress toolbar (when logged in) and site header. */
  #hero {
    padding-top: calc(var(--wp-adminbar-h) + var(--header-h) + 1.75rem);
  }

  /* Header: preserve brand, compact language controls and menu button on one line. */
  .header-inner {
    min-height: var(--header-h);
    padding-top: .55rem;
    padding-bottom: .55rem;
  }
  .brand {
    flex: 1 1 auto;
    overflow: hidden;
    min-width: 0;
  }
  .brand-dr,
  .brand-name {
    flex: 0 0 auto;
    font-size: clamp(.98rem, 4.2vw, 1.1rem);
  }
  .header-right {
    flex: 0 0 auto;
    gap: .35rem;
  }
  .lang-switch { max-width: none; }
  .lang-btn {
    min-width: 1.8rem;
    padding: .3rem .36rem;
    font-size: .64rem;
  }
  .menu-toggle {
    width: 2.35rem;
    height: 2.35rem;
  }

  /* Mobile stats: all values stay Latin in EN/FR and fit without clipping. */
  .hero-stats { align-items: start; }
  .stat-value {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    line-height: 1.15;
  }

  /* Contact: a single clean mobile column with safe wrapping. */
  #contact {
    padding-bottom: 2.5rem;
  }
  .contact-grid {
    width: 100%;
    max-width: 100%;
    gap: 1.5rem;
  }
  .contact-grid > div,
  .contact-form { width: 100%; max-width: 100%; }
  .contact-details {
    width: 100%;
    min-width: 0;
  }
  .contact-link {
    display: block;
    width: 100%;
    max-width: 100%;
    font-family: var(--font-sans);
    font-size: clamp(.92rem, 4.05vw, 1.08rem);
    line-height: 1.45;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  html[lang='fa'] .contact-link { font-family: var(--font-fa); }
  .contact-phone {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.05rem, 5vw, 1.28rem);
    overflow-wrap: anywhere;
  }
  .contact-form {
    box-sizing: border-box;
    padding: 1.1rem;
    border-radius: .9rem;
    overflow: hidden;
  }
  .field,
  .field input,
  .field textarea,
  .btn-submit { width: 100%; max-width: 100%; }
  .field textarea { min-height: 7.5rem; }
  .btn-submit { min-height: 3rem; }

  /* Footer becomes clearly visible and balanced on phones. */
  #site-footer {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
  .footer-inner {
    min-height: auto;
    align-items: center;
    text-align: center;
    gap: .35rem;
  }
  .footer-brand { font-size: 1rem; }
  #footerText { font-size: .76rem; line-height: 1.5; }
}


/* ================================================
   COMPACT LANGUAGE SWITCHER — v2.4
   Exact visual model: Fr | En | فا
   ================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  white-space: nowrap;
}
.lang-btn {
  min-width: 0;
  padding: .2rem .08rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  cursor: pointer;
}
.lang-btn-fa {
  font-family: var(--font-fa);
  font-size: .82rem;
}
.lang-separator {
  color: rgba(26,24,19,.38);
  font-size: .72rem;
  line-height: 1;
  user-select: none;
}
.lang-btn.active {
  color: var(--ink);
  font-weight: 800;
  background: transparent !important;
}
.lang-btn.active::after {
  content: '';
  display: block;
  width: 100%;
  height: 1.5px;
  margin-top: .2rem;
  background: var(--accent);
  border-radius: 99px;
}
.lang-btn:not(.active):hover { color: var(--accent); }

/* Old dual-label markup is no longer used; keep these harmless if cached CSS/HTML mix occurs. */
.lang-long, .lang-short { display: inline; }

@media (max-width: 767px) {
  .header-inner {
    gap: .45rem;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }
  .brand-dr, .brand-name {
    font-size: clamp(.96rem, 4.25vw, 1.08rem);
  }
  .header-right {
    flex: 0 0 auto;
    gap: .45rem;
  }
  .lang-switch {
    gap: .27rem;
    max-width: none;
  }
  .lang-btn {
    min-width: 0;
    padding: .18rem .04rem;
    font-size: .72rem;
  }
  .lang-btn-fa { font-size: .76rem; }
  .lang-separator { font-size: .66rem; }
  .menu-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 390px) {
  .header-inner { gap: .35rem; }
  .brand { gap: .25rem; }
  .brand-dr, .brand-name { font-size: .94rem; }
  .header-right { gap: .32rem; }
  .lang-switch { gap: .22rem; }
  .lang-btn { font-size: .68rem; }
  .lang-btn-fa { font-size: .72rem; }
  .menu-toggle { width: 2.15rem; height: 2.15rem; }
}


/* ================================================
   SAFE PERSIAN RTL — v2.6
   Keep structural layout LTR/stable; apply RTL only to textual content.
   This prevents flex/grid shells from moving outside the viewport.
   ================================================ */
html[lang='fa'] {
  direction: ltr !important;
}
html[lang='fa'] body {
  direction: ltr !important;
  overflow-x: hidden;
}

/* Structural containers must never flip their main axis. */
html[lang='fa'] #site-header,
html[lang='fa'] .header-inner,
html[lang='fa'] .header-right,
html[lang='fa'] .brand,
html[lang='fa'] .lang-switch,
html[lang='fa'] main,
html[lang='fa'] .container,
html[lang='fa'] .section-wrap,
html[lang='fa'] .packages-header,
html[lang='fa'] .hero-bottom,
html[lang='fa'] .hero-stats,
html[lang='fa'] .services-grid,
html[lang='fa'] .cards-grid,
html[lang='fa'] .pricelist-grid,
html[lang='fa'] .apps-grid,
html[lang='fa'] .contact-grid,
html[lang='fa'] .contact-form,
html[lang='fa'] .footer-inner {
  direction: ltr !important;
}

/* Persian textual surfaces. */
html[lang='fa'] .nav-link,
html[lang='fa'] .mobile-nav-link,
html[lang='fa'] #headerCta,
html[lang='fa'] #mobileHeaderCta,
html[lang='fa'] .hero-kicker,
html[lang='fa'] .hero-title,
html[lang='fa'] .hero-lead,
html[lang='fa'] .stat-value,
html[lang='fa'] .stat-label,
html[lang='fa'] .section-label,
html[lang='fa'] .section-heading,
html[lang='fa'] .service-no,
html[lang='fa'] .service-title,
html[lang='fa'] .service-body,
html[lang='fa'] .billing-toggle-wrap,
html[lang='fa'] .pkg-sub-label,
html[lang='fa'] .pkg-sub-heading,
html[lang='fa'] .price-card,
html[lang='fa'] .pricelist-row,
html[lang='fa'] .pricelist-note-box,
html[lang='fa'] .apps-lead,
html[lang='fa'] .apps-points,
html[lang='fa'] .apps-card,
html[lang='fa'] .contact-lead,
html[lang='fa'] .contact-details,
html[lang='fa'] .field,
html[lang='fa'] .form-message,
html[lang='fa'] #footerText {
  direction: rtl;
  text-align: right;
}

/* Buttons are centered but still render Persian text correctly. */
html[lang='fa'] .btn-primary,
html[lang='fa'] .btn-outline,
html[lang='fa'] .card-cta,
html[lang='fa'] .note-cta,
html[lang='fa'] .apps-cta,
html[lang='fa'] .btn-submit {
  direction: rtl;
  text-align: center;
}

/* Preserve brand identity and language switch physical order. */
html[lang='fa'] .brand,
html[lang='fa'] .brand-dr,
html[lang='fa'] .brand-name,
html[lang='fa'] .lang-switch,
html[lang='fa'] .lang-btn,
html[lang='fa'] .lang-separator {
  direction: ltr !important;
}
html[lang='fa'] .lang-btn-fa { direction: rtl !important; }

/* Email/phone remain LTR data even in Persian. */
html[lang='fa'] .contact-link,
html[lang='fa'] .contact-phone,
html[lang='fa'] input[type='email'],
html[lang='fa'] input[type='tel'] {
  direction: ltr !important;
  text-align: left !important;
}

@media (max-width: 767px) {
  html[lang='fa'] .header-inner,
  html[lang='fa'] .header-right,
  html[lang='fa'] .hero-actions,
  html[lang='fa'] .hero-stats,
  html[lang='fa'] .contact-grid,
  html[lang='fa'] .contact-form {
    direction: ltr !important;
  }
  html[lang='fa'] .hero-title,
  html[lang='fa'] .hero-lead,
  html[lang='fa'] .section-heading,
  html[lang='fa'] .service-title,
  html[lang='fa'] .service-body,
  html[lang='fa'] .pkg-sub-heading,
  html[lang='fa'] .contact-lead {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}


/* ================================================
   v2.7 — Persian header mirrors only the header shell
   Keep the page layout structurally LTR to avoid overflow, but place the
   brand on the right and header controls on the left when Persian is active.
   ================================================ */
html[lang='fa'] .header-inner {
  direction: rtl !important;
}

/* Preserve the Dr. Entertainment wordmark and language selector visually. */
html[lang='fa'] .brand {
  direction: ltr !important;
  text-align: left;
}
html[lang='fa'] .header-right,
html[lang='fa'] .lang-switch {
  direction: ltr !important;
}

/* Persian navigation content itself reads right-to-left. */
html[lang='fa'] .site-nav,
html[lang='fa'] .mobile-nav-inner {
  direction: rtl !important;
  text-align: right;
}
html[lang='fa'] .mobile-nav-link,
html[lang='fa'] #mobileHeaderCta {
  text-align: right;
}

@media (max-width: 767px) {
  html[lang='fa'] .header-inner {
    direction: rtl !important;
  }
  html[lang='fa'] .header-right {
    direction: ltr !important;
  }
}


/* ================================================
   v2.8 — Stable Persian mobile header
   Do not flip the mobile header flex axis. Use explicit grid placement:
   controls on the left, brand on the right.
   ================================================ */
@media (max-width: 767px) {
  html[lang='fa'] .header-inner {
    direction: ltr !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "controls brand";
    align-items: center;
    column-gap: .7rem;
    width: 100%;
  }

  html[lang='fa'] .brand {
    grid-area: brand;
    justify-self: end;
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: none;
    direction: ltr !important;
    text-align: left;
    overflow: visible;
  }

  html[lang='fa'] .header-right {
    grid-area: controls;
    justify-self: start;
    width: auto;
    min-width: max-content;
    flex: none;
    direction: ltr !important;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
  }

  html[lang='fa'] .lang-switch {
    direction: ltr !important;
    flex: 0 0 auto;
  }

  html[lang='fa'] .menu-toggle {
    flex: 0 0 auto;
  }

  /* Keep the opened Persian mobile menu RTL without affecting header geometry. */
  html[lang='fa'] .mobile-nav,
  html[lang='fa'] .mobile-nav-inner {
    direction: rtl !important;
  }
}

@media (max-width: 390px) {
  html[lang='fa'] .header-inner {
    column-gap: .45rem;
  }
  html[lang='fa'] .header-right {
    gap: .28rem;
  }
  html[lang='fa'] .brand-dr,
  html[lang='fa'] .brand-name {
    font-size: .9rem;
  }
}


/* ================================================
   v2.9 — Persian mobile header: hard physical placement
   Controls stay on the physical left; the brand is pushed to the physical
   right edge of the header. Do not rely on RTL flex/grid direction here.
   ================================================ */
@media (max-width: 767px) {
  html[lang='fa'] .header-inner {
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
  }

  html[lang='fa'] .header-right {
    order: 1 !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    direction: ltr !important;
  }

  html[lang='fa'] .brand {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
    direction: ltr !important;
    text-align: left !important;
    overflow: visible !important;
    max-width: calc(100% - 9.25rem);
  }

  html[lang='fa'] .site-nav {
    order: 3;
  }
}

@media (max-width: 390px) {
  html[lang='fa'] .brand {
    max-width: calc(100% - 8.75rem);
  }
  html[lang='fa'] .brand-dr,
  html[lang='fa'] .brand-name {
    font-size: .88rem;
  }
}


/* ================================================
   v2.10 — Persian mobile header control order
   Keep the brand on the physical right. Mirror only the compact control
   cluster so the hamburger sits at the outer/end edge, matching English.
   Visual order (LTR coordinates): hamburger | Fr | En | فا .... Brand
   ================================================ */
@media (max-width: 767px) {
  html[lang='fa'] .header-right {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .45rem !important;
    direction: ltr !important;
  }

  html[lang='fa'] .header-right .menu-toggle {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  html[lang='fa'] .header-right .lang-switch {
    flex: 0 0 auto !important;
    margin: 0 !important;
    direction: ltr !important;
  }
}


/* ================================================
   v3.0 — Commercial plans & polished pricing
   ================================================ */
.price-card { overflow: visible; }
.price-card .card-features { flex: 1 1 auto; }
.price-note {
  margin-top: .65rem;
  min-height: 2.5em;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}
.price-card.featured .price-note,
.price-card.dark-mode .price-note { color: rgba(242,237,225,.66); }
.enterprise-card {
  background:
    linear-gradient(145deg, rgba(224,68,34,.07), transparent 45%),
    var(--paper);
  border-style: solid;
}
.price-card.dark-mode.enterprise-card {
  background: linear-gradient(145deg, rgba(224,68,34,.14), rgba(255,255,255,.025));
}
.enterprise-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: .75rem;
  padding: .25rem .55rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  color: var(--accent);
  font: 600 .64rem/1 var(--font-sans);
  letter-spacing: .14em;
}
html[lang='fa'] .enterprise-eyebrow { font-family: var(--font-fa); letter-spacing: .04em; }
.price-card.enterprise-card .card-cta { background: var(--accent); color: var(--paper); }
.price-card.enterprise-card .card-cta:hover { background: var(--ink); }
.price-card.dark-mode.enterprise-card .card-cta:hover { background: var(--paper); color: var(--ink); }

.pricelist-table { overflow: hidden; }
.pricelist-row { min-height: 4.4rem; }
.pricelist-service { padding-inline-end: 1rem; line-height: 1.45; }
.pricelist-note-box { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.pricelist-note-box .note-cta { align-self: flex-start; }

/* Header must start at the top of the public page. WordPress admin-bar offset
   applies only while logged in, via the existing body.admin-bar rule. */
body:not(.admin-bar) #site-header { top: 0 !important; }
body:not(.admin-bar) #hero { margin-top: 0 !important; }

@media (min-width: 1024px) {
  .cards-grid { align-items: stretch; }
  .price-card { padding: 2rem; }
  .card-name { font-size: 1.65rem; }
}
@media (max-width: 767px) {
  .price-card { padding: 1.5rem; }
  .price-amount { font-size: clamp(2.25rem, 11vw, 3rem); }
  .price-note { min-height: 0; }
  .pricelist-row {
    align-items: flex-start;
    padding: 1rem 1.1rem;
    gap: .8rem;
  }
  .pricelist-service { font-size: .92rem; }
  .pricelist-price { font-size: 1rem; }
}
