/* ==========================================
   Homepage Search Bar - Mobile Responsive
   ========================================== */
.search-container {
    background: white;
    padding: 10px 10px 10px 30px;
    border-radius: 100px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
}

.search-form {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-field-wrapper {
    flex: 1;
    padding: 0 20px;
    position: relative;
    min-width: 0;
    /* Prevent flex items from overflowing */
}

.search-field-wrapper:first-child {
    padding-left: 0;
}

.search-field-wrapper.border-left {
    border-left: 1px solid var(--gray-200);
}

.search-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.search-input-group {
    display: flex;
    align-items: center;
}

.search-icon {
    color: var(--primary-400);
    margin-right: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

.search-select {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    font-size: 0.95rem;
    appearance: none;
    /* Hide default arrow */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Custom Select Arrow shim if needed, or let browser handle partials */

.search-btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-left: 10px;
    flex-shrink: 0;
}

/* Mobile & Tablet Optimization */
@media (max-width: 992px) {
    .search-container {
        border-radius: 20px;
        padding: 16px;
        margin: 0 16px;
        background: white;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        /* Slightly stronger shadow for pop effect */
        border: 1px solid rgba(0, 0, 0, 0.05);
        /* Subtle border */
    }

    .search-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Two equal columns */
        gap: 12px;
        width: 100%;
    }

    /* General Field wrapper styling for mobile */
    .search-field-wrapper {
        border: none !important;
        padding: 10px 14px;
        background: var(--gray-50);
        border-radius: 12px;
        margin-bottom: 0;
        width: auto;
        /* Let grid control width */
        min-height: 60px;
        /* Consistent height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        border: 1px solid transparent;
        transition: all 0.2s;
    }

    .search-field-wrapper:focus-within {
        background: white;
        border-color: var(--primary-300);
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
    }

    .search-field-wrapper.border-left {
        border-left: none;
    }

    /* 
       Grid Placement Logic:
       1. Destination: Full Width (Span 2)
       2. Status (Auto flow)
       3. Budget (Auto flow)
       4. Duration: Make it Full Width (Span 2) to fill the gap
       5. Search Button: Full Width (Span 2)
    */

    /* Destination (1st child) */
    .search-field-wrapper:first-child {
        grid-column: 1 / -1;
        /* Span all columns */
    }

    /* Duration (4th filter wrapper) - Child indices: 1=Dest, 2=Status, 3=Budget, 4=Duration */
    .search-field-wrapper:nth-of-type(4) {
        grid-column: 1 / -1;
    }

    .search-label {
        font-size: 0.65rem;
        color: var(--gray-500);
        margin-bottom: 2px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .search-input-group {
        padding: 0;
        background: transparent;
        border-radius: 0;
        display: flex;
        align-items: center;
    }

    .search-icon {
        font-size: 0.85rem;
        color: var(--primary-500);
        margin-right: 8px;
    }

    .search-select {
        font-size: 0.9rem;
        color: var(--gray-900);
        font-weight: 600;
        width: 100%;
        padding-right: 20px;
        /* Space for chevron */
        /* Custom Dropdown Arrow */
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right center;
    }

    .search-select:focus {
        outline: none;
    }

    .search-btn {
        grid-column: 1 / -1;
        /* Full width button */
        width: 100%;
        margin: 4px 0 0 0;
        /* Tiny top margin */
        padding: 14px;
        border-radius: 14px;
        background: var(--primary-600);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        justify-content: center;
        font-size: 1rem;
    }

    .search-btn:active {
        transform: scale(0.98);
        background: var(--primary-700);
    }
}

/* ==========================================
   Destinations Swiper Navigation - Custom
   ========================================== */
.destinations-swiper .swiper-button-next,
.destinations-swiper .swiper-button-prev {
    color: var(--primary-600);
    /* Use theme color instead of default blue */
    background: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.destinations-swiper .swiper-button-next:after,
.destinations-swiper .swiper-button-prev:after {
    font-size: 1.2rem !important;
    /* Force smaller icon size */
    font-weight: 800;
}

.destinations-swiper .swiper-button-next:hover,
.destinations-swiper .swiper-button-prev:hover {
    background: var(--primary-600);
    color: white;
    transform: scale(1.1);
}

/* Mobile Adjustments for Swiper Nav */
@media (max-width: 640px) {

    .destinations-swiper .swiper-button-next,
    .destinations-swiper .swiper-button-prev {
        width: 32px;
        /* Reduce container size */
        height: 32px;
        background: rgba(255, 255, 255, 0.9);
        /* Slightly transparent */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .destinations-swiper .swiper-button-next:after,
    .destinations-swiper .swiper-button-prev:after {
        font-size: 0.8rem !important;
        /* Much smaller arrow icon */
    }

    .destinations-swiper {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .destinations-swiper .swiper-button-prev {
        left: 5px;
    }

    .destinations-swiper .swiper-button-next {
        right: 5px;
    }
}