/* ================================================================
   shared.css — Single Source of Truth for all shared styles.
   Architecture: Token-first, BEM-aware, RTL/LTR agnostic.
   All rules here are consumed by every page. Per-page CSS must
   NOT redefine any selector declared in this file.
   ================================================================ */

/* ── Cairo font — canonical application ── */
html,
body {
  font-family: 'Cairo', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html,
body,
body *:not(i):not(svg):not(path):not([class^='fa-']):not([class*=' fa-']) {
  font-family: 'Cairo', sans-serif !important;
}

input,
textarea,
select,
button,
option,
label {
  font-family: 'Cairo', sans-serif !important;
}

/* ── Skip-to-content ── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e40af;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* ── Focus ring — keyboard navigation ── */
:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Glass navigation bar — shared across all pages ── */
.glass-nav {
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

/* ── Main navigation — enhanced visibility ── */
nav[role='navigation'] {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.13) !important;
  border-bottom: 2px solid #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ── Mobile menu ── */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

.mobile-menu-open {
  display: block !important;
}

/* ================================================================
   Carousel — shared component (carousel-wrapper, carousel-track,
   carousel-slide, carousel-btn, carousel-dots, carousel-dot)
   ================================================================ */

.carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.slider-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  background: #f1f5f9;
  padding: 50px 0 70px;
  direction: ltr;
}

.carousel-track {
  display: flex;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-slide {
  flex: 0 0 20%;
  min-width: 180px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
  z-index: 3;
}

.carousel-slide img {
  width: 100%;
  max-height: 84px;
  object-fit: contain;
  filter: grayscale(80%);
  opacity: 0.65;
  transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  transform-origin: center;
}

.carousel-slide:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 5;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(15, 23, 42, 0.95);
}

/* LTR: next=right, previous=left — RTL pages invert via [dir="rtl"] below */
.carousel-btn[aria-label='next']     { right: 10px; }
.carousel-btn[aria-label='previous'] { left: 10px; }

[dir='rtl'] .carousel-btn[aria-label='next']     { right: auto; left: 10px; }
[dir='rtl'] .carousel-btn[aria-label='previous'] { left: auto; right: 10px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.carousel-dot.active {
  width: 16px;
  background: #2563eb;
}

/* ── Carousel responsive breakpoints ── */
@media (max-width: 1023px) {
  .carousel-slide { flex: 0 0 33.33%; }
}

@media (max-width: 767px) {
  .carousel-slide { flex: 0 0 50%; }
  .carousel-btn   { width: 40px; height: 40px; }
}

/* ================================================================
   AOS — Animate On Scroll (local, replaces aos.js)
   Activated via IntersectionObserver in shared.js
   ================================================================ */

[data-aos] {
  transition-property: opacity, transform;
  transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-duration: 800ms;
  opacity: 0;
}

[data-aos='fade-up']    { transform: translateY(40px); }
[data-aos='fade-down']  { transform: translateY(-40px); }
[data-aos='fade-left']  { transform: translateX(40px); }
[data-aos='fade-right'] { transform: translateX(-40px); }
[data-aos='zoom-in']    { transform: scale(0.88); }
[data-aos='zoom-out']   { transform: scale(1.12); }

[data-aos].aos-animate {
  opacity: 1;
  transform: none;
}

/* ================================================================
   WhatsApp Widget — Floating button + balloon
   ================================================================ */

.honeypot-field,
.botcheck-hidden {
  display: none;
}

.wa-widget-container,
.wa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.wa-balloon {
  opacity: 0;
  transform: translateX(16px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 240px;
}

.wa-balloon-box,
.wa-balloon-content,
.wa-balloon-card {
  background: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.13);
  position: relative;
}

.wa-close,
.wa-close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.wa-close:hover,
.wa-close-btn:hover {
  color: #475569;
}

[dir='rtl'] .wa-close,
[dir='rtl'] .wa-close-btn {
  left: 8px;
  right: auto;
}

.wa-balloon-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  font-family: inherit;
}

.wa-balloon-text {
  margin: 0;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
  font-family: inherit;
}

.wa-balloon-arrow,
.wa-balloon-tail {
  position: absolute;
  bottom: -8px;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

.wa-btn-wrapper,
.wa-button-wrapper,
.wa-btn-wrap {
  position: relative;
}

.wa-pulse-1,
.wa-pulse-2,
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: wa-pulse 2s ease-out infinite;
}

.wa-pulse-1,
.wa-pulse-one {
  background: rgba(37, 211, 102, 0.35);
}

.wa-pulse-2,
.wa-pulse-two {
  background: rgba(37, 211, 102, 0.2);
  animation-delay: 0.5s;
}

.wa-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  font-family: inherit;
  animation: wa-badge-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 3s both;
}

.wa-btn {
  position: relative;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.wa-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.65);
}

.wa-btn:focus-visible {
  outline: 3px solid #25d366;
  outline-offset: 4px;
}

/* ── WhatsApp keyframes ── */
@keyframes wa-badge-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.7); opacity: 0;   }
  100% { transform: scale(1.7); opacity: 0;   }
}

/* ================================================================
   WhatsApp CTA button (contact sections)
   ================================================================ */

.wa-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 16px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow:
    0 8px 32px rgba(37, 211, 102, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}

.wa-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 44px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0, 0, 0, 0.22);
  filter: brightness(1.08);
}

.wa-cta-btn:active {
  transform: scale(0.98);
}

.wa-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.wa-cta-icon i {
  font-size: 1.5rem;
}

.wa-cta-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.wa-cta-label {
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.78;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wa-cta-title {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.wa-cta-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
  border-radius: 18px;
}

/* ================================================================
   SVG Icon — shared inline icon base (.si)
   ================================================================ */

.si {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ================================================================
   Geo pages — decorative dot pattern
   ================================================================ */

.geo-dot-pattern,
.dot-pattern {
  background-image: radial-gradient(circle at 25% 25%, white 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ================================================================
   Geo-card — rich internal link card (services page area listing)
   BEM: .geo-card / .geo-card__title / .geo-card__desc
   ================================================================ */

.geo-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.geo-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.geo-card:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

.geo-card__title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #1e293b;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.geo-card:hover .geo-card__title {
  color: #1d4ed8;
}

.geo-card__desc {
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.5;
}

/* ================================================================
   Legal / Terms / Privacy document page styles
   ================================================================ */

.legal-main {
  max-width: 860px;
  margin: 80px auto;
  padding: 0 24px;
  line-height: 1.8;
  color: #1e293b;
}

.legal-h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.legal-h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 32px;
}

.legal-link {
  color: #1d4ed8;
}

.legal-footer-note {
  margin-top: 48px;
  font-size: 0.875rem;
  color: #64748b;
}

/* ================================================================
   Service dropdown label
   ================================================================ */

.svc-label-text {
  color: rgba(255, 255, 255, 0.7);
}

/* ================================================================
   FAQ accordion — shared base
   ================================================================ */

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .faq-icon,
.faq-icon {
  transition: transform 0.3s ease, background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.faq-item[open] summary .faq-icon {
  transform: rotate(45deg);
}

.faq-item[open] .faq-icon {
  background: #1d4ed8;
  color: #fff;
}

.faq-answer {
  overflow: hidden;
  animation: faqOpen 0.3s ease;
}

@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Reduced motion — global overrides
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .wa-pulse-1,
  .wa-pulse-2,
  .wa-pulse,
  .wa-pulse-one,
  .wa-pulse-two {
    animation: none !important;
  }

  .btn-animate {
    animation: none !important;
  }
}
