/* ================= VARIABLES & RESET ================= */
:root {
  --primary-color: #1b8a1b;
  --primary-hover: #146b14;
  --secondary-bg: #f4f7f6;
  --text-dark: #2d3748;
  --text-muted: #718096;
  --white: #ffffff;
  --max-width: 1200px;
  --border-radius: 12px;
  --box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
html {
  scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
*::-webkit-scrollbar {display: none;}
body { font-family: 'Inter', sans-serif; color: var(--text-dark); line-height: 1.6; background-color: #fafafa; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1500px; margin: 0 auto; padding: 0 40px;}

/* ================= BUTTONS ================= */
.btn { display: inline-block; padding: 14px 28px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.3s; text-align: center; border: none; }
.btn-primary { background-color: var(--primary-color); color: var(--white); border: 2px solid var(--primary-color); }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(27,138,27,0.2); }
.btn-outline { background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: var(--white); transform: translateY(-3px); }

/* ================= NAVIGATION ================= */
.navbar { background-color: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; padding-top: 10px; padding-bottom: 10px;}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.nav-links a { margin: 0 15px; font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color);}
.logo { display: flex; justify-content: center; }
.awiLogo { width: 200px; height: 100%; }

/* ================= HERO SLIDER (React Controlled) ================= */
.hero-slider { position: relative; width: 100%; height: 700px; overflow: hidden; background: #fff; }
.hero-slider:hover {cursor: pointer;}

.slides-container { 
  display: flex; 
  width: 300%; /* Calculated as: (Number of slides * 100%) */
  height: 100%; 
  /* The transform is now injected via inline style in React */
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1); 
}

.slide { width: 33.333%; height: 100%; display: flex; align-items: center; background: linear-gradient(135deg, #fff 0%, var(--secondary-bg) 100%); }
.hero-container { display: flex; align-items: center; gap: 50px; }

.hero-content { flex: 1; }
.hero-image { flex: 1.5; display: flex;
  align-items: center;
  justify-content: center;
  height: 400px; /* This keeps your requested height */
  background: #fff; /* Matches the image background */
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px; /* This creates the "breathing room" so nothing is cut off */
  overflow: hidden;}

.hero-image img { width: 100%;
  height: 100%;
  object-fit: contain; /* This ensures the WHOLE image is visible */
  box-shadow: none; /* Remove shadow from the image itself since the container has it */
  border-radius: 0; }
.badge { display: inline-block; padding: 6px 16px; background: rgba(27, 138, 27, 0.1); color: var(--primary-color); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; border-radius: 50px; margin-bottom: 20px; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; }
.hero-content p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 35px; max-width: 500px; }
.hero-buttons { display: flex; gap: 15px; }

/* Clickable Dots Styling */
.slider-nav { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; z-index: 100; }

.dot { 
  width: 14px; 
  height: 14px; 
  background: #cbd5e0; 
  border-radius: 50%; 
  cursor: pointer; 
  transition: all 0.4s ease; 
}

/* React adds the 'active' class to the current dot */
.dot.active { 
  background: var(--primary-color); 
  width: 40px; 
  border-radius: 20px; 
}

/* ================= FEATURES ================= */
.features { padding: 100px 0; background: #fff; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 15px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { padding: 40px; background: var(--secondary-bg); border-radius: var(--border-radius); transition: 0.3s; }
.feature-card:hover { transform: translateY(-10px); background: var(--primary-color); box-shadow: var(--box-shadow); cursor: pointer; }
.feature-card:hover h3 {color: var(--white);}
.feature-card:hover p {color: var(--white);}
.icon-placeholder { font-size: 2rem; margin-bottom: 20px; display: block; }
.feature-card h3 { margin-bottom: 15px; font-size: 1.25rem; }

/* ================= INFO BANNER ================= */
.info-banner { padding: 100px 0; background-color: var(--text-dark); color: var(--white); }
.banner-container { display: flex; align-items: center; gap: 60px; }
.banner-image, .banner-text { flex: 1; }
.banner-image img {max-width: 100%; border-radius: var(--border-radius); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.banner-text h2 { font-size: 3.5rem; margin-bottom: 25px; line-height: 60px;}
.banner-text p { color: #cbd5e0; font-size: 1.2rem; margin-bottom: 30px; }

/* ================= MAINTENANCE SECTION ================= */

.maintenance-detail {
  padding: 120px 0; /* Ensures consistent spacing from sections above/below */
  background-color: var(--white);
  overflow: hidden; /* Prevents overlap/hover shifts from creating scrollbars */
}

.maintenance-detail .banner-container {
  display: flex;
  align-items: center; /* Vertically centers the text block and the image stack */
  gap: 60px;
}

.fleetText { 
  color: var(--text-dark) !important; 
  font-size: 1.2rem; 
  margin-bottom: 30px; 
}

.check-list {
  list-style: none;
  margin-top: 20px;
}

.check-list li {
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
}

.check-list li::before {
  content: "✓";
  color: var(--primary-color);
  font-weight: 900;
}

/* Container for the stack - provides the canvas for the images */
.image-stack {
  position: relative;
  flex: 1.5; /* Gives images more horizontal room than the text */
  height: 550px; 
  display: flex;
  align-items: center; 
  justify-content: center;
}

/* Base style for both stacked images - identical sizing applied here */
.stack-img {
  position: absolute;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 85%;    /* Both images now share the same width */
  height: 380px;   /* Both images now share the same height */
  object-fit: cover;
  background: #fff;
}

/* The Bottom/Back Image */
.stack-img.main {
  z-index: 1;
  top: 10%; /* Shifted slightly up */
  left: 0;
}

/* The Top/Front Image - Identical size to 'main', shifted down and right */
.stack-img.sub {
  z-index: 2;
  top: 30%; /* Shifted down to create the symmetric overlap */
  right: 0; 
  border: 8px solid var(--white); /* Thick border creates a clean separation */
}

/* Hover Effect: Images move apart to show depth */
.image-stack:hover .stack-img.main {
  transform: translate(-25px, -25px);
}

.image-stack:hover .stack-img.sub {
  transform: translate(25px, 25px);
}
/* ================= MAIN FUNCTIONS SECTION ================= */

.functionality-container {
  margin-top: 3rem;
}

.functionality-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;  
}

.functionality-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.functionality-text h2 {
  margin: 4rem auto 1.5rem auto;
  font-size: 2.5rem;
  width: 100%;
  text-align: center;
}

.functionality-text p {
  width: 90%;
  text-align: center;
  margin: 0 auto 2.5rem auto;
}

.functionality-image img {
  height: 350px; 
  width: auto;
  margin-bottom: 5rem;
  transition: transform 0.4s ease-out;
}
.functionality-image img:hover{
  transform: translateY(-10px);
  cursor: pointer;
}

/* ================= CONTACT SECTION ================= */
.contact-section {
  padding: 100px 0;
  background-color: var(--secondary-bg);
}

.contact-card {
  background: var(--white);
  padding: 60px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.contact-info h2 { font-size: 2.5rem; margin-bottom: 20px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  gap: 15px;
}

.contact-form input, .contact-form select {
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.contact-form button {
  padding: 18px;
  font-size: 1.1rem;
}

/* ================= CALL SECTION ================= */
.call-action-section {
  padding: 60px 0;
  background-color: var(--white); /* White background to contrast with the gray contact section */
  border-top: 1px solid #e2e8f0;
}

.call-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 40px 60px;
}

.call-content h2 {
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.call-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.call-button-container .btn-primary {
  font-size: 1.2rem;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================= FOOTER ================= */
.footer { background: #1a202c; color: #fff; padding: 80px 0 30px; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; }
.footer-links { display: flex; flex-direction: column; }
.footer-links h4 { margin-bottom: 20px; color: var(--primary-color); }
.footer-links a { color: #a0aec0; margin-bottom: 10px; transition: 0.3s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { text-align: center; margin-top: 60px; padding-top: 20px; border-top: 1px solid #2d3748; color: var(--text-muted); }

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
  .hero-container, .banner-container { flex-direction: column; text-align: center; }
  .hero-image, .banner-image { display: none; }
  .hero-slider { height: 550px; }
  .hero-buttons { justify-content: center; }

    .image-stack {
    height: auto;
    display: block;
  }
  .stack-img {
    position: relative;
    max-width: 100%;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-bottom: -100px; /* Overlap them vertically instead */
  }
  .stack-img.sub {
      margin-bottom: 0;
      margin-left: 20px;
  }

  .contact-card { grid-template-columns: 1fr; padding: 40px 20px; }
  .form-group { flex-direction: column; }

   .maintenance-detail .banner-container {
    flex-direction: column;
    text-align: center;
  }
  .image-stack {
    height: auto;
    width: 100%;
    margin-top: 50px;
  }
  .stack-img {
    position: relative;
    width: 100% !important;
    height: auto;
    top: 0 !important;
    right: 0 !important;
    margin-bottom: 20px;
  }
}
.banner-image-dispo {
  height: 400px !important;
  width: 550px !important;
}

.second-row-boxes {
  margin-top: 2rem;
}

/* ================= RESPONSIVE FOR PHONES (MAX 768PX) ================= */
@media (max-width: 768px) {
  
  /* 1. Global Spacing */
  .container, .container-wide {
    padding: 0 20px;
  }

  /* 2. Navigation - Stacked for clarity */
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
    gap: 15px;
  }

  .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-links a {
    margin: 0 5px;
    font-size: 0.85rem;
  }

  /* 3. Hero Slider - Scaled down */
  .hero-slider {
    height: auto;
    min-height: 550px;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
    gap: 30px;
  }
  .hero-content h1 {
    font-size: 2rem; /* Reduced from 3.5rem */
    line-height: 1.2;
  }

  .hero-content p {
    font-size: 1rem;
    margin: 0 auto 20px auto;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 50%; /* Full width buttons for thumbs */
    margin: 0 auto 0 auto;
  }

  /* 4. Hero Image Card - Maintaining the look without the size */
  .hero-image {
    width: 100%;
    height: 280px;
    flex: none;
  }

  /* 5. Maintenance Section - Fixing the Image Stack */
  .maintenance-detail .banner-container {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }

  .image-stack {
    height: 320px; /* Space for absolute children */
    width: 100%;
    margin-top: 20px;
  }

  .stack-img {
    width: 75% !important;
    height: 220px !important;
  }

  .stack-img.main {
    display: none !important;
  }

  .stack-img.sub {
    display: none !important;
  }

  /* 6. Functionality Section */
  .functionality-text h2 {
    font-size: 2.25rem;
    margin-top: 2rem;
  }
  .functionality-text p {
    font-size: 1.2rem;
  }

  .functionality-image img {
    display: none !important;
  }

  /* 7. Info Banner */
  .banner-container {
    flex-direction: column;
    text-align: center;
  }

  .banner-text h2 {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* 8. Contact Section - Single Column */
  .contact-card {
    grid-template-columns: 1fr;
    padding: 30px 15px;
    gap: 30px;
  }

  .form-group {
    flex-direction: column;
  }
  .call-card {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    padding: 40px 20px;
  }
  
  .call-content h2 {
    font-size: 1.5rem;
  }
}

/* Extra Small Phones */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }
}