/* Галерея */
.gallery-section {
    padding: 60px 0;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Основные вкладки */
.main-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.main-tab {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.main-tab:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.main-tab.active {
    background: #fbbb50;
    border-color: #fbbb50;
    color: #fff;
}

/* Контент основных вкладок */
.main-tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.main-tab-pane.active {
    display: block;
}

/* Подвкладки */
.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px;
    background: #fafafa;
    border-radius: 10px;
}

.sub-tab {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.sub-tab:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.sub-tab.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #fff;
}

/* Контент подвкладок */
.sub-tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.sub-tab-pane.active {
    display: block;
}

/* Сетка изображений */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

.gallery-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.gallery-empty-section {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Адаптивность */
@media (max-width: 1024px) {
    .main-tabs {
        gap: 8px;
    }
    
    .main-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .sub-tabs {
        gap: 6px;
    }
    
    .sub-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .main-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .sub-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 10px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .main-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .sub-tab {
        padding: 5px 12px;
        font-size: 12px;
    }
}