/* ===== Shared Components ===== */

/* --- Header / Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-base);
  height: var(--header-height);
}

.header--transparent {
  background: transparent;
}

.header--scrolled {
  background: rgba(var(--dark-rgb), 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
  height: 70px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo img {
  height: 30px;
  width: auto;
  transition: height var(--transition-base);
}

.header--scrolled .header__logo img {
  height: 38px;
}

@media (max-width: 768px) {
  .header__logo img {
    height: 24px;
  }
  .header--scrolled .header__logo img {
    height: 28px;
  }
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.header__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__links a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.header__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition-base);
  border-radius: 0;
}

.header__links a:hover::after,
.header__links a.active::after {
  width: 100%;
}

.header__links a:hover,
.header__links a.active {
  color: var(--secondary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 0;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.15);
}

.lang-switch a {
  padding: 6px 14px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition-fast);
}

.lang-switch a.active {
  background: var(--secondary);
  color: var(--dark);
}

.lang-switch a:hover:not(.active) {
  color: var(--white);
}

/* Contact CTA in header */
.header__cta {
  padding: 10px 24px !important;
  font-size: 0.85rem !important;
  border-radius: 0 !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--white);
  border-radius: 0;
  transition: all var(--transition-base);
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  background: var(--dark);
  z-index: 999;
  padding: 100px 30px 40px;
  transition: right var(--transition-base);
  overflow-y: auto;
}

[dir="rtl"] .mobile-nav {
  right: auto;
  left: -100%;
  transition: left var(--transition-base);
}

.mobile-nav.open {
  right: 0;
}

[dir="rtl"] .mobile-nav.open {
  left: 0;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mobile-nav__links a {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition-fast);
}

.mobile-nav__links a:hover,
.mobile-nav__links a.active {
  color: var(--secondary);
  padding-left: 12px;
}

.mobile-nav__footer {
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mobile-overlay.active {
  opacity: 1;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding-top: var(--space-20);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer__brand p {
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
}

.footer__brand img {
  height: 42px;
}

.footer__social {
  display: flex;
  gap: var(--space-3);
}

.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.footer__social a:hover {
  background: var(--secondary);
  color: var(--dark);
  transform: translateY(-3px);
}

.footer__col h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: var(--space-6);
  position: relative;
  padding-bottom: var(--space-3);
}

.footer__col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--secondary);
  border-radius: 0;
}

[dir="rtl"] .footer__col h4::after {
  left: auto;
  right: 0;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__col ul a {
  color: var(--gray-500);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__col ul a:hover {
  color: var(--secondary);
  padding-left: 6px;
}

[dir="rtl"] .footer__col ul a:hover {
  padding-left: 0;
  padding-right: 6px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: var(--space-4);
  color: var(--gray-500);
  font-size: 0.9rem;
}

.footer__contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--secondary);
  margin-top: 4px;
}

.footer__contact-text.email-nowrap {
  white-space: nowrap;
}

.footer__contact-text.phone-ltr {
  direction: ltr;
  unicode-bidi: plaintext;
}

.footer__bottom {
  padding: var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* --- Page Hero Banner (Inner Pages) --- */
.page-hero {
  position: relative;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--dark);
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.page-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(var(--dark-rgb), 0.6), rgba(var(--primary-rgb), 0.8));
}

.page-hero__content {
  position: relative;
  z-index: 2;
}

.page-hero__content h1 {
  color: var(--white);
  margin-bottom: var(--space-3);
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 0.9rem;
}

.page-hero__breadcrumb a {
  color: var(--secondary);
}

.page-hero__breadcrumb a:hover {
  text-decoration: underline;
}

.page-hero__breadcrumb span {
  color: var(--gray-500);
}

/* --- Stats Counter --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.stat {
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.stat__number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--secondary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat__label {
  font-size: 0.9rem;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section--dark .stat__label {
  color: var(--gray-400);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 900;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
  animation: whatsappPulse 2s infinite;
}

[dir="rtl"] .whatsapp-float {
  right: auto;
  left: 30px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: var(--white);
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6); }
}

/* --- Responsive Components --- */
@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__links,
  .header__actions,
  .header__cta {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .page-hero {
    height: 280px;
  }

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

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat {
    padding: var(--space-6) var(--space-3);
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  [dir="rtl"] .whatsapp-float {
    right: auto;
    left: 20px;
  }
}
