﻿/* Chehreh Sho — site-wide responsive and accessibility layer */
:root {
  --cs-green-950: #0d2b1e;
  --cs-green-900: #133624;
  --cs-green-700: #1b4a34;
  --cs-gold-500: #c9a96e;
  --cs-cream-50: #fcfaf5;
  --cs-text: #1f2f28;
  --cs-muted: #62756b;
  --cs-border: rgba(13, 43, 30, .14);
  --cs-shadow: 0 14px 40px rgba(13, 43, 30, .09);
  --cs-radius-lg: 24px;
  --cs-radius-md: 16px;
  --cs-content: 1240px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  color: var(--cs-text);
  background: #fff;
  overflow-x: clip;
}

body,
button,
input,
select,
textarea {
  font-family: inherit;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  border: 0;
}

::selection {
  color: #fff;
  background: var(--cs-green-700);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--cs-gold-500) !important;
  outline-offset: 3px;
}

:where(a, button, input, select, textarea) {
  -webkit-tap-highlight-color: rgba(201, 169, 110, .22);
}

:where(.site-content, .main-page-wrapper, .elementor) p {
  line-height: 1.9;
}

:where(.site-content, .main-page-wrapper, .elementor) h1,
:where(.site-content, .main-page-wrapper, .elementor) h2,
:where(.site-content, .main-page-wrapper, .elementor) h3,
:where(.site-content, .main-page-wrapper, .elementor) h4 {
  line-height: 1.45;
  text-wrap: balance;
}

:where(.site-content, .main-page-wrapper, .elementor) p,
:where(.site-content, .main-page-wrapper, .elementor) li {
  text-wrap: pretty;
}

/* Header and navigation */
.whb-header,
.whb-sticky-header {
  isolation: isolate;
}

.wd-header-nav .menu > li > a,
.mobile-nav .wd-nav-mobile > li > a {
  min-height: 44px;
}

.mobile-nav .wd-nav-mobile a {
  white-space: normal;
  line-height: 1.7;
}

.wd-tools-element > a,
.wd-header-mobile-nav > a,
.wd-header-search > a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Shared content surfaces */
:where(.page, .single-post) .entry-content :where(table, pre, .wp-block-table) {
  max-width: 100%;
  overflow-x: auto;
}

:where(.page, .single-post) .entry-content table {
  width: 100%;
  border-collapse: collapse;
}

:where(.page, .single-post) .entry-content th,
:where(.page, .single-post) .entry-content td {
  padding: 12px 14px;
  border: 1px solid var(--cs-border);
  text-align: right;
}

:where(.page, .single-post) .entry-content blockquote {
  margin-inline: 0;
  padding: 20px 24px;
  border-inline-start: 4px solid var(--cs-gold-500);
  border-radius: var(--cs-radius-md);
  background: var(--cs-cream-50);
}

/* Forms */
:where(.site-content, .elementor) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--cs-text);
  border: 1px solid rgba(13, 43, 30, .22);
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

:where(.site-content, .elementor) textarea {
  min-height: 130px;
  resize: vertical;
}

:where(.site-content, .elementor) :where(input, select, textarea):focus {
  border-color: var(--cs-green-700);
  box-shadow: 0 0 0 4px rgba(27, 74, 52, .10);
}

:where(.site-content, .elementor) :where(button, input[type="submit"], .button, .elementor-button) {
  min-height: 48px;
  border-radius: 12px;
  touch-action: manipulation;
}

/* Home page: preserve the established green/gold harmony */
.home .elementor-element.e-con,
.home .elementor-section-wrap > .elementor-section {
  max-width: 100%;
}

.home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc, .chehreh-full-footer) {
  margin-inline: auto;
}

.home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc) a,
.home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc) button {
  touch-action: manipulation;
}

/* Service and editorial pages */
body:not(.home).elementor-page .elementor-widget-text-editor,
body:not(.home).elementor-page .elementor-widget-theme-post-content {
  color: var(--cs-text);
}

body:not(.home).elementor-page .elementor-widget-text-editor :where(ul, ol),
body:not(.home).elementor-page .elementor-widget-theme-post-content :where(ul, ol) {
  padding-inline-start: 1.35em;
}

body:not(.home).elementor-page .elementor-widget-text-editor li,
body:not(.home).elementor-page .elementor-widget-theme-post-content li {
  margin-block: .45em;
  line-height: 1.9;
}

body:not(.home).elementor-page :where(.elementor-widget-image, .elementor-widget-video) img,
body:not(.home).elementor-page :where(.elementor-widget-image, .elementor-widget-video) video {
  border-radius: var(--cs-radius-md);
}

/* Prevent common horizontal overflow sources */
.elementor-widget-html,
.elementor-widget-shortcode,
.elementor-widget-text-editor,
.elementor-widget-theme-post-content {
  min-width: 0;
}

.elementor-widget-html > .elementor-widget-container,
.elementor-widget-shortcode > .elementor-widget-container {
  max-width: 100%;
}

@media (max-width: 1024px) {
  :root {
    --cs-radius-lg: 20px;
  }

  .site-content,
  .main-page-wrapper {
    --wd-container-w: min(100%, 100vw);
  }

  .home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc) {
    max-width: calc(100vw - 32px) !important;
  }
}

@media (max-width: 767px) {
  :root {
    --cs-radius-lg: 18px;
    --cs-radius-md: 14px;
  }

  body {
    font-size: 15px;
  }

  .site-content,
  .main-page-wrapper,
  .elementor-page .site-content {
    padding-inline: 0;
  }

  .elementor > .e-con,
  .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100%;
  }

  .home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc) {
    max-width: calc(100vw - 20px) !important;
    border-radius: var(--cs-radius-lg) !important;
  }

  :where(.site-content, .main-page-wrapper, .elementor) h1 {
    font-size: clamp(28px, 8vw, 38px);
  }

  :where(.site-content, .main-page-wrapper, .elementor) h2 {
    font-size: clamp(23px, 6.5vw, 31px);
  }

  :where(.site-content, .main-page-wrapper, .elementor) h3 {
    font-size: clamp(19px, 5.5vw, 25px);
  }

  :where(.site-content, .elementor) :where(button, input[type="submit"], .button, .elementor-button) {
    min-height: 50px;
    padding-inline: 18px;
  }

  .elementor-button-text {
    line-height: 1.5;
  }

  :where(.page, .single-post) .entry-content :where(table, .wp-block-table) {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  :where(.page, .single-post) .entry-content th,
  :where(.page, .single-post) .entry-content td {
    min-width: 130px;
    padding: 10px 12px;
  }

  .wd-page-title {
    min-height: auto !important;
    padding-block: 28px !important;
  }

  .wd-page-title .title {
    font-size: clamp(26px, 7vw, 34px) !important;
    line-height: 1.45;
  }

  .scrollToTop {
    inset-inline-end: 14px;
    bottom: 76px;
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 420px) {
  .home :where(.cs-dep, .cl-intro, .csw-why, .csw-ba, .jf, .jc) {
    max-width: calc(100vw - 12px) !important;
  }

  :where(.site-content, .elementor) :where(.button, .elementor-button) {
    max-width: 100%;
    white-space: normal;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --cs-border: rgba(13, 43, 30, .38);
  }

  a {
    text-decoration-thickness: 2px;
  }
}
