/*
 * WINGERFIX responsive hardening layer — v13.8.1
 * Loaded after theme and plugin route styles so all public routes share the
 * same overflow, readability and touch-target guarantees.
 */

:root { --rayan-font: "Peyda", Tahoma, Arial, sans-serif; }

body,
button,
input,
select,
textarea {
  font-family: "Peyda", Tahoma, Arial, sans-serif !important;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body { overflow-x: hidden; }
}

body,
main,
.site,
.site-content,
.content-wrap,
.entry-content,
.container,
[class*="__grid"],
[class*="-grid"],
[class*="__copy"],
[class*="-copy"] { min-width: 0; }

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

img,
video { height: auto; }

iframe { border: 0; }

pre,
code,
kbd,
samp {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content,
.rayan-editor-content,
.woocommerce,
.woocommerce-page {
  overflow-wrap: anywhere;
}

.entry-content > :where(.alignwide,.alignfull),
.rayan-editor-content > :where(.alignwide,.alignfull),
.rayan-editor-content .entry-content > :where(.alignwide,.alignfull) {
  max-width: 100%;
  margin-inline: 0;
}

:where(input,select,textarea,button) {
  max-width: 100%;
  font: inherit;
}

:where(input,select,textarea) { min-width: 0; }

:where(.btn,.rayan-button,.wf-products-button,.wf-projects-button,.wf-reference-hero__button,.button,button,input[type="submit"]) {
  touch-action: manipulation;
}

/* Prevent intentionally off-canvas UI from contributing to page width. */
.mobile-drawer,
.mobile-drawer-overlay,
.rayan-install-prompt,
.mobile-bottom-nav { max-width: 100vw; }

/* Long LTR values inside an RTL page must wrap instead of widening cards. */
:where(a[href^="mailto:"],a[href^="tel:"],[dir="ltr"],.woocommerce-order-details__title,.woocommerce-customer-details address) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .site-header-inner,
  .footer-top-grid,
  .footer-bottom .container,
  .org-overview-grid,
  .org-intelligence-grid,
  .project-steps,
  .enterprise-grid,
  .contact-grid,
  .app-grid,
  .training-grid,
  .representatives-grid {
    min-width: 0;
  }

  .site-header-actions { min-width: 0; }

  .header-app-button span,
  .header-consult-button { white-space: normal; }
}

@media (max-width: 820px) {
  .site-header-inner {
    width: min(100% - 28px, var(--rayan-container, 1180px));
    min-height: 68px;
  }

  .primary-navigation,
  .site-header-actions { display: none !important; }

  .mobile-menu-button { display: inline-grid !important; }

  .mobile-bottom-nav {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-nav > :where(a,button) {
    min-width: 0;
    min-height: 60px;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 28px 22px;
  }

  .footer-brand-block { grid-column: 1 / -1; }

  .footer-bottom .container {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
  }

  .footer-bottom .container > :where(div,nav) {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  /* Dedicated template grids */
  .org-overview-grid,
  .org-intelligence-grid,
  .about-legacy-grid,
  .rayan-about-intro-grid,
  .rayan-about-overview-grid,
  .rayan-about-capability-layout,
  .rayan-about-credentials-grid,
  .rayan-contact-shell,
  .contact-grid,
  .application-grid,
  .app-feature-grid,
  .training-layout,
  .representatives-layout,
  .faq-layout {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .org-intelligence-copy,
  .org-overview-premium > div:first-child { text-align: center; }

  .org-intelligence-copy > p,
  .org-overview-premium > div:first-child > p { margin-inline: auto; }

  .org-intelligence-visual {
    grid-row: auto !important;
    width: min(100%,590px);
    margin-inline: auto;
  }

  .enterprise-visual-grid,
  .project-visual-steps {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  /* Plugin landings */
  .wf-products-hero__grid,
  .wf-products-consult__shell,
  .wf-products-vehicle__result,
  .wf-projects-hero__inner,
  .wf-projects-final-cta__panel,
  .wf-reference-hero__grid,
  .wf-catalog--premium .wf-reference-hero__grid,
  .wf-vehicle-page--premium .wf-vehicle-hero__grid,
  .wf-vehicle-page--premium .wf-vehicle-overview__grid,
  .wf-product-review-request,
  .wf-selector-shell__header,
  .wf-finder__layout,
  .wf-finder__prompt,
  .rayan-shop-hero .container,
  .rayan-catalog-card__main,
  body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout.woocommerce-checkout {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .wf-reference-hero__visual,
  .wf-vehicle-hero__visual,
  .wf-products-hero__visual,
  .wf-projects-hero__media { width: 100%; }

  .wf-products-models__grid,
  .wf-products-needs__grid,
  .wf-products-services__grid,
  .wf-projects-capabilities__grid,
  .wf-projects-usecases__grid,
  .wf-projects-outcomes__grid,
  .wf-reference-trust__grid,
  .wf-product-grid,
  .wf-vehicle-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .wf-products-compare__scroll,
  .wf-vehicle-compare,
  .woocommerce table.shop_table,
  .entry-content table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 600px) {
  :root { --rayan-mobile-gutter: 14px; }

  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }

  .container,
  .rayan-about-v81 .container,
  .wf-products-container,
  .wf-projects-shell,
  .wf-catalog .container,
  .rayan-commerce-shell {
    width: calc(100% - (var(--rayan-mobile-gutter) * 2)) !important;
    max-width: none !important;
    margin-inline: auto !important;
  }

  section,
  .section { scroll-margin-top: 76px; }

  h1,
  .page-hero h1,
  .wf-products-hero h1,
  .wf-projects-hero h1,
  .wf-reference-hero h1,
  .wf-vehicle-hero h1 {
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  p,
  li,
  small,
  label,
  .entry-content { text-wrap: pretty; }

  :where(.btn,.rayan-button,.wf-products-button,.wf-projects-button,.wf-reference-hero__button,.button,button,input[type="submit"]) {
    min-height: 44px;
  }

  :where(.page-hero-actions,.about-legacy-actions,.rayan-about-actions,.wf-products-hero__actions,.wf-projects-hero__actions,.wf-reference-hero__actions,.wf-vehicle-hero__actions,.wf-products-consult__actions,.wf-projects-final-cta__actions,.consult-box) {
    width: 100%;
  }

  :where(.page-hero-actions,.about-legacy-actions,.rayan-about-actions,.wf-products-hero__actions,.wf-projects-hero__actions,.wf-reference-hero__actions,.wf-vehicle-hero__actions,.wf-products-consult__actions,.wf-projects-final-cta__actions) {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
  }

  :where(.page-hero-actions,.about-legacy-actions,.rayan-about-actions,.wf-products-hero__actions,.wf-projects-hero__actions,.wf-reference-hero__actions,.wf-vehicle-hero__actions,.wf-products-consult__actions,.wf-projects-final-cta__actions) > :where(a,button) {
    width: 100%;
    min-width: 0;
  }

  .enterprise-hero-proof {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
  }

  .enterprise-hero-proof > span {
    min-height: 72px;
    justify-content: center;
    padding: 10px;
  }

  .enterprise-hero-proof b { font-size: 12px; }
  .enterprise-hero-proof small { font-size: 10px; line-height: 1.65; }

  .org-overview-premium { gap: 24px; }

  .org-system-map {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 9px;
    padding: 12px;
  }

  .org-system-map::before,
  .org-system-map::after { display: none !important; }

  .org-system-core {
    position: static !important;
    grid-column: 1 / -1;
    width: auto !important;
    height: auto !important;
    min-height: 108px;
    border-radius: 16px;
    transform: none !important;
  }

  .org-system-core b { font-size: 13px; }
  .org-system-core small { font-size: 10px; }

  .org-system-node {
    position: static !important;
    min-width: 0 !important;
    min-height: 72px;
    padding: 9px;
  }

  .org-system-node b { font-size: 12px; }
  .org-system-node small { font-size: 10px; line-height: 1.55; }

  .enterprise-visual-grid,
  .project-visual-steps,
  .org-insight-list { grid-template-columns: minmax(0,1fr) !important; }

  .enterprise-visual-card h3 { font-size: 18px; }
  .enterprise-visual-card p { min-height: 0 !important; font-size: 13px; }
  .enterprise-visual-card li { font-size: 12px; line-height: 1.8; }

  .org-intelligence-visual {
    height: min(98vw,390px) !important;
    min-height: 310px;
    border-radius: 20px;
  }

  .org-intelligence-visual > img {
    object-position: center !important;
    transform: none !important;
  }

  .org-insight-list article {
    min-height: 68px;
    padding: 11px;
  }

  .org-insight-list b { font-size: 13px; }
  .org-insight-list small { font-size: 11px; line-height: 1.7; }

  .project-visual-steps article {
    display: block !important;
    grid-template-columns: none !important;
  }

  .project-visual-steps figure {
    width: 100%;
    height: 150px !important;
    min-height: 0 !important;
  }

  .project-visual-steps h3 { font-size: 16px; }
  .project-visual-steps p { font-size: 12px; line-height: 1.85; }

  .consult-box {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    padding: 24px 18px !important;
    text-align: center;
  }

  .consult-box .btn { width: 100%; }

  .footer-top-grid { grid-template-columns: minmax(0,1fr); }
  .footer-brand-block { grid-column: auto; }

  .footer-top-grid > div,
  .footer-brand-block { text-align: center; }

  .footer-top-grid > div > :where(a,span) { justify-content: center; }

  .footer-logo,
  .footer-badges,
  .rayan-app-badges,
  .footer-social-links { justify-content: center; }

  .footer-badges { gap: 7px; }

  .footer-badge {
    white-space: normal;
    text-align: center;
  }

  .footer-trust-social {
    grid-template-columns: minmax(0,1fr) !important;
  }

  /* Forms */
  .rayan-contact-fields,
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    grid-template-columns: minmax(0,1fr) !important;
    width: 100%;
  }

  :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
    width: 100%;
  }

  /* Product and project landing pages */
  .wf-products-models__grid,
  .wf-products-needs__grid,
  .wf-products-services__grid,
  .wf-projects-capabilities__grid,
  .wf-projects-usecases__grid,
  .wf-projects-outcomes__grid,
  .wf-projects-process__grid,
  .wf-reference-trust__grid,
  .wf-product-grid,
  .wf-vehicle-grid,
  .wf-benefit-grid,
  .wf-safety-grid,
  .wf-technical-grid,
  .wf-download-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .wf-projects-metrics__grid,
  .wf-reference-hero__metrics,
  .wf-vehicle-facts {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }

  .wf-products-card__actions,
  .rayan-catalog-card__actions,
  .rayan-catalog-card__purchase {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .wf-products-card__actions > *,
  .rayan-catalog-card__actions > *,
  .rayan-catalog-card__purchase > * { width: 100%; }

  .wf-products-compare__scroll,
  .wf-vehicle-compare,
  .woocommerce table.shop_table,
  .entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .wf-products-compare table,
  .wf-vehicle-compare table,
  .woocommerce table.shop_table { min-width: 620px; }

  .wf-finder__search {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
  }

  .wf-finder__status,
  .wf-finder__reset { width: 100%; }

  .wf-finder__brands,
  .wf-brand-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }

  .wf-finder__model-grid { grid-template-columns: minmax(0,1fr) !important; }

  .wf-reference-hero__visual,
  .wf-vehicle-hero__visual,
  .wf-products-hero__visual,
  .wf-projects-hero__media {
    min-width: 0;
    min-height: 280px;
  }

  .wf-reference-dashboard,
  .wf-vehicle-identity-card {
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  .wf-reference-signal { display: none !important; }

  .rayan-premium-catalog ul.products,
  .woocommerce ul.products {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .rayan-catalog-card__media { min-height: 230px; }

  /* WooCommerce / checkout */
  body.woocommerce-checkout:not(.woocommerce-order-received) .content-wrap > .container {
    width: calc(100% - 20px) !important;
  }

  body.woocommerce-checkout:not(.woocommerce-order-received) form.checkout.woocommerce-checkout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
  }

  .woocommerce-checkout-review-order,
  #order_review { position: static !important; }

  .woocommerce div.product,
  .woocommerce div.product div.summary,
  .woocommerce div.product div.images { width: 100% !important; }
}

@media (max-width: 380px) {
  :root { --rayan-mobile-gutter: 12px; }

  .enterprise-hero-proof,
  .org-system-map,
  .wf-projects-metrics__grid,
  .wf-reference-hero__metrics,
  .wf-vehicle-facts,
  .wf-finder__brands,
  .wf-brand-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }

  .enterprise-hero-proof > span { min-height: 62px; }

  .org-system-node { min-height: 64px; }

  .mobile-bottom-nav > :where(a,button) span { font-size: 9px; }

  .footer-bottom .container > :where(div,nav) {
    gap: 8px 12px;
  }
}

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

/* Final audit corrections: application collage, vehicle selector and editorial tables. */
@media (min-width: 821px) and (max-width: 1080px) {
  .app-page-grid { gap: 34px; }
  .app-images {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .app-images img {
    width: 140px;
    flex: 0 0 auto;
  }
  .app-images img.main { width: 175px; }
  .app-images img.side { margin-inline: -16px 0; }
}

@media (max-width: 640px) {
  .wf-catalog--premium .wf-selector-steps {
    overflow: hidden;
    isolation: isolate;
  }

  .wf-catalog--premium .wf-reference-hero__metrics small,
  .wf-catalog--premium .wf-finder__brand small {
    font-size: 10px;
    line-height: 1.55;
  }
}

@media (max-width: 820px) {
  .entry-content table,
  .rayan-editor-content table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
}


/* Contact footer stability — v14.0.2 */
body.rayan-contact-route .rayan-editor-content,
body.rayan-contact-route main ~ .rayan-editor-content,
body.rayan-contact-route main + .rayan-editor-content{display:none!important}
body.rayan-contact-route .rayan-contact-page{position:relative;z-index:1;isolation:isolate}
body.rayan-contact-route .rayan-contact-experience{padding-bottom:clamp(72px,8vw,112px)}
body.rayan-contact-route .rayan-contact-unified-card{margin-bottom:0}
body.rayan-contact-route .site-footer{position:relative;z-index:2;clear:both;margin-top:0;isolation:isolate}
@media (max-width:680px){
  body.rayan-contact-route .rayan-contact-experience{padding-bottom:64px}
  body.rayan-contact-route .site-footer{width:100%;max-width:100%;overflow:clip}
}
