/* === FlightPadi Modern Redesign - 2024 === */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Root Variables --- */
:root {
    --primary-color: #4A90E2; /* A slightly softer, more modern blue */
    --secondary-color: #50E3C2; /* A vibrant mint for accents */
    --text-dark: #333333;
    --text-light: #6c757d;
    --background-light: #F8F9FA;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Force hide mobile filter bar on desktop */
@media (min-width: 1024px) {
    .mobile-filter-bar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* --- Base & Typography --- */
body {
    font-family: var(--font-primary);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.7;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; } /* 40px */
h2 { font-size: 2rem; }   /* 32px */
h3 { font-size: 1.5rem; } /* 24px */

/* --- Header --- */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.btn {
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(80, 227, 194, 0.08));
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%234A90E2" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%2350E3C2" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%234A90E2" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%2350E3C2" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 1;
}

/* --- Modern Search Bar Styles --- */
.search-section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #010B52;
    margin-bottom: 1.5rem;
}

.search-bar-modern {
    background: #fff;
    border-radius: 48px;
    box-shadow: 0 8px 32px rgba(20,117,194,0.10), 0 1.5px 6px rgba(1,11,82,0.08);
    padding: 2.5rem 2rem 2rem 2rem;
    max-width: 1100px;
    margin: 0 auto 2.5rem auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.trip-type-selector {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.trip-type-toggle-modern {
    display: flex;
    justify-content: center;
    margin-bottom: 2.2rem;
}

.trip-type-toggle-modern > div {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(20, 117, 194, 0.1), 0 2px 8px rgba(1, 11, 82, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
}

.trip-type-pill {
    border: none;
    outline: none;
    background: transparent;
    color: #1475C2;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.trip-type-pill svg {
    transition: transform 0.3s ease;
}

.trip-type-pill:hover {
    color: #010B52;
    transform: translateY(-1px);
}

.trip-type-pill:hover svg {
    transform: scale(1.1);
}

.trip-type-pill.active {
    color: #fff;
    position: relative;
}

.trip-type-pill.active .absolute {
    opacity: 1;
}

.trip-type-pill.active svg {
    transform: scale(1.1);
}

.search-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-fields-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

.search-field {
    background: #F8F9FA;
    border-radius: 24px;
    padding: 1rem 1.25rem 0.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1 1 0;
    position: relative;
}

.search-field label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1475C2;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input, .date-input, .select-input {
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: #010B52;
    padding: 0.5rem 0 0.5rem 0;
    outline: none;
    border-bottom: 2px solid #e0e7ef;
    border-radius: 0;
    transition: border-color 0.2s;
}

.search-input:focus, .date-input:focus, .select-input:focus {
    border-color: #1475C2;
}

.swap-btn {
    background: linear-gradient(135deg, #1475C2 0%, #010B52 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 0.5rem;
    box-shadow: 0 2px 8px rgba(20,117,194,0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    position: relative;
    top: 18px;
}

.swap-btn:hover {
    background: linear-gradient(135deg, #010B52 0%, #1475C2 100%);
    box-shadow: 0 4px 16px rgba(20,117,194,0.18);
}

.pax-field, .class-field {
    min-width: 140px;
    max-width: 180px;
}

.passenger-control {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    border: 1.5px solid #e0e7ef;
    overflow: hidden;
    margin-top: 0.25rem;
}

.passenger-btn {
    background: none;
    border: none;
    color: #1475C2;
    font-size: 1.2rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.passenger-btn:hover {
    background: #1475C2;
    color: #fff;
}

.passenger-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: #010B52;
}

.btn-search-modern {
    width: 100%;
    padding: 1.1rem 0;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-radius: 32px;
    background: linear-gradient(90deg, #1475C2 0%, #010B52 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(20,117,194,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-search-modern:hover {
    background: linear-gradient(90deg, #010B52 0%, #1475C2 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(20,117,194,0.22);
}

@media (max-width: 900px) {
    .search-bar-modern {
        padding: 1.5rem 0.5rem 1.5rem 0.5rem;
    }
    .search-fields-row {
        flex-direction: column;
        gap: 1rem;
    }
    .search-field, .pax-field, .class-field {
        min-width: 100%;
        max-width: 100%;
    }
    .swap-btn {
        margin: 0.5rem auto;
        top: 0;
    }
}

@media (max-width: 600px) {
    .search-section-title {
        font-size: 1.3rem;
    }
    .search-bar-modern {
        border-radius: 24px;
        padding: 1rem 0.25rem 1rem 0.25rem;
    }
    .btn-search-modern {
        font-size: 1rem;
        padding: 0.8rem 0;
    }
}

/* Bold selected airport codes */
.search-input::placeholder {
    color: #b0b8c1;
    font-weight: 400;
}

.search-input.selected {
    color: #1475C2;
    font-weight: 700;
}

/* Enhanced Search Button */
.search-button-container {
    margin-top: 1rem;
}

.btn-search {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), #3a7ac8);
    color: var(--white);
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

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

.btn-search:hover {
    background: linear-gradient(135deg, #3a7ac8, var(--primary-color));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

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

.btn-search:active {
    transform: translateY(0);
}

/* Enhanced More Options Toggle */
.more-options-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.more-options-toggle:hover {
    color: #3a7ac8;
    transform: translateX(5px);
}

.more-options-toggle::after {
    content: '▼';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.more-options-toggle.active::after {
    transform: rotate(180deg);
}

/* Enhanced Advanced Options */
#advanced-options {
    padding: 2rem;
    border-top: 2px solid var(--border-color);
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.02), rgba(80, 227, 194, 0.02));
    border-radius: var(--border-radius-sm);
    animation: slideDown 0.3s ease-out;
}

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

/* Enhanced Passenger Controls */
.passenger-control {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    overflow: hidden;
    transition: all 0.3s ease;
}

.passenger-control:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
}

.passenger-btn {
    background: var(--background-light);
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
    min-width: 48px;
}

.passenger-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.passenger-btn:active {
    transform: scale(0.95);
}

.passenger-input {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--white);
    -moz-appearance: textfield;
    padding: 12px 8px;
}

.passenger-input::-webkit-outer-spin-button,
.passenger-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Enhanced Airport Results - Fixed for better UX */
.airport-results-container {
    position: absolute;
    width: 100%;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    animation: slideDown 0.2s ease-out;
    top: 100%;
    left: 0;
    right: 0;
}

.airport-result-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.airport-result-item:last-child {
    border-bottom: none;
}

.airport-result-item:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(80, 227, 194, 0.05));
    transform: translateX(3px);
}

.airport-result-item .airport-name {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.airport-result-item .airport-location {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Enhanced Error States */
.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-error::before {
    content: '⚠';
    font-size: 1rem;
}

.input-with-icon input.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.15);
}

/* Enhanced Loading States */
.loading-indicator {
    text-align: center;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.spinner {
    border: 4px solid rgba(20, 117, 194, 0.1);
    border-left: 4px solid #1475C2;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Grid Layouts */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.col-md-6 {
    grid-column: span 6;
}

.col-md-4 {
    grid-column: span 4;
}

/* Enhanced Form Validation */
.search-form .form-group.error label {
    color: #e74c3c;
}

.search-form .form-group.error .input-with-icon i {
    color: #e74c3c;
}

/* Enhanced Responsive Design */
@media (max-width: 992px) {
    .search-container {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .col-md-6, .col-md-4 {
        grid-column: span 12;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .search-container {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-search {
        padding: 16px 20px;
        font-size: 1rem;
    }
    
    #advanced-options {
        padding: 1.5rem;
    }
}

/* Enhanced Focus States for Accessibility */
.search-input:focus-visible,
.date-input:focus-visible,
.select-input:focus-visible,
.passenger-btn:focus-visible,
.btn-search:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced Hover Effects */
.search-form .form-group:hover label {
    color: var(--primary-color);
}

.search-form .form-group:hover .input-with-icon i {
    color: var(--primary-color);
}

/* Enhanced Success States */
.search-form .form-group.success .input-with-icon {
    border-color: var(--secondary-color);
}

.search-form .form-group.success .input-with-icon i {
    color: var(--secondary-color);
}

/* --- "Why Us?" Section --- */
.why-us-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: inline-block;
    background: linear-gradient(to right, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* --- Popular Destinations Section --- */
.destinations-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.destination-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.destination-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.08);
}

.destination-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.destination-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 3rem 1.5rem 1.5rem;
    color: var(--white);
}

.destination-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

/* --- Footer --- */
.site-footer {
    background-color: #2c3e50;
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    text-decoration: none;
    color: #bdc3c7;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: #95a5a6;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-form .form-row { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .hero { padding: 80px 0; }
    .main-nav { height: 70px; }
    .nav-links { display: none; } /* Basic mobile: hide links, needs hamburger */
    .footer-content { grid-template-columns: 1fr; text-align: center; }
}

/* Remove old styles that might conflict */
/* Keep .airport-results-container for JS compatibility */
/* REMOVED: Duplicate airport-results-container styles that were conflicting */

.field-error { color: #e74c3c; font-size: 0.8em; margin-top: 4px; }
.input-with-icon input.invalid { border-color: #e74c3c; }

.loading-indicator { text-align: center; padding: 40px; }

/* Retain passenger number input styles, but simplified */
.number-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}
.number-input button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
}
.number-input input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    -moz-appearance: textfield;
}
.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
    .combined-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}
.passengers-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
#advanced-options {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1.5rem;
}
.more-options-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

/* Advanced Options (More Options) Section */
.advanced-options-enhanced {
  background: #f6faff;
  border: 1.5px solid #e0e8f3;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(20,117,194,0.06);
  margin-top: 1.5rem;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  transition: box-shadow 0.2s;
}
.advanced-row {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}
.advanced-row .search-field {
  min-width: 180px;
}
.advanced-row label {
  font-weight: 500;
  color: #1475C2;
  margin-bottom: 0.4rem;
}
.advanced-row .passenger-control {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e0e8f3;
  box-shadow: 0 1px 4px rgba(20,117,194,0.04);
  padding: 0.2rem 0.7rem;
}
/* Hide return date field when One Way is active (handled by JS, but for smoothness) */
#return-date-group[style*='display: none'] {
  display: none !important;
}

/* Clean Modern Flight Search Card Styles */
.flight-search-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(20,117,194,0.10), 0 1.5px 6px rgba(1,11,82,0.08);
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.trip-type-toggle-modern {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  margin-bottom: 2.2rem;
}
.trip-type-pill {
  border: none;
  outline: none;
  background: #f3f7fa;
  color: #1475C2;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 999px;
  padding: 0.7rem 2.2rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.trip-type-pill.active {
  background: linear-gradient(90deg, #1475C2 0%, #010B52 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20,117,194,0.10);
}
.fields-row {
  display: flex;
  gap: 1.2rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 180px;
  flex: 1 1 0;
  position: relative;
}
/* Specific field width adjustments */
.field-group:has(#from),
.field-group:has(#to) {
  min-width: 200px;
  flex: 2 1 0;
}

.field-group:has(#departure-date),
.field-group:has(#return-date) {
  min-width: 180px;
  flex: 1.5 1 0;
}

.field-group label {
  font-size: 0.98rem;
  color: #010B52;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.field-group label > div {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.field-group label:hover > div {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.field-group label svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.input-modern {
  border: none;
  background: #f3f7fa;
  border-radius: 0.3rem;
  padding: 0.7rem 1.1rem;
  font-size: 1.08rem;
  color: #010B52;
  font-weight: 200;
  box-shadow: 0 1px 4px rgba(20,117,194,0.04);
  transition: box-shadow 0.18s, background 0.18s;
  width: 100%;
}
.input-modern:focus {
  outline: none;
  background: #eaf3fb;
  box-shadow: 0 0 0 2px #1475C233;
}
.swap-btn-simple {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-self: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}
.swap-btn-simple:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.1);
}
.swap-btn-simple:active {
  transform: scale(0.95);
}
.more-options-toggle-modern {
  background: none;
  border: none;
  color: #1475C2;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 1.1rem;
  margin-left: 0.1rem;
  padding: 12px 16px;
  border-radius: 0.3rem;
  transition: all 0.3s ease;
  background: rgba(20, 117, 194, 0.05);
  border: 1px solid rgba(20, 117, 194, 0.1);
}
.more-options-toggle-modern:hover {
  background: rgba(20, 117, 194, 0.1);
  border-color: rgba(20, 117, 194, 0.2);
  transform: translateY(-1px);
}
.more-options-toggle-modern.active {
  background: rgba(20, 117, 194, 0.15);
  border-color: rgba(20, 117, 194, 0.3);
}
.more-options-toggle-modern.active svg:last-child {
  transform: rotate(180deg);
}
.advanced-options-modern {
  background: rgba(248, 251, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(224, 232, 243, 0.8);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(20, 117, 194, 0.08);
  margin-bottom: 1.5rem;
  padding: 1.8rem 1.8rem 1.2rem 1.8rem;
  animation: slideDown 0.3s ease-out;
}
.advanced-fields-row {
  display: flex;
  gap: 2.5rem;
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.info-box-modern {
  background: linear-gradient(135deg, rgba(234, 243, 251, 0.9), rgba(224, 232, 243, 0.9));
  backdrop-filter: blur(8px);
  color: #1475C2;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  margin-top: 1.2rem;
  border: 1px solid rgba(20, 117, 194, 0.1);
}
.btn-search-modern-full {
  width: 100%;
  background: linear-gradient(135deg, #1475C2 0%, #010B52 100%);
  color: #fff;
  font-size: 1.18rem;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  padding: 1.2rem 0;
  margin-top: 1.5rem;
  box-shadow: 0 4px 20px rgba(20, 117, 194, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-search-modern-full::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}
.btn-search-modern-full:hover::before {
  left: 100%;
}
.btn-search-modern-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(20, 117, 194, 0.25);
}
.btn-search-modern-full:active {
  transform: translateY(0);
}
/* Fix preloader centering for desktop */
.loading-indicator {
  text-align: center;
  padding: 40px;
  display: flex;
    flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.spinner {
  border: 4px solid rgba(20, 117, 194, 0.1);
  border-left: 4px solid #1475C2;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Modern Search Summary Card */
.search-summary-card-modern {
  background: #fff;
  box-shadow: 0 8px 32px rgba(20,117,194,0.10), 0 1.5px 6px rgba(1,11,82,0.08);
  border-radius: 32px;
  padding: 2.2rem 2.2rem 1.5rem 2.2rem;
  margin: 2.5rem auto 1.5rem auto;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2.2rem;
}
.summary-route {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-grow: 1;
}
.summary-route .fs-4 {
  font-size: 1.5rem !important;
}
.summary-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.summary-actions {
  margin-left: auto;
}
/* Filter Bar */
.results-filter-bar {
  background: #f8fbff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(20,117,194,0.06);
  padding: 1.1rem 1.5rem;
  margin-bottom: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
}
.filter-label {
  font-size: 1.05rem;
  color: #1475C2;
  font-weight: 600;
}
.filter-pill {
  border: none;
  outline: none;
  background: #eaf3fb;
  color: #1475C2;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  margin-right: 0.2rem;
}
.filter-pill.active, .filter-pill:focus {
  background: linear-gradient(90deg, #1475C2 0%, #010B52 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(20,117,194,0.10);
}
.filter-dropdown {
  border: 1.5px solid #e0e8f3;
  border-radius: 12px;
  background: #fff;
  color: #1475C2;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 1.2rem;
  min-width: 180px;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
}
@media (max-width: 900px) {
  .search-summary-card-modern {
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.2rem 0.7rem 1.2rem 0.7rem;
  }
  .results-filter-bar {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 0.7rem;
  }
}

/* Mobile Layout Stacking */
@media (max-width: 768px) {
    .fields-row {
        flex-direction: column;
        gap: 0rem;
    }
    
    .field-group {
        width: 100%;
        min-width: auto;
        flex: none;
    }
    
    /* Stack origin and destination with swap button in between */
    .field-group:nth-child(1) {
        order: 1; /* From field */
    }
    
    .swap-btn-simple {
        order: 2; /* Swap button after From */
        align-self: center;
        margin: 0.5rem 0;
    }
    
    .field-group:nth-child(3) {
        order: 3; /* To field */
    }
    
    /* Stack departure date */
    .field-group:has(#departure-date) {
        order: 4;
        margin-bottom: 1rem; /* Add space between departure and return date fields */
    }
    
    /* Stack return date */
    .field-group:has(#return-date) {
        order: 5;
    }
    
    /* Stack passengers and travel class in same row */
    .advanced-fields-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .advanced-fields-row .field-group {
        flex: none;
        width: 100%;
    }
    
    /* Ensure travel class appears first on mobile */
    .advanced-fields-row .field-group:has(#class) {
        order: 1;
    }
    
    /* Ensure passengers appears second on mobile */
    .advanced-fields-row .field-group:has(#passenger-dropdown-btn) {
        order: 2;
    }
    
    /* Ensure proper spacing */
    .flight-search-form-modern {
        gap: 1.5rem;
    }
    
    /* Mobile-optimized input sizes */
    .input-modern {
        height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Mobile-optimized button sizes */
    .btn-search-modern-full {
        height: 56px;
        font-size: 16px;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .fields-row {
        gap: 1rem;
    }
    
    .field-group {
        flex: 1;
    }
    
    .advanced-fields-row {
        gap: 1rem;
        flex-direction: column;
    }
    
    .advanced-fields-row .field-group {
        flex: none;
        width: 100%;
    }
    
    /* Ensure travel class appears first on tablets */
    .advanced-fields-row .field-group:has(#class) {
        order: 1;
    }
    
    /* Ensure passengers appears second on tablets */
    .advanced-fields-row .field-group:has(#passenger-dropdown-btn) {
        order: 2;
    }
}

/* Ensure loading modal is perfectly centered */
#loadingModal {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

#loadingModal.show {
  display: flex;
}

#loadingModal > div:first-child {
  position: absolute;
  inset: 0;
}

#loadingModal > div:last-child {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* === Improved Passenger Dropdown Styles === */

.passenger-dropdown-container {
    position: relative;
    width: 100%;
}

.passenger-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 280px;
    max-width: 320px;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

.passenger-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Desktop specific improvements */
@media (min-width: 769px) {
    .passenger-dropdown {
        bottom: calc(100% + 8px) !important; /* Position above the button */
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(10px) !important;
        min-width: 240px !important;
        max-width: 280px !important;
        font-size: 0.875rem !important;
        z-index: 9999 !important;
        position: absolute !important;
    }
    
    .passenger-dropdown.show {
        transform: translateX(-50%) translateY(0) !important;
    }
    
.passenger-dropdown .p-4 {
        padding: 0.75rem !important;
}

.passenger-dropdown .space-y-4 > div {
        margin-bottom: 0.5rem !important;
    }
}

/* Mobile styling remains the same */
@media (max-width: 767px) {
    .passenger-dropdown {
        top: calc(100% + 8px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateY(-10px) !important;
        min-width: 100% !important;
        max-width: 100% !important;
        position: absolute !important;
        z-index: 9999 !important;
    }
    
    .passenger-dropdown.show {
        transform: translateY(0) !important;
    }
    
    .passenger-dropdown .p-4 {
        /* padding: 1rem !important; */
        padding: 0.4rem !important;
        padding-top: 17px !important;
    }
    
    .passenger-dropdown .space-y-4 > div {
        margin-bottom: 0.75rem !important;
    }
    
    .passenger-dropdown .font-medium {
        font-size: 0.875rem !important;
    }
    
    .passenger-dropdown .text-sm {
        font-size: 0.75rem !important;
    }
    
    .passenger-dropdown .passenger-counter-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .passenger-dropdown .passenger-counter-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .passenger-dropdown .w-8 {
        width: 2rem !important;
    }
}

.passenger-dropdown .p-4 {
    padding: 24px;
}

.passenger-dropdown .space-y-4 > div {
    margin-bottom: 20px;
}

.passenger-dropdown .font-medium {
        font-weight: 600;
    font-size: 16px;
    color: #1f2937;
}

.passenger-dropdown .text-sm {
    font-size: 14px;
    color: #6b7280;
    margin-top: 2px;
}

.passenger-dropdown .w-8 {
    width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    color: #1f2937;
}

/* Enhanced counter buttons */
.passenger-dropdown .passenger-counter-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.passenger-dropdown .passenger-counter-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    color: #3b82f6;
    transform: scale(1.05);
}

.passenger-dropdown .passenger-counter-btn:active {
    transform: scale(0.95);
}

.passenger-dropdown .passenger-counter-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

.passenger-dropdown .passenger-counter-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .passenger-dropdown .passenger-counter-btn {
        width: 52px;
        height: 52px;
    }
    
    .passenger-dropdown .passenger-counter-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .passenger-dropdown .w-8 {
        width: 48px;
        font-size: 20px;
    }
    
    .passenger-dropdown .font-medium {
        font-size: 18px;
    }
    
    .passenger-dropdown .text-sm {
        font-size: 15px;
    }
}

/* Layout improvements */
.passenger-dropdown .flex.items-center.justify-between {
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

    .passenger-dropdown .flex.items-center.justify-between > div:first-child {
    flex-shrink: 0;
    min-width: 0;
    max-width: 70px;
    }
    
    .passenger-dropdown .flex.items-center.justify-between > div:last-child {
        flex-shrink: 0;
    min-width: fit-content;
    }
    
    .passenger-dropdown .font-medium {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    line-height: 1.1;
    }
    
    .passenger-dropdown .text-sm {
    font-size: 11px;
    color: #6b7280;
    margin-top: 0;
    line-height: 1.1;
}

/* Total section styling */
.passenger-dropdown .border-t {
    border-top: 2px solid #f3f4f6;
    margin-top: 16px;
    padding-top: 20px;
}

.passenger-dropdown .border-t .font-medium {
    font-size: 16px;
    color: #1f2937;
}

.passenger-dropdown .border-t .font-bold {
    font-size: 20px;
    color: #3b82f6;
}

/* Enhanced trigger button */
#passenger-dropdown-btn {
    transition: all 0.2s ease;
}

#passenger-dropdown-btn:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

#passenger-dropdown-btn:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Arrow rotation animation */
#passenger-dropdown-btn svg {
    transition: transform 0.2s ease;
}

.passenger-dropdown.show + #passenger-dropdown-btn svg,
#passenger-dropdown-btn.active svg {
    transform: rotate(180deg);
}

/* Backdrop for mobile */
.passenger-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.passenger-dropdown-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Accessibility improvements */
.passenger-dropdown .passenger-counter-btn:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Smooth animations for all interactive elements */
.passenger-dropdown * {
    transition: all 0.2s ease;
}

/* Enhanced Date Input Styling */
.enhanced-date-input {
    position: relative;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.enhanced-date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.enhanced-date-input:hover {
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Calendar icon styling using pseudo-element */
.enhanced-date-input::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.enhanced-date-input:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%233b82f6' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

/* Hide default calendar picker indicator */
.enhanced-date-input::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    z-index: 3;
}

.enhanced-date-input::-webkit-calendar-picker-indicator:hover {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

/* Show native placeholder text */
.enhanced-date-input::-webkit-datetime-edit {
    color: #9ca3af;
}

.enhanced-date-input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.enhanced-date-input::-webkit-datetime-edit-text {
    color: #9ca3af;
    padding: 0 0.2em;
}

.enhanced-date-input::-webkit-datetime-edit-month-field,
.enhanced-date-input::-webkit-datetime-edit-day-field,
.enhanced-date-input::-webkit-datetime-edit-year-field {
    color: #9ca3af;
}

/* Show selected date text */
.enhanced-date-input:not([value=""])::-webkit-datetime-edit {
    color: #1f2937;
}

.enhanced-date-input:not([value=""])::-webkit-datetime-edit-month-field,
.enhanced-date-input:not([value=""])::-webkit-datetime-edit-day-field,
.enhanced-date-input:not([value=""])::-webkit-datetime-edit-year-field {
    color: #1f2937;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .enhanced-date-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .enhanced-date-input::after {
        right: 12px;
        width: 18px;
        height: 18px;
    }
    
    .enhanced-date-input::-webkit-calendar-picker-indicator {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
} 