/* ========================================
   RIVIERA ELITE CHAUFFEUR - DESIGN SYSTEM
   Ultra-Premium VTC Côte d'Azur
   ======================================== */

/* ========== CSS VARIABLES ========== */
:root {
  /* Color Palette - French Riviera */
  --color-white: #FFFFFF;
  --color-azure: #2B92E4;
  --color-navy: #0D1A35;
  --color-gold: #D8C49C;
  --color-sand: #D2D2D2;
  --color-dark: #1a1a1a;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(13, 26, 53, 0.85) 0%, rgba(43, 146, 228, 0.65) 100%);
  --gradient-overlay: linear-gradient(to bottom, rgba(13, 26, 53, 0.3), rgba(13, 26, 53, 0.7));
  --gradient-gold: linear-gradient(135deg, #D8C49C 0%, #B8A47C 100%);

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(13, 26, 53, 0.1);
  --shadow-md: 0 4px 16px rgba(13, 26, 53, 0.15);
  --shadow-lg: 0 8px 32px rgba(13, 26, 53, 0.2);
  --shadow-xl: 0 16px 48px rgba(13, 26, 53, 0.25);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 80px;
  /* Prevent header overlap */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: var(--spacing-sm);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  margin-bottom: var(--spacing-sm);
}

p {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
  color: #4a4a4a;
}

.text-gold {
  color: var(--color-gold);
}

.text-azure {
  color: var(--color-azure);
}

.text-center {
  text-align: center;
}

/* ========== LAYOUT ========== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-narrow {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
}

.section-dark {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.9);
}

/* ========== HEADER & NAVIGATION ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.logo img {
  height: 50px;
  width: auto;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 8px rgba(43, 146, 228, 0.3));
}

.logo-icon {
  font-size: 2rem;
  color: var(--color-azure);
}

.nav-menu {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--color-navy);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-azure);
  background-color: rgba(43, 146, 228, 0.1);
}

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

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-navy);
  cursor: pointer;
  padding: 0.5rem;
}

/* ========== LANGUAGE SELECTOR ========== */
.lang-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: var(--spacing-sm);
}

.lang-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0.6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.lang-btn.active {
  opacity: 1;
  border-color: var(--color-azure);
  box-shadow: 0 0 0 3px rgba(43, 146, 228, 0.2);
}

.lang-btn[data-lang="fr"] {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 600"><rect width="900" height="600" fill="%23ED2939"/><rect width="600" height="600" fill="%23fff"/><rect width="300" height="600" fill="%23002395"/></svg>');
}

.lang-btn[data-lang="en"] {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><clipPath id="s"><path d="M0,0 v30 h60 v-30 z"/></clipPath><clipPath id="t"><path d="M30,15 h30 v15 z v-15 h-30 z h-30 v15 z v-15 h30 z"/></clipPath><g clip-path="url(%23s)"><path d="M0,0 v30 h60 v-30 z" fill="%23012169"/><path d="M0,0 L60,30 M60,0 L0,30" stroke="%23fff" stroke-width="6"/><path d="M0,0 L60,30 M60,0 L0,30" clip-path="url(%23t)" stroke="%23C8102E" stroke-width="4"/><path d="M30,0 v30 M0,15 h60" stroke="%23fff" stroke-width="10"/><path d="M30,0 v30 M0,15 h60" stroke="%23C8102E" stroke-width="6"/></g></svg>');
}


/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--gradient-gold);
  color: var(--color-navy);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
}

.btn-azure {
  background-color: var(--color-azure);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-azure:hover {
  background-color: #1f7ac9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -80px;
  padding: 180px 0 60px;
  /* Compensate for body padding and ensure content spacing */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: -1;
}

.hero-content {
  text-align: center;
  color: var(--color-white);
  max-width: 900px;
  padding: var(--spacing-md);
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  color: var(--color-white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--spacing-md);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--spacing-lg);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 300;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== CARDS ========== */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

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

.card-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.card-content {
  padding: var(--spacing-md);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-navy);
}

.card-text {
  color: #666;
  margin-bottom: var(--spacing-sm);
}

/* ========== GRID LAYOUTS ========== */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========== FEATURES ========== */
.feature-icon {
  font-size: 3rem;
  color: var(--color-azure);
  margin-bottom: var(--spacing-sm);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--color-navy);
}

.feature-text {
  color: #666;
  font-size: 1rem;
}

/* ========== TESTIMONIALS ========== */
.testimonial {
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--color-gold);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--spacing-sm);
  color: #4a4a4a;
  font-size: 1.125rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--color-navy);
}

.testimonial-role {
  color: var(--color-azure);
  font-size: 0.9rem;
}

/* ========== WHATSAPP BUTTON ========== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition-smooth);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

/* ========== FOOTER ========== */
.footer {
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.footer-section h4 {
  color: var(--color-gold);
  margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: var(--color-azure);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.2s;
}

.fade-in-delay-2 {
  animation-delay: 0.4s;
}

.fade-in-delay-3 {
  animation-delay: 0.6s;
}

/* ========== GLASSMORPHISM ========== */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-lg);
  }

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

  .mobile-menu-toggle {
    display: block;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  section {
    padding: var(--spacing-md) 0;
  }
}

/* ========== UTILITY CLASSES ========== */
.mt-1 {
  margin-top: var(--spacing-xs);
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-3 {
  margin-top: var(--spacing-md);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-3 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.pt-1 {
  padding-top: var(--spacing-xs);
}

.pt-2 {
  padding-top: var(--spacing-sm);
}

.pt-3 {
  padding-top: var(--spacing-md);
}

.pt-4 {
  padding-top: var(--spacing-lg);
}

.pb-1 {
  padding-bottom: var(--spacing-xs);
}

.pb-2 {
  padding-bottom: var(--spacing-sm);
}

.pb-3 {
  padding-bottom: var(--spacing-md);
}

.pb-4 {
  padding-bottom: var(--spacing-lg);
}

/* ========== ARABIC LANGUAGE SUPPORT ========== */
.lang-btn[data-lang="ar"] {
  background: linear-gradient(to bottom, #007A3D 0%, #007A3D 33.33%, #FFFFFF 33.33%, #FFFFFF 66.66%, #000000 66.66%, #000000 100%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow:
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 3px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
}

/* ========== RTL SUPPORT FOR ARABIC ========== */
html[lang="ar"] {
  direction: rtl;
}

html[lang="ar"] body {
  text-align: right;
}

/* Grid and layout RTL */
html[lang="ar"] .grid {
  direction: rtl;
}

html[lang="ar"] .footer-content {
  direction: rtl;
}

/* Icons and features RTL */
html[lang="ar"] .feature-icon {
  margin-left: 0.5rem;
  margin-right: 0;
}

html[lang="ar"] .testimonial {
  border-left: none;
  border-right: 4px solid var(--color-gold);
}

/* Cards RTL */
html[lang="ar"] .card-content {
  text-align: right;
}

/* Buttons with icons RTL */
html[lang="ar"] .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* WhatsApp button RTL */
html[lang="ar"] .whatsapp-float {
  right: auto;
  left: 30px;
}

/* Navigation RTL - Desktop only to avoid mobile menu issues */
@media (min-width: 769px) {
  html[lang="ar"] .nav {
    flex-direction: row-reverse;
  }

  html[lang="ar"] .nav-menu {
    flex-direction: row-reverse;
  }

  html[lang="ar"] .logo {
    flex-direction: row-reverse;
  }

  html[lang="ar"] .lang-selector {
    margin-left: 0;
    margin-right: var(--spacing-sm);
    flex-direction: row-reverse;
  }
}

/* Mobile RTL adjustments */
@media (max-width: 768px) {
  html[lang="ar"] .whatsapp-float {
    left: 20px;
    right: auto;
  }

  /* Ensure mobile menu works correctly in RTL */
  html[lang="ar"] .nav-menu {
    left: auto !important;
    right: -100% !important;
  }

  html[lang="ar"] .nav-menu.active {
    left: auto !important;
    right: 0 !important;
  }

  /* Keep mobile menu vertical in RTL */
  html[lang="ar"] .nav-menu {
    flex-direction: column !important;
    align-items: flex-end;
  }

  html[lang="ar"] .nav-link {
    text-align: right;
    width: 100%;
  }

  html[lang="ar"] .lang-selector {
    margin-right: 0;
    margin-left: 0;
  }
}