/* ═══════════════════════════════════════════════════
   NOON CALLIGRAPHER — LAYOUT
   Phase 2: Navigation, Footer, Sidebar shells
═══════════════════════════════════════════════════ */

/* ─── Public Navigation ─────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: var(--nav-height);
  z-index: var(--z-sticky);
  transition: background var(--dur-base), box-shadow var(--dur-base),
              backdrop-filter var(--dur-base);
}

/* Transparent on top of hero */
.site-nav.nav-transparent {
  background: transparent;
}

/* Scrolled state */
.site-nav.nav-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 44px;
  width: auto;
  transition: filter var(--dur-base);
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
}

.nav-links > li > a {
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text);
  border-radius: var(--radius-full);
  transition: background var(--dur-fast), color var(--dur-fast);
  position: relative;
  white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--c-primary);
  background: var(--c-primary-xlight);
}

/* On transparent nav: white links */
.nav-transparent .nav-links > li > a {
  color: rgba(255,255,255,0.9);
}
.nav-transparent .nav-links > li > a:hover,
.nav-transparent .nav-links > li > a.active {
  color: var(--c-white);
  background: rgba(255,255,255,0.15);
}

/* If transparent nav is in dark text mode (for light banners) */
.site-nav.nav-transparent.nav-dark-text .nav-links > li > a {
  color: var(--c-text);
}
.site-nav.nav-transparent.nav-dark-text .nav-links > li > a:hover,
.site-nav.nav-transparent.nav-dark-text .nav-links > li > a.active {
  color: var(--c-primary);
  background: var(--c-primary-xlight);
}

/* Nav actions (right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--c-border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all var(--dur-fast);
  text-decoration: none;
  background: var(--c-white);
}

.lang-toggle:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-xlight);
}

.nav-transparent .lang-toggle {
  border-color: rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
}

.site-nav.nav-transparent.nav-dark-text .lang-toggle {
  border-color: var(--c-border);
  color: var(--c-text-muted);
  background: var(--c-white);
}

.site-nav.nav-transparent.nav-dark-text .lang-toggle:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-xlight);
}

/* Hamburger (mobile only) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  transition: background var(--dur-fast);
}

.nav-hamburger:hover { background: var(--c-primary-xlight); }

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background: var(--c-dark);
  border-radius: var(--radius-full);
  transition: transform var(--dur-base) var(--ease-out),
              opacity var(--dur-base);
}

.nav-transparent .hamburger-line { background: white; }

.site-nav.nav-transparent.nav-dark-text .hamburger-line { background: var(--c-dark); }

.nav-hamburger.open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Mobile Drawer ─────────────────────────────── */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base), visibility var(--dur-base);
}

.nav-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: min(320px, 85vw);
  height: 100dvh;
  background: var(--c-white);
  z-index: 10000;
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}

[dir="rtl"] .nav-drawer {
  transform: translateX(100%);
}

.nav-drawer.open {
  transform: translateX(0);
}

/* Hide drawer elements on desktop viewport */
@media (min-width: 768px) {
  .nav-drawer,
  .nav-drawer-backdrop {
    display: none !important;
  }
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--c-border-light);
  background: var(--c-primary-xlight);
}

.nav-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text-muted);
  transition: all var(--dur-fast);
  background: var(--c-white);
}

.nav-drawer-close:hover {
  color: var(--c-danger);
  border-color: var(--c-danger);
}

.nav-drawer-links {
  flex: 1;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.nav-drawer-links a {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--c-text);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.nav-drawer-links a i {
  width: 20px;
  text-align: center;
  color: var(--c-primary);
  font-size: var(--text-md);
}

.nav-drawer-links a:hover,
.nav-drawer-links a.active {
  background: var(--c-primary-xlight);
  color: var(--c-primary-dark);
}

.nav-drawer-footer {
  padding: var(--sp-5);
  border-top: 1px solid var(--c-border-light);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ─── Mobile Bottom Tab Navigation ─────────────── */
.bottom-tab-nav {
  display: none;
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  height: var(--bottom-tab-h);
  background: var(--c-white);
  box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
  z-index: var(--z-sticky);
  border-top: 1px solid var(--c-border-light);
}

.bottom-tab-nav-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--c-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast);
  text-decoration: none;
  padding: var(--sp-2);
  position: relative;
}

.bottom-tab i {
  font-size: 1.3rem;
  transition: transform var(--dur-base) var(--ease-spring);
}

.bottom-tab span {
  font-size: 10px;
  font-weight: 600;
}

.bottom-tab.active,
.bottom-tab:hover {
  color: var(--c-primary);
}

.bottom-tab.active i {
  transform: translateY(-2px);
}

/* Active indicator dot */
.bottom-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 20%;
  height: 3px;
  background: var(--c-primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

/* Center CTA Tab (Request Quote) */
.bottom-tab-cta {
  position: relative;
  flex: 1.2;
}

.bottom-tab-cta-spacer {
  height: 20px;
  width: 20px;
  flex-shrink: 0;
}

.bottom-tab-cta-btn {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  box-shadow: var(--shadow-green);
  transition: all var(--dur-base) var(--ease-spring);
}

.bottom-tab-cta:hover .bottom-tab-cta-btn {
  transform: translateX(-50%) scale(1.1);
}

/* ─── Page Wrapper (offset for fixed nav) ───────── */
.page-wrapper {
  padding-top: var(--nav-height);
  padding-bottom: 0;
}

/* Allow transparent nav to overlay hero slider on homepage */
.page-index .page-wrapper {
  padding-top: 0;
}

@media (max-width: 767px) {
  .page-wrapper {
    padding-top: var(--nav-height-mob);
    padding-bottom: var(--bottom-tab-h);
  }
  .page-index .page-wrapper {
    padding-top: 0;
  }
}

/* ─── Footer ────────────────────────────────────── */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,0.8);
  padding-top: var(--sp-16);
  margin-bottom: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--c-primary);
  display: inline-block;
}

.footer-col-logo {
  margin-bottom: var(--sp-4);
}

.footer-col-logo img {
  height: 48px;
  filter: brightness(0) invert(1);
}

.footer-about-text {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-5);
}

.footer-social {
  display: flex;
  gap: var(--sp-3);
}

.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: var(--text-base);
  transition: all var(--dur-base);
}

.footer-social-link:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: white;
  transform: translateY(-3px);
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-links-list a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--dur-fast), gap var(--dur-fast);
}

.footer-links-list a:hover { color: var(--c-primary-light); gap: var(--sp-3); }
.footer-links-list a i { font-size: var(--text-xs); color: var(--c-primary); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
}

.footer-contact-item i {
  color: var(--c-primary);
  font-size: var(--text-base);
  margin-top: 2px;
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-5);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  transition: color var(--dur-fast);
}

.footer-bottom a:hover { color: var(--c-primary-light); }

/* Mobile Footer */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }

  .footer-col {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: var(--sp-4);
  }

  /* Collapsible footer on mobile */
  .footer-col-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    width: 100%;
  }

  .footer-col-title::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: var(--text-sm);
    transition: transform var(--dur-base);
  }

  .footer-col.expanded .footer-col-title::after {
    transform: rotate(180deg);
  }

  .footer-col-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-slow) var(--ease-out),
                padding var(--dur-base);
  }

  .footer-col.expanded .footer-col-content {
    max-height: 300px;
    padding-top: var(--sp-4);
  }

  /* First col (brand) always expanded */
  .footer-col:first-child .footer-col-title::after { display: none; }
  .footer-col:first-child .footer-col-content { max-height: none; overflow: visible; padding-top: var(--sp-3); }

  .footer-bottom { flex-direction: column; text-align: center; }

  /* Show bottom tabs on mobile */
  .bottom-tab-nav { display: block; }

  /* Hide desktop nav links */
  .nav-links, .nav-actions .btn-primary { display: none; }
  .nav-hamburger { display: flex; }

  .site-nav {
    height: var(--nav-height-mob);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links a { padding: var(--sp-2) var(--sp-3); }
}
