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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2d5a4a 0%, #1a3d32 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
}

.background-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-section {
    background: transparent;
    padding: 1rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(15, 25, 20, 0.7) 0%, 
        rgba(10, 20, 15, 0.8) 50%, 
        rgba(5, 15, 10, 0.85) 100%);
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-1 {
    background-image: url('background-images/pexels-ronald-plett-437547918-15368562.jpg');
}

.slide-2 {
    background-image: url('background-images/pexels-ronald-plett-437547918-15496795.jpg');
}

.slide-3 {
    background-image: url('background-images/pexels-bill-bettilyon-462558506-15837431.jpg');
}

.slide-4 {
    background-image: url('background-images/pexels-michiel-ton-2722948-4269571.jpg');
}

.slide-5 {
    background-image: url('background-images/pexels-chechil-orifa-224183752-15228084.jpg');
}



.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.5rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2d5a4a;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group label .optional {
    font-weight: 400;
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
}

/* Time input wrapper */
.time-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.time-input-wrapper input {
    padding-right: 2.5rem;
}

.time-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.time-clear-btn:hover {
    background: #f0f0f0;
    color: #666;
}

.time-clear-btn:active {
    background: #e0e0e0;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

#departure-time {
    font-family: inherit;
    text-transform: uppercase;
}

#departure-time:invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

#departure-time:valid {
    border-color: #2d5a4a;
    box-shadow: 0 0 5px rgba(45, 90, 74, 0.2);
}

/* Style for datalist dropdown */
.form-group input[list] {
    position: relative;
}

/* Placeholder styling for better UX */
.form-group input::placeholder {
    color: #999;
    font-style: italic;
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
}

/* Disclaimer styles */
.disclaimer {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.disclaimer-text {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.disclaimer-text strong {
    color: #b45309;
    font-weight: 600;
}

.results-container {
    max-width: none;
    margin: 0;
    padding: 0.5rem 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    text-align: center;
    flex: 1;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.results-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}

.results-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
}

.bus-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
    transition: all 0.3s ease;
}



.bus-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.bus-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.bus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Additional card structure */
.route-info {
    margin-top: 0.5rem;
}

.route-path {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.route-note {
    display: block;
    font-size: 0.8rem;
    color: #2d5a4a;
    font-weight: 600;
    margin-top: 0.4rem;
    line-height: 1.3;
    text-align: center;
    padding: 0.5rem 1rem;
}

/* List view styling */
.list-view .bus-card {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 1.5rem;
    min-height: auto;
}

.list-view .bus-info-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-view .bus-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.list-view .bus-company-section {
    gap: 0.8rem;
}

.list-view .bus-route {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

.list-view .route-path {
    font-size: 0.75rem;
    color: #666;
    text-align: left;
    margin-top: 0.2rem;
}

/* Bus BID - Hidden by default (uncomment display to show for debugging) */
.bus-bid {
    display: none; /* Change to 'block' to show BIDs */
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
    font-family: monospace;
}

.list-view .route-note {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2d5a4a;
    margin-top: 0.3rem;
    text-align: center;
    padding: 0.4rem 0.8rem;
}

.list-view .time-and-details-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.list-view .time-section {
    margin-bottom: 0;
    justify-content: flex-start;
    gap: 1.5rem;
}

.list-view .time-block {
    text-align: left;
    flex: none;
}

.list-view .time-value {
    font-size: 1.1rem;
}

.list-view .time-separator {
    margin: 0 0.5rem;
    font-size: 1.1rem;
}

.list-view .details-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.list-view .stops-section {
    margin-bottom: 0;
}

.list-view .stops-title {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.list-view .stops-list {
    gap: 0.3rem;
}

.list-view .stop-item {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.list-view .stop-item.highlighted-stop {
    background: #e8f5e8;
    border: 2px solid #2d5a4a;
    font-weight: 600;
    color: #1a3d32;
}

.list-view .days-info,
.list-view .notes-info,
.list-view .phone-info {
    margin-bottom: 0.2rem;
    padding: 0.1rem 0;
}

.list-view .action-section {
    display: flex;
    align-items: center;
}

.list-view .view-location-btn {
    width: auto;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-bottom: 0.3rem;
}

.list-view .view-schedule-btn {
    width: auto;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.list-view .action-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
}

.bus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.bus-company-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.bus-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bus-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bus-company {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d5a4a;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.verified-badge {
    background: #2d5a4a;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(45, 90, 74, 0.3);
}

.bus-route {
    font-size: 0.7rem;
    color: #666;
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
}

.time-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.time-block {
    text-align: center;
    flex: 1;
}

.time-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d5a4a;
}

.time-separator {
    font-size: 1.5rem;
    color: #f39c12;
    margin: 0 1rem;
}

.stops-section {
    margin-bottom: 0.8rem;
}

.stops-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d5a4a;
    margin-bottom: 0.5rem;
}

.stops-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stop-item {
    background: #f8f9fa;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #666;
    border: 1px solid #e9ecef;
}

.stop-item.highlighted-stop {
    background: #e8f5e8;
    border: 2px solid #2d5a4a;
    font-weight: 600;
    color: #1a3d32;
}

.view-location-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    display: none;
}

.view-location-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.view-location-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.view-schedule-btn {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(45deg, #2d5a4a, #1a3d32);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-schedule-btn:hover {
    background: linear-gradient(45deg, #1a3d32, #2d5a4a);
    transform: translateY(-2px);
}

.action-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.days-info, 
.notes-info,
.phone-info {
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
}

.days-info small,
.notes-info small,
.phone-info small {
    color: #666;
    font-size: 0.7rem;
}

.phone-link {
    color: #2d5a4a;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.phone-link:hover {
    color: #1a3d32;
    border-bottom-color: #2d5a4a;
}

.phone-link:active {
    color: #0f2d24;
}

.filters {
    display: none;
}

/* Load more section hidden by default */
.load-more-section {
    display: none;
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 3rem;
}

.terms-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.terms-link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal styles for company schedules */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 2rem;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #2d5a4a, #3d6b5a);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: linear-gradient(135deg, #1f4a3a, #2d5a4a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 90, 74, 0.3);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(45, 90, 74, 0.3);
}

.action-btn svg {
    fill: none;
    stroke: currentColor;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d5a4a;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.schedule-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #2d5a4a;
}

.schedule-route {
    font-weight: 600;
    color: #2d5a4a;
    margin-bottom: 0.5rem;
}

.schedule-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.schedule-time {
    font-weight: 600;
    color: #f39c12;
}

.loading-schedules {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-schedules {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Terms of Service Modal Styles */
.terms-modal-content {
    max-width: 800px;
}

.terms-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.terms-content h3 {
    color: #2d5a4a;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    border-bottom: 2px solid #e8f5e8;
    padding-bottom: 0.5rem;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333;
}

.terms-content ul {
    margin: 1rem 0 1rem 1.5rem;
    color: #333;
}

.terms-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.terms-content strong {
    color: #2d5a4a;
    font-weight: 600;
}

.terms-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e8f5e8;
    text-align: center;
    color: #666;
}

/* Terms modal responsive */
@media (max-width: 768px) {
    .terms-modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: none;
    }
    
    .terms-modal-body {
        padding-right: 0;
        max-height: 60vh;
    }
}

@media (max-width: 1400px) {
    .bus-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .search-btn {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    .bus-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-btn {
        grid-column: auto;
        margin-top: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .bus-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    /* Default to list view on mobile */
    .bus-grid:not(.card-view) {
        gap: 1rem;
    }
    
    .bus-grid:not(.card-view) .bus-card {
        display: block;
        padding: 1rem;
    }
    
    .bus-grid:not(.card-view) .bus-header {
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
        border-bottom: 2px solid #f8f9fa;
        flex-direction: row;
        align-items: center;
    }
    
    .bus-grid:not(.card-view) .time-section {
        margin-bottom: 1rem;
        justify-content: space-between;
    }
    
    .bus-grid:not(.card-view) .time-block {
        text-align: center;
    }
    
    .bus-grid:not(.card-view) .view-schedule-btn {
        width: 100%;
        padding: 0.8rem;
    }
    
    .search-container {
        margin: 0 1rem;
    }
    
    .results-container {
        padding: 2rem 1rem;
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .results-info {
        order: 1;
    }
    
    .view-toggle {
        order: 2;
        align-self: center;
    }
    
    .hero-section {
        padding: 2rem 1rem 3rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    /* List view adjustments for mobile */
    .list-view .bus-card {
        display: block;
        grid-template-columns: none;
        gap: 1rem;
        padding: 1rem;
    }
    
    .list-view .bus-info-section {
        margin-bottom: 1rem;
    }
    
    .list-view .bus-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .list-view .route-path {
        text-align: center;
        font-size: 0.8rem;
    }
    
    .list-view .route-note {
        text-align: center;
        font-size: 0.7rem;
        font-weight: 600;
        color: #2d5a4a;
        margin-top: 0.3rem;
        padding: 0.4rem 0.8rem;
    }
    
    .list-view .time-and-details-section {
        margin-bottom: 1rem;
    }
    
    .list-view .time-section {
        justify-content: space-between;
        margin-bottom: 1rem;
        gap: 1rem;
    }
    
    .list-view .time-block {
        text-align: center;
    }
    
    .list-view .time-value {
        font-size: 1.1rem;
    }
    
    .list-view .details-section {
        gap: 0.5rem;
    }
    
    .list-view .action-section .view-location-btn {
        width: 100%;
        padding: 0.7rem;
        margin-bottom: 0.5rem;
    }
    
    .list-view .action-section .view-schedule-btn {
        width: 100%;
        padding: 0.8rem;
    }
    
    /* Disclaimer mobile styles */
    .disclaimer {
        margin: 1rem auto 0;
        padding: 0 1rem;
    }
    
    .disclaimer-text {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
        text-align: left;
    }
    
    /* Time input mobile styles */
    .time-clear-btn {
        font-size: 1.4rem;
        width: 2rem;
        height: 2rem;
        right: 0.3rem;
    }
    
    .time-input-wrapper input {
        padding-right: 3rem;
    }
}

/* Load more section */
.load-more-section {
    display: none;
    justify-content: center;
    margin: 2rem 0;
}

.load-more-section.show {
    display: flex;
}

.load-more-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2d5a4a, #3d6b5a);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(45, 90, 74, 0.2);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #1f4a3a, #2d5a4a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 90, 74, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(45, 90, 74, 0.3);
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Map modal styles */
.map-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container {
    background: white;
    margin: 1rem;
    border-radius: 16px;
    width: 95%;
    max-width: 1000px;
    height: 80vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.map-header {
    background: linear-gradient(135deg, #2d5a4a, #4CAF50);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 4px 12px rgba(45, 90, 74, 0.3);
}

.map-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.map-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.map-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.location-status {
    display:none!important;
    background: #f8f9fa;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #495057;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.status-online {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-left-color: #4CAF50;
    animation: pulseGreen 2s infinite;
}

.status-offline {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border-left-color: #f44336;
}

.status-loading {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    border-left-color: #FF9800;
    animation: pulseOrange 1.5s infinite;
}

@keyframes pulseGreen {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
    }
    50% { 
        transform: scale(1.2); 
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
    }
}

@keyframes pulseOrange {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
    }
    50% { 
        transform: scale(1.2); 
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.7);
    }
}

#busMap {
    flex: 1;
    min-height: 0;
    background: #2d3748;
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
}

/* Bus location display section at bottom of modal */
.bus-location-display {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 1px solid #dee2e6;
    padding: 0;
    min-height: 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.bus-location-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #2d5a4a, #4CAF50);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.location-display-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.25rem 2rem;
    gap: 1.5rem;
}

.location-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    animation: locationPulse 3s infinite;
}

@keyframes locationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.location-info {
    flex: 1;
    min-width: 0;
}

.location-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.location-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2d5a4a;
    line-height: 1.3;
    word-wrap: break-word;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.location-timestamp {
    font-size: 0.85rem;
    color: #6c757d;
    background: rgba(255,255,255,0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
}

/* Loading state for location display */
.location-text.loading {
    color: #FF9800;
    font-style: italic;
}

.location-text.error {
    color: #f44336;
    font-style: italic;
}

.location-text.success {
    color: #2d5a4a;
}

/* Custom popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
    border: 2px solid rgba(76, 175, 80, 0.2) !important;
}

.leaflet-popup-content {
    margin: 12px !important;
    font-family: 'Segoe UI', sans-serif !important;
}

.leaflet-popup-tip {
    background: white !important;
    border: 2px solid rgba(76, 175, 80, 0.2) !important;
    border-top: none !important;
    border-right: none !important;
}

/* User and bus marker animations */
.user-location-marker,
.bus-location-marker {
    z-index: 1000 !important;
}

/* Mobile map adjustments */
@media (max-width: 768px) {
    .map-container {
        margin: 0.5rem;
        height: 85vh;
        border-radius: 12px;
    }
    
    .map-header {
        padding: 1rem 1.5rem;
        border-radius: 12px 12px 0 0;
    }
    
    .map-header h3 {
        font-size: 1.1rem;
    }
    
    .map-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
    
    .location-status {
        padding: 0.75rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .leaflet-popup-content-wrapper {
        border-radius: 8px !important;
    }
    
    .leaflet-popup-content {
        margin: 8px !important;
        font-size: 0.9rem !important;
    }
    
    .location-display-content {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .location-icon {
        font-size: 1.5rem;
    }
    
    .location-text {
        font-size: 1.1rem;
    }
    
    .location-timestamp {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .bus-location-display {
        min-height: 70px;
    }
}

/* Print styles */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        margin: 0;
        padding: 20px;
        background: white !important;
    }
    
    .hero-section, .search-container, .footer, .background-carousel {
        display: none !important;
    }
    
    .modal {
        position: static !important;
        background: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .modal-content {
        background: white !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-height: none !important;
        max-width: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .modal-header {
        border-bottom: 2px solid #000 !important;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .modal-actions, .close-btn {
        display: none !important;
    }
    
    .modal-title {
        color: #000 !important;
        font-size: 24px !important;
    }
    
    .schedule-grid {
        page-break-inside: avoid;
    }
    
    .schedule-item {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
        margin-bottom: 10px;
    }
}

/* Auto-complete and Toast Notification Styles */
.auto-correct-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    z-index: 10000;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Enhanced datalist styling */
.form-group input[list]::-webkit-calendar-picker-indicator {
    display: none;
}

.form-group input[list] {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
}

.form-group input[list]:focus {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23f39c12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6,9 12,15 18,9"></polyline></svg>');
}

/* Auto-complete input enhancement */
.form-group input[list]::placeholder {
    color: #999;
    font-style: italic;
    transition: all 0.3s ease;
}

.form-group input[list]:focus::placeholder {
    color: #bbb;
    transform: translateY(-1px);
}

/* Input validation styling for auto-complete */
.form-group input[list]:valid {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input[list]:invalid:not(:placeholder-shown) {
    border-color: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
    .auto-correct-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.8rem 1rem;
    }
    
    .form-group input[list] {
        background-size: 14px;
        padding-right: 2.5rem;
    }
}

/* Modern Bottom Navigation Styles */
.modern-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(45, 90, 74, 0.1);
    display: none; /* Hidden by default, shown on mobile */
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.modern-bottom-nav::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 90, 74, 0.3), transparent);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.85rem 0;
    position: relative;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 0.5rem;
    min-height: 60px;
    position: relative;
    flex: 1;
    border-radius: 12px;
    margin: 0 0.25rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2d5a4a, #4CAF50);
    border-radius: 0 0 3px 3px;
    transition: width 0.3s ease;
}

.nav-item.active::before {
    width: 60%;
}

.nav-item:active {
    transform: scale(0.95);
    background: rgba(45, 90, 74, 0.05);
}

/* Modern Navigation Icon and Label Styles */
.nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
}

.nav-item.active .nav-icon {
    color: #2d5a4a;
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(45, 90, 74, 0.2));
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}

.nav-item.active .nav-label {
    color: #2d5a4a;
    font-weight: 600;
    transform: translateY(-1px);
}

.nav-indicator {
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #2d5a4a, #4CAF50);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.nav-item.active .nav-indicator {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.nav-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(45, 90, 74, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.nav-item:active .nav-ripple {
    width: 60px;
    height: 60px;
}

/* Removed Floating Action Button - not needed */

/* Hover Effects */
.nav-item:hover:not(.active) {
    color: #999;
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.nav-item:hover:not(.active) .nav-icon {
    transform: scale(1.05);
}

/* Show bottom nav on mobile only */
@media (max-width: 768px) {
    .modern-bottom-nav {
        display: block;
    }
    
    /* Add bottom padding to body to account for bottom nav */
    body {
        padding-bottom: 100px; /* Increased from 80px to ensure content isn't hidden */
    }
    
    /* Hide elements that interfere with bottom nav */
    .footer {
        margin-bottom: 0;
        padding-bottom: 1rem;
    }
    
    /* Hide company field on mobile since we have Companies tab */
    .form-group:has(#company) {
        display: none;
    }
    
    /* If :has() not supported, fallback */
    .form-group-company {
        display: none;
    }
    
    /* Fix mobile view containers to fill full height without gaps */
    .bottom-nav-view {
        min-height: calc(100vh - 100px) !important; /* Updated to match body padding */
        padding-bottom: 20px !important; /* Add bottom padding to prevent content cutoff */
        margin-bottom: 0 !important;
        height: calc(100vh - 100px) !important;
    }
    
    .bottom-nav-view > div {
        min-height: calc(100vh - 100px) !important; /* Updated to match container */
        height: calc(100vh - 100px) !important; /* Updated to match container */
        padding-bottom: 20px !important; /* Ensure content isn't hidden behind nav */
    }
    
    /* Enhanced mobile touch interactions */
    .nav-item {
        min-height: 70px;
        padding: 1rem 0.5rem;
    }
    
    .nav-label {
        font-size: 0.75rem;
    }
    
    /* FAB removed - no mobile optimization needed */
}

/* Extra small devices */
@media (max-width: 480px) {
    .modern-bottom-nav {
        padding: 0.5rem 0;
    }
    
    .nav-item {
        min-height: 65px;
        padding: 0.75rem 0.25rem;
    }
    
    .nav-label {
        font-size: 0.7rem;
    }
    
    /* FAB removed - no extra small device optimization needed */
}

/* Additional spacing fixes for mobile views */
@media (max-width: 768px) {
    /* Ensure all content areas have proper bottom spacing */
    .companies-container,
    .map-container,
    .settings-container {
        padding-bottom: 120px !important; /* Extra padding to prevent content cutoff */
        margin-bottom: 0 !important;
    }
    
    /* Fix for any scrollable containers */
    .scrollable-content {
        padding-bottom: 120px !important;
    }
    
    /* Company schedules view specific spacing */
    .company-schedules-view {
        padding-bottom: 120px !important;
        margin-bottom: 0 !important;
    }
    
    /* Ensure bus cards in company schedules have proper spacing */
    .company-schedules-view .bus-card:last-child {
        margin-bottom: 20px !important;
        padding-bottom: 20px !important;
    }
    
    /* Ensure the navigation bar doesn't overlap content */
    .modern-bottom-nav {
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15); /* Enhanced shadow for better separation */
    }
}

/* iOS safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .modern-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Modern Navigation Animations */
@keyframes tabActivate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes rippleEffect {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.nav-item.active {
    animation: tabActivate 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge support for notifications (optional) */
.nav-item .nav-badge {
    position: absolute;
    top: 0.5rem;
    right: 50%;
    transform: translateX(50%);
    background: linear-gradient(135deg, #f44336, #ff5722);
    color: white;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
    min-width: 16px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

/* Enhanced accessibility for focus states */
.nav-item:focus-visible {
    outline: 2px solid #2d5a4a;
    outline-offset: 2px;
    border-radius: 12px;
    background: rgba(45, 90, 74, 0.05);
}

/* Focus styles for navigation items only */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modern-bottom-nav {
        border-top: 2px solid #2d5a4a;
        background: white;
    }
    
    .nav-item.active {
        background: rgba(45, 90, 74, 0.1);
        border: 2px solid #2d5a4a;
    }
    
    /* FAB removed - no border needed */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .nav-item,
    .nav-icon,
    .nav-label,
    .nav-indicator,
    .nav-fab,
    .fab-icon {
        transition: none;
        animation: none;
    }
    
    .nav-item:active {
        transform: none;
    }
    
    /* FAB removed - no transform needed */
}

/* Dark mode support removed - keeping consistent white theme */

/* Toast Notification System */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    max-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    border-left: 4px solid #2d5a4a;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.toast-message {
    font-size: 0.875rem;
    color: #333;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.toast-info {
    border-left-color: #2196F3;
}

.toast-success {
    border-left-color: #4CAF50;
}

.toast-warning {
    border-left-color: #FF9800;
}

.toast-error {
    border-left-color: #f44336;
}

/* Dark mode toast support removed - keeping consistent white theme */ 

.leaflet-bottom {
    bottom: 5%!important;
}