/* DriveShare Custom Styles - Enhanced with Depth & Iconic Elements */

body {
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    color: #0a0a0a;
    /* overflow-x: hidden; */
}

html {
    overflow-x: clip;
    width: 100%;
}

body {
    overflow-x: clip;
    width: 100%;
    position: relative;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.container {
    max-width: 100%;
}

#cookie-consent {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#cookie-consent.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Ensure the search container doesn't cause overflow on mobile */
@media (max-width: 768px) {
    .search-card {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .search-field {
        width: 100%;
        padding: 16px 20px;
        box-sizing: border-box;
    }

    .search-button {
        width: calc(100% - 24px);
        margin: 12px;
        box-sizing: border-box;
    }
}

/* Error states */
.form-input.border-red-500,
select.border-red-500,
.select2-container .select2-selection.border-red-500 {
    border-color: #ef4444 !important;
}

.form-field-wrapper.has-error .form-label {
    color: #ef4444;
}

.form-field-wrapper.has-error .form-label svg {
    color: #ef4444;
}

.error-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style for the error summary at top */
.bg-red-50 {
    animation: slideDown 0.3s ease-out;
}

.animate-slideIn {
    animation: slideIn 0.3s ease-out;
}

/* Style Select2 to match search bar */
.search-container .select2-container--default .select2-selection--single {
    height: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.search-container .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 14px;
    line-height: 1.5;
    color: #222;
    padding: 0;
}

.search-container .select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-size: 14px;
    color: #717171;
}

.search-container .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container .select2-dropdown {
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
    font-size: 14px;
}

.search-container .select2-results__option {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.search-container .select2-results__option--highlighted {
    background: linear-gradient(135deg, #5B9BD5, #4a8ac4);
    color: white;
}

.select2-selection__clear {
    display: none !important;
}

/* Ensure dropdown appears above other elements */
.select2-dropdown {
    z-index: 1050 !important;
}
.select2-container--open .select2-dropdown--below {
    top: 5px !important;
}

.flatpickr-day.unavailable {
    border-color: #ef4444 !important;
    color: #9ca3af;
}

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

/* Highlight for section with errors */
.form-section.ring-2 {
    transition: ring 0.3s ease;
}

/* Added animated gradient mesh background for hero */
.hero-gradient-mesh {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 150%;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(91, 155, 213, 0.08) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(74, 138, 196, 0.06) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 90%,
            rgba(91, 155, 213, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
    animation: meshFloat 20s ease-in-out infinite;
}

@keyframes meshFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* Enhanced header with glassmorphism effect */
header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

header nav a {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;

    font-weight: 500;
    letter-spacing: 0.3px;

    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

header nav a:hover {
    background: rgba(91, 155, 213, 0.08);
    color: #5b9bd5;
}

header nav a.active {
    background: linear-gradient(135deg, #5b9bd5, #4a8ac4);
    color: white;
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.3);
}

header button:not(.bg-primary) {
    border-radius: 999px;
    padding: 8px 16px;
    transition: all 0.25s ease;
}

header button:not(.bg-primary):hover {
    background: rgba(0, 0, 0, 0.04);
}

header .bg-primary {
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.35);
}

header .bg-primary:hover {
    transform: translateY(-1px);
}

@keyframes subtle-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%; /* enough to see subtle motion */
    animation: subtle-gradient-shift 6s ease infinite; /* slower, subtle movement */
}

/* Floating search card with elevated shadow */
.search-container {
    position: relative;
    z-index: 10;
}

.search-card {
    background: white;
    border-radius: 50px;
    box-shadow:
        0 10px 40px rgba(91, 155, 213, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    /* Smoothed animation from 0.2s to 0.4s with ease timing */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    border: 1px solid rgba(91, 155, 213, 0.1);
    transform: translateY(0);
}

.search-card:hover {
    /* transform: translateY(-4px); */
    box-shadow:
        0 20px 60px rgba(91, 155, 213, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.12);
}

.search-field {
    position: relative;
    padding: 14px 24px;
    cursor: pointer;
    /* Smoothed transition to 0.3s */
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-field:hover {
    background-color: rgba(91, 155, 213, 0.04);
    border-radius: 50px;
}

.search-field.active {
    background-color: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    z-index: 10;
}

.search-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 2px;
    display: block;
}

.search-field-input {
    font-size: 14px;
    color: #717171;
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    padding: 0;
    text-align: center;
}

.search-field-input:focus {
    color: #222222;
}

.search-field-input::placeholder {
    color: #717171;
}

.search-divider {
    width: 1px;
    height: 32px;
    background-color: #dddddd;
    align-self: center;
}

/* Enhanced search button with glow effect */
.search-button {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    color: white;
    border-radius: 50px;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 6px 8px 6px 0;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.4);
}

.search-button-icon {
    width: 16px;
    height: 16px;
}

/* Dropdown for search fields */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 1000;
    display: none;
}

.search-dropdown.active {
    display: block;
}

/* Flatpickr custom styles for date picker */
.flatpickr-calendar {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(91, 155, 213, 0.1) !important;
    border-radius: 1rem !important;
}

.flatpickr-day.selected {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%) !important;
    border-color: #5b9bd5 !important;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3) !important;
}

.flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #4a8ac4 0%, #3979b3 100%) !important;
    border-color: #4a8ac4 !important;
}

.flatpickr-day:hover {
    background: rgba(91, 155, 213, 0.08) !important;
    border-color: rgba(91, 155, 213, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-card {
        border-radius: 1.5rem;
        flex-direction: column !important;
    }

    .search-field {
        padding: 16px 20px;
        border-radius: 0.75rem !important;
    }

    .search-field:not(:last-child) {
        border-bottom: 1px solid #ebebeb;
    }

    .search-divider {
        display: none;
    }

    .search-button {
        width: calc(100% - 24px);
        justify-content: center;
        margin: 12px;
        height: 52px;
    }

    .how-it-works-step,
    .value-prop-card {
        margin-bottom: 1rem;
    }

    .cta-gradient-box {
        padding: 3rem 2rem;
    }
}

/* Iconic value props with smoother depth - increased transition to 0.5s */
.value-prop-card {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 1.5rem;
    border-radius: 1rem;
    position: relative;
}

.value-prop-card:hover {
    transform: translateY(-8px);
    background: white;
    box-shadow: 0 12px 32px rgba(91, 155, 213, 0.15);
}

.value-prop-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(
        135deg,
        rgba(91, 155, 213, 0.1) 0%,
        rgba(74, 138, 196, 0.05) 100%
    );
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    /* Smoothed transition to 0.4s */
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.08);
}

.value-prop-card:hover .value-prop-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.25);
}

.value-prop-card:hover .value-prop-icon svg {
    color: white !important;
}

/* Enhanced vehicle cards with smoother overlay and depth - increased to 0.6s */
.vehicle-card {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.vehicle-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(91, 155, 213, 0.03) 0%,
        transparent 50%
    );
    opacity: 0;
    /* Smoothed to 0.6s */
    transition: opacity 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.vehicle-card:hover::before {
    opacity: 1;
}

.vehicle-card:hover {
    cursor: pointer;
    transform: translateY(-12px);
    box-shadow:
        0 20px 48px rgba(91, 155, 213, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(91, 155, 213, 0.2) !important;
}

.vehicle-image {
    /* Smoothed to 0.8s for fluid zoom */
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.vehicle-card:hover .vehicle-image {
    transform: scale(1.08);
}

/* Added image overlay gradient */
.vehicle-image-container {
    position: relative;
    overflow: hidden;
}

.vehicle-image-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.4) 0%,
        transparent 100%
    );
    opacity: 0;
    /* Smoothed to 0.6s */
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.vehicle-discount {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    color: rgb(22 163 74); /* soft green */

    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.15),
        rgba(22, 163, 74, 0.1)
    );

    border: 1px solid rgba(22, 163, 74, 0.25);
    backdrop-filter: blur(8px);

    letter-spacing: 0.3px;
    white-space: nowrap;
}

.vehicle-discount.muted {
    color: #6b7280;
    background: rgba(0, 0, 0, 0.04);
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.vehicle-card:hover .vehicle-image-container::after {
    opacity: 1;
}

.vehicle-category {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    border-radius: 999px;
    color: white;

    backdrop-filter: blur(14px) saturate(160%);
    background: rgba(0, 0, 0, 0.35);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0.85;

    z-index: 3;
    pointer-events: none;

    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vehicle-card:hover .vehicle-category {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.vehicle-category.luxury {
    background: linear-gradient(
        135deg,
        rgba(91, 155, 213, 0.55),
        rgba(74, 138, 196, 0.45)
    );
}

.vehicle-category.comfort {
    background: linear-gradient(
        135deg,
        rgba(120, 200, 160, 0.55),
        rgba(90, 170, 140, 0.45)
    );
}

.vehicle-category.electric {
    background: linear-gradient(
        135deg,
        rgba(100, 220, 180, 0.55),
        rgba(60, 190, 150, 0.45)
    );
}

.vehicle-category.economy {
    background: linear-gradient(
        135deg,
        rgba(160, 160, 160, 0.55),
        rgba(120, 120, 120, 0.45)
    );
}

.vehicle-category.basic {
    background: linear-gradient(
        135deg,
        rgba(140, 140, 150, 0.45),
        rgba(110, 110, 120, 0.35)
    );
}

/* Enhanced buttons with depth */
.btn-primary-elevated {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary-elevated-2 {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .7rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.22);
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    font-weight: 600;
    transition: .25s ease;
}

.btn-primary-elevated::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition:
        width 0.6s,
        height 0.6s;
}

.btn-primary-elevated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-elevated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.35);
}

.btn-secondary-elevated {
    padding: 14px 36px;
    border-radius: 14px;

    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.8px;

    color: var(--primary);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.35)
    );

    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px) saturate(160%);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);

    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-secondary-elevated:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-secondary-elevated:active {
    transform: translateY(0);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* How it works section with smoother elevated cards - increased to 0.6s */
.how-it-works-step {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 2rem;
    border-radius: 1.5rem;
    position: relative;
}

.how-it-works-step:hover {
    transform: translateY(-12px);
    background: white;
    box-shadow: 0 16px 48px rgba(91, 155, 213, 0.12);
}

.step-icon-wrapper {
    width: 88px;
    height: 88px;
    background: linear-gradient(
        135deg,
        rgba(91, 155, 213, 0.12) 0%,
        rgba(74, 138, 196, 0.08) 100%
    );
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    /* Smoothed to 0.5s */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.1);
    position: relative;
}

.step-icon-wrapper::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5b9bd5, #4a8ac4);
    opacity: 0;
    z-index: -1;
    /* Smoothed to 0.5s */
    transition: opacity 0.5s ease;
}

.how-it-works-step:hover .step-icon-wrapper {
    transform: scale(1.15) rotate(8deg);
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    box-shadow: 0 12px 36px rgba(91, 155, 213, 0.3);
}

.how-it-works-step:hover .step-icon-wrapper::after {
    opacity: 0.2;
}

.how-it-works-step:hover .step-icon-wrapper svg {
    color: white !important;
}

/* CTA section with gradient and depth */
.cta-gradient-box {
    background: linear-gradient(
        135deg,
        rgba(91, 155, 213, 0.12) 0%,
        rgba(74, 138, 196, 0.08) 50%,
        rgba(91, 155, 213, 0.05) 100%
    );
    border-radius: 2rem;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(91, 155, 213, 0.1);
    border: 1px solid rgba(91, 155, 213, 0.15);
}

.cta-gradient-box::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(91, 155, 213, 0.15) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

.cta-gradient-box::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(74, 138, 196, 0.1) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

/* Animated scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Language dropdown enhancements */
.lang-dropdown {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid rgba(91, 155, 213, 0.15);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 140px;
    z-index: 1000;
    overflow: hidden;
}

.lang-menu a {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.lang-menu a:hover {
    background-color: rgba(91, 155, 213, 0.08);
    color: #5b9bd5;
}

.lang-menu a.active {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    color: white;
}

.btn-danger-elevated {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 600;
}

.btn-danger-elevated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
}
