/* Homepage Search Section Mobile Optimizations */

/* Hero Section Mobile */
@media (max-width: 991px) {
    .header-top {
        display: none !important;
    }

    .hero-section {
        min-height: auto;
        padding: 30px 0;
    }

    .hero-content-wrapper {
        padding: 0;
    }

    .search-area {
        padding: 20px 0;
        margin-top: .5rem;
    }

    .search-wrapper {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .search-box {
        padding: 20px 15px;
        background: #fff;
        border-radius: 10px;
    }
}

/* Flight Type Radio Buttons Mobile */
@media (max-width: 767px) {
    .flight-type {
        display: flex !important;
        flex-wrap: wrap;
        gap: 10px !important;
        margin-bottom: 20px;
        justify-content: center;
    }

    .form-check-inline {
        margin: 0;
        flex: 1 1 auto;
        min-width: 100px;
    }

    .form-check-inline .form-check-input {
        margin: 6px;
    }

    .form-check-inline .form-check-label {
        font-size: 14px;
        white-space: nowrap;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    .flight-type {
        flex-direction: column;
        align-items: stretch;
    }

    .form-check-inline {
        width: 100%;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .form-check-inline:has(.form-check-input:checked) {
        background: #e7f3ff;
        border: 1px solid #0066cc;
    }
}

/* Search Form Fields Mobile */
@media (max-width: 991px) {
    .flight-search-wrapper {
        margin-top: 20px;
    }

    .flight-search-content .row {
        margin: 0 -8px;
    }

    .flight-search-content [class*="col-"] {
        padding: 0 8px;
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 0;
    }

    .form-group label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
        display: block;
        color: #333;
    }

    .form-group-icon {
        position: relative;
    }

    .form-group-icon input {
        width: 100%;
        padding: 12px 40px 12px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 14px;
    }

    .form-group-icon i {
        position: absolute;
        right: 10px !important;
        top: 15px !important;
        transform: translateY(-50%);
        font-size: 28px !important;
        color: #0066cc;
        font-size: 16px;
    }

    .subscribe-form .form-group-icon i {
        left: 10px !important;
        top: 24px !important;
    }

    .form-group p {
        font-size: 12px;
        color: #666;
        margin-top: 5px;
        margin-bottom: 0;
    }
}

/* Search Form Swap Button Mobile */
@media (max-width: 991px) {
    .search-form-swap {
        position: absolute;
        right: -15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: #0066cc;
        color: #fff;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
    }

    .search-form-swap i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .search-form-swap {
        right: 50%;
        top: auto;
        bottom: -15px;
        transform: translateX(50%);
    }
}

/* Date Picker Mobile */
@media (max-width: 991px) {
    .search-form-date {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .search-form-journey,
    .search-form-return {
        width: 100%;
    }
}

/* Passenger Dropdown Mobile */
@media (max-width: 991px) {
    .passenger-box .passenger-class {
        cursor: pointer;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
    }

    .passenger-box .dropdown-menu {
        width: 100%;
        max-width: 100%;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .passenger-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
    }

    .passenger-info h6 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .passenger-info p {
        font-size: 12px;
        color: #666;
        margin: 0;
    }

    .passenger-qty {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .passenger-qty button {
        width: 32px;
        height: 32px;
        border: 1px solid #ddd;
        background: #fff;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
    }

    .passenger-qty button:hover {
        background: #0066cc;
        color: #fff;
        border-color: #0066cc;
    }

    .passenger-qty input {
        width: 40px;
        text-align: center;
        border: none;
        font-size: 16px;
        font-weight: 600;
    }

    .passenger-class-info {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .passenger-class-info .form-check {
        padding: 10px 0;
    }

    .passenger-class-info .form-check-label {
        font-size: 14px;
        cursor: pointer;
    }
}

/* Search Button Mobile */
@media (max-width: 991px) {
    .search-btn {
        margin-top: 20px;
        text-align: center;
    }

    .search-btn .theme-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s;
    }

    .search-btn .theme-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    }
}

/* Airport List Dropdown Mobile */
@media (max-width: 991px) {
    .airport-list {
        position: fixed !important;
        left: 15px;
        right: 15px;
        max-width: calc(100% - 30px);
        max-height: 60vh;
        overflow-y: auto;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 9999;
        margin-top: 5px;
    }

    .airport-item {
        padding: 15px;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        font-size: 14px;
    }

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

    .airport-item:hover,
    .airport-item:active {
        background: #f8f9fa;
    }

    .airport-item strong {
        color: #0066cc;
        font-weight: 600;
        margin-right: 8px;
    }
}

/* Multi-City Form Mobile */
@media (max-width: 991px) {
    .multi-city-segment {
        background: #f8f9fa;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .multi-city-segment .row {
        margin: 0 -8px;
    }

    .multi-city-segment [class*="col-"] {
        padding: 0 8px;
        margin-bottom: 12px;
    }

    #add-segment {
        width: 100%;
        padding: 12px;
        background: #fff;
        border: 2px dashed #0066cc;
        color: #0066cc;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        margin-top: 10px;
        cursor: pointer;
    }

    .remove-segment {
        width: 100%;
        padding: 10px;
        background: #fff;
        border: 1px solid #dc3545;
        color: #dc3545;
        border-radius: 6px;
        font-size: 13px;
        margin-top: 0 !important;
    }
}

/* Feature Area Mobile */
@media (max-width: 991px) {
    .feature-area {
        padding: 50px 0;
    }

    .feature-item {
        margin-bottom: 25px;
        padding: 25px 20px;
        text-align: center;
    }

    .feature-icon {
        margin-bottom: 15px;
    }

    .feature-icon i {
        font-size: 40px;
    }

    .feature-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .feature-item p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Flight Items Mobile */
@media (max-width: 991px) {
    .flight-area {
        padding: 50px 0;
    }

    .flight-item {
        margin-bottom: 25px;
    }

    .flight-img {
        border-radius: 8px;
        overflow: hidden;
    }

    .flight-content {
        padding: 15px;
    }

    .flight-title h4 {
        font-size: 16px;
    }

    .flight-date {
        font-size: 13px;
    }

    .flight-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .flight-price span {
        font-size: 20px;
    }
}

/* CTA Area Mobile */
@media (max-width: 991px) {
    .cta-area {
        padding-bottom: 50px;
    }

    .cta-wrapper {
        padding: 40px 20px;
        border-radius: 12px;
    }

    .cta-text h1 {
        font-size: 24px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .cta-text p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Testimonial Area Mobile */
@media (max-width: 991px) {
    .testimonial-area {
        padding: 50px 0;
    }

    .testimonial-single {
        padding: 20px;
    }

    .testimonial-content {
        margin-bottom: 15px;
    }

    .testimonial-author-img {
        width: 60px;
        height: 60px;
    }

    .testimonial-author-info h4 {
        font-size: 16px;
    }

    .testimonial-quote p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Site Heading Mobile */
@media (max-width: 991px) {
    .site-heading {
        text-align: center;
        margin-bottom: 30px;
    }

    .site-title-tagline {
        font-size: 13px;
    }

    .site-title {
        font-size: 24px;
        line-height: 1.3;
    }

    .site-heading p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Improve Input Focus States for Mobile */
@media (max-width: 991px) {
    .form-control:focus {
        border-color: #0066cc;
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        outline: none;
    }

    .form-check-input:focus {
        border-color: #0066cc;
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }
}

/* Prevent iOS Zoom on Input Focus */
@supports (-webkit-touch-callout: none) {

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Loading State */
@media (max-width: 991px) {
    .search-btn .theme-btn.loading {
        pointer-events: none;
        opacity: 0.7;
    }

    .search-btn .theme-btn.loading::after {
        content: '';
        width: 16px;
        height: 16px;
        border: 2px solid #fff;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
        margin-left: 10px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Scrolling */
@media (max-width: 991px) {
    html {
        scroll-behavior: smooth;
    }

    body {
        -webkit-overflow-scrolling: touch;
    }
}