/* =========================================================
   HEADER-FOOTER.CSS
   ========================================================= */

/* ===== هدر ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 350;
  background: var(--white, #fff);
  box-shadow: 0 2px 12px rgba(34,53,72,0.08);
}

@media (max-width: 767px) {
  .site-header {
    background: transparent;
    box-shadow: 0 1px 0 rgba(34,53,72,0.08);
  }

  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: -1;
  }

  .header-inner {
    justify-content: center;
  }
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-text {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--dark);
}
.logo-text span { color: var(--blue); }

/* ===== لوگو ===== */
.site-logo img {
  max-height: 58px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .site-logo img {
    max-height: 46px;
  }
}

/* ===== دکمه‌های سمت هدر (دسکتاپ) ===== */
.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}

.header-agent-btn {
  color: var(--blue);
  border: 1.5px solid var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.header-agent-btn:hover { background: var(--bg); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: var(--dark);
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.menu-toggle {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.4rem;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--dark);
  border-radius: 2px;
}

@media (min-width: 768px) {
  .header-actions { display: flex; }
  .menu-toggle { display: none; }
}

/* ===== پایه منو (هم موبایل هم دسکتاپ) ===== */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===== منوی موبایل (Bottom Sheet) ===== */
@media (max-width: 767px) {
  .nav-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: auto;
    max-width: 480px;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 34px rgba(34,53,72,0.22);
    padding: 1.1rem 1.1rem calc(76px + env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    max-height: 60vh;
    overflow-y: auto;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(.32,.72,0,1), opacity 0.25s ease;
    z-index: 300;
    list-style: none;
  }

  .nav-menu::before {
    content: "";
    flex-basis: 100%;
    width: 40px; height: 4px;
    background: var(--muted);
    opacity: 0.4;
    border-radius: 999px;
    margin: 0 auto 0.4rem;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu li {
    flex: 0 1 28%;
    max-width: 28%;
    border-bottom: none;
    list-style: none;
  }

  .nav-menu li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--bg);
    border-radius: 16px;
    padding: 0.6rem 0.4rem;
    text-align: center;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .nav-menu li a:active {
    transform: scale(0.95);
    background: #eef1f5;
  }

  .menu-tile-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    border-radius: 12px;
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(34,53,72,0.08);
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position: center;
  }
  .menu-tile-icon svg { width: 20px; height: 20px; }

  .menu-tile-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--dark);
  }

  .mobile-only-item .menu-tile-icon {
    background-color: var(--primary);
  }
}

/* آیکون هر آیتم منو (مسیر نسبی از ریشه سایت — با تغییر دامنه/هاست مشکلی پیدا نمی‌کنه) */
.icon-home .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/home.png');
}
.icon-services .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/services.png');
}
.icon-blog .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/article.png');
}
.icon-about .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/about.png');
}
.icon-contact .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/contact.png');
}
.icon-agent .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/register.png');
}
.icon-cities .menu-tile-icon {
  background-image: url('/wp-content/uploads/2026/08/iran4.png');
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }
  .nav-overlay { display: none; }
  .mobile-only-item { display: none; }
  .menu-tile-icon { display: none; }
}

/* ===== لایه پشت منو (Overlay) ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34,53,72,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 250;
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.menu-open-lock {
  overflow: hidden;
}

/* ===== فوتر ===== */
.site-footer {
  background: var(--dark);
  color: #fff;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-logo { font-size: 1.3rem; margin: 0 0 0.5rem; }
.footer-logo span { color: var(--primary); }

/* لوگوی فوتر (از لوگوی سفارشی‌ساز) */
.footer-logo-img .custom-logo-link { display: inline-block; }
.footer-logo-img img {
  max-height: 60px;
  width: auto;
  margin-bottom: 0.5rem;
}
.footer-desc { color: var(--muted-on-dark); font-size: 0.9rem; }
.footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fff;
  border-radius: 10px;
  padding: 0.35rem;
  margin-top: 0.75rem;
  width: fit-content;
}
.footer-trust img { width: 90px; height: auto; display: block; }

.footer-col h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #ddd; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted-on-dark);
}

@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

/* ===== فوتر در موبایل: لوگوی کوچک‌تر + وسط‌چین + شهرها ۲ ردیف ۴تایی ===== */
@media (max-width: 767px) {
  .footer-inner { text-align: center; }
  .footer-logo-img { display: flex; justify-content: center; }
  .footer-logo-img img { max-height: 70px; }

  .footer-trust { justify-content: center; margin-left: auto; margin-right: auto; }

  .footer-cities {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem 0.25rem;
  }
  .footer-cities li { margin-bottom: 0; }

  .footer-contact-row { justify-content: center; }
}

/* ===== نویگیشن پایین موبایل ===== */
.mobile-bottom-nav {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(34,53,72,0.12);
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 400; /* باید همیشه بالای منوی باز‌شده (300) بمونه */
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  flex: 1;
  background: none;
  border: none;
  padding: 0.3rem 0;
}
.bottom-nav-item.is-active,
.bottom-nav-item:hover { color: var(--blue); }
.bottom-nav-item.is-active svg { stroke: var(--blue); }

/* دکمه وسط - برجسته */
.bottom-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex: 1.2;
  position: relative;
}

.bottom-nav-center-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  background: var(--primary);
  color: var(--dark);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(245,188,56,0.55);
  margin-top: -28px;
  border: 4px solid #fff;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.bottom-nav-center-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--dark);
}

/* فاصله پایین صفحه تا محتوا زیر نوار گم نشه */
body { padding-bottom: 72px; }

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* لینک‌های تلفن و ایمیل در فوتر */
.footer-col p a {
  color: #ddd;             
  text-decoration: none;
}
.footer-col p a:hover {
  color: var(--primary);   
}

/* ردیف تماس فوتر (آیکون SVG + لینک) */
.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-contact-row svg { flex-shrink: 0; }

/* رفع مشکل نمایش ایموجی تلفن و ایمیل در فوتر */
.footer-col p {
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'YekanBakh', sans-serif;
}

/* اگر فقط می‌خواهید روی خود ایموجی اعمال شود، می‌توانید از این روش هم استفاده کنید */
.footer-col p a {
  font-family: inherit; 
}