:root {
  --primary: #16a34a;         /* Refined green */
  --primary-dark: #15803d;    /* Darker green */
  --primary-light: #dff9f4ff;   /* Light green for backgrounds */
  --secondary: #1e40af;       /* Blue for accents */
  --dark: rgb(0, 0, 0);            /* Dark gray instead of pure black */
  --dark-alt: rgb(48, 48, 48);        /* Alternative dark */
  --light: #f6f6f6ff;           /* Pure White */
  --light-alt: rgb(234, 248, 253);       /* Off-white for backgrounds */
  --gray: #787373;            /* Neutral Gray */
  --gray-light: #e5e7eb;      /* Light gray for borders */
  --success: #059669;         /* Success green */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --transition: all 0.2s ease-in-out;
  /* ADDED GRADIENTS */
  --primary-gradient: linear-gradient(135deg, #16a34a 0%, #1f2021ff 100%);
  --primary-gradient-hover: linear-gradient(135deg, #15803d 0%, rgb(0, 0, 0) 100%);
  --success-gradient: linear-gradient(135deg, #059669 0%, #1f2021ff 100%);
  --success-gradient-hover: linear-gradient(135deg, #047857 0%, #000000ff 100%);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--light-alt);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  /* MODIFIED: Added flex properties for sticky footer */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* Header Styles */
header {
  background: var(--dark);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo i {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--light);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 0.9rem;
}

/* MODIFIED: Simplified hover effect to ensure visibility */
nav a:not(.cta-button):hover {
  color: var(--primary);
}

nav a:not(.cta-button)::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition);
}

nav a:not(.cta-button):hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.cta-button {
  background: var(--primary-gradient);
  color: var(--light);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-size: 0.85rem;
}

.cta-button:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.3);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--light);
  margin: 3px 0;
  border-radius: 5px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background: var(--dark);
  padding: 20px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.mobile-menu a i {
  margin-right: 10px;
  width: 20px;
}

.mobile-menu a:hover {
  color: var(--primary);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-menu .nav-right {
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.mobile-menu .cta-button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* Main Content */
.main-content {
  margin-top: 60px;
  padding: 30px 0;
  /* MODIFIED: Allows this section to grow and push the footer down */
  flex-grow: 1;
}

.split-layout {
  display: flex;
  gap: 30px;
  align-items: stretch; /* MODIFIED: Makes columns equal height */
}

/* ADDED: Makes cards fill their column */
.split-layout > div > .card {
    height: 100%;
}

.left-panel {
  flex: 1;
  position: relative  ;
  top: -5px;


}

.right-panel {
  flex: 1.5;
  position: relative  ;
  top: -5px;

  
}

/* ADDED: Makes the right card a flex container */
.right-panel .card {
    display: flex;
    flex-direction: column;
}

.card {
  background: var(--light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--gray-light);
}

.card-title {
  font-size: 1.6rem;
  color: var(--dark);
  margin-bottom: 10px;
  margin-top: -11px;
  position: relative;
  padding-bottom: 2px;
  font-weight: 900;
}

.card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* Form Styles */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  flex: 1;
  min-width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 3px solid var(--gray-light);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  background: white;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.location-input {
  display: flex;
  align-items: center;
  position: relative;
}

.location-input input {
  border-right: none;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 45px;
}

.location-btn {
  background: var(--primary-gradient);
  color: var(--light);
  border: 1px solid var(--gray-light);
  border-left: none;
  padding: 12px 15px;
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: absolute;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-btn:hover {
  background: var(--primary-gradient-hover);
}

/* Map Styles */
.map-container {
  width: 100%;
  flex-grow: 1;
  min-height: 320px;
  height: 40vh;              /* Ensure height is set */
  height: calc(var(--vh, 1vh) * 40); /* Mobile viewport fix */
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--gray-light);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ...other styles... */

@media (max-width: 576px) {
  /* ...other styles... */
  .map-container {
    min-height: 280px; /* Slightly larger for mobile */
    height: calc(var(--vh, 1vh) * 40);
  }
}



/* Button Styles */
.btn-primary {
  background: var(--primary-gradient);
  color: var(--light);
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(22, 163, 74, 0.3);
}

.btn-success {
  background: var(--dark-alt);
  color: var(--light);
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-size: 1rem;
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-success:hover {
  background: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn-success:disabled {
  background: var(--gray);
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* Fare Result - NEW UNIQUE STYLE */
.fare-result {
  background: linear-gradient(145deg, var(--light), #f7fdf9);
  border: 1px solid var(--primary-light);
  border-left: 2px solid var(--primary);
  padding: 2px;
  border-radius: var(--radius);
  margin-top: auto; /* Pushes it to the bottom of the flex card */
  animation: fadeIn 0.5s ease;
  box-shadow: 0 5px 15px rgba(22, 163, 74, 0.08);
}

.fare-result h3 {
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fare-details {
  display: flex;
  flex-direction: row; 
  flex-wrap: wrap;      
  gap: 12px; /* MODIFIED: Reduced gap */
}

.fare-detail-item {
  display: flex;
  align-items: center;
  gap: 12px; /* MODIFIED: Reduced gap */
  background: var(--light);
  padding: 12px; /* MODIFIED: Reduced padding for a smaller box */
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
  transition: var(--transition);
  flex: 1;              
  min-width: 170px; /* MODIFIED: Adjusted min-width */
}

.fare-detail-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.fare-detail-item .icon {
  font-size: 1.2rem;
  width: 30px;
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.fare-detail-item .text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 500;
}

.fare-detail-item .text span {
  font-size: 1rem;
  color: var(--dark);
  font-weight: 600;
}

/* Special style for the total fare item */
.fare-total-item {
  background: var(--primary-light);
  border: 1px solid transparent;
  border-image: var(--primary-gradient) 1;
}

.fare-total-item .text strong {
    color: var(--primary-dark);
}

.fare-total-item .text span {
  color: var(--primary-dark);
  font-size: 1.25rem;
  font-weight: 700;
}

.fare-total-item .icon {
  font-size: 1.4rem;
}


/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Features Section */
.features {
  padding: 20px 0;
  background: var(--light);
  margin: 1px 0;
  border-radius: var(--radius);
  margin-top: 1px;
}

.features h2 {
  text-align: center;
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 15px;
  font-weight: 700;
}

.features .subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 15px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.feature-card {
  background: var(--light);
  padding: 30px 20px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-light);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--primary-gradient);
  transform: scale(1.1);
}

.feature-icon i {
  font-size: 1.8rem;
  transition: var(--transition);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.feature-card:hover .feature-icon i {
  color: var(--light);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
}

.feature-card h3 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 12px;
  font-weight: 600;
}

.feature-card p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Footer Styles */
footer {
  background: var(--dark);
  color: var(--light);
  padding: 20px 0 5px;
  margin-top: 10px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 0px;
}

.footer-column h3 {
  color: var(--light);
  font-size: 1.2rem;
  margin-bottom: 18px;
  font-weight: 600;
  position: relative;
  padding-bottom: 8px;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.footer-column p {
  color: var(--gray-light);
  line-height: 1.6;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: var(--gray-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  font-size: 0.9rem;
}

.footer-column ul li a:hover {
  transform: translateX(5px);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.social-icons {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.social-icons a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
}

.social-icons a:hover {
  background: var(--primary-gradient);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-light);
  font-size: 0.85rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .split-layout {
    flex-direction: column;
    align-items: stretch; /* Ensure it stays stretched when vertical */
  }

  /* <<<--- இங்கேதான் முக்கிய மாற்றம் செய்யப்பட்டுள்ளது --->>> */
  .split-layout > div > .card {
    height: auto; /* This fixes the map collapsing issue on mobile */
  }
  
  .left-panel, .right-panel {
    min-width: 100%;
  }
  
  .right-panel {
    position: static;
  }
}

@media (max-width: 992px) {
  .header-container {
    padding: 12px 15px;
  }
  
  nav {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .form-group {
    min-width: 100%;
  }
  
  .feature-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-top: 75px;
    padding: 20px 0;
  }
  
  .card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .card-title {
    font-size: 1.4rem;
    margin-bottom: 18px;
  }

  .map-container {
    min-height: 280px; /* MODIFIED: Adjusted responsive height */
  }
  
  .features {
    padding: 40px 0;
    margin: 20px 0;
  }
  
  .features h2 {
    font-size: 1.6rem;
  }
  
  .feature-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-card {
    padding: 25px 18px;
  }
  
  footer {
    padding: 40px 20px 20px;
  }
  
  .footer-content {
    gap: 25px;
  }
  
  .btn-primary, .btn-success {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 10px 12px;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .user-profile {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .cta-button {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
  
  .main-content {
    margin-top: 65px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .card {
    padding: 18px;
  }
  
  .form-group input,
  .form-group select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .location-btn {
    padding: 10px 12px;
  }
  
  .map-container {
    min-height: 220px; /* MODIFIED: Adjusted responsive height */
  }
  
  .features h2 {
    font-size: 1.4rem;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
  }
  
  .feature-icon i {
    font-size: 1.5rem;
  }
  
  .feature-card h3 {
    font-size: 1.1rem;
  }
  
  .footer-column h3 {
    font-size: 1.1rem;
  }
  
  .mobile-menu {
    top: 62px;
  }
}

/* Fix for autocomplete dropdown on mobile */
.pac-container {
  z-index: 10000 !important;
}

/* Prevent horizontal scrolling */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* === FIX TO RESTORE FULL WIDTH ON DESKTOP VIEW === */
/* This rule tells the main page sections to take the full width of the body */
body > main,
body > section,
body > footer {
  width: 100%;
}