/* ═══════════════════════════════════════════════════════════
   HEADER, NAVIGATION & FOOTER STYLES
   ═══════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   0. SKIP LINK (accessibility) — off-screen until keyboard focus
   ────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  inset-inline-start: 0;
  top: -60px;
  z-index: 10000;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

/* ──────────────────────────────────────────────────────────────
   1. HEADER / NAVIGATION
   ────────────────────────────────────────────────────────────── */

.header {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: all var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  height: 80px;
}

/* LOGO & BRANDING */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.logo:hover {
  opacity: 0.8;
}

.logo-mark {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* Real brand logo image (replaces placeholder mark) */
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-mark svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-primary-gold);
  fill: none;
  stroke-width: 2;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-brand {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-navy);
  line-height: 1.2;
}

.logo-tagline {
  font-size: var(--text-xs);
  color: var(--color-primary-gold);
  font-weight: var(--weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

/* NAVIGATION MENU */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-base);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background-color: var(--color-primary-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary-gold);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--color-primary-gold);
}

.nav-link.active::after {
  transform: scaleX(1);
}

/* RIGHT SECTION - CTA & LANGUAGE */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

/* Language toggle (Phase 7) — visible EN button, links to English site */
.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: var(--weight-bold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-primary-gold);
  background: transparent;
  border: 1px solid var(--color-primary-gold);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-lang-toggle:hover {
  background: var(--color-primary-gold);
  color: var(--color-navy);
}

.btn-lang-toggle .lang-icon {
  font-size: 15px;
  display: inline-block;
}

@media (max-width: 768px) {
  .btn-lang-toggle {
    padding: 6px 10px;
    font-size: 11px;
  }
}

.btn-cta {
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-primary-gold);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-cta:hover {
  background-color: var(--color-primary-gold-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* MOBILE TOGGLE */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base);
}

.nav-toggle:hover {
  background-color: var(--color-gray-light);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--color-text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(11px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-11px);
}

/* ──────────────────────────────────────────────────────────────
   2. FOOTER
   ────────────────────────────────────────────────────────────── */

.footer {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding-top: var(--space-20);
  padding-bottom: var(--space-12);
  margin-top: var(--space-32);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-6);
  color: var(--color-white);
  letter-spacing: var(--letter-spacing-normal);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--space-3);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-base);
  line-height: var(--line-height-relaxed);
}

.footer-col a:hover {
  color: var(--color-primary-gold);
}

/* FOOTER COMPANY INFO */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-brand-logo {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}

.footer-brand-logo svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-primary-gold);
}

.footer-brand-text {
  font-size: var(--text-sm);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, 0.7);
}

/* FOOTER CONTACT INFO */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary-gold);
}

/* FOOTER BOTTOM */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.footer-bottom-left {
  flex: 1;
  text-align: left;
}

.footer-bottom-center {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.footer-bottom-right {
  flex: 0 0 auto;
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--color-primary-gold);
}

.footer-divider {
  width: 1px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.1);
}

/* ──────────────────────────────────────────────────────────────
   3. MOBILE RESPONSIVE
   ────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .nav-menu {
    gap: var(--space-6);
  }

  .nav-link {
    padding: var(--space-2) var(--space-3);
  }

  .nav-right {
    gap: var(--space-4);
  }
}

@media (max-width: 768px) {
  .nav {
    height: 70px;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }
    /* RTL (Arabic) mobile: pin actions to the left so they don't overlap the logo */
  html[dir="rtl"] .nav-right {
    right: auto;
    left: var(--space-4);
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-white);
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: var(--space-8);
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    z-index: var(--z-modal);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
    font-size: var(--text-base);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.active {
    background-color: var(--color-primary-gold-pale);
    border-left: 4px solid var(--color-primary-gold);
  }

  .nav-right {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    gap: var(--space-2);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-left,
  .footer-bottom-right {
    flex: 1 1 100%;
    text-align: center;
  }

  .footer-bottom-center {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .logo-text {
    display: none;
  }

  .nav {
    height: 60px;
  }

  .nav-menu {
    top: 60px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer {
    padding-top: var(--space-12);
  }
}
/* Mobile RTL header fix */
@media (max-width: 768px) {
  html[dir="rtl"] header,
  body.rtl header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
  }

  html[dir="rtl"] .header-inner,
  body.rtl .header-inner,
  html[dir="rtl"] .site-header-inner,
  body.rtl .site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    width: 100%;
  }

  html[dir="rtl"] .menu-toggle,
  body.rtl .menu-toggle {
    order: 1;
    margin-inline-start: 0;
    margin-inline-end: 0;
  }

  html[dir="rtl"] .language-switcher,
  body.rtl .language-switcher,
  html[dir="rtl"] .lang-switcher,
  body.rtl .lang-switcher {
    order: 2;
  }

  html[dir="rtl"] .quote-button,
  body.rtl .quote-button,
  html[dir="rtl"] .request-quote,
  body.rtl .request-quote {
    order: 3;
  }

  html[dir="rtl"] .logo,
  body.rtl .logo {
    order: 4;
  }
}

/* ══════════════════════════════════════════════════════════════ */
