/* =========================================================
   ARESA GLOBAL HEADER
   Module: Aresa Header
   Version: 3.1 – Production
   ========================================================= */


/* =========================================================
   1. DESIGN TOKENS & BASE
   ========================================================= */

.aresa-header {
  --aresa-green: #008f45;
  --aresa-dark: #063b2a;
  --aresa-light-green: #c4e8cc;
  --aresa-border: #dcebe2;
  --aresa-text: #243d34;
  --aresa-white: #ffffff;

  position: relative;
  z-index: 9999;
  width: 100%;
  direction: rtl;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  background: var(--aresa-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease;
}

.aresa-header,
.aresa-header *,
.aresa-header *::before,
.aresa-header *::after {
  box-sizing: border-box;
}

.aresa-header a {
  text-decoration: none;
}

.aresa-header a,
.aresa-header button {
  -webkit-tap-highlight-color: transparent;
}

.aresa-header__inner {
  width: min(100% - 48px, 1280px);
  margin-inline: auto;
}


/* =========================================================
   2. HUBSPOT STICKY WRAPPER
   ========================================================= */

body .dnd-section:has(.aresa-header),
body .row-fluid:has(.aresa-header),
body .widget-type-global_widget:has(.aresa-header),
body .widget-type-module:has(.aresa-header) {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  overflow: visible !important;
  background: var(--aresa-white, #ffffff);
}

.aresa-header-placeholder {
  width: 100%;
}


/* =========================================================
   3. TOP CONTACT BAR
   ========================================================= */

.aresa-header__topbar {
  height: 38px;
  overflow: hidden;
  color: var(--aresa-white);
  background: var(--aresa-dark);
  transition:
    height 0.25s ease,
    opacity 0.2s ease;
}

.aresa-header__topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

.aresa-header__contact {
  display: flex;
  align-items: center;
  gap: 14px;
  direction: ltr;
}

.aresa-header__contact-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.aresa-header__contact-link span {
  display: inline-flex;
}

.aresa-header__contact-link:hover,
.aresa-header__contact-link:focus-visible {
  color: var(--aresa-light-green);
}

.aresa-header__contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: var(--aresa-light-green);
  font-size: 13px;
  line-height: 1;
}

.aresa-header__contact-separator {
  display: block;
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.25);
}


/* =========================================================
   4. MAIN HEADER
   ========================================================= */

.aresa-header__main {
  position: relative;
  z-index: 2;
  background: var(--aresa-white);
  border-bottom: 1px solid rgba(6, 59, 42, 0.08);
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.aresa-header__main-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
  min-height: 82px;
  transition: min-height 0.25s ease;
}


/* =========================================================
   5. BRAND
   ========================================================= */

.aresa-header__brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 13px;
  flex-shrink: 0;
  color: var(--aresa-dark);
}

.aresa-header__brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  transition:
    width 0.25s ease,
    height 0.25s ease,
    flex-basis 0.25s ease;
}

.aresa-header__logo,
.aresa-header__mobile-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.aresa-header__brand-divider {
  display: block;
  width: 1px;
  height: 42px;
  background: var(--aresa-border);
  transition: height 0.25s ease;
}

.aresa-header__brand-name {
  display: block;
  color: var(--aresa-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  white-space: nowrap;
  transition: font-size 0.25s ease;
}


/* =========================================================
   6. DESKTOP NAVIGATION
   ========================================================= */

.aresa-header__nav {
  min-width: 0;
}

.aresa-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.6vw, 27px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.aresa-header__nav-list li {
  position: relative;
  margin: 0;
  padding: 0;
}

.aresa-header__nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 82px;
  color: var(--aresa-text);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    min-height 0.25s ease;
}

.aresa-header__nav-list a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 18px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--aresa-green);
  transform: translateX(50%);
  transition:
    width 0.22s ease,
    bottom 0.25s ease;
}

.aresa-header__nav-list a:hover,
.aresa-header__nav-list a:focus-visible {
  color: var(--aresa-green);
}

.aresa-header__nav-list a:hover::after,
.aresa-header__nav-list a:focus-visible::after {
  width: 100%;
}


/* =========================================================
   7. CONSULTATION CTA
   ========================================================= */

.aresa-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  color: var(--aresa-white);
  background: var(--aresa-green);
  border: 2px solid var(--aresa-green);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.aresa-header__cta span {
  color: inherit;
}

.aresa-header__cta:hover,
.aresa-header__cta:focus-visible {
  color: var(--aresa-green);
  background: var(--aresa-white);
  border-color: var(--aresa-green);
  box-shadow: 0 7px 18px rgba(0, 143, 69, 0.14);
  transform: translateY(-1px);
}

.aresa-header__cta-icon {
  font-size: 13px;
}


/* =========================================================
   8. MOBILE MENU TOGGLE
   ========================================================= */

.aresa-header__mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  color: var(--aresa-dark);
  background: transparent;
  border: 1px solid var(--aresa-border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.aresa-header__mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 99px;
  background: currentColor;
}

.aresa-header__mobile-toggle:hover,
.aresa-header__mobile-toggle:focus-visible {
  color: var(--aresa-white);
  background: var(--aresa-green);
  border-color: var(--aresa-green);
}


/* =========================================================
   9. MOBILE DRAWER
   ========================================================= */

.aresa-header__mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  background: rgba(3, 29, 21, 0.52);
  backdrop-filter: blur(2px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.aresa-header__mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.aresa-header__mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 380px);
  height: 100%;
  padding: 22px;
  overflow-y: auto;
  background: var(--aresa-white);
  box-shadow: -12px 0 36px rgba(6, 59, 42, 0.16);
  transform: translateX(105%);
  transition: transform 0.3s ease;
}

.aresa-header__mobile-menu.is-open .aresa-header__mobile-panel {
  transform: translateX(0);
}

.aresa-header__mobile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--aresa-border);
}

.aresa-header__mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--aresa-dark);
}

.aresa-header__mobile-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.aresa-header__mobile-brand-name {
  color: var(--aresa-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.aresa-header__mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  flex: 0 0 38px;
  color: var(--aresa-dark);
  background: #f4f8f5;
  border: 1px solid var(--aresa-border);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.aresa-header__mobile-close:hover,
.aresa-header__mobile-close:focus-visible {
  color: var(--aresa-white);
  background: var(--aresa-dark);
}

.aresa-header__mobile-nav {
  padding: 20px 0 12px;
}

.aresa-header__mobile-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aresa-header__mobile-nav li {
  margin: 0;
  border-bottom: 1px solid #edf3ef;
}

.aresa-header__mobile-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 4px 0 24px;
  color: var(--aresa-text);
  font-size: 15px;
  font-weight: 600;
  transition:
    color 0.2s ease,
    padding-right 0.2s ease;
}

.aresa-header__mobile-nav a::before {
  content: "";
  position: absolute;
  left: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid var(--aresa-green);
  border-left: 2px solid var(--aresa-green);
  transform: rotate(-45deg);
}

.aresa-header__mobile-nav a:hover,
.aresa-header__mobile-nav a:focus-visible {
  color: var(--aresa-green);
  padding-right: 8px;
}

.aresa-header__mobile-panel > .aresa-header__cta {
  display: flex;
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  padding-inline: 20px;
  font-size: 15px;
}


/* =========================================================
   10. SCROLLED / COMPACT STATE
   ========================================================= */

.aresa-header.is-scrolled {
  box-shadow: 0 8px 26px rgba(6, 59, 42, 0.12);
}

.aresa-header.is-scrolled .aresa-header__topbar {
  height: 0;
  opacity: 0;
}

.aresa-header.is-scrolled .aresa-header__main-inner {
  min-height: 66px;
}

.aresa-header.is-scrolled .aresa-header__brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
}

.aresa-header.is-scrolled .aresa-header__brand-divider {
  height: 34px;
}

.aresa-header.is-scrolled .aresa-header__brand-name {
  font-size: 13px;
}

.aresa-header.is-scrolled .aresa-header__nav-list a {
  min-height: 66px;
}

.aresa-header.is-scrolled .aresa-header__nav-list a::after {
  bottom: 12px;
}


/* =========================================================
   11. TABLET
   ========================================================= */

@media (max-width: 1180px) {
  .aresa-header__main-inner {
    gap: 20px;
  }

  .aresa-header__brand-name,
  .aresa-header__brand-divider {
    display: none;
  }

  .aresa-header__nav-list {
    gap: 15px;
  }

  .aresa-header__nav-list a {
    font-size: 14px;
  }

  .aresa-header__cta {
    padding-inline: 15px;
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .aresa-header__topbar {
    display: none;
  }

  .aresa-header__inner {
    width: min(100% - 32px, 1280px);
  }

  .aresa-header__main-inner {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    min-height: 70px;
  }

  .aresa-header__brand {
    order: 2;
    margin-right: 0;
    margin-left: auto;
  }

  .aresa-header__brand-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .aresa-header__nav {
    display: none;
  }

  .aresa-header__mobile-toggle {
    display: block;
    order: 3;
  }

  .aresa-header__main-inner > .aresa-header__cta {
    order: 1;
    min-height: 40px;
    padding-inline: 13px;
    font-size: 12px;
  }

  .aresa-header__cta-icon {
    display: none;
  }

  .aresa-header.is-scrolled .aresa-header__main-inner {
    min-height: 62px;
  }

  .aresa-header.is-scrolled .aresa-header__brand-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }
}


/* =========================================================
   12. MOBILE
   ========================================================= */

@media (max-width: 560px) {
  .aresa-header__inner {
    width: calc(100% - 24px);
  }

  .aresa-header__main-inner {
    min-height: 64px;
    gap: 10px;
  }

  .aresa-header__brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .aresa-header__mobile-toggle {
    width: 40px;
    height: 40px;
  }

  .aresa-header__main-inner > .aresa-header__cta {
    min-height: 38px;
    padding-inline: 11px;
    border-radius: 7px;
    font-size: 11px;
  }

  .aresa-header__mobile-panel {
    width: min(92vw, 350px);
    padding: 18px;
  }

  .aresa-header__mobile-brand-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .aresa-header.is-scrolled .aresa-header__brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}

@media (max-width: 390px) {
  .aresa-header__main-inner > .aresa-header__cta {
    max-width: 116px;
    padding-inline: 9px;
    font-size: 10.5px;
    text-align: center;
  }

  .aresa-header__brand-mark {
    width: 41px;
    height: 41px;
    flex-basis: 41px;
  }
}


/* =========================================================
   13. ACCESSIBILITY & PAGE STATE
   ========================================================= */

.aresa-header a:focus-visible,
.aresa-header button:focus-visible {
  outline: 3px solid rgba(0, 143, 69, 0.28);
  outline-offset: 3px;
}

body.aresa-mobile-menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .aresa-header,
  .aresa-header *,
  .aresa-header *::before,
  .aresa-header *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* =========================================================
   HUBSPOT OVERRIDE — TOP CONTACT BAR
   Keeps WhatsApp and email visible against theme overrides.
   ========================================================= */

.aresa-header__topbar .aresa-header__contact {
  display: flex !important;
  align-items: center;
  visibility: visible !important;
  opacity: 1 !important;
}

.aresa-header__topbar .aresa-header__contact-link,
.aresa-header__topbar .aresa-header__contact-link span {
  display: inline-flex !important;
  color: #ffffff !important;
  font-size: 13px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.aresa-header__topbar .aresa-header__contact-icon {
  display: inline-flex !important;
  color: #c4e8cc !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.aresa-header__topbar .aresa-header__contact-separator {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;