/* Hero Section */
.tours-hero {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}
.tours-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.tours-hero h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tour-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: 999px;
    padding: .35rem .65rem;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.tour-type-badge.domestic {
    background: #E8F7EE;
    color: #177245;
}
.tour-type-badge.international {
    background: #E8F0FE;
    color: var(--brand);
}

.transport-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}
.transport-type-badge.transport-type-flight {
    background: #E8F0FE;
    color: #0A58CA;
}
.transport-type-badge.transport-type-bus {
    background: #FFF4E5;
    color: #B45309;
}
.transport-type-badge.transport-type-train {
    background: #ECFDF5;
    color: #047857;
}
.transport-type-badge.transport-type-car {
    background: #F3F4F6;
    color: #374151;
}
.tour-image .transport-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.transport-type-badge-inline {
    box-shadow: none;
}

.tour-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}
.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}
.tour-image {
    position: relative;
    overflow: hidden;
    min-height: 220px;
}
.tour-image img {
    transition: transform 0.4s ease;
}
.tour-card:hover .tour-image img {
    transform: scale(1.05);
}
.limited-seats-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.soldout-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-600);
    font-size: 0.8rem;
    transition: all 0.2s;
    cursor: help;
}
.feature-icon:hover {
    background: var(--brand-light);
    color: var(--brand);
    transform: translateY(-2px);
}
.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
}
.currency {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
}

.category-item .form-check-input {
    margin-top: 0;
}
.tour-calendar {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: .75rem;
    background: var(--gray-50);
    margin-top: .75rem;
}
.tour-calendar-weekdays,
.tour-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .35rem;
}
.tour-calendar-weekdays span {
    color: var(--gray-600);
    font-size: .72rem;
    text-align: center;
    font-weight: 700;
}
.tour-calendar-day {
    border: 1px solid transparent;
    border-radius: 8px;
    min-height: 34px;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: .85rem;
    font-weight: 700;
    cursor: not-allowed;
}
.tour-calendar-day.available {
    background: white;
    border-color: rgba(10, 88, 202, .25);
    color: var(--brand);
    cursor: pointer;
}
.tour-calendar-day.available:hover,
.tour-calendar-day.selected {
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}
.tour-calendar-empty {
    min-height: 34px;
}
.selected-date-label {
    min-height: 20px;
}

@media (max-width: 768px) {
    .filter-card {
        margin-top: -30px;
    }
    .tour-card .row {
        flex-direction: column;
    }
    .tour-image {
        height: 200px;
    }
    .price {
        font-size: 1.2rem;
    }
}

.search-filters {
    padding: 12px 0;
}

.filter-section .tour-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
}

.filter-section .tour-filter-row > [class*="col-"] {
    min-width: 220px;
}

.filter-section .tour-filter-actions {
    min-height: 100%;
}

.filter-section .tour-search-btn {
    background: linear-gradient(135deg, #0A58CA 0%, #0ab39c 100%);
    border: 0;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    min-height: 44px;
    box-shadow: 0 12px 24px rgba(10, 88, 202, 0.22);
    transition: all 0.2s ease;
}

.filter-section .tour-search-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(10, 88, 202, 0.28);
}

.filter-section .tour-reset-btn {
    min-height: 44px;
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .filter-section .tour-filter-row {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .filter-section .tour-filter-row > [class*="col-"] {
        min-width: 0;
    }

    .filter-section .tour-filter-actions {
        justify-content: stretch !important;
    }

    .filter-section .tour-filter-actions .tour-search-btn,
    .filter-section .tour-filter-actions .tour-reset-btn {
        width: 100%;
    }
}

.form-select {
    padding: 9px;
    border-radius: 24px;
}

/* Sort select needs caret-side padding so long labels like «پربازدیدترین» are not clipped */
#sortBy.tour-sort-select,
.tour-sort-select {
    width: auto;
    min-width: 11.5rem;
    max-width: 100%;
    padding-block: 0.35rem;
    padding-inline: 2.25rem 0.9rem;
    border-radius: 999px;
    line-height: 1.4;
    background-position: left 0.75rem center;
}

.filter-card select, .filter-card input , .filter-card #departureDateButton{
    padding: 10px;
    border-radius: 20px;
}

#tourResultsPanel {
    position: relative;
    transition: opacity 0.2s ease;
}
#tourResultsPanel.is-loading {
    opacity: 0.45;
    pointer-events: none;
}
#tourResultsPanel.is-loading::after {
    content: '';
    position: absolute;
    top: 72px;
    left: 50%;
    width: 42px;
    height: 42px;
    margin-left: -21px;
    border: 3px solid rgba(10, 88, 202, 0.16);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: tourResultsSpin 0.75s linear infinite;
    z-index: 3;
}
@keyframes tourResultsSpin {
    to { transform: rotate(360deg); }
}
