/* static/css/gallery.css */

/* Секция галереи */
.gallery-section {
    margin: 60px 0;
}

.gallery-title {
    text-align: center;
    margin: 0 0 40px;
    font-size: 28px;
    font-weight: 600;
    color: #23282c;
    position: relative;
}

.gallery-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #fa6c3a;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Сетка галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Карточка галереи */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.gallery-item__link {
    display: block;
    text-decoration: none;
}

.gallery-item__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-item__image {
    transform: scale(1.05);
}

/* Оверлей при наведении */
.gallery-item__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 15px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__icon {
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.gallery-item__icon::before {
    content: "🔍";
    font-size: 16px;
}

/* Пустое состояние */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
}

/* Адаптация для планшетов */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .gallery-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .gallery-section {
        margin: 40px 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .gallery-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .gallery-title::after {
        width: 50px;
        margin-top: 10px;
    }
}