/* Modern Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #e6e9f0;
    /* Darker Neutral Background for contrast */
    overflow-x: hidden;
}

/* Variables */
:root {
    --primary: #005eb8;
    /* Sky Blue/Navy */
    --primary-light: #007bff;
    --accent: #ff6b6b;
    /* Converting Coral */
    --dark: #0a192f;
    --light: #f4f7f6;
    --white: #ffffff;
    --gray: #6c757d;
    --border-radius: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Utilities */

/* THE BOXED LAYOUT WRAPPER */
.boxed-layout {
    max-width: 1024px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.15);
    /* Deep shadow for "floating sheet" effect */
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    /* Ensure nothing spills out */
}

/* Container inside the box just handles padding */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 30px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light);
}

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background-color: #fa5252;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

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

/* Navigation */
.navbar {
    padding: 20px 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    font-size: 15px;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #005eb8 0%, #003b73 100%);
    color: white;
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: white;
    transform: skewY(-2deg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 3.2rem;
    color: white;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Search Box Container - Floating */
.search-wrapper {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
    margin-top: -80px;
    /* Overlap Hero */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 180px auto;
    gap: 20px;
    align-items: end;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-search {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Trust Bar */
.trust-bar {
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.trust-title {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 40px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: 0.3s;
}

.trust-logos:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.trust-logo {
    height: 30px;
}

/* Features Grid */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 12px;
    transition: 0.3s;
    border: 1px solid transparent;
}

.feature-card:hover {
    background: white;
    box-shadow: var(--shadow);
    border-color: #eee;
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(0, 94, 184, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
}

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

/* How It Works */
.steps {
    background: var(--dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.steps h1,
.steps h2,
.steps p {
    color: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
}

.step-card {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
    margin-bottom: -20px;
    position: relative;
    z-index: -1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent);
}

/* Stats/CTA */
.stats-banner {
    background: var(--primary);
    color: white;
    padding: 50px 0;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: white;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #050d1a;
    color: #8a99b3;
    padding: 60px 0 30px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h4 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.footer-links h5 {
    color: white;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

/* Responsiveness */
@media (max-width: 900px) {
    .search-wrapper {
        margin: -60px 20px 0;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu simplified */
}

/* Autocomplete (retained) */
.autocomplete-items {
    position: absolute;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #d4d4d4;
    background: #fff;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
}

.autocomplete-items div {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-items div:hover {
    background-color: #f1f1f1;
}

/* Full Screen App Mode (Step 2+) */
.app-mode {
    background-color: #f4f7f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.result-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.result-header h1 {
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 800;
    margin: 0;
}

.result-text {
    font-size: 0.9rem;
    color: #888;
    margin-top: 5px;
}

/* Progress Bar - Sleek */
.progress-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    position: relative;
    overflow: visible;
    /* Allow plane to pop out */
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #4facfe 100%);
    border-radius: 10px;
    position: relative;
}

.progress-airplane {
    position: absolute;
    right: -10px;
    top: -12px;
    background: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    color: var(--primary);
    font-size: 14px;
    transform: rotate(90deg);
    /* Plane facing right */
}

/* Sticky Action Footer for Mobile */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
    /* Push to bottom */
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.btn-back {
    color: #6c757d;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 10px 20px;
}

.btn-next {
    padding: 14px 40px;
    background: var(--accent);
    /* Red/Accent Color */
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
    flex-grow: 1;
    /* Make it wide on mobile */
    max-width: 200px;
    /* But not too wide */
    margin-left: 20px;
}

@media (max-width: 768px) {
    .result-header {
        padding-top: 20px;
    }

    .nav-buttons {
        padding: 15px 20px;
    }

    .btn-next {
        width: 100%;
        max-width: none;
    }
}


.btn-next:hover {
    background: #fa5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Mobile Optimization Overrides */
@media (max-width: 768px) {

    /* Full Width for Boxed Layout on Mobile */
    .boxed-layout {
        max-width: 100%;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .container {
        padding: 0 20px;
    }

    /* Navbar Mobile */
    .logo {
        font-size: 22px;
    }

    .navbar {
        padding: 15px 0;
    }

    /* Hero Tweaks */
    .hero {
        padding: 40px 0 100px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        opacity: 0.9;
    }

    /* Search Wrapper */
    .search-wrapper {
        margin-top: -80px;
        margin-left: 10px;
        margin-right: 10px;
        padding: 25px 20px;
        /* More padding inside card */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    /* Form Stack */
    .search-form {
        display: flex;
        /* Override grid */
        flex-direction: column;
        gap: 15px;
        /* Reduced gap generally */
    }

    /* Touch-Friendly Inputs */
    .form-group {
        width: 100%;
    }

    /* Make Date->Button gap tighter */
    .search-form .form-group:last-of-type {
        margin-top: -5px;
        /* Pull button closer to date */
    }

    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 8px;
        color: #888;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

    .form-control {
        font-size: 16px;
        padding: 16px 16px 16px 45px;
        height: 54px;
        width: 100%;
        border-radius: 8px;
        box-sizing: border-box;
    }

    /* Huge CTA Button */
    .btn-search {
        width: 100%;
        padding: 16px;
        height: 54px;
        font-size: 1.1rem;
        margin-top: 5px;
        /* Minimal margin */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border-radius: 8px;
    }

    /* Trust indicators */
    .trust-logos {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .trust-logo {
        height: 20px;
        margin-bottom: 10px;
    }

    /* Features & Steps */
    .section {
        padding: 40px 0;
    }

    .features-grid,
    .steps-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    /* Hide desktop spacer labels */
    .d-none-mobile {
        display: none;
    }
}

/* Input Icons Styling - Global */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
    font-size: 1.2rem;
    z-index: 5;
    width: 20px;
    /* Fixed width container for centering */
    text-align: center;
}

.form-control.with-icon {
    padding-left: 50px !important;
}

/* Autocomplete Customization */
.autocomplete-items {
    border-radius: 0 0 8px 8px;
    /* Rounded bottom only */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-top: -2px;
    /* Connect to input */
    border: 1px solid #eee;
    background: white;
    z-index: 99;
    position: absolute;
    width: 100%;
}

.autocomplete-header {
    padding: 12px 15px;
    background: #f1f3f5;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.7rem;
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.autocomplete-items div {
    padding: 14px 15px;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.95rem;
    cursor: pointer;
    background: white;
}

.autocomplete-items div:hover {
    background-color: #e7f5ff;
    color: var(--primary);
    padding-left: 20px;
    /* Slide effect */
    transition: 0.2s;
}

/* Flag & New Layout for Dropdown */
/* Flag & New Layout for Dropdown (ExiTicket Style) */
.suggestion-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    /* Further Reduced */
    padding: 6px 10px;
    /* Very Compact */
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    background: white;
    transition: background-color 0.1s ease;
}

.suggestion-item:hover {
    background-color: #f0f7ff;
}

.flag-icon {
    width: 18px;
    /* Tiny flag */
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Single Line Text Wrapper */
.suggestion-text-wrapper-single {
    display: flex;
    align-items: center;
    gap: 5px;
    /* Tiny gap */
    font-size: 0.8rem;
    /* Smaller font */
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.iata-bold {
    font-weight: 800;
    color: #222;
    min-width: 25px;
    /* Very tight */
}

.separator {
    color: #ccc;
    font-weight: 300;
    font-size: 0.75rem;
}

.city-country {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User asked for reduced font size in text field too */
.form-control {
    font-size: 14px !important;
}