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

/* Base body styling */
body {
  font-family: "Sarabun", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
}

/* Prevent horizontal scroll on html element */
html {
  overflow-x: hidden;
}

/* Apply Amaranth font for all headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Amaranth", sans-serif;
  color: #006c54;
  font-weight: bold;
}

/* ================= NAVBAR ================= */

/* Logo size */
.logo {
  height: 45px;
}

/* ================= HERO IMAGE (RESPONSIVE) ================= */

/* Generic hero image sizing */
.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hide car image by default (desktop/tablet view) */
#car-img {
  display: none;
}

/* Show car image only on mobile screens */
@media (max-width: 768px) {
  #car-img {
    display: block;
    width: 100%;
    height: auto;
  }
}

/* Hide mobile-only elements on desktop view */
@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
}

/* Adjust logo padding for small mobile screens */
@media (max-width: 400px) {
  .logo {
    padding: 10px 10px 10px 10px;
  }
}

/* ================= BUTTONS & NAV ================= */

/* Hide desktop-only images */
img.desktop_view {
  display: none !important;
}

/* Hide the driver/traveler chip */
.toggle-buttons {
  display: none !important;
}

/* Navbar button styling */
nav .btn {
  font-size: 0.9rem;
  padding: 6px 18px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

/* Custom button design */
.btn-custom {
  background: #ff7b00;
  color: #fff;
  border-radius: 30px;
  padding: 10px 25px;
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
}

/* Button hover effect */
.btn-custom:hover {
  background-color: #0d5b4d;
  color: #fff;
  transform: translateY(-2px);
}

/* Send button alignment in form */
#send-btn {
  width: 40%;
  display: block;
  margin: 0 auto 20px;
}

/* WhatsApp icon styled to match the Become a Driver button size */
.whatsapp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #006c54;
  background: transparent;
  color: #006c54;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.whatsapp-icon i {
  font-size: 1.15rem; /* icon size inside the circle */
  line-height: 1;
}

@media (max-width: 400px) {
  .whatsapp-icon {
    width: 40px;
    height: 40px;
  }
}

/* ================= HERO SECTION ================= */

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Hero heading style */
.hero-section h1 {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* Hero paragraph style */
.hero-section p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #555;
}

/* Hero background image */
.bg-img-hero {
  /* Keep background off the container to avoid duplicate rendering; image is on .hero-img */
  background: none !important;
  /* Do not force a viewport-height — let the section size to its content */
  min-height: auto;
  height: auto;
}

/* Strong layout rules for the hero region (override earlier rules) */
.bg-img-hero .row {
  /* remove bootstrap spacing inside hero and make it a flex container */
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  width: 100%;
  gap: 20px; /* 20px gap between text and image */
  align-items: stretch; /* make columns equal height */
}

/* Mobile: stack with image on top and text below */
@media (max-width: 768px) {
  .bg-img-hero {
    padding: 12px 0;
    background-position: center top !important;
    background-size: cover !important;
  }
  .bg-img-hero .row {
    flex-direction: column; /* stack vertically */
    gap: 12px;
  }
  .bg-img-hero .hero-img {
    background-image: url('../images/bg-img-hero.png');
    background-position: center;
    background-size: contain !important;
    background-repeat: no-repeat;
    min-height: 220px;
    width: 100%;
  }

  /* Ensure hero image column is visible on mobile (override earlier hide) */
  .col-md-6.hero-img {
    display: block !important;
    order: -1; /* place image before text */
  }
}

/* Desktop / large screens: text left (max 1/3), image right, 20px gap */
@media (min-width: 769px) {
  .bg-img-hero {
    padding: 40px 0;
  }
  .bg-img-hero .row {
    flex-direction: row;
    padding-left: 0; /* removed row-level padding; align on the column instead */
    padding-right: 0; /* allow image to reach edge */
  }
  .bg-img-hero .col-md-6:first-child {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding-left: 30px; /* align text with header logo (navbar padding 30px) */
  }
  .bg-img-hero .col-md-6:last-child {
    flex: 1 1 auto;
    max-width: calc(100% - 33.3333% - 20px);
    padding-right: 0;
  }
  .bg-img-hero .hero-img {
    background-image: url('../images/bg-img-hero.png');
    background-position: right center; /* align image to the right edge */
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    min-height: 360px;
  }
}

/* Wave image style */
.wave img {
  margin-top: 40px;
  width: 300px;
}

/* ================= INFO BOXES ================= */

.info-box {
  background: #fff;
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

/* Info box hover animation */
.info-box:hover {
  transform: translateY(-8px);
  box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.12);
}

/* Info box heading */
.info-box h5 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Info box text */
.info-box p {
  font-size: 0.95rem;
  color: #555;
}

/* Small info boxes */
.info-box.small {
  padding: 20px;
  text-align: center;
}

.info-box.small img {
  display: block;
  margin: 0 auto 15px;
}

/* ================= CONTACT FORM ================= */

.form-box {
  background: #fff;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Input fields basic styling */
.form-control {
  border-radius: 10px;
  padding: 12px 15px;
  border: 1px solid #ddd;
}

/* Input focus styling */
.form-control:focus {
  border-color: #128346;
  box-shadow: 0 0 0 0.2rem rgba(18, 131, 70, 0.25);
}

/* Country code & phone input group adjustments */
#country-code {
  /* keep the right side squared so it connects to the phone input */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  /* round the left side to match other form fields (same radius used by .form-control) */
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

#phone-input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Input group layout */
.input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Error text placement inside input group */
.input-group .error-text {
  width: 100%;
  margin-top: 4px;
  order: 99;
}

/* Remove number input arrows in Chrome/Edge/Safari */
#phone-input::-webkit-outer-spin-button,
#phone-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove number input arrows in Firefox */
#phone-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Final overrides: ensure hero text is visible and not covered by the background image */
.bg-img-hero {
  position: relative;
  z-index: 0;
}

.bg-img-hero .col-md-6 {
  position: relative;
  z-index: 2; /* put text column above the hero image column */
  color: #0d5b4d; /* ensure readable color for headings/paragraphs */
}

.bg-img-hero .hero-img {
  position: relative;
  z-index: 1; /* image stays behind text */
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center right;
}

/* On small screens ensure image is shown above text but still behind any overlaying content */
@media (max-width: 768px) {
  .col-md-6.hero-img {
    display: block !important;
    order: -1;
    z-index: 1;
  }
  .bg-img-hero .col-md-6 {
    z-index: 2;
  }
}

/* DEBUG OVERRIDES: force hero text visible (temporary) */
/* Ensure on mobile the boxed hero image column is hidden (keep mobile-only image visible) */
@media (max-width: 768px) {
  .col-md-6.hero-img {
    display: none !important;
  }
}

/* ================= FOOTER ================= */

.footer {
  background: #111;
  padding: 25px 10px;
  color: #fff;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */

@media (max-width: 992px) {
  .hero-section h1 {
    font-size: 2.3rem;
  }

  .hero-img {
    min-height: 280px;
    background-size: cover;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .wave img {
    width: 220px;
  }

  .slide.active {
    margin-left: 0 !important;
  }
}

/* ================= WHY JOIN US SECTION ================= */

.why-join-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  padding: 80px 40px;
  margin-top: 5%;
}

/* Heading style */
.why-join-heading {
  width: 10%;
  font-family: "Amaranth", sans-serif;
  font-size: 3.5rem;
  line-height: 1.1;
  color: #0d5b4d;
  font-weight: 700;
  text-align: left;
  padding-right: 1%;
  flex-shrink: 0;
}

/* Slider wrapper design */
.slider-wrapper {
  position: relative;
  overflow: hidden;
  width: 900px;
  max-width: 55%;
  padding: 20px;
  border-left: 1px solid #0d5b4d;
  padding: 30px 20px !important;
}

/* Slider track layout */
.slider-track {
  display: flex;
  gap: 30px;
  transition: transform 0.6s ease;
  padding-left: 10px;
}

/* Individual slide card */
.slide {
  flex: 0 0 180px;
  margin: 0;
  padding: 20px;
  border-radius: 20px;
  background-color: #ffffff;
  color: #125845;
  font-family: "Inter", sans-serif;
  box-shadow: 4px 4px 25px rgba(0, 0, 0, 0.25);
  transition: all 0.4s ease, transform 0.4s ease;
  cursor: pointer;
  height: 210px;
  position: relative;
  z-index: 1;
}

/* Active slide styling */
.slide.active {
  transform: scaleX(1.2) scaleY(1.05);
  background-color: #125845;
  color: #ffffff;
  z-index: 10;
  margin-left: 20px;
}

/* Slide heading and paragraph */
.slide h5 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #125845;
  font-weight: 800;
}

.slide p {
  font-size: 0.9rem;
  font-weight: 200;
  color: #125845;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Active slide text colors */
.slide.active h5 {
  color: #fff;
}

.slide.active p {
  color: #fffbf8;
  opacity: 1;
}

/* Responsive slider styling for mobile */
@media screen and (max-width: 768px) {
  .why-join-container {
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 30px;
  }

  .why-join-heading {
    font-size: 2.5rem;
    border-right: none;
    padding-right: 0;
    text-align: center;
  }

  .slider-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    border: none;
  }

  .slide {
    flex: 0 0 100%;
    max-width: 100%;
    height: auto;
    padding: 20px;
    transform: scale(1);
    opacity: 0.5;
    transition: all 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
  }

  .slide.active {
    transform: scale(1);
    opacity: 1;
    background-color: #125845;
    color: #fff;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  .slide h5 {
    font-size: 1.2rem;
    text-align: center;
  }

  .slide p {
    font-size: 1rem;
    text-align: center;
  }
}

/* ================= READY TO DRIVE SECTION ================= */

.ready-drive {
  max-width: 750px;
  margin: 0px auto;
  padding: 30px 20px;
  color: #123422;
  font-family: "Sarabun", sans-serif;
  background-color: #fff;
}

/* Ready to drive heading */
.ready-drive h2 {
  font-family: "Amaranth", sans-serif;
  font-size: 2.9rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  color: #006c54;
}

/* Drive steps layout */
.drive-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 35px;
}

/* Drive step image styling */
.drive-step img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 15px;
  object-fit: cover;
}

/* Green line beside text in drive steps */
.drive-step > div {
  border-left: 1px solid rgba(18, 88, 69, 0.5);
  padding-left: 20px;
}

/* Drive step alignment fixes */
#R-d1,
#R-d2,
#R-d3 {
  align-items: center;
}

/* Drive step text styling */
.drive-step p {
  padding-left: 0;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.drive-step em {
  font-style: italic;
  color: #000;
  font-weight: 500;
}

.drive-step strong {
  color: #125845;
  font-weight: 700;
}

/* ================= CONTACT FORM STYLING ================= */

#form-section {
  background-color: #fff;
  padding: 80px 0;
}

/* Centered form button styling */
.center-btn .btn {
  color: white;
  border: none;
  background-color: #9e4a22;
  margin-bottom: 20px;
  width: 120px;
  border-radius: 20px;
  padding: 10px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

/* Hover effect for form button */
.center-btn .btn:hover {
  background-color: #7e3a1a;
}

/* Center link text */
.center-btn a {
  color: white;
  font-size: 20px;
  text-decoration: underline;
  font-weight: 500;
}

/* Centered button container */
.center-btn {
  text-align: center;
}

/* Form heading styling */
#form-section h3 {
  font-family: "Amaranth", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: white;
}

/* Rounded form controls */
.form-control {
  border-radius: 20px;
  padding: 14px 18px;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Validation border colors */
.form-control.input-error {
  border: 2px solid #e74c3c !important;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.06);
}

.form-control.input-valid {
  border: 2px solid #28a745 !important;
  box-shadow: 0 0 0 4px rgba(40,167,69,0.06);
}

/* Error message text */
.error-text {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

/* Feedback message size */
#form-feedback { 
  font-size: 14px; 
}

/* Center all elements in parent container */
.center-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Send button spacing */
#send-btn {
  width: 40%;
  margin-bottom: 20px;
}

/* Paragraph and link adjustments in form */
.form-cont p {
  margin: 5px 0;
}

.form-cont a {
  display: inline-block;
  margin-top: 5px;
}

/* ================= FOOTER SECTION ================= */

.footer {
  background-color: #125845;
  color: #fff;
  padding: 24px 0; /* symmetric vertical padding */
  margin-top: 60px;
  height: auto; /* allow footer to size to content */
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left p,
.footer-left a {
  margin: 0;
  color: #fff;
}

.footer-copy {
  text-decoration: none;
  color: #fff;
}

/* Social links on the right of the footer */
.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  color: #fff; /* white icons */
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
  border: 1px solid rgba(255,255,255,0.12);
}

.social-link i { font-size: 1.05rem; }

.social-link:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* ================= NAVBAR CUSTOM STYLING ================= */

.navbar-custom {
  background-color: #fff;
  padding: 15px 30px;
}

.navbar-custom .logo {
  height: 72px;
}

/* Toggle buttons layout and colors */
.toggle-buttons {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  overflow: hidden;
  background-color: #f1e3d8;
}

.toggle-buttons a {
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 500;
  color: #9a5b3f;
  text-decoration: none;
  transition: 0.3s;
}

.toggle-buttons a.active {
  background-color: #9a441d;
  color: #fff;
  border-radius: 20px;
}

/* WhatsApp icon button style */
.whatsapp-icon:hover {
  background-color: #006c54;
  color: white;
  transform: translateY(-2px);
}

/* Custom button design */
.btn-custom {
  background-color: transparent;
  color: #111111;
  border: 2px solid #b04829;
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-custom.clicked {
  background-color: #125845;
  color: #f8f4ed;
}

/* Footer sizing handled above (auto height and symmetric padding) */

/* ================= RESPONSIVE FIXES ================= */

@media (max-width: 768px) {
  /* Why Join Us heading adjustments */
  .why-join-heading {
    text-align: center;
    font-size: 2.5rem;
    border-right: none;
    border-bottom: 2px solid black;
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 0%;
  }

  /* Hide background image on mobile */
  .bg-img-hero {
    background: none !important;
  }

  /* Hide hero image containers on mobile */
  .col-md-6.hero-img {
    display: none;
  }

  .drive-connect-earn-img {
    display: none;
  }

  /* Adjust drive steps for mobile */
  .drive-step {
    flex-direction: row;

  }
}