/* ===============================
   GLOBAL STYLES & VARIABLES
=============================== */
:root {
  /* New Color Palette */
  --primary-dark: #121212;
  --secondary-dark: #1e1e1e;
  --accent-color: #00bfff; /* Deep Sky Blue */
  --accent-color-hover: #00a0cc;
  --text-color: #333;
  --text-light: #f5f5f5;
  --light-bg: #ffffff;
  --gray-bg: #f8f9fa;

  /* Re-using old variables with new values */
  --primary-color: var(--primary-dark);
  --secondary-color: var(--secondary-dark);
  --white-color: var(--light-bg);

  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 25px rgba(0, 0, 0, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--white-color);
  padding-top: 80px; /* For fixed header */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===============================
   HEADER & NAVIGATION
=============================== */
header {
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--text-light);
  transition: color 0.3s;
}

.logo a:hover {
  color: var(--accent-color);
}

.logo_icon {
  width: 50px;
  height: 50px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent-color);
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
}

/* ===============================
   PAGE VISIBILITY
=============================== */
.page {
  display: none;
  min-height: calc(100vh - 80px);
}
.page.active {
  display: block;
}

/* ===============================
   HOME HERO SECTION
=============================== */
.home-hero {
  background-color: var(--primary-dark);
  color: var(--text-light);
  padding: 80px 0;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 80px);
}

.home-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}

.home-hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.home-hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.8;
  max-width: 500px;
}

.home-hero-image {
  display: flex; /* Added for centering */
  justify-content: center; /* Added for centering */
  align-items: center; /* Added for centering */
}

.home-hero-image img {
  width: 100%;
  max-width: 400px; /* Adjust max-width as needed */
  height: auto;
  display: block;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Add some shadow for depth */
}

/* ===============================
   BUTTON STYLES
=============================== */
.btn {
  display: inline-block;
  padding: 12px 35px;
  background-color: var(--accent-color);
  color: var(--primary-dark) !important;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--accent-color-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 191, 255, 0.2);
}

/* ===============================
   GENERAL & SECTION STYLES
=============================== */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}
.section.dark {
  background-color: var(--secondary-dark);
  color: var(--text-light);
}
.section.dark .section-title {
  color: var(--text-light);
}

/* ===============================
   CATEGORY SECTION
=============================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.category-card {
  background: var(--gray-bg);
  padding: 2rem 1rem;
  border-radius: var(--border-radius-md);
  transition: all 0.3s;
  border: 1px solid #eee;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}
.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}
.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.category-card p {
  font-size: 0.9rem;
  color: #666;
}

/* ===============================
   CARS SECTION & CARDS
=============================== */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.car-card {
  background: var(--white-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  cursor: pointer; /* Whole card is clickable */
}

.car-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.car-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.car-card:hover .car-image img {
  transform: scale(1.05);
}

.car-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-block;
  padding: 5px 15px;
  background: var(--accent-color);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.car-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  min-height: 48px; /* reserve space for 2 lines */
}

.car-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.rental-options {
  background: var(--gray-bg);
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-top: auto;
  margin-bottom: 1rem;
}
.rental-option {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid #dee2e6;
  font-size: 0.9rem;
}
.rental-option:last-child {
  border-bottom: none;
}

.contact-icon-btn {
  background-color: var(--accent-color);
  color: var(--primary-dark);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0; /* Prevent shrinking when text is long */
}
.contact-icon-btn:hover {
  background-color: var(--accent-color-hover);
  transform: scale(1.1);
}

/* ===============================
   NEWSLETTER SECTION
=============================== */
.newsletter-section {
  text-align: center;
}
.newsletter-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.newsletter-section p {
  margin-bottom: 2rem;
  opacity: 0.8;
}
.newsletter-form {
  display: flex;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 50px;
  background: #fff;
  padding: 5px;
  box-shadow: var(--shadow);
}
.newsletter-form input {
  flex-grow: 1;
  border: none;
  outline: none;
  padding: 0 20px;
  background: transparent;
  font-size: 1rem;
  direction: rtl;
}
.newsletter-form button {
  padding: 10px 30px;
}

/* ===============================
   CAR DETAILS PAGE & SLIDESHOW
=============================== */
.car-details-section {
  padding-top: 60px;
}
.back-btn {
  margin-bottom: 2rem;
  background: #f1f1f1;
  color: var(--text-color);
  padding: 10px 25px;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}
.main-image-wrapper {
  position: relative;
  width: 100%;
  /* Removed border-radius and box-shadow to let the thumbnails dictate the style */
  margin-bottom: 1rem;
}
.main-image-wrapper img {
  width: 100%;
  display: block;
  border-radius: var(--border-radius-md); /* Apply border-radius here */
  box-shadow: var(--shadow); /* Apply box-shadow here */
}
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.3s;
  z-index: 10;
}
.slide-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
.slide-btn.next {
  left: 10px;
}
.slide-btn.prev {
  right: 10px;
}
.thumbnail-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Ensure 4 columns for thumbnails */
  gap: 1rem;
}
.thumbnail {
  width: 100%;
  height: 80px; /* Fixed height for thumbnails */
  object-fit: cover; /* Ensures images cover the area without distortion */
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s;
  border: 3px solid transparent;
}
.thumbnail:hover,
.thumbnail.active {
  opacity: 1;
  transform: scale(1.05);
  border-color: var(--accent-color);
}
.details-info .details-title {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}
.details-info .details-price {
  font-size: 2.2rem;
  font-weight: bold;
  color: #111;
  margin-bottom: 1.5rem;
}
.details-description {
  line-height: 1.8;
  color: #555;
  margin-bottom: 2rem;
}
.specs-title {
  font-size: 1.5rem;
  color: #111;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
  display: inline-block;
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.specs-table tr {
  border-bottom: 1px solid #eee;
}
.specs-table td {
  padding: 12px 5px;
}
.specs-table td:first-child {
  font-weight: bold;
  color: #333;
}

/* ===============================
   ABOUT PAGE
=============================== */
.about-intro-section {
  text-align: center;
}
.about-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin: 1.5rem auto;
  max-width: 900px;
  line-height: 2;
}

.about-vision-section {
  padding: 6rem 0;
  background: var(--gray-bg);
}
.about-vision-content,
.about-goals-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-vision-text h2,
.about-goals-text h2 {
  font-size: 2.5rem;
  color: #111;
  margin-bottom: 1.5rem;
}
.about-vision-number,
.about-goals-number {
  font-size: 4rem;
  color: var(--accent-color);
  font-weight: bold;
  margin-bottom: 1rem;
}
.about-vision-text p,
.about-goals-text p {
  font-size: 1.15rem;
  color: #555;
  line-height: 2;
  text-align: justify;
  margin-bottom: 1rem;
}
.about-vision-image,
.about-goals-image {
  background: var(--white-color);
  padding: 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.about-vision-image img,
.about-goals-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
  border-radius: var(--border-radius-sm);
}

/* ===============================
   CONTACT PAGE (FIXED STYLES)
=============================== */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.contact-card {
  background: var(--secondary-dark);
  color: var(--text-light);
  padding: 4rem 1rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  transition: all 0.3s;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.contact-card h3 {
  margin-bottom: 1rem;
}
.contact-card h3 i {
  margin-left: 0.5rem; /* Space between icon and text */
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white-color);
  padding: 2.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow);
}
.form-title {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #111;
  font-weight: bold;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.btn-submit-form {
  width: 100%;
  background: var(--primary-dark);
  color: var(--text-light) !important;
}
.btn-submit-form:hover {
  background: #333;
}

/* ===============================
   FOOTER
=============================== */
footer {
  background: var(--secondary-dark);
  color: var(--text-light);
  padding: 60px 0 20px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #444;
}
.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--white-color);
}
.footer-col p,
.footer-col ul,
.footer-col li {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 0.7;
}
.footer-col a {
  color: inherit;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--accent-color);
}
.footer-about .logo {
  margin-bottom: 1rem;
}
.footer-about .logo a {
  font-size: 1.5rem;
  font-weight: bold;
}
.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.footer-socials a {
  font-size: 1.2rem;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  opacity: 0.5;
  font-size: 0.9rem;
}

/* ===============================
   POPUP
=============================== */
.popup {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}
.popup-content {
  background-color: #1e1e2f;
  color: #fff;
  padding: 30px 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 350px;
  width: 80%;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  position: relative;
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}
.close-btn:hover {
  color: #f44336;
}
.phone-number {
  margin-top: 10px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #00bcd4;
}

/* ===============================
   RESPONSIVE DESIGN
=============================== */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 80px;
    right: 0;
    background-color: var(--primary-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    width: 200px;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    display: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  }
  .nav-links.open {
    display: flex;
  }
  .home-hero .container,
  .about-vision-content,
  .about-goals-content,
  .details-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .home-hero-text {
    order: 2;
  }
  .home-hero-image {
    order: 1;
    margin-bottom: 2rem; /* Add margin for spacing */
  }
  .home-hero-image img {
    max-width: 300px; /* Adjust for smaller screens */
  }
  .home-hero-text h1 {
    font-size: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-socials {
    justify-content: center;
  }
  .about-vision-image,
  .about-goals-image {
    order: -1;
    margin-bottom: 2rem;
  }
  .contact-info {
    grid-template-columns: 1fr;
  }
  .thumbnail-container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on small screens */
  }
}
.footer-col .logo_icon {
  translate: 0 17px;
}
