/* Стили для страницы тура */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-dark);
}

.tour-detail {
    padding: 3rem 0;
    background: var(--bg-light);
}

.tour-detail-content {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 3rem;
    margin-top: 2rem;
}

/* Галерея */
.tour-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.image-thumbnails img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
    border: 3px solid transparent;
}

.image-thumbnails img:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

/* Описание и программа тура в галерее */
.tour-gallery .tour-description,
.tour-gallery .tour-program {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.tour-gallery .tour-description h2,
.tour-gallery .tour-program h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-gallery .tour-description h2::before {
    content: '📝';
    font-size: 1.3rem;
}

.tour-gallery .tour-program h2::before {
    content: '📋';
    font-size: 1.3rem;
}

.tour-gallery .tour-description p {
    color: var(--text-color);
    line-height: 1.8;
}

.tour-gallery .tour-program .program-content {
    color: var(--text-color);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Информация о туре */
.tour-info {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tour-info .tour-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tour-info .tour-location {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 30px;
}

.meta-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.meta-item span {
    color: var(--text-light);
}

.tour-description {
    margin-bottom: 2rem;
}

.tour-description h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.tour-description p {
    color: var(--text-light);
    line-height: 1.8;
    white-space: pre-wrap;
}

.tour-program {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.tour-program h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-program h2::before {
    content: '📋';
    font-size: 1.3rem;
}

.program-content {
    color: var(--text-color);
    line-height: 1.8;
    white-space: pre-wrap;
}

.program-content p {
    margin-bottom: 0.75rem;
}

.program-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Календарь дат туров */
.tour-dates-calendar {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tour-dates-calendar h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-dates-calendar h2::before {
    content: '📅';
    font-size: 1.3rem;
}

.dates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.date-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.date-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.date-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.date-card:hover::before {
    transform: scaleY(1);
}

.date-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.date-card.selected::before {
    transform: scaleY(1);
}

.date-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.date-start,
.date-end {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.date-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.date-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.date-card.selected .date-value {
    color: var(--primary-color);
}

.date-arrow {
    color: var(--text-light);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.date-duration {
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.date-card.selected .date-duration {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.tour-price-section {
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.price-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-large {
    flex: 1;
    min-width: 200px;
}

/* Секция отзывов */
.reviews-section {
    padding: 4rem 0;
    background: var(--bg-color);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.rating-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.stars i {
    font-size: 1.2rem;
    color: #d1d5db;
}

.stars i.active {
    color: #f59e0b;
}

.reviews-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.no-reviews {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-reviews i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.author-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.review-rating {
    display: flex;
    gap: 0.2rem;
}

.review-rating i {
    font-size: 0.9rem;
    color: #d1d5db;
}

.review-rating i.active {
    color: #f59e0b;
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.review-content {
    color: var(--text-color);
    line-height: 1.6;
}

.review-content p {
    margin: 0;
    white-space: pre-wrap;
}

/* Адаптивность */
/* Фиксированная ширина правой колонки на средних экранах */
@media (max-width: 1200px) {
    .tour-detail-content {
        grid-template-columns: 1fr 400px;
    }
}

/* Адаптивные стили для календаря дат */
@media (max-width: 768px) {
    .dates-list {
        grid-template-columns: 1fr;
    }
    
    .date-range {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .date-arrow {
        transform: rotate(90deg);
    }
    
    .date-start,
    .date-end {
        text-align: center;
    }
}

@media (max-width: 968px) {
    .tour-detail-content {
        grid-template-columns: 1fr;
    }

    .main-image {
        height: 400px;
    }

    .tour-info .tour-title {
        font-size: 2rem;
    }

    .tour-price-section {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-large {
        width: 100%;
    }

    .reviews-header {
        flex-direction: column;
        align-items: stretch;
    }

    .average-rating {
        justify-content: center;
    }
}

