/* ============================================
   ROOT VARIABLES & RESET
   ============================================ */
:root {
  --primary: #f5a623;
  --primary-dark: #e09415;
  --dark-bg: #0b2b38;
  --white: #ffffff;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --text-dark: #1e2a32;
  --text-muted: #64748b;
  --navbar-height: 75px;
  --topbar-height: 42px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--gray-100);
  direction: rtl;
  color: var(--text-dark);
  padding-top: calc(var(--topbar-height) + var(--navbar-height));
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
ul { list-style: none; }

/* ============================================
   SCROLL ANIMATION CLASSES
   ============================================ */
.hero-content,
.section-title,
.service-detail-card,
.badge-item,
.testimonial-card,
.stat-item,
.tips-box,
.accordion-item,
.footer-info,
.footer-links,
.footer-services,
.footer-contact {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Niche hai — hidden */
.scroll-hidden-bottom {
  opacity: 0;
  transform: translateY(50px);
}

/* Upar nikal gaya — gayab ho jao */
.scroll-hidden-top {
  opacity: 0;
  transform: translateY(-50px);
}

/* Screen mein hai — show karo */
.scroll-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ============================================
   LOADER
   ============================================ */
#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px; height: 50px;
  border: 5px solid var(--gray-200);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
  background: var(--dark-bg);
  color: var(--white);
  height: var(--topbar-height);
  position: fixed;
  top: 0; width: 100%; z-index: 1000;
  display: flex; align-items: center;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-number {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.phone-number i { color: var(--primary); }

.social-icons { display: flex; gap: 10px; }

.social-icons a {
  color: var(--white);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: var(--white);
  height: var(--navbar-height);
  position: fixed;
  top: var(--topbar-height);
  width: 100%; z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: flex; align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.container {
  width: 90%; max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}

.logo {
  font-size: 1.5rem; font-weight: 900;
  color: var(--dark-bg);
}

.logo span { color: var(--primary); }

/* Desktop Menu */
.nav-menu { display: flex; list-style: none; gap: 5px; }

.nav-menu li a {
  color: var(--text-dark);
  font-weight: 600; font-size: 0.85rem;
  padding: 8px 10px; border-radius: 6px;
  transition: var(--transition);
  display: block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: var(--primary);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 5px;
}

.hamburger span {
  width: 25px; height: 3px;
  background: var(--dark-bg);
  border-radius: 2px;
  transition: var(--transition);
  display: block;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a4a5e 100%);
  min-height: 90vh;
  display: flex; align-items: center;
  padding: 60px 0;
}

.hero .container {
  gap: 40px;
}

.hero-content { flex: 1; }

.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 15px;
}

.hero-content h1 .highlight {
  color: var(--primary);
}

.typing-container {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  min-height: 40px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.cursor {
  display: inline-block;
  background: var(--primary);
  width: 2px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.mb-3 { margin-bottom: 1rem; }

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.hero-image {
  flex: 1;
  max-width: 500px;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,166,35,0.4);
}

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--dark-bg);
  transform: translateY(-2px);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
  background: var(--primary);
  padding: 50px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-item {}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-top: 8px;
  font-weight: 600;
}

/* ============================================
   SERVICES SECTIONS
   ============================================ */
.services-section {
  padding: 60px 0;
}

.services-section.bg-light {
  background: var(--gray-100);
}

.service-detail-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.service-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-200);
}

.service-icon-large {
  font-size: 3rem;
  color: var(--primary);
  flex-shrink: 0;
}

.service-header h2 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--dark-bg);
}

.service-description p {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.service-description p strong {
  color: var(--text-dark);
}

.service-detail-card .btn {
  margin-top: 15px;
}

/* ============================================
   WHY US
   ============================================ */
.why-us {
  padding: 70px 0;
  background: var(--dark-bg);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 10px;
}

.section-title p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.badge-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition);
}

.badge-item:hover {
  background: rgba(245,166,35,0.15);
  border-color: var(--primary);
  transform: translateY(-5px);
}

.badge-item i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 15px;
}

.badge-item h3 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.badge-item p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials {
  padding: 70px 0;
  background: var(--white);
}

.testimonials .section-title h2 {
  color: var(--dark-bg);
}

.testimonials .section-title p {
  color: var(--text-muted);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.testimonial-card {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 25px;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.testimonial-rating {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.testimonial-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 15px;
  font-style: italic;
}

.testimonial-author {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.testimonial-location {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-section {
  padding: 70px 0;
  background: var(--gray-100);
}

.faq-section .section-title h2 {
  color: var(--dark-bg);
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-dark);
  transition: var(--transition);
}

.accordion-header:hover {
  background: var(--gray-100);
}

.accordion-header i {
  color: var(--primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-item.open .accordion-header i {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.open .accordion-content {
  max-height: 200px;
}

.accordion-content-inner {
  padding: 15px 25px 20px;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--gray-200);
}

/* ============================================
   TIPS BOX
   ============================================ */
.tips-box {
  background: linear-gradient(135deg, #fff8ed, #fff3d6);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 30px;
  margin: 20px 0;
}

.tips-box h3 {
  color: var(--dark-bg);
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tips-box h3 i {
  color: var(--primary);
}

.tips-box li {
  color: var(--text-muted);
  padding: 6px 0;
  font-size: 0.92rem;
  line-height: 1.7;
  border-bottom: 1px solid rgba(245,166,35,0.15);
}

.tips-box li:last-child {
  border-bottom: none;
}

.py-4 { padding: 30px 0; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary);
}

.footer-info p {
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.footer-links ul,
.footer ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer ul a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover,
.footer ul a:hover {
  color: var(--primary);
  padding-right: 5px;
}

.footer-contact p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}

.footer-contact i {
  color: var(--primary);
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
}

.mt-2 { margin-top: 10px; }

/* ============================================
   FLOATING BUTTONS
   ============================================ */
.floating-buttons {
  position: fixed;
  bottom: 90px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 998;
}

.floating-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.floating-btn:hover {
  transform: scale(1.1);
}

.floating-btn.whatsapp { background: #25D366; }
.floating-btn.call { background: var(--primary); }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 25px;
  left: 20px;
  width: 44px; height: 44px;
  background: var(--dark-bg);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 997;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
}

/* ============================================
   FONT CONTROLS
   ============================================ */
.font-controls {
  position: fixed;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 998;
}

.font-controls button {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.font-controls button:hover {
  background: var(--primary);
  color: var(--white);
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.dark-mode-toggle {
  position: fixed;
  bottom: 25px;
  right: 20px;
  z-index: 998;
}

.dark-mode-toggle button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--dark-bg);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
}

.dark-mode-toggle button:hover {
  background: var(--primary);
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode {
  background: #0f1923;
  color: #e2e8f0;
}

body.dark-mode .navbar {
  background: #1a2a35;
}

body.dark-mode .nav-menu li a {
  color: #e2e8f0;
}

body.dark-mode .service-detail-card,
body.dark-mode .testimonial-card,
body.dark-mode .accordion-item,
body.dark-mode .tips-box {
  background: #1a2a35;
  border-color: #2a3f50;
  color: #e2e8f0;
}

body.dark-mode .service-description p,
body.dark-mode .testimonial-text,
body.dark-mode .accordion-content-inner {
  color: #94a3b8;
}

body.dark-mode .faq-section,
body.dark-mode .services-section.bg-light {
  background: #111e27;
}

body.dark-mode .section-title h2 {
  color: var(--white);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 992px) {
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: calc(var(--topbar-height) + var(--navbar-height));
    right: -100%;
    background: var(--white);
    width: 280px; height: 100vh;
    flex-direction: column;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    transition: 0.4s ease-in-out;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-menu.active { right: 0; }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
  }

  .nav-menu li a { padding: 15px 10px; }

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

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons { justify-content: center; }
  .hero-image { max-width: 100%; }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 576px) {
  .hero-content h1 { font-size: 1.6rem; }
  .badges-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-number { font-size: 2rem; }
  .service-detail-card { padding: 25px 20px; }
  .social-icons { gap: 6px; }

  .floating-buttons { bottom: 80px; left: 15px; }
  .back-to-top { bottom: 20px; left: 15px; }
  .font-controls { right: 15px; bottom: 75px; }
  .dark-mode-toggle { right: 15px; bottom: 20px; }
}