/* Canvas 7 Base Variables */
:root {
    --cnvs-themecolor: #1e7e34;
    --cnvs-themecolor-rgb: 30, 126, 52;
    --cnvs-primary-font: 'Inter', sans-serif;
    --cnvs-body-font: 'Inter', sans-serif;
    --cnvs-secondary-font: 'PT Serif', serif;
}

/* Hero Slider Background - Covers Viewport Only */
.hero-slider-section {
    position: relative;
    width: 100%;
    min-height: 0 !important; /* Force zero minimum height */
    max-height: none !important; /* No height restrictions */
    height: auto !important; /* Only content height */
    overflow: visible; /* Changed from hidden to visible to allow scrolling */
    margin-top: -76px; /* Pull up to cover navbar area */
    margin-bottom: 0 !important; /* No bottom margin */
    padding-top: 100px; /* Reduced padding to avoid header overlap */
    padding-bottom: 15px; /* Minimal bottom padding */
    display: block; /* Change from flex to block to eliminate flex spacing */
    align-items: unset; /* Remove flex alignment */
    flex-direction: unset; /* Remove flex direction */
}

.background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Use 100% to match parent height, not viewport height */
    z-index: -1;
}

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

.slide.active {
    opacity: 1;
}

.slide-1 {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('/static/images/vehicles/482023518_1221050956691801_450952480247510902_n.jpg');
    background-position: center center;
    background-size: cover;
}

.slide-2 {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('/static/images/vehicles/caption.jpg');
    background-position: center center;
    background-size: cover;
}

.slide-3 {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('/static/images/vehicles/unnamed.jpg');
    background-position: center center;
    background-size: cover;
}

.slide-4 {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('https://images.pexels.com/photos/5717576/pexels-photo-5717576.jpeg?auto=compress&cs=tinysrgb&w=2070&q=80');
    background-position: center center;
    background-size: cover;
}

/* Navigation Overlay on Slider Background */
.navbar {
    position: relative;
    z-index: 20;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
}

.navbar .navbar-brand:hover,
.navbar .nav-link:hover {
    color: #fff !important;
}

/* Enhanced Booking Form Styling */
.hero-booking-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 900px;
    margin: 0 auto; /* Remove vertical margins to center with flexbox */
    position: relative;
    z-index: 10;
    min-height: auto !important; /* Ensure no minimum height */
    height: auto !important; /* Let height fit content */
}

/* Ensure no extra space in containers and body */
.container-fluid, .row, .col-12 {
    min-height: auto !important;
    height: auto !important;
}

/* Force body and html to not have minimum heights */
html, body {
    min-height: auto !important;
    height: auto !important;
}

/* Ensure no viewport height dependencies */
* {
    box-sizing: border-box;
}

/* Force all sections to be content-based height */
.hero-slider-section, .hero-booking-form, #map-section, #vehicle-selection {
    min-height: 0 !important;
    height: auto !important;
}

/* Make form expandable */
.hero-booking-form {
    transition: all 0.3s ease;
}

.hero-booking-form.expanded {
    max-height: none !important;
    height: auto !important;
}

/* Ensure map section takes NO space when hidden */
#map-section {
    transition: all 0.3s ease;
    overflow: hidden;
}

#map-section[style*="display: none"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
}

#map-section.show {
    display: block !important;
    height: auto !important;
    margin: 20px 0 !important;
    opacity: 1 !important;
}

/* Ensure vehicle selection also takes NO space when hidden */
#vehicle-selection[style*="display: none"],
#hourly-vehicle-selection[style*="display: none"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
}

/* Service Type Tabs */
.service-type-tabs {
    margin-bottom: 30px;
}

.service-type-tabs .nav-tabs {
    border: none;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.service-type-tabs .nav-link {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(30, 126, 52, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    color: #6b7280;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.service-type-tabs .nav-link i {
    font-size: 1.5rem;
}

.service-type-tabs .nav-link:hover {
    background: rgba(30, 126, 52, 0.1);
    border-color: var(--cnvs-themecolor);
    color: var(--cnvs-themecolor);
    transform: translateY(-2px);
}

.service-type-tabs .nav-link.active {
    background: var(--cnvs-themecolor);
    border-color: var(--cnvs-themecolor);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 126, 52, 0.3);
}

.service-type-tabs .nav-link.active:hover {
    background: var(--cnvs-themecolor);
    color: white;
}

/* Tab Content */
.tab-content {
    margin-top: 20px;
}

/* Ensure hidden tab panes don't reserve space */
.tab-pane {
    display: none !important;
}

.tab-pane.show.active {
    display: block !important;
}

/* Excursion specific styling */
.excursion-info {
    font-size: 0.95rem;
    line-height: 1.6;
}

.excursion-info p {
    margin-bottom: 8px;
}

.excursion-info strong {
    color: var(--cnvs-themecolor);
}

.hero-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.hero-form-group {
    position: relative;
}

.hero-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.hero-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.hero-form-control:focus {
    outline: none;
    border-color: var(--cnvs-themecolor);
    box-shadow: 0 0 0 3px rgba(30, 126, 52, 0.1);
}

.hero-form-control.with-icon {
    padding-left: 40px;
}

.location-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cnvs-themecolor);
    font-size: 1rem;
}

/* Luggage Selector */
.luggage-selector {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.luggage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.luggage-icon {
    font-size: 1.5rem;
    color: var(--cnvs-themecolor);
}

.luggage-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 5px;
}

.luggage-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--cnvs-themecolor);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.luggage-btn:hover {
    background: #155724;
    transform: scale(1.1);
}

.luggage-btn.minus {
    background: #dc3545;
}

.luggage-btn.minus:hover {
    background: #c82333;
}

.luggage-count {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 25px;
    text-align: center;
}

.luggage-label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

#children-ages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Vehicle Selection */
.vehicle-selection {
    margin-top: 30px;
}

.vehicle-selection[style*="display: none"] {
    margin: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vehicle-option {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.vehicle-option:hover {
    border-color: var(--cnvs-themecolor);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.vehicle-option.selected {
    border-color: var(--cnvs-themecolor);
    background: rgba(30, 126, 52, 0.05);
}

.vehicle-option.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.vehicle-image {
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.vehicle-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1f2937;
}

.vehicle-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.4;
}

.vehicle-price {
    background: linear-gradient(45deg, var(--cnvs-themecolor), #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.vehicle-features {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Action Buttons */
.hero-search-btn {
    background: linear-gradient(45deg, var(--cnvs-themecolor), #20c997);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 126, 52, 0.3);
}

.hero-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 126, 52, 0.4);
}

.hero-search-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Bootstrap Floating Labels Enhancement - Titles INSIDE Input Area */
.form-floating > .form-control,
.form-floating > .form-select {
    padding-left: 40px !important; /* Make room for icons */
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating > label {
    position: absolute !important;
    top: 50% !important; /* Center vertically INSIDE the input */
    left: 40px !important; /* Next to icon */
    transform: translateY(-50%) !important; /* Perfect vertical center */
    color: #999999 !important;
    font-weight: 400 !important;
    font-size: 0.85rem !important; /* Smaller size inside input */
    line-height: 1 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    z-index: 2 !important;
    background: transparent !important;
    transition: none !important; /* Disable all Bootstrap transitions */
}

/* Keep labels centered INSIDE input regardless of state - Override Bootstrap completely */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label,
.form-floating > .form-control:valid ~ label,
.form-floating > .form-control:invalid ~ label {
    position: absolute !important;
    top: 50% !important; /* Stay centered inside */
    left: 40px !important;
    transform: translateY(-50%) !important; /* Stay centered */
    font-size: 0.85rem !important;
    opacity: 1 !important;
    color: #999999 !important;
    transition: none !important;
    animation: none !important;
}

/* Icon positioning for floating labels */
.location-icon {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    color: var(--cnvs-themecolor) !important;
    font-size: 1.1rem !important;
    pointer-events: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 20px !important;
    width: 20px !important;
}

/* Hide default browser icons for date and time inputs */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    display: none !important;
    -webkit-appearance: none !important;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-inner-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
}

input[type="date"]::-webkit-outer-spin-button,
input[type="time"]::-webkit-outer-spin-button {
    display: none !important;
    -webkit-appearance: none !important;
}

/* Mobile specific floating labels */
@media (max-width: 768px) {
    .form-floating > .form-control,
    .form-floating > .form-select {
        height: calc(3rem + 2px);
        font-size: 1rem;
        padding-left: 35px !important;
        padding-top: 1.3rem !important;
    }

    .form-floating > label {
        top: 50% !important;
        left: 35px !important;
        transform: translateY(-50%) !important;
        font-size: 0.75rem !important;
    }

    .form-floating > .form-control:focus ~ label,
    .form-floating > .form-control:not(:placeholder-shown) ~ label,
    .form-floating > .form-select ~ label,
    .form-floating > .form-control:valid ~ label,
    .form-floating > .form-control:invalid ~ label {
        top: 50% !important;
        left: 35px !important;
        transform: translateY(-50%) !important;
        font-size: 0.75rem !important;
        color: #999999 !important;
        opacity: 1 !important;
    }

    .location-icon {
        left: 12px !important;
        font-size: 1rem !important;
        height: 18px !important;
        width: 18px !important;
    }
}

/* Contact Form */
.contact-form {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.contact-form.active {
    display: block;
}

/* Popular Routes Styling */
.route-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.route-card:hover {
    border-color: var(--cnvs-themecolor);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.route-card.selected {
    border-color: var(--cnvs-themecolor);
    background: rgba(30, 126, 52, 0.05);
}

.route-icon {
    font-size: 2.5rem;
    color: var(--cnvs-themecolor);
    margin-bottom: 15px;
}

.route-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1f2937;
}

.route-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.route-price {
    background: linear-gradient(45deg, var(--cnvs-themecolor), #20c997);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}

.route-details {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 10px;
}

.route-card-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.route-card-bottom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin-top: auto;
    gap: 10px;
}

/* Pexels Image Hover Effects */
.pexels-image {
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: help;
}

.pexels-image:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.excursion-image-container:hover .pexels-image {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Custom tooltip styles */
.tooltip .tooltip-inner {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    max-width: 250px;
}

.tooltip .tooltip-arrow {
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

/* Global fixes for hidden elements taking space */
[style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.vehicle-selection[style*="display: none"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Fix horizontal overflow issues */
    body {
        overflow-x: hidden;
    }

    /* Reduce icon sizes on mobile */
    .bi, i[class*="bi-"] {
        font-size: 14px !important;
    }

    /* Location icons in form fields */
    .location-icon {
        font-size: 12px !important;
    }

    /* Service tab icons */
    .service-type-tabs .nav-link i {
        font-size: 14px !important;
    }

    /* Vehicle feature icons */
    .vehicle-features i {
        font-size: 12px !important;
    }

    /* Button icons */
    .hero-search-btn i {
        font-size: 12px !important;
    }

    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-slider-section {
        /* Use block layout to eliminate extra space */
        display: block !important;
        flex-direction: unset !important;
        padding: 0 !important;
        padding-top: 80px !important; /* Account for fixed navbar height */
        margin-top: -80px !important; /* Pull up more to eliminate white space */
        padding-bottom: 10px !important;
        min-height: auto;
        height: auto;
        width: 100%;
        overflow-x: hidden;
    }

    /* Show slider above form on mobile */
    .background-slider {
        position: relative !important;
        height: 250px !important; /* Expanded height for mobile slider */
        width: 100%;
        order: 1; /* Show first */
        margin-bottom: 15px;
    }

    .background-slider .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        border-radius: 0; /* No rounded edges on mobile */
    }

    .container-fluid {
        order: 2; /* Show after slider */
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .hero-booking-form {
        padding: 15px;
        margin: 0;
        border-radius: 0; /* No rounded edges on mobile */
        background: white; /* Solid white background on mobile */
        backdrop-filter: none;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    /* Stack form fields vertically on mobile */
    .hero-form-row {
        grid-template-columns: 1fr !important;
        gap: 15px;
        margin-bottom: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Form groups must not overflow */
    .hero-form-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    /* Make form controls larger for mobile touch and constrain width */
    .hero-form-control {
        padding: 14px 16px;
        font-size: 16px; /* Prevent iOS zoom */
        border-radius: 10px;
        min-height: 48px; /* Better touch target */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .hero-form-control.with-icon {
        padding-left: 45px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .location-icon {
        left: 15px;
        font-size: 1.1rem;
    }

    /* COMPACT service tabs for mobile */
    .service-type-tabs .nav-link {
        padding: 8px 8px;
        font-size: 0.8rem;
        flex: 1;
        text-align: center;
        min-height: 45px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    .service-type-tabs .nav-link i {
        font-size: 1rem;
        margin-bottom: 0;
        display: inline-block;
    }

    .service-type-tabs .nav-link span {
        display: inline-block;
        font-size: 0.75rem;
        line-height: 1.1;
    }



    /* Make luggage selector mobile-friendly */
    .luggage-selector {
        gap: 15px;
        margin-top: 15px;
        padding: 0 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .luggage-controls {
        padding: 8px;
    }

    .luggage-btn {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
        touch-action: manipulation; /* Improve touch responsiveness */
    }

    .luggage-count {
        font-size: 1rem;
        min-width: 30px;
    }

    /* Improve search button for mobile */
    .hero-search-btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 1rem;
        margin-top: 20px;
        border-radius: 10px;
        min-height: 50px;
        touch-action: manipulation;
    }

    /* Better vehicle card layout on mobile - SIDE BY SIDE */
    .vehicle-card {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 8px;
        touch-action: manipulation;
    }

    .vehicle-grid {
        grid-template-columns: 1fr !important; /* Single column full width on mobile */
        gap: 15px;
    }

    /* Vehicle option cards optimized for mobile - horizontal rows */
    .vehicle-option {
        display: flex !important;
        align-items: center !important;
        padding: 15px !important;
        gap: 15px !important;
        border-radius: 12px !important;
        background: white !important;
        border: 2px solid #e5e7eb !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 80px !important;
    }

    .vehicle-option:hover {
        border-color: var(--cnvs-themecolor) !important;
        background: #f0f9ff !important;
    }

    .vehicle-option.selected {
        border-color: var(--cnvs-themecolor) !important;
        background: rgba(30, 126, 52, 0.1) !important;
    }

    /* Vehicle image styling for mobile row layout */
    .vehicle-option img {
        width: 80px !important;
        height: 60px !important;
        object-fit: contain !important;
        flex-shrink: 0 !important;
    }

    /* Vehicle content area for mobile */
    .vehicle-option .vehicle-content {
        flex: 1 !important;
        text-align: left !important;
    }

    /* Vehicle title and price for mobile rows */
    .vehicle-option .vehicle-name {
        font-size: 1rem !important;
        font-weight: 600 !important;
        margin-bottom: 4px !important;
        color: #1f2937 !important;
    }

    .vehicle-option .vehicle-features {
        font-size: 0.85rem !important;
        color: #6b7280 !important;
        margin-bottom: 8px !important;
    }

    .vehicle-option .vehicle-price {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: var(--cnvs-themecolor) !important;
        white-space: nowrap !important;
    }

    /* Make all grid layouts single column on mobile */
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Specifically target inline grid styles */
    div[style*="grid-template-columns: 1fr 1fr 1fr"],
    div[style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
    }

    /* Route cards full width on mobile */
    .route-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Fleet, excursion and route sections full width on mobile */
    .container[style*="max-width: 80%"] {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Excursion cards full width */
    .excursion-card {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Excursion cards full width on mobile */
    .excursion-card,
    .excursion-item {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Compact vehicle card content for mobile */
    .vehicle-card .vehicle-info {
        text-align: center;
    }

    .vehicle-card .vehicle-name {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .vehicle-card .vehicle-description {
        font-size: 0.7rem;
        line-height: 1.2;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .vehicle-card .vehicle-features {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .vehicle-card .vehicle-price {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--cnvs-themecolor);
    }

    /* Make vehicle image smaller on mobile */
    .vehicle-card img {
        max-width: 60px;
        height: auto;
        margin-bottom: 6px;
    }

    /* Mobile tooltip adjustments */
    .tooltip .tooltip-inner {
        font-size: 12px;
        max-width: 250px;
        padding: 8px 12px;
    }

    /* Optimize contact form for mobile */
    .contact-form .row .col-md-6 {
        margin-bottom: 15px;
    }

    /* Make payment method cards touch-friendly */
    .payment-method-card {
        padding: 12px;
        margin-bottom: 10px;
        min-height: 60px;
        touch-action: manipulation;
    }

    /* Better spacing for mobile */
    .mb-3 {
        margin-bottom: 1rem !important;
    }

    .mt-4 {
        margin-top: 1.25rem !important;
    }

    /* Improve map container for mobile */
    #route-map {
        height: 250px !important;
        border-radius: 8px;
    }
}

/* Extra small devices adjustments - VERY COMPACT */
@media (max-width: 480px) {
    /* Extra constraints for Samsung phones and very small screens */
    body {
        overflow-x: hidden !important;
        width: 100vw;
        max-width: 100vw;
    }

    .container-fluid {
        padding-left: 5px !important;
        padding-right: 5px !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .hero-slider-section {
        /* Use block layout for very small screens too */
        display: block !important;
        flex-direction: unset !important;
        padding: 0;
        padding-top: 80px !important; /* Account for fixed navbar height */
        margin-top: -80px !important; /* Eliminate white space on small screens */
        min-height: auto;
        height: auto;
        width: 100%;
        overflow-x: hidden;
    }

    /* Expanded slider on very small screens */
    .background-slider {
        height: 220px !important;
        margin-bottom: 10px;
    }

    .hero-booking-form {
        padding: 8px !important;
        margin: 0 !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .hero-form-row {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    .hero-form-group {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .hero-form-control {
        padding: 10px 12px !important;
        font-size: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    .hero-form-control.with-icon {
        padding-left: 35px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure labels don't cause overflow */
    .hero-form-group label {
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    /* Fix any textarea or select overflow */
    textarea.hero-form-control,
    select.hero-form-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        resize: vertical;
    }

    /* Override any inline styles that might cause overflow */
    .hero-form-content div[style*="padding"] {
        padding: 8px !important;
        box-sizing: border-box !important;
    }

    /* Specifically target luggage and other complex sections */
    .hero-form-content div[style*="background: #f8f9fa"] {
        padding: 8px !important;
        margin: 8px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Driver service info box */
    div[style*="background: rgba(30, 126, 52, 0.1)"] {
        padding: 10px !important;
        margin: 10px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Payment option boxes */
    div[style*="padding: 15px; border: 2px solid"] {
        padding: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure all flex and grid containers respect mobile constraints */
    div[style*="display: flex"],
    div[style*="display: grid"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Force all child elements to respect container width */
    .hero-booking-form * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Specific fix for any buttons that might overflow */
    .hero-search-btn {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 5px 0 !important;
    }

    /* Reduce spacing around buttons and vehicle selection on mobile */
    .vehicle-selection {
        margin-top: 15px !important;
        margin-bottom: 10px !important;
    }

    /* Specific button container spacing fixes */
    div[style*="text-align: center; margin-top: 20px"] {
        margin-top: 10px !important;
        margin-bottom: 5px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Remove any extra space after the form sections */
    .hero-form-content {
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
    }

    /* Compact the transfer tab content specifically */
    #transfer-content .hero-form-content {
        margin-bottom: 5px !important;
        padding-bottom: 5px !important;
    }

    /* Reduce tab content spacing on mobile */
    .tab-content {
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }

    /* Compact all tab panes */
    .tab-pane {
        padding-top: 0 !important;
        padding-bottom: 5px !important;
        margin-top: 0 !important;
        margin-bottom: 5px !important;
    }

    /* Specifically target the transfer content after the button */
    #transfer-content {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Fix contact form spacing on mobile */
    .contact-form {
        margin-top: 15px !important;
        padding: 15px !important;
    }

    /* When contact form is hidden, make sure it takes no space */
    .contact-form[style*="display: none"],
    .contact-form:not(.active) {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Ensure hidden vehicle sections take no space */
    #vehicle-selection[style*="display: none"],
    #hourly-vehicle-selection[style*="display: none"] {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    .service-type-tabs .nav-link {
        padding: 6px 6px;
        font-size: 0.75rem;
        min-height: 40px;
        gap: 4px;
    }

    .service-type-tabs .nav-link span {
        font-size: 0.7rem;
    }


    .luggage-selector {
        flex-direction: row;
        justify-content: space-around;
        gap: 8px;
        margin-top: 10px;
    }

    .luggage-item {
        flex-direction: column;
        gap: 4px;
        align-items: center;
    }

    .luggage-label {
        font-size: 0.7rem;
    }

    .hero-search-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        margin-top: 15px;
    }

    /* Full width vehicle cards on very small screens */
    .vehicle-grid {
        grid-template-columns: 1fr !important; /* Single column on very small screens */
        gap: 8px;
    }

    .vehicle-card {
        padding: 8px;
        margin-bottom: 6px;
    }

    .vehicle-card .vehicle-name {
        font-size: 0.8rem;
    }

    .vehicle-card .vehicle-description {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
    }

    .vehicle-card .vehicle-features {
        font-size: 0.6rem;
    }

    .vehicle-card img {
        max-width: 50px;
    }
}

/* Allow scrolling when search results are shown */
.hero-slider-section.search-active {
    min-height: auto;
    height: auto;
    overflow: visible;
}

body.search-active {
    overflow-y: auto !important;
}

/* Ensure the booking form and results are scrollable */
.booking-form-expanded {
    max-height: none !important;
    overflow: visible !important;
}
