/* ========================================================================== 
   Washnah responsive enhancements — mobile, tablet and fluid screens
   Loaded last to refine every page without changing the existing identity.
   ========================================================================== */

:root {
  --wr-header-mobile: 72px;
  --wr-safe-bottom: max(14px, env(safe-area-inset-bottom));
  --wr-safe-left: max(14px, env(safe-area-inset-left));
  --wr-safe-right: max(14px, env(safe-area-inset-right));
  --wr-touch: 44px;
  --wr-page-gutter: clamp(16px, 4vw, 40px);
  --wr-section-space: clamp(58px, 8vw, 110px);
}

html {
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  max-width: 100%;
  overflow-x: clip;
}

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

img,
video {
  height: auto;
}

iframe {
  width: 100%;
}

.main,
main,
section,
.container,
.container-fluid,
.row,
[class*="col-"] {
  min-width: 0;
}

.container,
.container-fluid {
  padding-inline: var(--wr-page-gutter);
}

.section {
  padding-block: var(--wr-section-space);
}

.section-title {
  width: min(100%, 820px);
  margin-inline: auto;
}

.section-title h1,
.section-title h2,
.balanced-page-title,
.hero-main-title,
.project-outreach__intro h1 {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.section-title h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.section-title p,
.page-title p,
.sector-hero-copy p,
.contact-intro p {
  font-size: clamp(.95rem, 1.6vw, 1.08rem);
}

/* Accessible touch targets without affecting inline text links. */
.cta-btn,
.header-cta,
.btn-primary-pro,
.btn-secondary-pro,
.footer-contact-btn,
.sector-scroll-link,
.project-outreach__filter,
.project-outreach__picker-button,
.project-outreach__region-reset,
.project-outreach__nav button,
.php-email-form button[type="submit"],
.mobile-nav-toggle,
.language-switcher__option,
.footer-socials a,
.contact-socials a,
.scroll-top,
.washnah-ai__launcher,
.washnah-ai__close,
.washnah-ai__reset,
.washnah-ai__send {
  min-width: var(--wr-touch);
  min-height: var(--wr-touch);
}

/* --------------------------------------------------------------------------
   Header and mobile navigation
   -------------------------------------------------------------------------- */
.header .container {
  width: min(100%, 1440px);
}

.header .logo,
.header .logo img {
  flex: 0 0 auto;
}

.header .logo img {
  width: clamp(126px, 14vw, 190px);
  height: auto;
}

.header-actions,
.language-switcher {
  min-width: 0;
}

@media (max-width: 1199.98px) {
  .header,
  .site-header {
    min-height: var(--wr-header-mobile);
    height: var(--wr-header-mobile);
  }

  .header .container {
    gap: clamp(8px, 2vw, 16px);
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }

  .header .logo {
    position: relative;
    z-index: 10001;
    max-width: min(34vw, 160px);
  }

  .header .logo img {
    width: min(100%, 155px);
    max-height: 54px;
    object-fit: contain;
  }

  .header-actions {
    position: relative;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-inline-start: auto;
  }

  .language-switcher {
    height: 40px;
    max-width: 132px;
    padding: 3px;
    gap: 1px;
    white-space: nowrap;
  }

  .language-switcher__icon {
    width: 27px;
    min-width: 27px;
  }

  .language-switcher__option {
    min-width: 35px;
    min-height: 32px;
    height: 32px;
    padding-inline: 7px;
    font-size: 10px;
  }

  .header-cta {
    min-height: 40px;
    padding-inline: 13px;
    font-size: 11px;
    white-space: nowrap;
  }

  .mobile-nav-toggle {
    position: relative;
    z-index: 10002;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: inline-grid !important;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(24, 7, 11, .36);
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
    backdrop-filter: blur(12px);
    cursor: pointer;
  }

  .mobile-nav-toggle::before {
    font-size: 24px;
    line-height: 1;
  }

  .navmenu {
    position: static;
    inset: auto;
    z-index: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: none;
  }

  .navmenu::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(7, 8, 10, .64);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }

  body.mobile-nav-active {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.mobile-nav-active .navmenu::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .navmenu > ul,
  #navmenu-list {
    position: fixed;
    top: calc(var(--wr-header-mobile) + 10px);
    bottom: 12px;
    z-index: 9998;
    width: min(92vw, 430px);
    height: auto;
    max-height: calc(100svh - var(--wr-header-mobile) - 22px);
    display: block;
    margin: 0;
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(128,25,34,.13);
    border-radius: 24px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 28px 80px rgba(13,6,8,.32);
    scrollbar-width: thin;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .32s cubic-bezier(.2,.78,.2,1), opacity .22s ease, visibility .22s ease;
  }

  html[dir="ltr"] .navmenu > ul,
  html[dir="ltr"] #navmenu-list {
    right: 12px;
    left: auto;
    transform: translateX(calc(100% + 28px));
  }

  html[dir="rtl"] .navmenu > ul,
  html[dir="rtl"] #navmenu-list {
    left: 12px;
    right: auto;
    transform: translateX(calc(-100% - 28px));
  }

  body.mobile-nav-active .navmenu > ul,
  body.mobile-nav-active #navmenu-list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .navmenu ul li {
    width: 100%;
  }

  .navmenu ul li + li {
    margin-top: 3px;
  }

  .navmenu ul li > a {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 13px !important;
    border-radius: 13px;
    color: #262126 !important;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
  }

  .navmenu ul li > a:hover,
  .navmenu ul li > a.active,
  .navmenu ul li.current-menu-item > a {
    color: #801922 !important;
    background: rgba(128,25,34,.075);
  }

  .navmenu .dropdown > a .toggle-dropdown {
    position: static;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    margin: 0;
    border-radius: 50%;
    background: rgba(128,25,34,.08);
    transition: transform .25s ease, background .25s ease;
  }

  .navmenu .dropdown > a.active .toggle-dropdown {
    transform: rotate(180deg);
    background: rgba(128,25,34,.15);
  }

  .navmenu .dropdown > ul,
  .navmenu .dropdown ul {
    position: static !important;
    inset: auto !important;
    width: 100%;
    min-width: 0;
    max-height: 0;
    display: block !important;
    margin: 0;
    padding: 0 8px;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    border: 0;
    border-radius: 14px;
    background: rgba(128,25,34,.035);
    box-shadow: none;
    transition: max-height .3s ease, padding .3s ease, margin .3s ease;
  }

  .navmenu .dropdown > ul.dropdown-active,
  .navmenu .dropdown ul.dropdown-active {
    max-height: 260px;
    margin-top: 4px;
    padding: 7px 8px;
  }

  .navmenu .dropdown ul a {
    min-height: 44px;
    padding-inline: 12px !important;
    font-size: 13px;
  }
}

@media (max-width: 767.98px) {
  :root {
    --wr-header-mobile: 66px;
    --wr-page-gutter: max(15px, 4vw);
    --wr-section-space: clamp(48px, 14vw, 72px);
  }

  .header .logo {
    max-width: min(31vw, 132px);
  }

  .header .logo img {
    max-height: 46px;
  }

  .language-switcher {
    max-width: 113px;
    height: 38px;
  }

  .language-switcher__icon {
    display: none;
  }

  .language-switcher__option {
    min-width: 38px;
    font-size: 9px;
  }

  .header-cta {
    display: none !important;
  }

  .mobile-nav-toggle {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .navmenu > ul,
  #navmenu-list {
    width: min(96vw, 420px);
    padding: 14px;
    border-radius: 20px;
  }

  html[dir="ltr"] .navmenu > ul,
  html[dir="ltr"] #navmenu-list {
    right: 8px;
  }

  html[dir="rtl"] .navmenu > ul,
  html[dir="rtl"] #navmenu-list {
    left: 8px;
  }
}

@media (max-width: 389.98px) {
  .header .container {
    gap: 5px;
    padding-inline: 10px;
  }

  .header .logo {
    max-width: 112px;
  }

  .language-switcher {
    max-width: 99px;
  }

  .language-switcher__option {
    min-width: 34px;
    padding-inline: 5px;
  }

  .mobile-nav-toggle {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
}

/* --------------------------------------------------------------------------
   Hero areas and primary actions
   -------------------------------------------------------------------------- */
.hero-home,
.page-title,
.sector-hero,
.contact-hero {
  min-height: min(900px, 100svh);
}

.hero-content,
.sector-hero-copy,
.page-title .container {
  width: min(100%, 1020px);
  padding-inline: var(--wr-page-gutter);
}

.hero-main-title {
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.08;
}

.hero-title-intro,
.hero-kicker,
.page-kicker,
.section-eyebrow,
.project-outreach__eyebrow {
  letter-spacing: clamp(.07em, .22vw, .16em);
}

.hero-actions,
.sector-hero-actions,
.cta-btn-container,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-primary-pro,
.btn-secondary-pro,
.footer-contact-btn,
.sector-scroll-link,
.php-email-form button[type="submit"] {
  width: auto;
  max-width: 100%;
  min-height: 48px;
  padding: 13px clamp(18px, 3vw, 28px);
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

@media (max-width: 767.98px) {
  .hero-home,
  .page-title,
  .sector-hero,
  .contact-hero {
    min-height: max(620px, 100svh);
  }

  .hero-content,
  .sector-hero-copy,
  .page-title .container {
    padding-top: calc(var(--wr-header-mobile) + 46px);
    padding-bottom: 72px;
  }

  .hero-main-title {
    font-size: clamp(1.85rem, 8.2vw, 2.85rem);
    line-height: 1.16;
  }

  .hero-title-line {
    display: block;
  }

  .hero-kicker,
  .page-kicker,
  .section-eyebrow,
  .project-outreach__eyebrow {
    font-size: 10px;
    line-height: 1.6;
  }

  .balanced-page-title,
  .sector-hero-copy h1,
  .page-title h1 {
    font-size: clamp(2rem, 9vw, 3.15rem);
    line-height: 1.12;
  }

  .hero-actions,
  .sector-hero-actions,
  .cta-btn-container,
  .form-actions {
    width: min(100%, 420px);
    margin-inline: auto;
    flex-direction: column;
  }

  .hero-actions > *,
  .sector-hero-actions > *,
  .cta-btn-container > *,
  .form-actions > *,
  .btn-primary-pro,
  .btn-secondary-pro,
  .footer-contact-btn,
  .php-email-form button[type="submit"] {
    width: 100%;
  }

  .hero-scroll-cue,
  .sector-scroll-link {
    bottom: 16px;
    font-size: 11px;
  }
}

/* --------------------------------------------------------------------------
   Home page sections
   -------------------------------------------------------------------------- */
.about-copy-card,
.profile-card,
.stats-item,
.service-item,
.contact-info-panel,
.contact-form-card {
  min-width: 0;
  max-width: 100%;
}

.about-copy-card ul,
.footer-links,
.footer-contact {
  padding-inline-start: 0;
}

.profile-card,
.service-item,
.contact-detail,
.icon-box {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .about-grid {
    row-gap: 22px;
  }

  .about-copy-card,
  .profile-downloads {
    width: 100%;
  }

  .profile-downloads {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .stats .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .partners-pro .row {
    row-gap: 24px;
  }
}

@media (max-width: 575.98px) {
  .profile-downloads {
    grid-template-columns: 1fr;
  }

  .profile-card {
    min-height: 118px;
    padding: 18px;
  }

  .profile-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }

  .profile-content strong {
    font-size: 1rem;
  }

  .stats .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .stats-item {
    min-height: 152px;
    padding: 24px 16px;
  }

  .stats-item .purecounter,
  .stats-item > span {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  .clients-slider,
  .logo-track {
    max-width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Interactive project map
   -------------------------------------------------------------------------- */
.project-outreach__container {
  width: 100%;
}

.project-outreach__layout,
.project-outreach__panel,
.project-outreach__map,
.project-outreach__map-stage,
.project-outreach__map-shell {
  min-width: 0;
  max-width: 100%;
}

.project-outreach__filter,
.project-outreach__picker-button,
.project-outreach__region-reset {
  white-space: normal;
  text-align: start;
}

.project-outreach__map-stage {
  touch-action: pan-y pinch-zoom;
}

@media (max-width: 1199.98px) {
  .project-outreach__layout {
    display: grid;
    grid-template-columns: minmax(290px, .78fr) minmax(0, 1.22fr);
    gap: 22px;
  }

  .project-outreach__panel {
    width: 100%;
    padding: clamp(22px, 3vw, 34px);
  }

  .project-outreach__map {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .project-outreach__layout {
    grid-template-columns: 1fr;
  }

  .project-outreach__panel,
  .project-outreach__map {
    width: min(100%, 900px);
    margin-inline: auto;
  }

  .project-outreach__filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .project-outreach__filter {
    justify-content: center;
    min-height: 58px;
    padding: 10px;
    text-align: center;
    font-size: 11px;
  }

  .project-outreach__map-stage {
    min-height: clamp(480px, 72vw, 680px);
  }
}

@media (max-width: 575.98px) {
  .project-outreach {
    padding-block: 46px;
  }

  .project-outreach__container {
    padding-inline: 10px;
  }

  .project-outreach__panel {
    padding: 20px 15px;
    border-radius: 22px;
  }

  .project-outreach__intro h1 {
    font-size: clamp(1.8rem, 9vw, 2.65rem);
  }

  .project-outreach__filters {
    grid-template-columns: 1fr;
  }

  .project-outreach__filter {
    justify-content: flex-start;
    min-height: 48px;
    padding: 11px 13px;
    text-align: start;
    font-size: 12px;
  }

  .project-outreach__picker-button {
    min-height: 58px;
    padding: 10px 12px;
  }

  .project-outreach__project-card {
    padding: 17px 14px;
  }

  .project-outreach__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-outreach__map {
    border-radius: 22px;
  }

  .project-outreach__map-header,
  .project-outreach__map-footer {
    flex-wrap: wrap;
    gap: 9px;
    padding-inline: 12px;
  }

  .project-outreach__map-header > *,
  .project-outreach__map-footer > * {
    min-width: 0;
  }

  .project-outreach__map-stage {
    min-height: 430px;
  }

  .project-outreach__map-shell {
    width: 100%;
  }

  .project-outreach__precise-map {
    width: 100%;
    height: auto;
    max-height: 500px;
  }

  .project-outreach__region-status {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Sector pages
   -------------------------------------------------------------------------- */
.sector-services .row {
  align-items: stretch;
}

.service-item {
  height: 100%;
}

.service-item h3,
.service-item p {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .sector-hero-meta {
    opacity: .85;
    transform: scale(.86);
    transform-origin: center;
  }

  .sector-services .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .vision-cta .row {
    row-gap: 22px;
  }
}

@media (max-width: 575.98px) {
  .sector-hero-meta {
    display: none;
  }

  .sector-services .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .service-item {
    min-height: 0;
    padding: 22px 18px;
    border-radius: 20px;
  }

  .service-item .icon {
    width: 54px;
    height: 54px;
  }

  .service-item h3 {
    font-size: 1.08rem;
  }

  .vision-cta {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Contact page and forms
   -------------------------------------------------------------------------- */
.contact-layout,
.contact-info-panel,
.contact-form-card,
.php-email-form,
.form-field,
.routing-field,
.website-field {
  min-width: 0;
  max-width: 100%;
}

.php-email-form input,
.php-email-form select,
.php-email-form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  font-size: 16px; /* prevents iOS zoom */
}

.php-email-form textarea {
  min-height: 136px;
  resize: vertical;
}

@media (max-width: 991.98px) {
  .contact-layout > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .contact-info-panel,
  .contact-form-card {
    padding: clamp(24px, 5vw, 38px);
  }
}

@media (max-width: 575.98px) {
  .contact-page-section,
  .contact-pro {
    padding-inline: 0;
  }

  .contact-layout {
    margin-inline: 0;
  }

  .contact-info-panel,
  .contact-form-card {
    padding: 22px 16px;
    border-radius: 22px;
  }

  .contact-detail,
  .icon-box {
    align-items: flex-start;
    gap: 12px;
  }

  .contact-detail i,
  .icon-box i {
    flex: 0 0 auto;
  }

  .php-email-form .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
  }

  .routing-note,
  .form-privacy-note {
    font-size: 11px;
    line-height: 1.7;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer,
.footer-main,
.footer-bottom {
  min-width: 0;
  max-width: 100%;
}

.footer-brand img {
  max-width: min(190px, 70vw);
  height: auto;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .footer-main .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .footer-bottom .container,
  .footer-bottom .d-flex {
    flex-wrap: wrap;
    gap: 8px 20px;
  }
}

@media (max-width: 575.98px) {
  .footer-main {
    padding-block: 54px 34px;
  }

  .footer-main .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .footer-main .row {
    row-gap: 34px;
  }

  .footer-socials {
    flex-wrap: wrap;
  }

  .footer-contact-btn {
    width: 100%;
  }

  .footer-bottom .container,
  .footer-bottom .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: start;
  }
}

/* --------------------------------------------------------------------------
   Floating controls: back-to-top and AI assistant
   -------------------------------------------------------------------------- */
.scroll-top {
  width: 54px;
  height: 54px;
  bottom: var(--wr-safe-bottom);
}

html[dir="ltr"] .scroll-top {
  right: var(--wr-safe-right);
  left: auto;
}

html[dir="rtl"] .scroll-top {
  left: var(--wr-safe-left);
  right: auto;
}

html[dir="ltr"] .washnah-ai {
  left: var(--wr-safe-left);
  right: auto;
  bottom: var(--wr-safe-bottom);
}

html[dir="rtl"] .washnah-ai {
  right: var(--wr-safe-right);
  left: auto;
  bottom: var(--wr-safe-bottom);
}

@media (max-width: 575.98px) {
  .scroll-top,
  .washnah-ai__launcher {
    width: 52px;
    height: 52px;
  }

  .scroll-top i,
  .washnah-ai__launcher i {
    font-size: 20px;
  }

  .washnah-ai__panel {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    bottom: max(74px, calc(env(safe-area-inset-bottom) + 66px));
    left: 8px !important;
    right: 8px !important;
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 20px;
  }

  .washnah-ai__header {
    padding: 12px;
    gap: 9px;
  }

  .washnah-ai__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .washnah-ai__identity strong {
    font-size: 13px;
  }

  .washnah-ai__identity span {
    font-size: 10px;
  }

  .washnah-ai__messages {
    padding: 13px;
  }

  .washnah-ai__message {
    max-width: 92%;
    font-size: 12px;
  }

  .washnah-ai__composer {
    padding: 10px;
  }

  .washnah-ai__form {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .washnah-ai__input,
  .washnah-ai__send {
    min-height: 44px;
    height: 44px;
  }
}

/* --------------------------------------------------------------------------
   Preloader, reduced motion and landscape safeguards
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .preloader-stage {
    width: min(90vw, 330px);
    transform: scale(.9);
  }

  .preloader-orbit {
    transform: scale(.86);
  }

  .preloader-brand {
    font-size: 12px;
    letter-spacing: .24em;
  }

  .preloader-caption {
    padding-inline: 18px;
    font-size: 12px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .hero-home,
  .page-title,
  .sector-hero,
  .contact-hero {
    min-height: 560px;
  }

  .hero-content,
  .sector-hero-copy,
  .page-title .container {
    padding-top: calc(var(--wr-header-mobile) + 30px);
    padding-bottom: 54px;
  }

  .washnah-ai__panel {
    top: 6px;
    bottom: 64px;
  }
}

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

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