.search-page {
    --search-bg: linear-gradient(180deg, #f4f7fb 0%, #eef3f8 38%, #fbfcfe 100%);
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: rgba(255, 255, 255, 0.98);
    --surface-muted: #eef4fb;
    --ink: #132238;
    --muted: #61748a;
    --line: rgba(19, 34, 56, 0.08);
    --line-strong: rgba(67, 97, 238, 0.2);
    --brand: #1f5eff;
    --brand-deep: #1239a8;
    --accent: #16a085;
    --shadow-lg: 0 30px 70px rgba(15, 34, 74, 0.12);
    --shadow-md: 0 16px 35px rgba(15, 34, 74, 0.08);
    --shadow-sm: 0 10px 24px rgba(15, 34, 74, 0.06);
    background: var(--search-bg);
    color: var(--ink);
    position: relative;
    overflow: hidden;
}

.search-page .container {
    padding-top: 0;
}

.search-page::before,
.search-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
}

.search-page::before {
    width: 32rem;
    height: 32rem;
    background: radial-gradient(circle, rgba(31, 94, 255, 0.12) 0%, rgba(31, 94, 255, 0) 68%);
    top: -8rem;
    right: -10rem;
}

.search-page::after {
    width: 26rem;
    height: 26rem;
    background: radial-gradient(circle, rgba(22, 160, 133, 0.13) 0%, rgba(22, 160, 133, 0) 70%);
    left: -8rem;
    top: 28rem;
}

.search-hero {
    position: relative;
    padding: 1.5rem 0 2rem;
}

.search-hero__backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, rgba(16, 41, 92, 0.94) 0%, rgba(22, 65, 157, 0.9) 46%, rgba(19, 42, 73, 0.86) 100%),
        url("Login.svg") no-repeat right center / 34rem auto;
    border-bottom-left-radius: 42px;
    border-bottom-right-radius: 42px;
}

.search-hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(32rem, 38rem) minmax(18rem, 1fr);
    gap: 2rem;
    align-items: start;
}

.hero-content {
    color: #fff;
    padding: 0.25rem 0 0;
    align-self: start;
}

.hero-content--side {
    width: 100%;
    max-width: 32rem;
    justify-self: start;
    text-align: left;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e9f0ff;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 0 0.75rem;
    max-width: 14ch;
}

.hero-copy {
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 48ch;
    margin: 0 0 1rem;
}

.hero-highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-highlight-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: #f5f8ff;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.search-panel-wrap {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.search-container {
    margin-bottom: 0;
}

.search-panel {
    background: rgba(248, 251, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    box-shadow: 0 26px 50px rgba(5, 18, 42, 0.22);
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.search-panel__header,
.search-panel__body {
    position: relative;
    z-index: 1;
}

.search-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(245, 249, 255, 0.18) 100%),
        linear-gradient(135deg, rgba(31, 94, 255, 0.08) 0%, rgba(22, 160, 133, 0.05) 100%);
    pointer-events: none;
}

.search-panel__header {
    padding: 0.85rem 1.1rem 0;
}

.search-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

.search-panel__body {
    padding: 0.65rem 1.1rem 1rem;
}

.trip-type-shell {
    margin-bottom: 0.65rem;
    display: flex;
    justify-content: flex-start;
}

.trip-type-segment {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 18px;
    background: rgba(231, 238, 251, 0.95);
    border: 1px solid rgba(19, 34, 56, 0.06);
}

.trip-type-segment .btn {
    min-width: 7.25rem;
    color: var(--muted);
    border: none;
    padding: 0.5rem 0.85rem;
}

.trip-type-segment .btn i {
    margin-right: 0.4rem;
}

.trip-type-segment .btn-check:checked + .btn {
    background: #fff;
    color: var(--brand);
    box-shadow: 0 8px 18px rgba(31, 94, 255, 0.14);
}

.form-section-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.65rem;
}

.form-span-3 { grid-column: span 3; }
.form-span-4 { grid-column: span 4; }
.form-span-6 { grid-column: span 6; }
.form-span-12 { grid-column: span 12; }

.search-field,
.passenger-panel,
.multi-city-shell,
.booking-retrieve,
.value-card {
    border-radius: 24px;
}

.search-field,
.passenger-panel,
.multi-city-shell,
.booking-retrieve {
    background: var(--surface-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.search-field {
    padding: 0.4rem 0.75rem 0.35rem;
    position: relative;
    background: #f4f6f9;
    border: 1px solid transparent;
    box-shadow: inset 0 2px 5px rgba(19, 34, 56, 0.04);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.search-field__label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.2rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-field__control {
    position: relative;
}

.search-field__icon {
    position: absolute;
    top: 50%;
    left: 0.15rem;
    transform: translateY(-50%);
    color: var(--brand);
    font-size: 0.95rem;
    pointer-events: none;
}

.search-field .form-control,
.search-field .form-select {
    border: none;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    min-height: 2.6rem;
    height: auto;
    padding: 0.55rem 0.75rem 0.55rem 1.7rem;
    color: var(--ink);
    font-size: 0.95rem;
}

.search-field:focus-within {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.12);
}

.search-field .form-control::placeholder {
    color: #8b9ab0;
    opacity: 1;
}

.search-field .date-input,
.search-field .flatpickr-input,
.multi-city-shell input[type="date"] {
    cursor: pointer;
}

.passenger-panel {
    padding: 0.55rem;
}

.passenger-toggle {
    border: none;
    background: #f6f9fd;
    border-radius: 20px !important;
    padding: 0.65rem 0.9rem !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    font-weight: 700;
}

.passenger-toggle::after {
    margin-left: auto;
}

.passenger-toggle__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.passenger-toggle__meta small {
    color: var(--muted);
    font-weight: 500;
}

.accordion-body.search-accordion-body {
    margin-top: 0.5rem;
    padding: 0.65rem;
    border-radius: 20px;
    background: #fbfdff;
    border: 1px solid var(--line);
}

/* Stepper styles */
.traveler-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem;
    border-radius: 18px;
    background: #f7faff;
    border: 1px solid rgba(19, 34, 56, 0.05);
}

.traveler-counter span {
    display: block;
    font-size: 0.95rem;
}

.stepper-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stepper-btn {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.stepper-btn:hover:not(:disabled) {
    background: var(--surface-muted);
}

.stepper-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stepper-val {
    width: 1.5rem;
    text-align: center;
    font-weight: bold;
    border: none;
    background: transparent;
    font-size: 1rem;
}

.search-submit {
    min-height: 3rem;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
    box-shadow: 0 18px 30px rgba(18, 57, 168, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgba(18, 57, 168, 0.28);
}

.search-submit:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 10px 20px rgba(18, 57, 168, 0.15);
}

.search-submit i {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-submit:hover i {
    transform: scale(1.15) rotate(5deg);
}

.route-wrapper {
    position: relative;
}

.swap-airports-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 34, 74, 0.08);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.swap-airports-btn:hover {
    background: #fdfdfd;
    box-shadow: var(--shadow-md);
    transform: translate(-50%, -50%) scale(1.05);
}

.swap-airports-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.swap-airports-btn i {
    transition: transform 0.4s ease;
}

.multi-city-shell {
    padding: 1rem;
}

.multi-city-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.multi-city-shell__header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.multi-city-shell__header p {
    margin: 0.35rem 0 0;
    color: var(--muted);
}

.multi-city-row {
    padding: 0.8rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(19, 34, 56, 0.05);
}

.multi-city-row + .multi-city-row {
    margin-top: 0.9rem;
}

.multi-city-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 1.25rem;
    flex-wrap: wrap;
}

.segment-count {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    background: #f3f7fc;
    color: var(--muted);
    font-weight: 600;
}

.multi-city-actions .btn {
    border-radius: 999px;
    padding-inline: 1rem;
}

.autocomplete-wrapper {
    position: relative;
}

.custom-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(19, 34, 56, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 34, 74, 0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-dropdown.show {
    display: block;
    animation: fadeIn 0.18s ease-out;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    color: var(--ink);
    transition: background-color 0.18s ease, color 0.18s ease;
}

.dropdown-item + .dropdown-item {
    border-top: 1px solid rgba(19, 34, 56, 0.05);
}

.dropdown-item:hover,
.dropdown-item.active {
    background: rgba(31, 94, 255, 0.08);
    color: var(--brand);
}

.dropdown-item i,
.dropdown-item strong {
    color: var(--brand);
}

.flatpickr-day.from-date-hint {
    background: rgba(31, 94, 255, 0.12);
    border-color: rgba(31, 94, 255, 0.35);
    font-weight: 700;
}

.search-benefits {
    padding: 1.25rem 0 1rem;
}

.section-intro {
    max-width: 54ch;
    margin: 0 0 1.6rem;
}

.section-intro span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-intro h3 {
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 0.55rem;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.value-card {
    height: 100%;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(19, 34, 56, 0.06);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.value-card__icon {
    width: 4.2rem;
    height: 4.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, rgba(31, 94, 255, 0.12) 0%, rgba(22, 160, 133, 0.12) 100%);
    color: var(--brand);
    font-size: 1.35rem;
}

.value-card h4 {
    margin: 0 0 0.7rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.value-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.booking-retrieve {
    padding: 1.4rem;
    margin: 1.25rem 0 4rem;
}

.booking-retrieve__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: center;
}

.booking-retrieve h4 {
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 0.5rem;
}

.booking-retrieve p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.booking-retrieve__form {
    display: flex;
    gap: 0.8rem;
}

.booking-retrieve__form .form-control {
    border: 1px solid rgba(19, 34, 56, 0.08);
    border-radius: 18px;
    min-height: 3.75rem;
    padding-inline: 1rem;
    box-shadow: none;
}

.booking-retrieve__form .btn {
    min-width: 9.5rem;
    border-radius: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1199.98px) {
    .search-hero__grid {
        grid-template-columns: minmax(28rem, 34rem) minmax(16rem, 1fr);
        gap: 1.5rem;
        align-items: start;
    }

    .booking-retrieve__grid {
        grid-template-columns: 1fr;
    }

    .hero-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .search-hero {
        padding-bottom: 3rem;
    }

    .search-hero__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .search-panel-wrap {
        max-width: 600px;
    }

    .hero-content--side {
        justify-self: start;
        max-width: none;
    }

    .search-hero__backdrop {
        background-size: 24rem auto;
    }

    .search-panel__trust,
    .support-strip {
        grid-template-columns: 1fr;
        display: grid;
    }

    .form-span-3,
    .form-span-4,
    .form-span-6 {
        grid-column: span 6;
    }

    .hero-aside {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .search-hero {
        padding: 2rem 0 2.25rem;
    }

    .search-hero__backdrop {
        background-size: 18rem auto;
        background-position: right -3rem top 4rem;
        inset: 0;
        border-bottom-left-radius: 28px;
        border-bottom-right-radius: 28px;
    }

    .hero-copy {
        font-size: 1rem;
    }

    .hero-stat-card {
        grid-template-columns: 1fr;
    }

    .search-panel-wrap {
        margin-top: 1rem;
    }

    .search-panel {
        border-radius: 26px;
    }

    .search-panel__header,
    .search-panel__body,
    .multi-city-shell,
    .booking-retrieve {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .trip-type-shell {
        justify-content: stretch;
    }

    .trip-type-segment {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        border-radius: 20px;
    }

    .trip-type-segment .btn {
        width: 100%;
        min-width: 0;
        padding-inline: 0.2rem;
        font-size: 0.8rem;
    }

    .trip-type-segment .btn i {
        margin-right: 0.25rem;
    }

    .form-grid {
        gap: 0.85rem;
    }

    .form-span-3,
    .form-span-4,
    .form-span-6,
    .form-span-12 {
        grid-column: span 12;
    }

    .booking-retrieve__form {
        grid-template-columns: 1fr;
        display: grid;
    }

    .multi-city-actions,
    .search-panel__header {
        align-items: stretch;
    }

    .swap-airports-btn {
        transform: translate(-50%, -50%) rotate(90deg);
    }
    
    .swap-airports-btn:hover {
        transform: translate(-50%, -50%) rotate(90deg) scale(1.05);
    }
    
    .swap-airports-btn:active {
        transform: translate(-50%, -50%) rotate(90deg) scale(0.95);
    }
}
