:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #9bd5b9;
  outline-offset: 3px;
}

.navbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(0, 26, 53, 0.96);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-full {
  height: 28px;
  width: auto;
  display: block;
}

.nav-logo-mark {
  display: none;
  height: 26px;
  width: auto;
}

@media (max-width: 560px) {
  .nav-logo-full { display: none !important; }
  .nav-logo-mark { display: block !important; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(251,255,251,.65);
  text-decoration: none;
  transition: color 150ms ease;
  white-space: nowrap;
  padding: 10px 2px;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  right: 0; left: 0; bottom: 4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms ease;
}

.nav-links a:hover,
.nav-links a.active { color: #fbfffb; }

.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after { transform: scaleX(1); }

.nav-links a.nav-cta {
  background: #4a8a72;
  color: #fbfffb;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 6px;
}

.nav-links a.nav-cta:hover { background: #5b9a80; }

/* ─── قائمة الخدمات المنسدلة ─── */
.nav-dropdown {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 6px;
  margin-inline-start: 2px;
  cursor: pointer;
  color: rgba(251,255,251,.55);
  transition: color 150ms ease;
}

.nav-dropdown-toggle:hover { color: #fbfffb; }

.nav-dropdown-caret {
  transition: transform 200ms ease;
}

.nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 230px;
  background: #001a35;
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(251,255,251,.7);
  white-space: nowrap;
  border-radius: 6px;
}

.nav-dropdown-menu a::after { display: none; content: none; }

.nav-dropdown-menu a:hover {
  background: rgba(74,138,114,.16);
  color: #fbfffb;
}

.nav-dropdown-divider {
  height: 0.5px;
  background: rgba(255,255,255,.1);
  margin: 6px 4px;
  list-style: none;
}

@media (hover: hover) and (min-width: 901px) {
  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (min-width: 901px) {
  .nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fbfffb;
  border-radius: 999px;
}

/* ─── FOOTER (مصدر موحّد لكل الصفحات) ─── */
.footer-v2 {
  background: #001a35;
  padding: 64px 48px 28px;
}
.footer-top {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 0.8fr 0.8fr 1.5fr; gap: 32px;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 0.5px solid rgba(251,255,251,.1);
}
.footer-tagline {
  font-size: 12.5px; color: #fbfffb;
  line-height: 1.8; margin: 14px auto 0; max-width: 220px;
  text-align: center;
}
.footer-tagline-sub {
  font-size: 11.5px; color: rgba(255,255,255,.55);
  margin-top: 8px;
}
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col-label {
  font-size: 11px; font-weight: 700; color: #4a8a72;
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 8px;
}
.footer-col a {
  font-size: 13.5px; color: rgba(251,255,251,.62);
  text-decoration: none; transition: color 150ms ease;
  width: fit-content;
}
.footer-col a:hover { color: #fbfffb; }
.footer-branches { display: flex; flex-direction: row; flex-wrap: wrap; gap: 18px 24px; }
.footer-branch { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.footer-branch-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; color: #4a8a72;
  letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 7px;
}
.footer-branch-line {
  font-size: 13px; color: rgba(251,255,251,.62);
  direction: ltr; text-align: right; line-height: 1.7;
}
.footer-bottom {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding-top: 24px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.06); color: rgba(251,255,251,.7);
  border: 0.5px solid rgba(251,255,251,.12);
  display: flex; align-items: center; justify-content: center;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.footer-social a:hover { background: #4a8a72; color: #fbfffb; border-color: #4a8a72; }
.footer-copyright {
  font-size: 11.5px; color: rgba(251,255,251,.32);
}
.footer-logo-col { display: flex; flex-direction: column; }
.footer-contact-col { gap: 20px; }
.footer-qr-trigger {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.06); color: rgba(251,255,251,.7);
  border: 0.5px solid rgba(251,255,251,.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.footer-qr-trigger:hover { background: #4a8a72; color: #fbfffb; border-color: #4a8a72; }

.qr-popover {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,26,53,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.qr-popover[hidden] { display: none; }
.qr-popover-card {
  background: #fbfffb;
  border-radius: 14px;
  padding: 28px;
  max-width: 280px;
  text-align: center;
  position: relative;
}
.qr-popover-close {
  position: absolute; top: 10px; left: 10px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 16px; color: #001a35;
}
.qr-popover-img { width: 100%; height: auto; display: block; margin-bottom: 12px; }
.qr-popover-text { font-size: 13px; color: #3d4d45; }

/* ─── WhatsApp chat widget ─── */
.whatsapp-widget { position: fixed; z-index: 150; left: 24px; bottom: 24px; direction: rtl; }
.whatsapp-toggle {
  min-height: 52px; padding: 0 17px; border: 0; border-radius: 999px;
  display: flex; align-items: center; gap: 9px; background: #001a35; color: #fbfffb;
  box-shadow: 0 10px 28px rgba(0, 26, 53, .26); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; transition: transform 160ms ease, background 160ms ease;
}
.whatsapp-toggle:hover { transform: translateY(-2px); background: #123758; }
.whatsapp-toggle svg { width: 22px; height: 22px; flex: 0 0 auto; }
.whatsapp-panel {
  width: min(340px, calc(100vw - 32px)); margin-bottom: 12px; overflow: hidden;
  background: #fbfffb; border-radius: 14px; box-shadow: 0 20px 52px rgba(0, 26, 53, .25);
  border: 1px solid rgba(0, 26, 53, .12);
}
.whatsapp-panel[hidden] { display: none; }
.whatsapp-panel-head { min-height: 76px; padding: 14px 16px; background: #001a35; color: #fbfffb; display: flex; align-items: center; gap: 10px; }
.whatsapp-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: url('../images/logo/yanoof-google-logo-light.png') center / cover no-repeat;
  border: none;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.whatsapp-avatar svg { display: none; }
.whatsapp-panel-head div:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.whatsapp-panel-head strong { font-size: 14px; }
.whatsapp-panel-head span { font-size: 10.5px; opacity: .82; }
.whatsapp-close { background: transparent; border: 0; color: #fff; font-size: 27px; font-weight: 300; line-height: 1; cursor: pointer; padding: 2px 4px; }
.whatsapp-panel-body {
  padding: 18px 16px 16px;
  background-color: #f3f8f6;
  background-image:
    radial-gradient(circle at 10% 5%, rgba(255,255,255,.98), transparent 45%),
    linear-gradient(135deg, rgba(223,235,229,.42), transparent 58%);
}
.whatsapp-greeting { margin: 0 0 16px; padding: 10px 12px; width: fit-content; max-width: 90%; background: #fff; color: #001a35; border: 1px solid rgba(74, 138, 114, .15); border-radius: 3px 10px 10px 10px; font-size: 13px; line-height: 1.7; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.whatsapp-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #001a35; }
.whatsapp-panel textarea { width: 100%; resize: vertical; min-height: 72px; box-sizing: border-box; padding: 10px; border: 1px solid rgba(0, 26, 53, .15); border-radius: 8px; background: #fff; color: #001a35; font: inherit; font-size: 13px; line-height: 1.6; outline: none; }
.whatsapp-panel textarea:focus { border-color: #4a8a72; box-shadow: 0 0 0 3px rgba(74,138,114,.16); }
.whatsapp-send { width: 100%; margin-top: 10px; padding: 11px 14px; border: 0; border-radius: 8px; background: #4a8a72; color: #fbfffb; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.whatsapp-send:hover { background: #3d775f; }

@media (max-width: 560px) {
  .whatsapp-widget { left: 16px; bottom: 16px; }
  .whatsapp-toggle { width: 54px; height: 54px; padding: 0; justify-content: center; }
  .whatsapp-toggle span { display: none; }
  .footer-branches { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
  .footer-branch { align-items: center; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .footer-v2 { padding: 48px 20px 24px; }
  .footer-top {
    grid-template-columns: 1fr; gap: 28px;
    text-align: center;
    padding-bottom: 28px;
  }
 .footer-col { align-items: center; }
  .footer-branch-title { justify-content: center; }
  .footer-branch-line { text-align: center; }

  /* mobile: center social + col blocks */
  .footer-social { justify-content: center; }
  .footer-contact-col { align-items: center; }
  .footer-col-label { margin-left: auto; margin-right: auto; }

  .footer-bottom { flex-direction: column-reverse; gap: 16px; padding-top: 20px; }
  .footer-copyright { text-align: center; }
}

@media (max-width: 900px) {
  .navbar { padding: 0 20px; }

  .nav-hamburger { display: flex; }

  body.menu-open::before {
    content: '';
    position: fixed;
    top: 64px; right: 0; left: 0; bottom: 0;
    background: rgba(0, 26, 53, .45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 98;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px; right: 0; left: 0;
    background: rgba(0,26,53,.98);
    padding: 20px 24px 32px;
    gap: 4px;
    border-bottom: 0.5px solid rgba(251,255,251,.1);
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 0.5px solid rgba(251,255,251,.06);
    color: rgba(251,255,251,.65);
    border-radius: 0;
    background: none;
  }

  .nav-links a:hover,
  .nav-links a.active { color: #fbfffb; background: none; }

  .nav-links a.nav-cta {
    margin-top: 8px;
    display: block;
    text-align: center;
    padding: 12px 18px;
    border-radius: 6px;
    background: #4a8a72;
    color: #fbfffb;
    border-bottom: none;
  }

  .nav-dropdown {
    flex-direction: column;
    align-items: stretch;
    position: relative;
  }

  .nav-dropdown-link { flex: 1; }

  .nav-dropdown-toggle {
    position: absolute;
    top: 4px; left: 0;
    height: 44px;
    padding: 0 8px;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    margin: 0 0 4px;
    padding: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 220ms ease, padding 220ms ease;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    max-height: 260px;
    padding: 6px 4px;
  }

  .nav-dropdown-menu a {
    padding: 10px 20px;
    font-size: 14px;
    color: rgba(251,255,251,.6);
    border-bottom: none;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 28px;
    text-align: center;
  }

  .footer-logo-col { grid-column: auto; align-items: center; }
  .footer-tagline { margin-left: auto; margin-right: auto; }
  .footer-col { align-items: center; }
  .footer-branch-title { justify-content: center; }
  .footer-branch-line { text-align: center; }
  .footer-social { justify-content: center; }
  .footer-contact-col { align-items: center; }
  .footer-col-label { margin-left: auto; margin-right: auto; }

  .footer-branches {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
  }
}
