/* Basic reset for consistent box sizing */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Dark Theme Styles --- */

/* --- THIS IS THE NEW, CORRECTED RULE --- */
body {
    font-family: 'Inter', Arial, sans-serif;
    color: #e0e0e0; /* Default light text */
    background-color: #1a1a1a; /* Fallback color for when image is loading */

    /* === Background Image Properties === */
    background-image: url('p1.jpg'); /* Your image file */
    background-size: cover; /* Stretches to fill the screen */
    background-position: center; /* Centers the image */
    background-attachment: fixed; /* Parallax scrolling effect */
    background-repeat: no-repeat; /* Prevents tiling */
}
/* --------------- */
/* Header Styles */
/* --------------- */

header {
    width: 100%;
    /* Dark-mode appropriate shadow */
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.header-top {
    background: #222222; /* Slightly lighter dark for the top bar */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid #333; /* Subtle separator */
}

/* Logo (as text) */
.logo h1 {
    font-size: 48px; /* Increased size */
    font-weight: 800; /* Extra bold */
    font-family: 'Inter', sans-serif;
    color: #ffffff; /* UPDATED: White text for dark bg */
    letter-spacing: -0.5px; /* Subtle letter spacing */
    text-shadow: none; /* No shadow needed on dark bg */
}
.logo h1 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
.logo h1 a:hover {
    color: #cccccc; /* Lighter grey hover */
}

/* Right side (contact + search) */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.contact-info {
    display: flex;
    gap: 25px;
    font-size: 14px;
    color: #a0a0a0; /* Softer grey for contact */
}

/* Dark-mode search bar */
.search-container form {
    display: flex;
    border: 1px solid #444; /* Darker border */
    border-radius: 6px;
    overflow: hidden;
    background: #333; /* Dark input background */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* Use accent green for focus */
.search-container form:focus-within {
    border-color: #8BC53F;
    box-shadow: 0 0 0 3px rgba(139, 197, 63, 0.2);
}

.search-container input {
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    width: 250px;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: #e0e0e0; /* Light text */
}
.search-container input:focus {
    outline: none;
}
.search-container input::placeholder {
    color: #777; /* Grey placeholder text */
}

.search-container button {
    border: none;
    background: #8BC53F; /* Keep the green accent */
    color: white;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.search-container button:hover {
    background: #7AB42F;
}


/* Main Navigation Bar */
.main-nav {
    background: #2a2a2a; /* Dark grey nav bar */
}

.main-nav > .container > ul {
    display: flex;
    list-style: none;
    justify-content: flex-start; /* Aligns links to the left of the container */
}

.main-nav li a {
    display: block;
    padding: 15px 25px;
    color: #f0f0f0; /* Bright white text */
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-nav li a:hover {
    background: #383838; /* Lighter grey for hover */
    color: #ffffff;
}

/* Special style for the green home button (accent) */
.nav-home a {
    background: #8BC53F;
    font-size: 20px;
    padding: 12px 25px;
    color: #ffffff; /* Make sure emoji/text is white */
}
.nav-home a:hover {
    background: #7AB42F;
}

/* --------------- */
/* Main Content Styles */
/* --------------- */

main {
    padding: 40px 0; /* Reset padding */
    position: relative;
    z-index: 1;
}

/* Remove the overlay */
main::before {
    content: none;
}

/* A helper class to center content */
.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto; /* Centers the content */
}

/* Content Boxes (Dark) */
.trip-planner-section {
    background: #2a2a2a; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Dark shadow */
    width: 90%;
    max-width: 900px;
    margin: 40px auto; 
}

/* Tab Navigation */
.tab-nav {
    display: flex;
}

.tab-link {
    font-family: 'Inter', sans-serif;
    border: none;
    padding: 18px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background: #2a2a2a; /* Inactive tab background */
    color: #a0a0a0; /* Inactive tab text */
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: 3px solid transparent; /* Inactive border */
}

.tab-link:hover {
    background: #303030;
    color: #e0e0e0;
}

.tab-link.active {
    background: #333; /* Active tab bg - matches content */
    color: #ffffff; /* Active tab text */
    border-bottom: 3px solid #8BC53F; /* Green accent line */
}

/* Tab Content */
.tab-content-container {
    background: #333; /* Main content area background */
    padding: 30px 40px;
}

.tab-content {
    display: none; /* Hide all content by default */
}

.tab-content.active {
    display: block; /* Show only the active one */
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #f0f0f0;
    font-size: 15px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background: #444;
    border: 1px solid #555;
    border-radius: 6px;
    color: #e0e0e0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #8BC53F;
    box-shadow: 0 0 0 3px rgba(139, 197, 63, 0.2);
}

/* CTA Button (like "Plan my trip") */
.cta-button {
    background: #8BC53F;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background: #7AB42F;
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Planner-Specific Layout */
.planner-form-layout {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.planner-form-layout .form-inputs {
    flex-grow: 1; /* Inputs take up all available space */
}

.swap-btn {
    background: #555;
    color: #f0f0f0;
    border: 1px solid #666;
    border-radius: 50%; /* Make it circular */
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px; /* Aligns it between the two inputs */
}

.swap-btn:hover {
    background: #666;
    transform: rotate(180deg);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.google-branding {
    font-size: 14px;
    color: #a0a0a0;
}

/* Next Bus-Specific Layout */
.next-bus-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.helper-links a {
    color: #8BC53F; /* Use accent green */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.helper-links a {
    color: #8BC53F; /* Use accent green */
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.helper-links a:hover {
    color: #a3e05f;
    text-decoration: underline;
}

/* --------------- */
/* Quick Links Styles (Minimalist Update) */
/* --------------- */

.quick-links {
    margin-top: 40px;
}

.quick-links .container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    background: #2a2a2a; /* Matching the dark panels */
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Dark shadow */
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    flex-basis: 45%; /* Each item takes up roughly half the space */
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.quick-link-item:hover {
    background: #333; /* Darker hover effect */
}

.quick-link-icon {
    font-size: 30px;
    flex-shrink: 0; 
    background: #444; 
    color: #e0e0e0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-link-text h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.quick-link-text p {
    font-size: 14px;
    color: #a0a0a0; /* Softer text for description */
    line-height: 1.5;
}

/* --------------- */
/* Rider Info Styles */
/* --------------- */
.rider-info {
    margin: 40px auto;
}

.rider-info h2 {
    color: #ffffff; /* UPDATED: White text for dark bg */
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: none; /* No shadow needed */
}

.timetrack-widget {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Dark shadow */
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #333;
    border-bottom: 1px solid #444;
}

.widget-header h3 {
    font-size: 18px;
    color: #fff;
}

.widget-header button {
    background: #555;
    color: #fff;
    border: 1px solid #666;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.widget-header button:hover {
    background: #666;
}

.timetrack-widget table {
    width: 100%;
    border-collapse: collapse;
}

.timetrack-widget th, .timetrack-widget td {
    padding: 16px 25px;
    text-align: left;
    border-bottom: 1px solid #333;
    color: #ccc;
    font-size: 14px;
}

.timetrack-widget th {
    background: #2a2a2a;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
}

.timetrack-widget tbody tr:hover {
    background: #303030;
}

.timetrack-widget tbody tr:nth-child(even) {
    background: #2c2c2c;
}
.timetrack-widget tbody tr:nth-child(even):hover {
    background: #333;
}


/* --------------- */
/* Other Services Styles */
/* --------------- */
.other-services {
    margin: 40px auto;
}

.other-services h2 {
    color: #ffffff; /* UPDATED: White text for dark bg */
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: none; /* No shadow needed */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 20px;
}

.service-item {
    text-decoration: none;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5); /* Dark shadow */
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.7);
}

.service-image-placeholder {
    height: 150px;
    background: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
}

.service-item h3 {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    padding: 20px;
}

/* --------------- */
/* Stay Informed Styles */
/* --------------- */
.stay-informed {
    background: #2a2a2a; /* Dark grey */
    color: #f0f0f0;
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.stay-informed h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 15px;
}

.stay-informed p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
}

.stay-informed strong {
    font-size: 18px;
    color: #fff;
}


/* --------------- */
/* Reload mCard Styles */
/* --------------- */
/* --------------- */
/* Reload mCard Styles */
/* --------------- */
.reload-mcard {
    background: #8BC53F; /* Green accent */
    padding: 40px 0;
}

.reload-mcard .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reload-mcard h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
}

/* --- THIS IS THE NEW, FIXED RULE --- */
.cta-button-outline {
    background: #8BC53F; /* UPDATED: Match the green background */
    color: #ffffff;
    border: 2px solid #ffffff; /* White border */
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button-outline:hover {
    background: #ffffff;
    color: #8BC53F; /* Green text on hover */
}


/* --------------- */
/* Footer Styles */
/* --------------- */
footer {
    background: #2a2a2a; /* Dark grey */
    color: #ccc;
    padding-top: 40px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    padding-bottom: 40px;
    gap: 30px;
}

.footer-mission {
    flex: 2; /* Takes up more space */
}

.footer-mission h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-mission p {
    font-size: 14px;
    line-height: 1.6;
    color: #ccc;
}

.footer-links h3 {
    color: #fff;
    font-size: 16px;
}

.footer-links h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links h3 a:hover {
    color: #a3e05f; /* Green accent on hover */
}

.footer-bottom {
    background: #222222; /* Darker grey */
    padding: 25px 0;
    font-size: 12px;
    color: #aaa;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-bottom p {
    max-width: 75%;
}

.back-to-top {
    background: #8BC53F;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.back-to-top:hover {
    background: #7AB42F;
}

/* --------------- */
/* Dropdown Menu Styles */
/* --------------- */

.main-nav .dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none; 
    position: absolute;
    top: 100%; 
    left: 0;
    background: #2a2a2a; /* Dark grey */
    min-width: 220px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    border-radius: 0 0 6px 6px; 
    z-index: 100; 
}

.main-nav .dropdown-container:hover .dropdown-menu {
    display: block; 
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu li a {
    display: block; 
    padding: 14px 20px;
    color: #f0f0f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #383838; /* Lighter grey border */
    transition: background-color 0.3s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: #383838; /* Lighter grey */
    color: #ffffff;
}

/* --------------- */
/* Quick Link Dropdown Styles */
/* --------------- */

.quick-link-item.dropdown-container {
    position: relative;
    z-index: 50; 
}

.quick-link-item .dropdown-menu {
    top: 100%; 
    left: 0;
    right: 0; 
    min-width: 100%; 
    border-radius: 0 0 8px 8px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    z-index: 100;
}

.quick-link-item.dropdown-container:hover .dropdown-menu {
    display: block;
}

.quick-link-item.dropdown-container:hover {
    background: #333;
    border-radius: 8px 8px 0 0; 
}
/* --------------- */
/* Geolocation Button Styles */
/* --------------- */

.label-wrapper {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 10px;
}

.form-group label {
    margin-bottom: 0; 
}

.location-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #a0a0a0;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0; 
}

.location-btn:hover {
    color: #8BC53F; /* Green accent */
}
/* --------------- */
/* Form Select Dropdown Styles */
/* --------------- */

/* Style for new <select> elements */
.form-group select {
    padding: 12px 15px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;

    /* Remove default OS styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Custom dropdown arrow (light-colored) */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23e0e0e0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.6-3.6%205.4-7.9%205.4-12.9%200-5-1.8-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: .65em auto;
    padding-right: 40px; /* Make space for the custom arrow */
}

/* Style for the full-width dropdowns */
.form-group select[name="depart-type"],
.form-group select[name="route-pref"] {
    width: 100%;
}

/* Flexbox layout for the date/time row */
.datetime-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.datetime-group select {
    flex-grow: 1; /* Allow dropdowns to share space */
}

.datetime-group span {
    font-size: 20px;
    font-weight: bold;
    color: #a0a0a0;
    padding: 0 2px;
}

/* Update form-footer to just have the button on the right */
.form-footer {
    justify-content: flex-end; /* This aligns the button to the right */
}