/* ==========================================================================
   TicketsSathi - Flight Booking Website Theme & Styling
   Colors: Navy Blue (#0f2b48, #07192d), Sky Blue (#0284c7, #38bdf8),          Orange Accent (#f97316, #ea580c), White (#ffffff)
   ========================================================================== */

:root {
    --ts-navy: #0f2b48;
    --ts-navy-dark: #07192d;
    --ts-sky: #0284c7;
    --ts-sky-light: #38bdf8;
    --ts-sky-subtle: #e0f2fe;
    --ts-orange: #f97316;
    --ts-orange-hover: #ea580c;
    --ts-white: #ffffff;
    --ts-gray-bg: #f8fafc;
    --ts-gray-border: #e2e8f0;
    --ts-whatsapp: #25d366;
    --ts-viber: #7360f2;
    --ts-kakao: #fee500;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background-color: var(--ts-gray-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Background & Utility Classes */
.bg-navy {
    background-color: var(--ts-navy) !important;
}

.bg-navy-dark {
    background-color: var(--ts-navy-dark) !important;
}

.bg-sky {
    background-color: var(--ts-sky) !important;
}

.bg-sky-subtle {
    background-color: var(--ts-sky-subtle) !important;
}

.text-navy {
    color: var(--ts-navy) !important;
}

.text-sky {
    color: var(--ts-sky) !important;
}

.text-orange {
    color: var(--ts-orange) !important;
}

.bg-orange {
    background-color: var(--ts-orange) !important;
}

.hover-white:hover {
    color: #ffffff !important;
}

.hover-sky:hover {
    color: var(--ts-sky-light) !important;
}

/* Brand Icon */
.brand-icon {
    width: 36px;
    height: 36px;
}

/* Custom Buttons */
.btn-sky {
    background-color: var(--ts-sky);
    border-color: var(--ts-sky);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-sky:hover, .btn-sky:focus {
    background-color: #0369a1;
    border-color: #0369a1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-orange {
    background-color: var(--ts-orange);
    border-color: var(--ts-orange);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-orange:hover, .btn-orange:focus {
    background-color: var(--ts-orange-hover);
    border-color: var(--ts-orange-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-outline-navy {
    color: var(--ts-navy);
    border-color: var(--ts-navy);
}

.btn-outline-navy:hover {
    background-color: var(--ts-navy);
    color: #ffffff;
}

/* Social & Contact Buttons */
.btn-whatsapp {
    background-color: var(--ts-whatsapp);
    color: #ffffff !important;
    border: none;
}
.btn-whatsapp:hover {
    background-color: #20bd5a;
    color: #ffffff !important;
}

.btn-viber, .bg-viber {
    background-color: var(--ts-viber) !important;
    color: #ffffff !important;
}
.btn-viber:hover {
    background-color: #634fe3 !important;
}

.btn-kakao, .bg-kakao {
    background-color: var(--ts-kakao) !important;
    color: #3c1e1e !important;
}
.btn-kakao:hover {
    background-color: #edd500 !important;
}

/* ==========================================================================
   HERO SECTION (Clear Natural Background & Clean Text)
   ========================================================================== */
.hero-section {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%),
                url('https://images.unsplash.com/photo-1542296332-2e4473faf563?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat !important;
    min-height: 500px;
    position: relative;
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.hero-section h1 {
    color: #07192d !important;
    font-weight: 800 !important;
}

.hero-section p {
    color: #1e293b !important;
    font-weight: 500 !important;
}

.btn-white-custom {
    background-color: #ffffff !important;
    color: #0f2b48 !important;
    border: 1px solid #cbd5e1 !important;
    transition: all 0.25s ease;
}

.btn-white-custom:hover {
    background-color: #f8fafc !important;
    box-shadow: 0 6px 16px rgba(15, 43, 72, 0.15) !important;
    transform: translateY(-1px);
}

/* Search Box Container */
.search-card {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 15px 35px rgba(15, 43, 72, 0.12);
    margin-top: -3.5rem;
    position: relative;
    z-index: 20;
    border: 1px solid var(--ts-gray-border);
}

.search-tab-btn {
    border-radius: 50rem;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ts-navy);
    background: #f1f5f9;
    border: none;
    transition: all 0.2s;
}

.search-tab-btn.active {
    background: var(--ts-navy);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 43, 72, 0.2);
}

/* Passenger Popup & Wrapper */
.passenger-dropdown-wrapper {
    position: relative;
}

.passenger-popup {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1060;
    width: 320px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--ts-gray-border);
    padding: 1.25rem;
    display: none;
    margin-top: 6px;
}

.passenger-popup.show {
    display: block;
    animation: fadeInSlide 0.2s ease-out;
}

.btn-stepper {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--ts-navy);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-stepper:hover:not(:disabled) {
    background: var(--ts-sky-subtle);
    border-color: var(--ts-sky);
    color: var(--ts-sky);
}

.btn-stepper:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Autocomplete styling */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--ts-gray-border);
    border-radius: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1070;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.autocomplete-item:hover, .autocomplete-item.active {
    background-color: var(--ts-sky-subtle);
}

/* Flight Results Cards */
.flight-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid var(--ts-gray-border);
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.flight-card:hover {
    box-shadow: 0 10px 25px rgba(15, 43, 72, 0.09);
    border-color: var(--ts-sky-light);
}

.flight-duration-bar {
    position: relative;
    border-top: 2px dashed #cbd5e1;
    margin: 1.5rem 0 0.5rem;
}

.flight-duration-bar .plane-icon {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 0 6px;
    color: var(--ts-sky);
}

/* Floating contact widget pulse animation */
.floating-pulse {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7);
    animation: contactPulse 2.5s infinite;
}

@keyframes contactPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(2, 132, 199, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
    }
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Dashboard Elements */
.admin-sidebar {
    background-color: var(--ts-navy);
    min-height: 100vh;
}

.admin-nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.stat-card {
    border-radius: 1rem;
    border: 1px solid var(--ts-gray-border);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   MOBILE RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 992px) {
    .hero-section {
        min-height: 400px;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

    .search-card {
        margin-top: -2rem;
        padding: 1rem !important;
    }
}

@media (max-width: 768px) {
    .passenger-popup {
        width: 100% !important;
        left: 0;
        right: 0;
    }

    .search-card {
        margin-top: -1.5rem;
        border-radius: 0.75rem;
        box-shadow: 0 8px 20px rgba(15, 43, 72, 0.1);
    }

    .search-tab-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }

    .flight-card .card-body {
        padding: 1rem !important;
    }
}

/* Print styles for booking confirmation */
@media print {
    .top-contact-bar, nav, footer, .floating-contact-widget, .no-print {
        display: none !important;
    }
    body {
        background: #ffffff;
    }
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Destination Card Image Wrapper & Object-Fit Fix */
.destination-card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.destination-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.destination-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

/* Reviews Section Styling */
.rating-select .star-btn {
    cursor: pointer;
    transition: transform 0.15s ease-in-out;
}

.rating-select .star-btn:hover {
    transform: scale(1.2);
}

#customer-reviews .progress {
    background-color: #e2e8f0;
    border-radius: 50rem;
}/* Typing & Red Background Animation */
.typing-text-red-bg {
    display: inline-block;
    color: #ffffff;
    background-color: #dc3545; /* Red background */
    padding: 2px 10px;
    border-radius: 20px;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid white; /* Typing cursor effect */
    animation: 
        typing 3s steps(16, end) infinite,
        blink-caret 0.75s step-end infinite;
}

/* Typing keyframe: width 0 to 100% */
@keyframes typing {
    0% { width: 0; }
    70% { width: 100%; }
    100% { width: 100%; }
}

/* Cursor blink animation */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white; }
}

/* =====================================
   TICKETSSATHI FLIGHT SEARCH BUTTON
===================================== */

#standardSearchForm {
    display: block !important;
    width: 100%;
    overflow: visible !important;
}

#standardSearchForm .search-btn-container {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 15px !important;
    padding: 0 12px !important;
}

#standardSearchForm .search-btn-container button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    min-width: 200px !important;
    min-height: 50px !important;
    padding: 12px 30px !important;
    background: #f97316 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer;
}

#standardSearchForm .search-btn-container button:hover {
    background: #ea580c !important;
}

@media (max-width: 767px) {
    #standardSearchForm .search-btn-container {
        justify-content: center !important;
    }

    #standardSearchForm .search-btn-container button {
        width: 100% !important;
    }
}
@media (max-width: 991px) {
    #standardSearchForm .search-btn-container {
        width: 100% !important;
        margin-top: 10px !important;
    }
}
/* Align Search Button with Cabin Class and Nationality */
#standardSearchForm .search-btn-container {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 25% !important;
    margin-top: 0 !important;
    padding-top: 14px !important;
}

#standardSearchForm .search-btn-container button {
    width: 100% !important;
    height: 36px !important;
    min-width: 0 !important;
    margin: 0 !important;
    background: #f97316 !important;
    color: #ffffff !important;
}

@media (max-width: 991px) {
    #standardSearchForm .search-btn-container {
        width: 100% !important;
        padding-top: 0 !important;
    }
}
/* Flight Search Layout Fix */
#standardSearchRow {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end !important;
}

#standardSearchRow > div {
    margin-top: 0 !important;
}

.search-btn-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.search-btn-container button {
    min-height: 48px;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .search-btn-container {
        width: 100%;
    }
}

/* TicketsSathi Flight Search Alignment */
#standardSearchForm #standardSearchRow {
    align-items: flex-end !important;
}

#standardSearchForm .row {
    width: 100%;
}

#standardSearchForm .form-control,
#standardSearchForm .form-select {
    min-height: 48px;
}

#standardSearchForm .search-btn-container button {
    min-height: 48px;
}

@media (max-width: 767px) {
    #standardSearchForm .row > div {
        width: 100%;
    }
}
