/* Tailwind Configuration */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

/* Custom CSS Styles */
:root {
  --primary: #1e3a8a;
  --secondary: #0f766e;
  --accent: #059669;
  --gold: #d4af37;
  --dark: #0f172a;
  --light: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.rtl {
  direction: rtl;
  font-family: 'Noto Sans Arabic', sans-serif;
}

/* Gradient Sections - Inspired by the image */
.section-gradient-1 {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f766e 100%);
}

.section-gradient-2 {
  background: linear-gradient(180deg, #e0f2fe 0%, #dbeafe 50%, #e0f2fe 100%);
}

.section-gradient-3 {
  background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 50%, #f0fdfa 100%);
}

.section-gradient-4 {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 50%, #eff6ff 100%);
}

.section-gradient-5 {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 50%, #064e3b 100%);
}

.section-gradient-6 {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
}

.section-gradient-7 {
  background: linear-gradient(180deg, #f0fdf4 0%, #d1fae5 50%, #f0fdf4 100%);
}

.gradient-text {
  background: linear-gradient(135deg, #d4af37 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navbar Scroll Effect */
#navbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

#navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Service Card Hover Effect */
.service-card {
  transition: all 0.4s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(30, 58, 138, 0.2);
}

/* Language Button Active State */
.language-btn {
  transition: all 0.3s ease;
}

.language-btn.active {
  background: #d4af37;
  color: #0f172a;
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Navigation Link Hover */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #fbbf24);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Button Hover Effects */
button, a {
  transition: all 0.3s ease;
}

/* Form Input Focus */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Mobile Menu */
#mobileMenu {
  transition: all 0.3s ease;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
  
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e3a8a, #0f766e);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0f766e, #1e3a8a);
}

/* Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

/* Package Card Scale Effect */
.package-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.package-card:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Footer Links */
footer a:hover {
  color: #fbbf24 !important;
}

/* Social Media Icons */
.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px) rotate(5deg);
}

/* Hero Image Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Stat Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.count-up {
  animation: countUp 0.6s ease-out;
}

/* Map Responsive */
iframe {
  width: 100%;
  height: 100%;
}

/* Section Transitions */
section {
  position: relative;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
  .backdrop-blur {
    backdrop-filter: blur(10px);
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Gradient Overlays for Better Text Readability */
.section-gradient-1::before,
.section-gradient-5::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* Enhanced Shadows */
.shadow-custom {
  box-shadow: 0 10px 40px rgba(30, 58, 138, 0.15);
}

/* Card Animations */
@keyframes cardSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-animate {
  animation: cardSlideUp 0.6s ease-out;
}

/* Responsive Padding */
@media (max-width: 640px) {
  section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* === OPTIMISATIONS ONE-PAGE SCROLL === */

/* 1. Compensation navbar fixe (essentiel) */
html {
  scroll-padding-top: 120px; /* Hauteur navbar + marge */
}

/* 2. Sections one-page optimisées */
section[id] {
  scroll-margin-top: 120px; /* Pour ancres #home, #about, etc. */
  min-height: 100vh;
}

/* 3. Navbar scrolled - AMÉLIORATION */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  color: #1e3a8a !important;
}

#navbar.scrolled .nav-link {
  color: #1e3a8a !important;
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
  color: #d4af37 !important;
  background: rgba(212, 175, 55, 0.2) !important;
}

/* 4. Nav link active renforcé */
.nav-link.active {
  background: linear-gradient(135deg, #d4af37, #fbbf24) !important;
  color: #0f172a !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  transform: scale(1.05);
}

/* 5. Mobile menu one-page */
#mobileMenu .nav-link {
  font-size: 1.1rem;
  font-weight: 600;
}

#mobileMenu .nav-link.active {
  background: linear-gradient(135deg, #d4af37, #fbbf24);
  color: #0f172a;
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

/* 6. Smooth height transitions */
.hero-section {
  padding-top: 140px; /* Compense navbar */
  padding-bottom: 120px;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }
  
  section[id] {
    scroll-margin-top: 100px;
  }
  
  .hero-section {
    padding-top: 120px;
  }
}
