/* ===============================
   HERO SECTION LAYOUT FIXES
   =============================== */

/* Hero Section - Relative positioning, overflow visible for dropdowns */
.hero-section {
    position: relative;
    overflow: visible; /* Dropdown'lar için gerekli */
    min-height: 550px;
    padding-bottom: 0; /* Alt padding kaldırıldı */
}

.hero-section .banner-sec img {
    height: 550px;
    object-fit: cover;
}

.hero-section .banner-sec::after {
    background: none !important;
}

/* Hero Content - Normal flow'da kal */
.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 0; /* Alt padding kaldırıldı */
}

/* İlk görünür section'a padding-top ekle (margin yerine) */
/* Hero section'dan sonraki ilk section (tripadvisor d-none olduğu için fleet olacak) */
.hero-section + section:not(.d-none),
.hero-section ~ section:not(.d-none):first-of-type {
    padding-top: 3rem;
    position: relative;
    z-index: 0; /* Hero'dan düşük z-index */
}

/* Eğer tripadvisor görünürse */
.hero-section + section.section {
    padding-top: 3rem;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-bottom: 2rem; /* Form için alan */
    }
    
    .hero-content {
        padding-bottom: 2rem;
    }
    
    .hero-section + section:not(.d-none),
    .hero-section ~ section:not(.d-none):first-of-type,
    .hero-section + section.section {
        padding-top: 2rem; /* Mobilde daha az padding */
    }
    
    .hero-section .banner-sec {
        display: block;
    }
}

/* Eski margin-top kullanımlarını kaldır */
.private-tour-class {
    /* margin-top kaldırıldı - padding-top kullanılıyor */
}

.category-buttons {
    /* margin-top kaldırıldı - padding-top kullanılıyor */
}

/* ===============================
   AIRPORT TRANSFER PAGE FIXES
   Hero section olmayan sayfalar için
   =============================== */

/* Breadcrumb z-index - form'un altında kalmalı */
.breadcrumb-bar {
    position: relative;
    z-index: 1;
}

/* Content wrapper içindeki form için z-index ve spacing */
.content .banner-form {
    position: relative;
    z-index: 3;
}

/* Content wrapper - breadcrumb sonrası form için padding ayarı */
.breadcrumb-bar ~ .content {
    padding-top: 1rem; /* Breadcrumb sonrası minimal padding */
}

@media (max-width: 991.98px) {
    .breadcrumb-bar ~ .content {
        padding-top: 0.5rem;
    }
}

/* Form altındaki içerik için spacing */
/* Form içeren row'dan sonraki row - airport transfer sayfası için */
.content > .container > .row:first-child + .row {
    margin-top: 2rem;
    position: relative;
    z-index: 0;
}

@media (max-width: 991.98px) {
    .content > .container > .row:first-child + .row {
        margin-top: 1.5rem;
    }
}

/* Airport transfer sayfası özel düzenlemeler */
/* Breadcrumb sonrası form için spacing - content padding zaten azaltıldı */
.breadcrumb-bar ~ .content .banner-form {
    margin-top: 1rem; /* Breadcrumb ile form arası minimal spacing */
}

@media (max-width: 991.98px) {
    .breadcrumb-bar ~ .content .banner-form {
        margin-top: 0.5rem;
    }
}

/* Form içeren row için spacing */
.content > .container > .row:first-child {
    margin-bottom: 2rem;
}

@media (max-width: 991.98px) {
    .content > .container > .row:first-child {
        margin-bottom: 1.5rem;
    }
}

.custom-shadow {
    background-color: rgba(0, 0, 0, 0); /* yarı saydam siyah */
    border-radius: 0.5rem; /* isteğe bağlı */
    backdrop-filter: blur(2px); /* opsiyonel: arkaplan bulanıklığı */
}

/* ===============================
   TRANSFER SEARCH FORM STYLES
   =============================== */

/* Location Dropdown Styles */
.location-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.location-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.location-result-item:hover {
    background-color: #f8f9fa;
}

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

.location-result-item.popular {
    background-color: #fff3cd;
}

.location-result-item.popular:hover {
    background-color: #ffeaa7;
}

.location-result-item.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.location-result-item.no-results,
.location-result-item.error {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.location-item-content {
    display: flex;
    flex-direction: column;
}

.location-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.location-address {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* Form Validation Styles */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

/* Transfer Form Styles */
.transfer-form {
    transition: all 0.3s ease;
}

.transfer-search-form {
    position: relative;
}

.transfer-search-form .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.transfer-search-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Location Input Styles */
.location-input {
    background-color: #fff;
    cursor: pointer;
}

.location-input:focus {
    cursor: text;
}

.location-search-input {
    border: none;
    outline: none;
    box-shadow: none;
}

.location-search-input:focus {
    border: none;
    outline: none;
    box-shadow: none;
}

/* Passenger Selection Styles */
.guest-container {
    position: relative;
}

.pax-toggle {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.pax-toggle:hover {
    border-color: #007bff;
}

.total-guests {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.guest-summary {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Increment/Decrement Styles */
.custom-increment .input-group {
    width: 120px;
}

.custom-increment .btn {
    border: 1px solid #e0e0e0;
    background-color: #fff;
    color: #333;
    transition: all 0.2s ease;
}

.custom-increment .btn:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.custom-increment .input-number {
    text-align: center;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

/* Search Button Styles */
.search-btn {
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 140px;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Location Search Styles */
.location-field {
    position: relative;
    pointer-events: auto;
}

.location-field .location-input {
    pointer-events: auto;
}

.location-field .location-results {
    pointer-events: auto !important;
}

.location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    /* z-index banner-form içinde tanımlı */
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent; /* iOS tap highlight'ı kaldır */
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

.location-results.show {
    display: block;
    pointer-events: auto !important;
}

.location-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto !important;
    position: relative;
    /* z-index parent'tan alınıyor */
    background-color: white;
    /* Mobilde tıklanabilirliği artır */
    -webkit-touch-callout: none;
}

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

.location-result-item:hover {
    background-color: #f8f9fa;
}

.location-result-item.selected {
    background-color: #e3f2fd;
}

.location-item-content {
    display: flex;
    flex-direction: column;
}

.location-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.location-address {
    font-size: 12px;
    color: #666;
}

.location-results .loading {
    padding: 16px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.location-results .no-results {
    padding: 16px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.location-results .error {
    padding: 16px;
    text-align: center;
    color: #dc3545;
    font-style: italic;
}

/* Focus state for location inputs */
.location-input:focus + .location-results {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .location-results {
        max-height: 150px;
        /* z-index mobilde yukarıda tanımlı (2000) */
    }

    .location-result-item {
        padding: 14px 16px; /* Daha büyük dokunma alanı */
        min-height: 50px; /* Minimum dokunma alanı */
        display: flex;
        align-items: center;
        /* z-index parent'tan alınıyor */
    }

    /* Location field container mobilde */
    .location-field {
        position: relative;
        z-index: 1;
    }

    .location-field:focus-within {
        z-index: 2;
    }

    .location-field:focus-within .location-results {
        /* z-index mobilde yukarıda tanımlı */
    }
}

/* ===============================
   EXISTING STYLES (if any)
   =============================== */
.destination-info{
    position: fixed !important;
}

/* ===============================
   Z-INDEX HIERARCHY SYSTEM
   Mantıklı ve yönetilebilir z-index sistemi
   =============================== */

/* Base z-index layers */
.hero-section {
    z-index: 1;
}

.hero-content {
    z-index: 2;
}

.banner-form {
    position: relative;
    z-index: 3;
    margin-bottom: 0; /* Margin kaldırıldı */
}

/* Form içindeki dropdown'lar için z-index */
.banner-form .location-results,
.banner-form .location-dropdown {
    z-index: 1000 !important;
}

/* Passenger ve Guest dropdown'ları - Search button'ın üstünde olmalı */
/* Desktop'ta da yüksek z-index kullan (buton z-index: 0) */
.banner-form .dropdown-menu,
.guest-container .dropdown-menu,
.pax-toggle + .dropdown-menu,
.guest-selection {
    z-index: 10000 !important;
}

/* Time picker widget - body'ye append edilebilir, çok yüksek z-index gerekli */
.bootstrap-datetimepicker-widget,
.bootstrap-datetimepicker-widget.dropdown-menu {
    z-index: 10000 !important;
}

/* Mobilde çok daha yüksek z-index - Search button'ın kesinlikle üstünde */
@media (max-width: 991.98px) {
    .banner-form .location-results,
    .banner-form .location-dropdown {
        z-index: 2000 !important;
    }

    /* Passenger dropdown'ları mobilde çok yüksek */
    .banner-form .dropdown-menu,
    .guest-container .dropdown-menu,
    .pax-toggle + .dropdown-menu,
    .guest-selection {
        z-index: 10000 !important;
    }

    /* Time picker mobilde en yüksek */
    .bootstrap-datetimepicker-widget,
    .bootstrap-datetimepicker-widget.dropdown-menu {
        z-index: 10001 !important;
    }
}

/* Form Items - stacking context */
.banner-form .form-info .form-item {
    position: relative;
    z-index: 1;
}

/* Time ve Date input'ları açıkken yüksek z-index */
.banner-form .form-info .form-item:focus-within,
.banner-form .form-info .form-item.has-datetimepicker {
    z-index: 10; /* Dropdown açıkken yüksek */
}

/* Guest container açıkken */
.guest-container.show,
.pax-toggle[aria-expanded="true"] {
    z-index: 10;
}

/* Search Button - Düşük z-index, dropdown'ların altında kalmalı */
.search-btn {
    position: relative;
    z-index: 0; /* Dropdown'ların altında kalmalı */
}

@media (max-width: 991.98px) {
    .search-btn {
        margin-top: 1rem;
        z-index: 0; /* Mobilde de düşük */
    }
}

/* Form Info Container */
.banner-form .form-info {
    position: relative;
    z-index: 1;
}

/* Input Groups */
.banner-form .input-group {
    position: relative;
    z-index: 1;
}

.banner-form .input-group:focus-within {
    z-index: 2;
}
