/* ======= CSS Variables ======= */
:root {
  --primary: #10B981;
  /* Green Button */
  --primary-hover: #059669;
  --secondary: #3B82F6;
  --secondary-hover: #2563EB;

  --bg-gradient-start: #1E3A8A;
  /* Blue */
  --bg-gradient-end: #4C1D95;
  /* Purple */

  --bg-color: #F8FAFC;
  --card-bg: #FFFFFF;
  --text-main: #1E293B;
  --text-muted: #64748B;

  --border-radius: 16px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition: all 0.3s ease;

  --font-family: 'Cairo', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

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

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

.mt-3 {
  margin-top: 20px;
}

.mt-4 {
  margin-top: 30px;
}

.mt-5 {
  margin-top: 40px;
}

.mt-negative {
  margin-top: -60px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-main);
}

.page-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ======= Typography ======= */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  line-height: 1.3;
}

/* ======= Buttons ======= */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background-color: #fff;
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.2rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ======= Navbar ======= */
.navbar {
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  
  z-index: 1000;

}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  position: relative; /* For absolute centering */
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.navbar-menu {
  display: flex;
  gap: 30px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.navbar-social {
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 10;
}

.navbar-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.navbar-logo:hover .navbar-logo-img {
  transform: scale(1.2) rotate(5deg);
}

.navbar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.navbar-logo-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1E3A8A;
}

.navbar-logo-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.navbar-menu {
  display: flex;
  gap: 30px;
}

.navbar-menu a {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-main);
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.navbar-menu a:hover {
  color: var(--primary);
  transform: scale(1.15);
}

.navbar-menu a.active {
  color: var(--primary);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.navbar-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  transition: var(--transition);
}

.navbar-social {
  display: flex;
  gap: 12px;
  align-items: center;
}

.navbar-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  background-color: #f1f5f9;
  transition: var(--transition);
}

.navbar-social a:hover {
  background-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ======= Hero ======= */
.hero {
  position: relative;
  height: auto;
  min-height: 487px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #ffffff;
  /* Fallback */
}

@media (max-width: 768px) {
  .hero {
    min-height: 300px;
    background-size: contain; 
  }
}


.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-main);
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.4rem;
  opacity: 0.9;
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* ======= Grid Layout ======= */
.grid {
  display: grid;
  gap: 30px;
}

.cars-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ======= Car Card ======= */
.car-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.car-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.car-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.car-card:hover .car-card-image img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge-new {
  background-color: var(--primary);
}

.badge-used {
  background-color: var(--secondary);
}

.car-card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.car-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.car-specs-list {
  margin-bottom: 20px;
  flex: 1;
}

.car-specs-list li {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.car-specs-list li:last-child {
  border-bottom: none;
}

.car-specs-list strong {
  color: var(--text-main);
}

/* ======= Single Car Page ======= */
.single-car-grid {
  grid-template-columns: 3fr 2fr;
  align-items: start;
}

.main-image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.thumbnails {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
}

.thumbnails .thumb {
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  height: 80px;
  object-fit: cover;
  width: 100%;
}

.thumbnails .thumb:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.car-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.car-header .car-title {
  margin-bottom: 0;
}

.car-header .badge {
  position: static;
}

/* ======= Contact Page ======= */
.gradient-bg {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  padding-bottom: 120px;
}

.contact-cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  position: relative;
  z-index: 10;
}

.contact-card {
  transition: var(--transition);
}

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

.contact-card .icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.contact-card h3 {
  color: var(--text-main);
  margin-bottom: 15px;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.text-link {
  color: var(--secondary);
  font-weight: 600;
}

.text-link:hover {
  color: var(--secondary-hover);
  text-decoration: underline;
}

/* ======= Services Page ======= */
.services-header {
  padding-top: 60px;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  position: relative;
  z-index: 10;
}

.service-card {
  transition: var(--transition);
  padding: 40px 30px;
}

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

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  color: var(--text-main);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.text-white {
  color: #fff;
}

.text-white .page-title,
.text-white .subtitle {
  color: #fff;
}

/* ======= Cars Landing Page ======= */
.cars-header {
  padding-top: 60px;
}

/* ======= Footer ======= */
.site-footer {
  background-color: var(--text-main);
  color: #fff;
  padding: 40px 0;
  text-align: center;
  margin-top: 60px;
}

/* ======= Responsive ======= */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .single-car-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    transform: none; /* Override desktop centering */
    background: var(--card-bg);
    z-index: 999;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section {
    padding: 50px 0;
  }

  .mobile-hidden {
    display: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

.car-card.hidden {
  display: none;
}

.car-wrapper.hidden {
  display: none;
}
/* Custom Contact Section Styling */
#contact {
  background-color: #1E3A8A; /* Dark Blue */
  color: #ffffff;
}

#contact .section-title {
  color: #ffffff;
}

#contact > .container > p {
  color: #e2e8f0 !important;
}

/* Custom Cars Section Styling */
#cars {
  background-color: #1E3A8A; /* Dark Blue */
  color: #ffffff;
}

#cars .section-title {
  color: #ffffff;
}

#cars .car-card {
  background-color: #ffffff; /* Ensure cards remain white */
  color: var(--text-main);   /* Ensure text inside cards remains dark */
}

#cars .car-card .car-title, 
#cars .car-card strong {
  color: var(--text-main);
}

#cars .btn-secondary {
  /* Make the 'View All' button stand out on blue bg if needed */
  background-color: #ffffff;
  color: #1E3A8A;
  border: 1px solid #ffffff;
}

#cars .btn-secondary:hover {
  background-color: #f1f5f9;
  color: #1E3A8A;
}

/* Modern Ultra-Wide Futuristic Hero Gradient */
.hero {
  /* Fallback color */
  background-color: #1e1b4b; 
  /* Complex gradient: Deep blue to purple/cyan for "flowing shapes" feel */
  background-image: 
    radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
    radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
    radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
  /* Ensure the background covers the whole area */
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}

/* Semi-transparent overlay for text readability */
.hero-overlay {
  /* Vignette effect: Dark corners fading to transparent center */
  background: radial-gradient(circle, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none; /* Allows clicking through the overlay */
}

/* Update hero text color for dark background */
.hero-title, .hero-subtitle {
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Keep button visibility */
.hero-buttons .btn-secondary {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.hero-buttons .btn-secondary:hover {
  background: rgba(255,255,255,0.2);
}

/* Cinematic Hero Adjustment for Sports Car Image */
.hero {
  /* Position car image on the right */
  background-position: center right; 
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  /* Darken solely the left side for text readability if needed */
  background: radial-gradient(circle, transparent 50%, rgba(0, 0, 0, 0.8) 100%), linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%);
  backdrop-filter: none; /* Removed blur to show the car clearly */
}

.hero-content {
  /* Align text to the Left (where the empty space is) */
  text-align: right; /* In RTL, 'right' aligns to the start (right side). Wait. */
  /* If the car is on the RIGHT side of the image... */
  /* And the text should be in the EMPTY SPACE on the LEFT... */
  /* In LTR, text-align: left. In RTL, text-align: right might push it to the right side where the car is. */
  
  /* Let's fix positioning first */
  margin-right: auto; /* Push box to the left */
  margin-left: 0;     /* Reset any auto margin */
  
  /* Text alignment inside the box */
  text-align: right; /* Standard Arabic alignment */
  
  /* Box styling */
  max-width: 600px;
  background: transparent; /* Remove frosted glass to keep it clean, or keep it subtle */
  box-shadow: none;
  border: none;
  padding: 0; /* Remove padding if background is removed */
}

/* Make text pop */
.hero-title {
  color: #ffffff !important;
  font-size: 3.5rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: #f1f5f9 !important;
  font-size: 1.25rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  margin-bottom: 2rem;
}

/* Adjust buttons */
.hero-buttons .btn-primary {
  background-color: var(--primary);
  border: none;
  color: #fff;
}
.hero-buttons .btn-secondary {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.hero-buttons .btn-secondary:hover {
  background-color: #fff;
  color: #000;
}

/* Bigger Cars Display on Home Page */
#cars .cars-grid {
  /* Increase minimum width from 260px to 340px to make cards significantly physically larger */
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px; /* Increase gap between cards */
}

/* Adjust container to give more breathing room on sides styling */
#cars .container {
  padding-left: 1cm;
  padding-right: 1cm;
  max-width: 100%; /* Fill the width minus padding */
}

/* Taller images for bigger cards */
#cars .car-card-image {
  height: 280px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #cars .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  #cars .cars-grid {
     grid-template-columns: 1fr; /* Full width on mobile */
  }
}
