/*
 * Shakhestt Desktop Visual Refresh — v2.0.0
 * A reversible visual layer for XTRA / Codevz + Elementor.
 * IMPORTANT: all rules are scoped to desktop widths (1025px and above).
 * It deliberately does not change page content, Elementor structure, URLs,
 * menu items, media files, or any WordPress/theme settings.
 */

@media screen and (min-width: 1025px) {
  :root {
    --sx-ink: #102943;
    --sx-ink-2: #233d55;
    --sx-text: #46596b;
    --sx-muted: #778696;
    --sx-teal: #16a79f;
    --sx-teal-dark: #0d827c;
    --sx-teal-soft: #e8f6f4;
    --sx-gold: #b18a4a;
    --sx-paper: #f4f7f8;
    --sx-white: #ffffff;
    --sx-line: #e5ebef;
    --sx-radius: 16px;
    --sx-radius-sm: 10px;
    --sx-shadow: 0 8px 26px rgba(16, 41, 67, .065);
    --sx-shadow-hover: 0 15px 36px rgba(16, 41, 67, .12);
  }

  html { scroll-behavior: smooth; }

  body {
    color: var(--sx-text);
    background: var(--sx-paper);
    font-family: Vazirmatn, IRANSansX, IRANSans, Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.95;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* Consistent typography without replacing the font files selected in XTRA. */
  body,
  button,
  input,
  select,
  textarea,
  .elementor,
  .cz_content,
  .cz_header,
  .cz_footer {
    font-family: Vazirmatn, IRANSansX, IRANSans, Tahoma, Arial, sans-serif;
  }

  h1, h2, h3, h4, h5, h6,
  .entry-title,
  .cz_title,
  .cz_post_title,
  .elementor-heading-title {
    color: var(--sx-ink);
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: -.2px;
  }

  h1, .entry-title { font-size: clamp(30px, 2.5vw, 38px); }
  h2 { font-size: clamp(24px, 2vw, 30px); }
  h3 { font-size: clamp(19px, 1.45vw, 23px); }
  h4 { font-size: 18px; }

  p,
  .entry-content,
  .elementor-widget-text-editor,
  .cz_post_excerpt {
    color: var(--sx-text);
    line-height: 1.95;
  }

  p { margin-top: 0; margin-bottom: 1.05em; }

  a {
    color: var(--sx-teal-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .18s ease, background-color .18s ease, opacity .18s ease;
  }

  a:hover, a:focus { color: var(--sx-ink); }

  /* Header: clean white surface, quiet separator, legible navigation. */
  #cz_header,
  .cz_header,
  .cz_header_1,
  .cz_header_2,
  .cz_header_3,
  header.cz_header,
  .elementor-location-header {
    background: rgba(255,255,255,.985);
    border-bottom: 1px solid var(--sx-line);
    box-shadow: 0 4px 20px rgba(16,41,67,.045);
  }

  #cz_header .cz_menu > li > a,
  .cz_header .cz_menu > li > a,
  .cz_header_1 .cz_menu > li > a,
  .cz_header_2 .cz_menu > li > a,
  .cz_header_3 .cz_menu > li > a,
  .elementor-location-header .elementor-nav-menu > li > a {
    color: var(--sx-ink-2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: color .18s ease, background-color .18s ease;
  }

  #cz_header .cz_menu > li:hover > a,
  .cz_header .cz_menu > li:hover > a,
  .cz_header_1 .cz_menu > li:hover > a,
  .cz_header_2 .cz_menu > li:hover > a,
  .cz_header_3 .cz_menu > li:hover > a,
  .elementor-location-header .elementor-nav-menu > li:hover > a,
  #cz_header .cz_menu > li.current-menu-item > a,
  .cz_header .cz_menu > li.current-menu-item > a,
  .elementor-location-header .elementor-nav-menu > li.current-menu-item > a {
    color: var(--sx-teal-dark);
  }

  #cz_header img.custom-logo,
  .cz_header img.custom-logo,
  .cz_header .cz_logo img,
  .cz_header_1 .cz_logo img,
  .cz_header_2 .cz_logo img {
    max-height: 56px;
    width: auto;
  }

  /* Dropdowns and mega menus.
     Keep simple dropdowns refined, but never clip the content of XTRA mega menus. */
  #cz_header .sub-menu,
  .cz_header .sub-menu,
  .elementor-location-header .elementor-nav-menu--dropdown {
    background: var(--sx-white);
    border: 1px solid var(--sx-line);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(16,41,67,.12);
    overflow: visible;
  }

  /* XTRA uses nested wrappers for full-width / content mega menus.
     A border and overflow clipping here can cut overlapping titles and buttons. */
  #cz_header,
  .cz_header,
  .cz_header_1,
  .cz_header_2,
  .cz_header_3,
  .elementor-location-header {
    position: relative;
    z-index: 5000;
    overflow: visible !important;
  }

  #cz_header .cz_menu > li:hover,
  .cz_header .cz_menu > li:hover,
  .cz_header_1 .cz_menu > li:hover,
  .cz_header_2 .cz_menu > li:hover,
  .cz_header_3 .cz_menu > li:hover {
    position: relative;
    z-index: 10020;
  }

  #cz_header .cz_megamenu_wrap,
  .cz_header .cz_megamenu_wrap,
  .cz_header_1 .cz_megamenu_wrap,
  .cz_header_2 .cz_megamenu_wrap,
  .cz_header_3 .cz_megamenu_wrap,
  .cz_megamenu_wrap,
  .cz_megamenu,
  .cz_mega_menu {
    background: var(--sx-white);
    border: 0 !important;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 44px rgba(16,41,67,.12);
    overflow: visible !important;
    z-index: 10010 !important;
    max-height: none !important;
  }

  /* Image-box cards in the mega menu intentionally allow their CTA to overlap
     the lower card edge; keep that overlap visible instead of cropping it. */
  .cz_megamenu_wrap .elementor-widget-image-box .elementor-image-box-wrapper,
  .cz_megamenu .elementor-widget-image-box .elementor-image-box-wrapper,
  .cz_mega_menu .elementor-widget-image-box .elementor-image-box-wrapper,
  .cz_megamenu_wrap .cz_service_box,
  .cz_megamenu_wrap .cz_service,
  .cz_megamenu .cz_service_box,
  .cz_megamenu .cz_service {
    overflow: visible !important;
  }

  /* XTRA/Elementor mega-menu: inner header containers must not clip the flyout.
     Scope this to the header so ordinary page cards keep their own shape. */
  #cz_header .cz_megamenu_wrap .elementor-element,
  #cz_header .cz_megamenu .elementor-element,
  #cz_header .cz_mega_menu .elementor-element,
  .cz_header .cz_megamenu_wrap .elementor-element,
  .cz_header .cz_megamenu .elementor-element,
  .cz_header .cz_mega_menu .elementor-element,
  .elementor-location-header .cz_megamenu_wrap .elementor-element,
  .elementor-location-header .cz_megamenu .elementor-element,
  .elementor-location-header .cz_mega_menu .elementor-element,
  #cz_header .cz_megamenu_wrap .e-con,
  #cz_header .cz_megamenu .e-con,
  .cz_header .cz_megamenu_wrap .e-con,
  .cz_header .cz_megamenu .e-con,
  .elementor-location-header .cz_megamenu_wrap .e-con,
  .elementor-location-header .cz_megamenu .e-con,
  #cz_header .cz_megamenu_wrap .elementor-widget-container,
  #cz_header .cz_megamenu .elementor-widget-container,
  .cz_header .cz_megamenu_wrap .elementor-widget-container,
  .cz_header .cz_megamenu .elementor-widget-container,
  .elementor-location-header .cz_megamenu_wrap .elementor-widget-container,
  .elementor-location-header .cz_megamenu .elementor-widget-container {
    overflow: visible !important;
    max-height: none !important;
  }

  /* Image-box CTA labels in the mega menu are allowed to extend below the image/title box. */
  #cz_header .elementor-widget-image-box .elementor-image-box-wrapper,
  .cz_header .elementor-widget-image-box .elementor-image-box-wrapper,
  .elementor-location-header .elementor-widget-image-box .elementor-image-box-wrapper {
    overflow: visible !important;
  }

  #cz_header .sub-menu a,
  .cz_header .sub-menu a,
  .elementor-location-header .elementor-nav-menu--dropdown a {
    color: var(--sx-ink-2);
    font-size: 13px;
    transition: color .16s ease, background-color .16s ease;
  }

  #cz_header .sub-menu a:hover,
  .cz_header .sub-menu a:hover,
  .elementor-location-header .elementor-nav-menu--dropdown a:hover {
    color: var(--sx-teal-dark);
    background: var(--sx-teal-soft);
  }

  /* Home hero: refine only the first Elementor content section. */
  /* Homepage hero: retain rounded corners without clipping the header mega-menu.
     The previous overflow:hidden rule could clip dropdown content on the home page. */
  body.home .elementor > .elementor-element:first-child,
  body.home .elementor > .elementor-section:first-child,
  body.home .elementor-section-wrap > .elementor-section:first-child,
  body.home .elementor > .e-con:first-child {
    border-radius: 28px;
    overflow: visible !important;
  }

  body.home .elementor > .elementor-element:first-child .elementor-heading-title,
  body.home .elementor > .elementor-section:first-child .elementor-heading-title,
  body.home .elementor-section-wrap > .elementor-section:first-child .elementor-heading-title,
  body.home .elementor > .e-con:first-child .elementor-heading-title {
    color: #ffffff;
    font-weight: 800;
    line-height: 1.75;
  }

  body.home .elementor > .elementor-element:first-child .elementor-widget-text-editor,
  body.home .elementor > .elementor-section:first-child .elementor-widget-text-editor,
  body.home .elementor-section-wrap > .elementor-section:first-child .elementor-widget-text-editor,
  body.home .elementor > .e-con:first-child .elementor-widget-text-editor,
  body.home .elementor > .elementor-element:first-child p,
  body.home .elementor > .elementor-section:first-child p,
  body.home .elementor-section-wrap > .elementor-section:first-child p,
  body.home .elementor > .e-con:first-child p {
    color: rgba(255,255,255,.84);
  }

  /* Section headings and text widgets. */
  .elementor-widget-heading .elementor-heading-title {
    color: var(--sx-ink);
    font-weight: 750;
  }

  .elementor-widget-text-editor,
  .elementor-widget-text-editor p { color: var(--sx-text); }

  /* Cards: XTRA posts, Elementor Posts/Loop Grid and common image/icon boxes. */
  .cz_post,
  .cz_post_item,
  .cz_blog .cz_post,
  .cz_posts .cz_post,
  .cz_grid .cz_post,
  .elementor-post,
  .elementor-post__card,
  .elementor-posts-container .elementor-post,
  .e-loop-item > .elementor,
  .elementor-widget-image-box .elementor-image-box-wrapper,
  .elementor-widget-icon-box .elementor-icon-box-wrapper,
  .cz_service_box,
  .cz_service {
    background: var(--sx-white);
    border: 1px solid var(--sx-line);
    border-radius: var(--sx-radius);
    box-shadow: var(--sx-shadow);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  }

  .cz_post:hover,
  .cz_post_item:hover,
  .cz_blog .cz_post:hover,
  .cz_posts .cz_post:hover,
  .cz_grid .cz_post:hover,
  .elementor-post:hover,
  .elementor-post__card:hover,
  .elementor-widget-image-box .elementor-image-box-wrapper:hover,
  .elementor-widget-icon-box .elementor-icon-box-wrapper:hover,
  .cz_service_box:hover,
  .cz_service:hover {
    transform: translateY(-3px);
    border-color: #d2e5e3;
    box-shadow: var(--sx-shadow-hover);
  }

  .cz_post_image img,
  .cz_post_thumbnail img,
  .cz_post_thumb img,
  .cz_post .cz_post_img img,
  .cz_post .cz_post_image a img,
  .elementor-post__thumbnail img,
  .elementor-widget-posts .elementor-post__thumbnail img,
  .elementor-widget-loop-grid .e-loop-item img {
    display: block;
    width: 100%;
    object-fit: cover;
  }

  .cz_post_content,
  .cz_post_inner,
  .cz_post_body,
  .elementor-post__text {
    padding: 18px 20px 21px;
  }

  .cz_post_title,
  .cz_post_title a,
  .elementor-post__title,
  .elementor-post__title a {
    color: var(--sx-ink);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.8;
  }

  .cz_post_title a:hover,
  .elementor-post__title a:hover { color: var(--sx-teal-dark); }

  .cz_post_excerpt,
  .cz_post_content p,
  .elementor-post__excerpt,
  .elementor-post__meta-data {
    color: var(--sx-muted);
    font-size: 13px;
    line-height: 1.9;
  }

  .cz_post_meta,
  .cz_post_date,
  .cz_post_category,
  .cz_meta { color: var(--sx-muted); font-size: 12px; }

  /* Service cards and visual icons: coherent surfaces, retain the original artwork. */
  .elementor-widget-image-box .elementor-image-box-content,
  .elementor-widget-icon-box .elementor-icon-box-content {
    padding: 14px 14px 18px;
  }

  .elementor-widget-image-box .elementor-image-box-title,
  .elementor-widget-icon-box .elementor-icon-box-title {
    color: var(--sx-ink);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.7;
  }

  .elementor-widget-icon-box .elementor-icon,
  .elementor-widget-icon-box .elementor-icon i,
  .elementor-widget-icon-box .elementor-icon svg {
    color: var(--sx-teal-dark);
    fill: var(--sx-teal-dark);
  }

  /* Buttons: one brand color, consistent radius and restrained hover. */
  .cz_btn,
  a.cz_btn,
  .vc_btn3,
  .elementor a.elementor-button,
  .elementor .elementor-button,
  input[type="submit"],
  input[type="button"],
  .wp-block-button__link {
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  }

  .cz_btn,
  a.cz_btn,
  .vc_btn3,
  .elementor a.elementor-button,
  .elementor .elementor-button,
  input[type="submit"],
  input[type="button"],
  .wp-block-button__link {
    box-shadow: 0 5px 15px rgba(22,167,159,.16);
  }

  .cz_btn:hover,
  a.cz_btn:hover,
  .vc_btn3:hover,
  .elementor a.elementor-button:hover,
  .elementor .elementor-button:hover,
  input[type="submit"]:hover,
  .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(22,167,159,.22);
  }

  /* Inputs and search fields. */
  input[type="text"],
  input[type="email"],
  input[type="search"],
  input[type="url"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #dce5e9;
    border-radius: var(--sx-radius-sm);
    background: #fff;
    color: var(--sx-ink);
    box-shadow: none;
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease;
  }

  input:focus,
  textarea:focus,
  select:focus {
    border-color: rgba(22,167,159,.72);
    box-shadow: 0 0 0 3px rgba(22,167,159,.11);
    outline: none;
  }

  /* Reading experience on article pages.
     Restore a distinct white reading surface over the light page background. */
  .entry-content,
  .cz_content,
  .cz_content_inner { color: var(--sx-text); }

  .single-post .entry-content,
  .single .entry-content {
    font-size: 16px;
    line-height: 2.1;
  }

  /* XTRA single-post content column: a distinct reading panel over the page canvas. */
  body.single-post #cz_main .cz_content_inner,
  body.single #cz_main .cz_content_inner {
    background: #fff !important;
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    box-shadow: 0 10px 34px rgba(16,41,67,.075);
    padding: clamp(24px, 3vw, 44px) !important;
    margin-bottom: 30px;
  }

  /* Keep inner XTRA post/editor wrappers transparent to avoid nested white cards. */
  body.single-post #cz_main .cz_content_inner .cz_post_content,
  body.single #cz_main .cz_content_inner .cz_post_content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
  }

  /* Fallback for single-post templates without XTRA's content-inner wrapper. */
  body.single-post #cz_main article.post > .entry-content,
  body.single-post #cz_main .post > .entry-content,
  body.single #cz_main article.post > .entry-content {
    background: #fff !important;
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    box-shadow: 0 10px 34px rgba(16,41,67,.075);
    padding: clamp(24px, 3vw, 44px) !important;
    margin-bottom: 30px;
  }

  /* Avoid a nested panel when the fallback entry-content is already inside the panel. */
  body.single-post #cz_main .cz_content_inner .entry-content,
  body.single #cz_main .cz_content_inner .entry-content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0;
  }

  .single-post .entry-content h2,
  .single .entry-content h2 { margin-top: 1.9em; margin-bottom: .7em; }

  .single-post .entry-content h3,
  .single .entry-content h3 { margin-top: 1.5em; margin-bottom: .55em; }

  .single-post .entry-content img,
  .single .entry-content img { border-radius: 12px; }

  /* Archive / blog cards remain individually separated from the page canvas. */
  body.blog #cz_main .cz_post,
  body.archive #cz_main .cz_post,
  body.category #cz_main .cz_post,
  body.tag #cz_main .cz_post {
    background: #fff;
    border: 1px solid var(--sx-line);
    border-radius: 16px;
    box-shadow: var(--sx-shadow);
  }

  /* Footer: a deep institutional anchor with clear contrast. */
  #cz_footer,
  .cz_footer,
  footer.cz_footer,
  .elementor-location-footer {
    background: #102943;
    color: rgba(255,255,255,.82);
  }

  #cz_footer h1, #cz_footer h2, #cz_footer h3, #cz_footer h4,
  .cz_footer h1, .cz_footer h2, .cz_footer h3, .cz_footer h4,
  .elementor-location-footer h1, .elementor-location-footer h2,
  .elementor-location-footer h3, .elementor-location-footer h4 {
    color: #fff;
  }

  #cz_footer p, .cz_footer p, .elementor-location-footer p {
    color: rgba(255,255,255,.76);
  }

  #cz_footer a,
  .cz_footer a,
  .elementor-location-footer a { color: #bfe5e1; }

  #cz_footer a:hover,
  .cz_footer a:hover,
  .elementor-location-footer a:hover { color: #fff; }

  /* Utility details: selection, focus and separators. */
  ::selection { background: rgba(22,167,159,.22); color: var(--sx-ink); }

  :focus-visible {
    outline: 2px solid var(--sx-teal);
    outline-offset: 3px;
  }

  /* Single posts: use the actual article/container as the reading surface.
     XTRA installs may wrap the post differently, so include the common XTRA and
     WordPress article containers and keep inner text wrappers transparent. */
  body.single-post #cz_main article.post,
  body.single #cz_main article.post,
  body.single-post #cz_main .cz_post,
  body.single #cz_main .cz_post {
    background: #fff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 34px rgba(16,41,67,.075) !important;
    padding: clamp(24px, 3vw, 44px) !important;
    margin-bottom: 30px !important;
  }

  body.single-post #cz_main article.post .cz_post_content,
  body.single #cz_main article.post .cz_post_content,
  body.single-post #cz_main .cz_post .cz_post_content,
  body.single #cz_main .cz_post .cz_post_content,
  body.single-post #cz_main article.post .entry-content,
  body.single #cz_main article.post .entry-content,
  body.single-post #cz_main .cz_post .entry-content,
  body.single #cz_main .cz_post .entry-content {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Fallback when a single-post template does not use article.post or .cz_post. */
  body.single-post #cz_main .cz_post_content,
  body.single #cz_main .cz_post_content {
    background: #fff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 34px rgba(16,41,67,.075) !important;
    padding: clamp(24px, 3vw, 44px) !important;
    margin-bottom: 30px !important;
  }

  /* Blog/archive cards: ensure both card shell and its text area are distinct. */
  body.blog #cz_main .cz_post,
  body.archive #cz_main .cz_post,
  body.category #cz_main .cz_post,
  body.tag #cz_main .cz_post,
  body.blog #cz_main article.post,
  body.archive #cz_main article.post,
  body.category #cz_main article.post,
  body.tag #cz_main article.post {
    background: #fff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 16px !important;
    box-shadow: var(--sx-shadow) !important;
  }

  hr,
  .elementor-divider-separator { border-color: var(--sx-line); }

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