/* استایل‌های اصلی تور ریلی */
.rail-tours-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.rail-tour-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 20px 0;
    display: flex;
    height: 280px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.rail-tour-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 122, 255, 0.12);
    border-color: #5AC8FA;
}

.tour-image-section {
    flex: 0 0 250px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.tour-info-section {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.tour-action-section {
    flex: 0 0 220px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #f8f9fa;
}

/* گالری تصاویر */
.tour-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-slides {
    display: flex;
    height: 100%;
    position: relative;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: none;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    color: #999;
    font-size: 16px;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-gallery:hover .gallery-nav {
    opacity: 1;
}

.nav-button {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: white;
    border-color: #007AFF;
    color: #007AFF;
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-dot.active {
    background: white;
    transform: scale(1.2);
}

.tour-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #007AFF, #5AC8FA);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

/* اطلاعات تور */
.tour-header {
    margin-bottom: 15px;
}

.tour-title {
    font-size: 18px;
    font-weight: bold;
    color: #1C1C1E;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.hotel-address {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #8E8E93;
    background: #f8f9fa;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.address-icon {
    font-size: 14px;
}

.hotel-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.hotel-icon {
    font-size: 14px;
}

.star {
    font-size: 14px;
}

.star-gold {
    color: #FFD700;
}

.star-gray {
    color: #E5E5EA;
}

.star-count {
    font-size: 12px;
    color: #8E8E93;
    margin-right: 4px;
}

/* اطلاعات قطار */
.train-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
}

.train-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #E5E5EA;
}

.train-logo {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: white;
    border-radius: 6px;
    border: 1px solid #D1D1D6;
}

.logo-raja {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.train-company {
    font-size: 12px;
    font-weight: bold;
    color: #007AFF;
    min-width: 50px;
}

.train-route {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.route-from,
.route-to {
    font-weight: 600;
    color: #1C1C1E;
}

.route-time {
    font-weight: bold;
    background: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid #E5E5EA;
}

.route-time.departure {
    color: #007AFF;
}

.route-time.arrival {
    color: #34C759;
}

.route-separator {
    color: #C7C7CC;
    margin: 0 4px;
    font-weight: bold;
}

.train-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.train-number {
    color: #48484A;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #D1D1D6;
}

.train-type {
    color: #8E8E93;
    font-size: 10px;
}

.train-status {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.train-status.available {
    background: #34C759;
    color: white;
}

.train-status.sold-out {
    background: #FF3B30;
    color: white;
}

.change-train-btn {
    background: #E5E5EA;
    color: #48484A;
    border: 1px solid #D1D1D6;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-train-btn:hover {
    background: #5AC8FA;
    color: white;
    border-color: #007AFF;
}

/* مسافران */
.tour-passengers {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.passenger-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8E8E93;
}

.passenger-icon {
    color: #007AFF;
    font-size: 14px;
}

/* بخش اقدام */
.price-section {
    text-align: center;
    margin-bottom: 15px;
}

.original-price {
    font-size: 13px;
    color: #8E8E93;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.final-price {
    font-size: 20px;
    font-weight: 800;
    color: #007AFF;
    margin-bottom: 6px;
}

.price-nights {
    font-size: 12px;
    color: #8E8E93;
    margin-bottom: 6px;
}

.price-breakdown {
    font-size: 11px;
    color: #8E8E93;
}

.book-button {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.book-button:hover {
    background: linear-gradient(135deg, #0056CC, #007AFF);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.button-icon {
    font-size: 16px;
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #E5E5EA;
    color: #48484A;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    justify-content: center;
}

.rating-icon {
    color: #FFD700;
}

/* مودال */
.rail-tour-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #007AFF;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #E5E5EA;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0056CC;
}

.btn-primary:disabled {
    background: #C7C7CC;
    cursor: not-allowed;
}

.btn-secondary {
    background: #E5E5EA;
    color: #48484A;
}

.btn-secondary:hover {
    background: #D1D1D6;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .rail-tour-card {
        height: auto;
        flex-direction: column;
        margin: 15px 0;
    }
    
    .tour-image-section {
        flex: 0 0 220px;
        width: 100%;
    }
    
    .tour-info-section {
        border-left: none;
        border-right: none;
        border-bottom: 1px solid #E5E5EA;
        padding: 15px;
    }
    
    .tour-action-section {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        flex: none;
        height: auto;
        padding: 15px;
    }
    
    .price-section {
        text-align: right;
        margin-bottom: 0;
        flex: 1;
    }
    
    .book-button {
        flex: 0 0 130px;
    }
    
    .rating-badge {
        display: none;
    }
    
    .train-line {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .train-route {
        flex: 1;
        min-width: 140px;
    }
    
    .train-details {
        justify-content: flex-end;
        flex: 1;
    }
}

@media (max-width: 480px) {
    .tour-action-section {
        flex-direction: column;
        gap: 12px;
    }
    
    .book-button {
        flex: none;
        width: 100%;
    }
    
    .rail-tours-container {
        padding: 10px;
    }
    
    .tour-title {
        font-size: 16px;
        height: auto;
        margin-bottom: 6px;
    }
    
    .hotel-stars {
        margin-bottom: 8px;
    }
    
    .train-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .train-route {
        width: 100%;
        justify-content: space-between;
    }
    
    .train-details {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* پیام خالی */
.rail-tour-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8E8E93;
    font-size: 16px;
    background: white;
    border-radius: 12px;
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}