/*Адаптировано*/
/* Стили галереи */
.gallery-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(25, 25, 25, 0.98) 100%);
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--ink);
    text-align: center;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-subtitle {
    font-size: 1.2rem;
    color: var(--neon);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.6),
            0 0 30px rgba(255, 94, 0, 0.3);
}

.watermarked-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    height: 300px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.gallery-item:hover .watermarked-image {
    border: 2px solid var(--neon);
    box-shadow: inset 0 0 30px rgba(255, 94, 0, 0.2);
}

.watermarked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
    transform-origin: center;
}

.gallery-item:hover .watermarked-image img {
    transform: scale(1.15);
}

.watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    z-index: 2;
    transition: all 0.3s ease;
}

.gallery-item:hover .watermark {
    color: var(--neon);
    background: rgba(0, 0, 0, 0.8);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            135deg,
            rgba(255, 94, 0, 0.1) 0%,
            rgba(255, 94, 0, 0.05) 50%,
            transparent 100%
    );
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 2rem;
    color: white;
    background: rgba(255, 94, 0, 0.8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
}

.view-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.gallery-item:hover .zoom-icon {
    transform: scale(1);
}

.gallery-item:hover .view-text {
    opacity: 1;
    transform: translateY(0);
}

/* Стили модального окна */
.image-modal .modal-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    z-index: 10001;
}

.image-modal .modal-main {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
}

.image-modal .image-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.image-modal .modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal .nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal .nav-btn:hover {
    background: rgba(255, 94, 0, 0.5);
    transform: scale(1.1);
}

/* Кнопка закрытия для галереи */
.image-modal .modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 94, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 10002;
}

.image-modal .modal-close:hover {
    background: rgba(255, 94, 0, 0.7);
    transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .gallery-title {
        font-size: 2.5rem;
    }
    .gallery-subtitle {
        font-size: 1rem;
    }
    .watermarked-image {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .watermarked-image {
        height: 220px;
    }
    .zoom-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    .image-modal .modal-main {
        flex-direction: column;
        gap: 10px;
    }
    .image-modal .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 1.6rem;
    }
    .gallery-subtitle {
        font-size: 0.9rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .watermarked-image {
        height: 200px;
    }
    .zoom-icon {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
    .view-text {
        font-size: 12px;
    }
    .image-modal .modal-close {
        top: 10px;
        right: 10px;
    }
}