/**
 * diRENT Car Rental - Homepage Custom Styles
 */

/* Modernized vehicle slider layout */
.vehicles-slider-wrapper {
    position: relative;
    margin-top: 40px;
    padding: 0 55px;
}

.vehicles-slider-container {
    overflow: hidden;
    width: 100%;
    border-radius: 20px;
}

.vehicles-grid-figma {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    width: 100%;
}

.vehicles-grid-figma .vehicle-card-figma {
    flex: 0 0 calc((100% - 60px) / 3) !important;
    width: calc((100% - 60px) / 3) !important;
    min-width: calc((100% - 60px) / 3) !important;
    max-width: calc((100% - 60px) / 3) !important;
    box-sizing: border-box;
    background: rgba(10, 34, 51, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-md);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 991px) {
    .vehicles-slider-wrapper {
        padding: 0 45px;
    }
    .vehicles-grid-figma .vehicle-card-figma {
        flex: 0 0 calc((100% - 30px) / 2) !important;
        width: calc((100% - 30px) / 2) !important;
        min-width: calc((100% - 30px) / 2) !important;
        max-width: calc((100% - 30px) / 2) !important;
    }
}

@media (max-width: 767px) {
    .vehicles-slider-wrapper {
        padding: 0 35px;
    }
    .vehicles-grid-figma .vehicle-card-figma {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

.slider-arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1.5px solid rgba(10, 34, 51, 0.15);
    color: var(--primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 20;
    transition: all 0.2s ease;
}

.slider-arrow-btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow-btn.prev-btn {
    left: 0px;
}

.slider-arrow-btn.next-btn {
    right: 0px;
}

@media (max-width: 767px) {
    .slider-arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* SEARCH WIDGET FLOATING BAR FIXES */
input[type="hidden"],
.search-widget-figma input[type="hidden"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* CUSTOM LOCATION SELECTOR STYLING */
.custom-select-wrapper {
    position: relative !important;
    width: 100% !important;
}

.custom-select-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    height: 28px !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    width: 100% !important;
    user-select: none !important;
}

.custom-select-trigger .custom-select-value {
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.custom-select-trigger .custom-select-value.placeholder-text {
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.custom-select-trigger .select-chevron {
    font-size: 11px !important;
    color: #94a3b8 !important;
    transition: transform 0.2s ease !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
}

.custom-select-wrapper.open .select-chevron {
    transform: rotate(180deg) !important;
    color: var(--accent, #ea5b0c) !important;
}

.custom-select-options {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 14px) !important;
    left: -16px !important;
    min-width: 270px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 10px 20px -5px rgba(15, 23, 42, 0.08) !important;
    padding: 8px !important;
    z-index: 999999 !important;
}

.custom-select-wrapper.open .custom-select-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.custom-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.custom-option:hover {
    background: rgba(234, 91, 12, 0.08) !important;
    color: var(--accent, #ea5b0c) !important;
}

.custom-option.selected {
    background: rgba(234, 91, 12, 0.12) !important;
    color: var(--accent, #ea5b0c) !important;
    font-weight: 800 !important;
}

.floating-search-box {
    position: relative !important;
    z-index: 999 !important;
    overflow: visible !important;
}

.search-widget-figma {
    background: #ffffff !important;
    border-radius: 80px !important;
    padding: 12px 16px 12px 28px !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    border: 1.5px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    position: relative !important;
    z-index: 9999 !important;
    overflow: visible !important;
}

.search-widget-figma .search-field {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    flex: 1 !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.search-widget-figma .search-field-date-range {
    flex: 1.8 !important;
    min-width: 290px !important;
}

.search-widget-figma .search-field i {
    color: var(--accent, #ea5b0c) !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.search-widget-figma .field-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: visible !important;
}

.search-widget-figma .field-info label {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.search-widget-figma .field-info select,
.search-widget-figma .field-info input#dateRangePickerInput {
    border: none !important;
    background: transparent !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    outline: none !important;
    width: 100% !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

.search-widget-figma .search-divider {
    width: 1px !important;
    height: 40px !important;
    background-color: #cbd5e1 !important;
    flex-shrink: 0 !important;
}

.search-btn-circle {
    background: linear-gradient(135deg, #ea5b0c 0%, #c2410c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 60px !important;
    height: 52px !important;
    padding: 0 32px !important;
    font-weight: 800 !important;
    font-size: 14.5px !important;
    font-family: 'Outfit', 'Inter', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 10px 22px rgba(234, 91, 12, 0.3) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

@media (max-width: 991px) {
    .search-widget-figma {
        flex-direction: column !important;
        border-radius: 24px !important;
        padding: 24px !important;
        gap: 18px !important;
    }
    .search-widget-figma .search-field,
    .search-widget-figma .search-field-date-range {
        width: 100% !important;
        flex: none !important;
        min-width: 0 !important;
    }
    .search-widget-figma .search-divider {
        display: none !important;
    }
    .search-btn-circle {
        width: 100% !important;
        justify-content: center !important;
    }
}

.search-widget-figma .search-field.field-error-highlight {
    background-color: #fef2f2 !important;
    border-radius: 40px !important;
    padding: 8px 16px !important;
    margin: -8px -12px !important;
    box-shadow: inset 0 0 0 2px #ef4444, 0 0 12px rgba(239, 68, 68, 0.15) !important;
    animation: shakeField 0.4s ease-in-out !important;
}

.search-widget-figma .search-field.field-error-highlight i {
    color: #ef4444 !important;
}

.search-widget-figma .search-field.field-error-highlight .custom-select-value {
    color: #b91c1c !important;
}

@keyframes shakeField {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.validation-toast-capsule {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #0f172a;
    border: 1.5px solid #ea5b0c;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999999;
}

.validation-toast-capsule.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.validation-toast-capsule i.toast-icon {
    color: #ea5b0c;
    font-size: 18px;
}

/* ==========================================================================
   SECTION: COMMENT ÇA MARCHE ? (HOW IT WORKS)
   ========================================================================== */
.how-it-works-section {
    font-family: 'Inter', sans-serif !important;
    padding: 75px 0 !important;
    color: #0f172a !important;
    background: #fffdf7 !important;
}

.how-it-works-header {
    text-align: center !important;
    margin-bottom: 50px !important;
}

.how-it-works-title {
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 38px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #0f172a !important;
    margin: 0 0 10px 0 !important;
}

.how-it-works-title span {
    color: var(--accent, #ea5b0c) !important;
}

.how-it-works-subtitle {
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    margin: 8px auto 0 auto !important;
    max-width: 650px !important;
    line-height: 1.5 !important;
}

.how-it-works-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    gap: 24px !important;
}

.how-it-works-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 36px 24px !important;
    text-align: center !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.how-it-works-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1) !important;
}

.how-it-works-number {
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    background: var(--accent, #ea5b0c) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 20px rgba(234, 91, 12, 0.3) !important;
    margin-bottom: 22px !important;
    flex-shrink: 0 !important;
}

.how-it-works-card-title {
    font-family: 'Outfit', 'Inter', sans-serif !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    color: #0f172a !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.4px !important;
}

.how-it-works-card-text {
    font-family: 'Inter', sans-serif !important;
    color: #64748b !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .how-it-works-section {
        padding: 50px 0 !important;
    }
    .how-it-works-title {
        font-size: 28px !important;
    }
    .how-it-works-subtitle {
        font-size: 13.5px !important;
    }
    .how-it-works-card {
        padding: 28px 20px !important;
    }
}
