/**
 * Virtual Tours Archive Styles
 */

/* === Контейнер === */
.virtual-tours-archive {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* === Фильтры === */
.vt-filters {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.vt-filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.vt-filter-item {
    flex: 1;
    min-width: 250px;
}

/* Поиск */
.vt-search-input {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.vt-search-input:focus {
    outline: none;
    border-color: #6f9c76;
    box-shadow: 0 0 0 3px rgba(111, 156, 118, 0.1);
}

.vt-search-input::placeholder {
    color: #999;
}

/* Select фильтр */
.vt-select {
    width: 100%;
    /*padding: 12px 18px;*/
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.vt-select:focus {
    outline: none;
    border-color: #6f9c76;
    box-shadow: 0 0 0 3px rgba(111, 156, 118, 0.1);
}

/* === Сетка карточек === */
.vt-results {
    min-height: 300px;
    transition: opacity 0.3s ease;
}

.vt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* === Карточка тура === */
.vt-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.vt-card-clickable {
    cursor: pointer;
}

.vt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Изображение */
.vt-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

.vt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vt-card:hover .vt-card-image img {
    transform: scale(1.08);
}

/* Оверлей с иконкой Play */
.vt-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vt-card:hover .vt-card-overlay {
    opacity: 1;
}

.vt-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6f9c76;
    padding-left: 4px; /* Центрируем треугольник */
    transition: transform 0.3s ease;
}

.vt-card:hover .vt-play-icon {
    transform: scale(1.1);
}

/* Placeholder для карточек без изображения */
.vt-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.vt-placeholder-icon {
    font-size: 60px;
    opacity: 0.3;
}

/* Название */
.vt-card-title {
    padding: 20px;
}

.vt-card-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* === Loader === */
.vt-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.vt-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(111, 156, 118, 0.2);
    border-top-color: #6f9c76;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Нет результатов === */
.vt-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.vt-no-results p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .virtual-tours-archive {
        padding: 20px 15px;
    }
    
    .vt-filters {
        padding: 20px;
    }
    
    .vt-filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .vt-filter-item {
        min-width: 100%;
    }
    
    .vt-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .vt-card-image {
        height: 200px;
    }
    
    .vt-play-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .vt-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vt-card-title h3 {
        font-size: 16px;
    }
}

/* === Совместимость с Fancybox === */
.fancybox-container {
    z-index: 99999;
}

.fancybox-slide--iframe .fancybox-content {
    width: 90%;
    height: 90%;
    max-width: 1400px;
    margin: 0 auto;
}