/* Стили для галереи */
.gallery-container {
    margin-top: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.gallery-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.gallery-overlay i {
    color: #fff;
    font-size: 24px;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay i {
    transform: scale(1);
}

.gallery-caption {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    background: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-link img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-link img {
        height: 200px;
    }
}

/* Стили для Magnific Popup */
.mfp-bg {
    background: rgba(0,0,0,0.9);
}

.mfp-container {
    padding: 20px;
}

.mfp-figure {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.mfp-img {
    max-width: 100%;
    height: auto;
}

.mfp-bottom-bar {
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 15px;
    text-align: center;
}

.mfp-counter {
    color: #fff;
    font-size: 14px;
}

.mfp-arrow {
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mfp-arrow:hover {
    background: rgba(0,0,0,0.9);
}

.mfp-arrow:before {
    border: none;
    font-family: 'FontAwesome';
    font-size: 20px;
    color: #fff;
}

.mfp-arrow-left:before {
    content: '\f104';
}

.mfp-arrow-right:before {
    content: '\f105';
}

.mfp-close {
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mfp-close:hover {
    background: rgba(0,0,0,0.9);
}

.mfp-close:before {
    content: '\f00d';
    font-family: 'FontAwesome';
    font-size: 16px;
    color: #fff;
}
