* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: url("../photo/background.jpg") no-repeat center center / cover;
    background-attachment: fixed;

    font-family: 'Montserrat', sans-serif;
    color: white;
    overflow-x: hidden;
}

/* затемнення */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    z-index: 0;
}

/* glow */
body::before {
    content: "";
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.25), transparent);
    top: 20%;
    left: 10%;
    filter: blur(100px);
    z-index: 0;
}

/* логотип */
.logo {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 28px;
    letter-spacing: 3px;
    font-weight: 600;
    z-index: 2;
    text-decoration: none;
    color: white;
}

.container {
    position: relative;
    z-index: 1;
    padding: 100px 20px 40px;
    text-align: center;
}

.gallery {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 0 25px rgba(139,92,246,0.4);
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

/* === КНОПКА З АНОМАЦІЄЮ === */
.btn {
    position: relative;
    margin-top: 40px;
    padding: 20px 45px;
    width: 280px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    color: white;
    font-size: 18px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    overflow: hidden;
    transition: 0.3s;
}

/* лінія */
.btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 2px;

    background: linear-gradient(
        120deg,
        transparent 30%,
        #8b5cf6,
        transparent 70%
    );

    background-size: 200% 200%;

    -webkit-mask: 
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;

    opacity: 0;
}

.btn:hover::before {
    opacity: 1;
    animation: borderRun 1.2s linear infinite;
}

.btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 25px rgba(139,92,246,0.5);
}

@keyframes borderRun {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* === МОДАЛКА === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal.show {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(139,92,246,0.6);
}

/* хрестик */
.close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 35px;
    cursor: pointer;
    background: transparent;
    border: 0;
    color: white;
}

/* === СТРІЛКИ === */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    cursor: pointer;
    padding: 10px;
    transition: 0.3s;
    background: transparent;
    border: 0;
    color: white;
}

.arrow:hover {
    color: #8b5cf6;
    transform: translateY(-50%) scale(1.2);
}

.left { left: 40px; }
.right { right: 40px; }

@media (max-width: 768px) {
    body {
        min-height: 100svh;
        background-attachment: scroll;
    }

    body::before {
        width: 320px;
        height: 320px;
        top: 8%;
        left: 50%;
        transform: translateX(-50%);
        filter: blur(80px);
    }

    .logo {
        position: relative;
        top: auto;
        left: auto;
        display: block;
        margin: 24px auto 8px;
        width: fit-content;
        font-size: 22px;
        letter-spacing: 2px;
    }

    .container {
        padding: 16px 16px 32px;
    }

    .container h1 {
        font-size: 26px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 20px;
    }

    .card {
        padding: 8px;
        border-radius: 18px;
    }

    .card:hover {
        transform: none;
    }

    .card img {
        height: 220px;
    }

    .btn {
        width: min(100%, 340px);
        padding: 18px 24px;
        font-size: 16px;
    }

    .modal img {
        max-width: calc(100% - 32px);
        max-height: 72%;
    }

    .close {
        top: 18px;
        right: 20px;
    }

    .arrow {
        font-size: 34px;
        top: auto;
        bottom: 18px;
        transform: none;
        padding: 8px 10px;
    }

    .arrow:hover {
        transform: none;
    }

    .left {
        left: 20px;
    }

    .right {
        right: 20px;
    }
}
