/*
 * Amaj Global Header & Footer
 * Scoped styles for compatibility with WordPress themes.
 */
:root {
  --amaj-hf-primary: #20427c;
  --amaj-hf-secondary: #315ea6;
  --amaj-hf-accent: #78a9ff;
  --amaj-hf-header-bg: #ffffff;
  --amaj-hf-header-text: #10213d;
  --amaj-hf-footer-bg: #0b2b5d;
  --amaj-hf-container: min(1200px, calc(100% - 40px));
  --amaj-hf-line: #e6ebf3;
  --amaj-hf-muted: #63718a;
  --amaj-hf-shadow: 0 16px 42px rgba(18, 43, 84, .11);
}

body.amaj-global-hf-active {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}

body.amaj-global-hf-active.amaj-global-hf-sticky .amaj-global-header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

body.admin-bar.amaj-global-hf-active.amaj-global-hf-sticky .amaj-global-header {
  top: 32px;
}

.amaj-global-header,
.amaj-global-footer,
.amaj-hf-mobile-panel,
.amaj-hf-mobile-overlay,
.amaj-hf-floating-whatsapp {
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  direction: rtl;
}

.amaj-global-header *,
.amaj-global-footer *,
.amaj-hf-mobile-panel *,
.amaj-hf-floating-whatsapp * {
  box-sizing: border-box;
}

.amaj-global-header a,
.amaj-global-footer a,
.amaj-hf-mobile-panel a,
.amaj-hf-floating-whatsapp {
  color: inherit;
  text-decoration: none;
}

.amaj-hf-container {
  width: var(--amaj-hf-container);
  margin-inline: auto;
}

.amaj-hf-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  flex: 0 0 auto;
}

.amaj-hf-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */
.amaj-global-header {
  width: 100%;
  color: var(--amaj-hf-header-text);
  background: var(--amaj-hf-header-bg);
  box-shadow: 0 1px 0 rgba(16, 33, 61, .06);
  transition: box-shadow .25s ease, transform .25s ease;
}

.amaj-global-header.amaj-hf-scrolled {
  box-shadow: 0 14px 40px rgba(12, 35, 73, .12);
}

.amaj-hf-topbar {
  color: #fff;
  background:
    radial-gradient(circle at 10% 0, rgba(255,255,255,.12), transparent 30%),
    linear-gradient(90deg, color-mix(in srgb, var(--amaj-hf-primary) 78%, #071a3c), var(--amaj-hf-secondary));
}

.amaj-hf-topbar-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 11.5px;
}

.amaj-hf-topbar-right,
.amaj-hf-topbar-left,
.amaj-hf-topbar-message,
.amaj-hf-topbar-item,
.amaj-hf-topbar-left > a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amaj-hf-topbar-right {
  gap: 24px;
}

.amaj-hf-topbar-left {
  gap: 18px;
}

.amaj-hf-topbar .amaj-hf-icon {
  width: 16px;
  height: 16px;
}

.amaj-hf-topbar a {
  color: rgba(255,255,255,.80);
  transition: .2s;
}

.amaj-hf-topbar a:hover {
  color: #fff;
}

.amaj-hf-mainbar {
  position: relative;
  background: color-mix(in srgb, var(--amaj-hf-header-bg) 94%, transparent);
  backdrop-filter: blur(18px);
}

.amaj-hf-mainbar-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.amaj-hf-brand {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.amaj-hf-logo-image {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
}

.amaj-hf-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.amaj-hf-logo-mark {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 30%),
    linear-gradient(145deg, var(--amaj-hf-secondary), var(--amaj-hf-primary));
  clip-path: polygon(50% 0, 95% 19%, 91% 72%, 50% 100%, 9% 72%, 5% 19%);
  box-shadow: 0 12px 28px rgba(32,66,124,.19);
}

.amaj-hf-logo-mark .amaj-hf-icon {
  width: 30px;
  height: 30px;
}

.amaj-hf-brand-copy {
  display: grid;
  gap: 1px;
}

.amaj-hf-brand-copy strong {
  color: var(--amaj-hf-header-text);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.amaj-hf-brand-copy small {
  color: var(--amaj-hf-muted);
  font-size: 10.5px;
}

.amaj-hf-desktop-nav {
  flex: 1;
  min-width: 0;
}

.amaj-hf-menu,
.amaj-hf-menu ul,
.amaj-hf-mobile-menu,
.amaj-hf-mobile-menu ul,
.amaj-hf-footer-menu,
.amaj-hf-footer-fallback,
.amaj-hf-fallback-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.amaj-hf-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.amaj-hf-menu > li {
  position: relative;
}

.amaj-hf-menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 84px;
  color: var(--amaj-hf-header-text);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: .22s;
}

.amaj-hf-menu > li > a::after {
  content: "";
  position: absolute;
  right: 0;
  left: auto;
  bottom: 17px;
  width: 0;
  height: 2px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--amaj-hf-secondary), var(--amaj-hf-primary));
  transition: .22s;
}

.amaj-hf-menu > li:hover > a,
.amaj-hf-menu > li.current-menu-item > a,
.amaj-hf-menu > li.current-menu-ancestor > a {
  color: var(--amaj-hf-primary);
}

.amaj-hf-menu > li:hover > a::after,
.amaj-hf-menu > li.current-menu-item > a::after,
.amaj-hf-menu > li.current-menu-ancestor > a::after {
  width: 100%;
}

.amaj-hf-menu .sub-menu {
  position: absolute;
  top: calc(100% - 8px);
  right: -18px;
  z-index: 50;
  min-width: 230px;
  padding: 10px;
  border: 1px solid var(--amaj-hf-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(15, 40, 80, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .22s;
}

.amaj-hf-menu li:hover > .sub-menu,
.amaj-hf-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.amaj-hf-menu .sub-menu li {
  position: relative;
}

.amaj-hf-menu .sub-menu a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: #38475f;
  font-size: 12.5px;
  font-weight: 600;
  transition: .2s;
}

.amaj-hf-menu .sub-menu a:hover {
  color: var(--amaj-hf-primary);
  background: #f1f6fd;
}

.amaj-hf-menu .sub-menu .sub-menu {
  top: 0;
  right: calc(100% + 8px);
}

.amaj-hf-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.amaj-hf-search-toggle,
.amaj-hf-mobile-toggle,
.amaj-hf-mobile-panel-close {
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.amaj-hf-search-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--amaj-hf-line);
  border-radius: 13px;
  color: var(--amaj-hf-primary);
  background: #f7f9fc;
  transition: .2s;
}

.amaj-hf-search-toggle:hover {
  border-color: color-mix(in srgb, var(--amaj-hf-primary) 25%, #fff);
  background: #edf4ff;
}

.amaj-hf-header-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 13px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--amaj-hf-secondary), var(--amaj-hf-primary));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--amaj-hf-primary) 24%, transparent);
  font-size: 12.5px;
  font-weight: 900;
  transition: .22s;
}

.amaj-hf-header-cta:hover {
  transform: translateY(-2px);
}

.amaj-hf-mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--amaj-hf-secondary), var(--amaj-hf-primary));
}

.amaj-hf-mobile-close-icon {
  display: none;
}

.amaj-hf-search-panel {
  border-top: 1px solid var(--amaj-hf-line);
  background: #fff;
  box-shadow: 0 18px 30px rgba(14, 38, 75, .08);
}

.amaj-hf-search-panel[hidden] {
  display: none;
}

.amaj-hf-search-form {
  display: flex;
  gap: 10px;
  padding: 16px 0;
}

.amaj-hf-search-form input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 1px solid #dce4ee;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  color: #10213d;
  background: #f9fbfd;
  font: inherit;
}

.amaj-hf-search-form input:focus {
  border-color: color-mix(in srgb, var(--amaj-hf-primary) 45%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--amaj-hf-primary) 9%, transparent);
}

.amaj-hf-search-form button {
  min-width: 120px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--amaj-hf-secondary), var(--amaj-hf-primary));
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* Mobile panel */
.amaj-hf-mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10001;
  width: min(390px, 90vw);
  height: 100dvh;
  overflow-y: auto;
  color: #10213d;
  background: #fff;
  box-shadow: -24px 0 70px rgba(8, 29, 64, .22);
  transform: translateX(105%);
  visibility: hidden;
  transition: .32s ease;
}

.amaj-hf-mobile-panel.is-open {
  transform: translateX(0);
  visibility: visible;
}

.amaj-hf-mobile-panel-inner {
  min-height: 100%;
  padding: 22px;
}

.amaj-hf-mobile-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--amaj-hf-line);
}

.amaj-hf-mobile-panel-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--amaj-hf-primary);
  background: #edf4ff;
}

.amaj-hf-mobile-nav {
  padding: 20px 0;
}

.amaj-hf-mobile-menu > li {
  border-bottom: 1px solid #edf0f5;
}

.amaj-hf-mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 50px;
  color: #263955;
  font-size: 13.5px;
  font-weight: 700;
}

.amaj-hf-mobile-menu .sub-menu {
  padding: 0 14px 10px 0;
}

.amaj-hf-mobile-menu .sub-menu a {
  min-height: 40px;
  color: #68758a;
  font-size: 12.5px;
}

.amaj-hf-mobile-contact {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 17px;
  background: #f4f7fb;
}

.amaj-hf-mobile-contact a,
.amaj-hf-mobile-contact span {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #536178;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.amaj-hf-mobile-contact .amaj-hf-icon {
  width: 18px;
  height: 18px;
  color: var(--amaj-hf-primary);
}

.amaj-hf-mobile-panel .amaj-hf-socials {
  margin-top: 18px;
}

.amaj-hf-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 18, 43, .58);
  backdrop-filter: blur(4px);
}

.amaj-hf-mobile-overlay[hidden] {
  display: none;
}

body.amaj-hf-menu-open {
  overflow: hidden;
}

/* Social */
.amaj-hf-socials {
  display: flex;
  align-items: center;
  gap: 7px;
}

.amaj-hf-socials a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.11);
  transition: .2s;
}

.amaj-hf-socials a:hover {
  color: var(--amaj-hf-primary);
  background: #fff;
  transform: translateY(-2px);
}

.amaj-hf-socials .amaj-hf-icon {
  width: 15px;
  height: 15px;
}

/* Footer */
.amaj-global-footer {
  position: relative;
  color: #fff;
  background: var(--amaj-hf-footer-bg);
}

.amaj-hf-footer-cta-wrap {
  position: relative;
  z-index: 3;
  padding-top: 68px;
}

.amaj-hf-footer-cta {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 46px;
  padding: 38px 42px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 8% 5%, rgba(255,255,255,.15), transparent 30%),
    linear-gradient(115deg, var(--amaj-hf-primary), var(--amaj-hf-secondary));
  box-shadow: 0 22px 60px rgba(4, 22, 52, .28);
}

.amaj-hf-footer-cta::after {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -165px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 50px rgba(255,255,255,.03);
}

.amaj-hf-footer-cta > * {
  position: relative;
  z-index: 2;
}

.amaj-hf-footer-cta h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.4;
}

.amaj-hf-footer-cta p {
  max-width: 750px;
  margin: 0;
  color: rgba(255,255,255,.73);
  font-size: 13.5px;
}

.amaj-hf-footer-cta > a {
  min-width: 150px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 14px;
  color: var(--amaj-hf-primary);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  transition: .22s;
}

.amaj-hf-footer-cta > a:hover {
  transform: translateY(-3px);
}

.amaj-hf-footer-main {
  padding: 74px 0 0;
  background:
    radial-gradient(circle at 90% 0, rgba(86,136,211,.12), transparent 30%),
    linear-gradient(180deg, color-mix(in srgb, var(--amaj-hf-footer-bg) 97%, #fff), var(--amaj-hf-footer-bg));
}

.amaj-hf-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1fr 1.25fr;
  gap: 46px;
}

.amaj-hf-brand-footer .amaj-hf-brand-copy strong {
  color: #fff;
}

.amaj-hf-brand-footer .amaj-hf-brand-copy small {
  color: rgba(255,255,255,.56);
}

.amaj-hf-footer-about > h3,
.amaj-hf-footer-column > h3 {
  margin: 22px 0 15px;
  color: #fff;
  font-size: 15px;
}

.amaj-hf-footer-column > h3 {
  margin-top: 0;
}

.amaj-hf-footer-about > p {
  max-width: 360px;
  margin: 0;
  color: rgba(255,255,255,.63);
  font-size: 12.5px;
}

.amaj-hf-socials-footer {
  margin-top: 22px;
}

.amaj-hf-socials-footer a {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.amaj-hf-socials-footer .amaj-hf-icon {
  width: 18px;
  height: 18px;
}

.amaj-hf-footer-menu,
.amaj-hf-footer-fallback {
  display: grid;
  gap: 10px;
}

.amaj-hf-footer-menu a,
.amaj-hf-footer-fallback a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.65);
  font-size: 12.5px;
  transition: .2s;
}

.amaj-hf-footer-menu a::before,
.amaj-hf-footer-fallback a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--amaj-hf-accent) 75%, #fff);
}

.amaj-hf-footer-menu a:hover,
.amaj-hf-footer-fallback a:hover {
  color: #fff;
  transform: translateX(-4px);
}

.amaj-hf-footer-contact {
  display: grid;
  align-content: start;
  gap: 11px;
}

.amaj-hf-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.amaj-hf-contact-row .amaj-hf-icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: color-mix(in srgb, var(--amaj-hf-accent) 78%, #fff);
}

a.amaj-hf-contact-row:hover {
  color: #fff;
}

.amaj-hf-footer-bottom {
  min-height: 66px;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255,255,255,.52);
  font-size: 11px;
}

.amaj-hf-footer-bottom a:hover {
  color: #fff;
}

/* Floating WhatsApp */
.amaj-hf-floating-whatsapp {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9998;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 16px;
  color: #fff !important;
  background: linear-gradient(145deg, #20b85a, #159447);
  box-shadow: 0 16px 38px rgba(21,148,71,.28);
  font-size: 12px;
  font-weight: 900;
  transition: .22s;
}

.amaj-hf-floating-whatsapp:hover {
  transform: translateY(-3px);
}

.amaj-hf-floating-whatsapp .amaj-hf-icon {
  width: 25px;
  height: 25px;
}

/* Fallback page menu */
.amaj-hf-fallback-menu > ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.amaj-hf-fallback-menu > ul > li > a {
  display: inline-flex;
  min-height: 84px;
  align-items: center;
  color: var(--amaj-hf-header-text);
  font-size: 13.5px;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1080px) {
  .amaj-hf-desktop-nav {
    display: none;
  }

  .amaj-hf-mainbar-inner {
    min-height: 76px;
  }

  .amaj-hf-header-actions {
    margin-right: auto;
  }

  .amaj-hf-mobile-toggle {
    display: grid;
  }

  .amaj-hf-topbar-message {
    display: none;
  }

  .amaj-hf-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 782px) {
  body.admin-bar.amaj-global-hf-active.amaj-global-hf-sticky .amaj-global-header {
    top: 46px;
  }
}

@media (max-width: 700px) {
  :root {
    --amaj-hf-container: min(100% - 24px, 1200px);
  }

  .amaj-hf-topbar {
    display: none;
  }

  .amaj-hf-mainbar-inner {
    min-height: 70px;
    gap: 14px;
  }

  .amaj-hf-logo-mark {
    width: 44px;
    height: 49px;
  }

  .amaj-hf-logo-image {
    width: 48px;
    height: 48px;
  }

  .amaj-hf-brand-copy strong {
    font-size: 17px;
  }

  .amaj-hf-brand-copy small {
    display: none;
  }

  .amaj-hf-search-toggle {
    display: none;
  }

  .amaj-hf-header-cta {
    min-width: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .amaj-hf-header-cta span {
    display: none;
  }

  .amaj-hf-footer-cta-wrap {
    padding-top: 46px;
  }

  .amaj-hf-footer-cta {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 22px;
  }

  .amaj-hf-footer-cta > a {
    width: 100%;
  }

  .amaj-hf-footer-main {
    padding-top: 58px;
  }

  .amaj-hf-footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .amaj-hf-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 18px;
  }

  .amaj-hf-floating-whatsapp {
    left: 14px;
    bottom: 14px;
    width: 50px;
    padding: 0;
    justify-content: center;
  }

  .amaj-hf-floating-whatsapp span {
    display: none;
  }
}
