body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: #f4f6fb;
    color: #222;
}

header {
    background: #222;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
}

nav a {
    color: #fff;
    margin: 0 1rem;
    text-decoration: none;
    font-weight: bold;
}

.hero {
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: #fff;
    color: #2575fc;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: 0.2s, color 0.2s;
}

.btn:hover {
    background: #2575fc;
    color: #fff;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
    padding: 3rem 3rem;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 420px;
    min-height: 340px;
    text-align: center;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    margin-left: auto;
    margin-right: auto;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card h3 {
    margin: 1rem 0 0.5rem 0;
}

.card p {
    color: #555;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.card a {
    display: inline-block;
    margin-bottom: 1rem;
    color: #2575fc;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #2575fc;
    transition: color 0.2s, border-color 0.2s;
}

.card a:hover {
    color: #6a11cb;
    border-color: #6a11cb;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* Fullscreen galerija */
#fullscreen-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 30, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    flex-direction: column;
}



#fullscreen-gallery .carousel-images img {
    max-width: 90vw;
    max-height: 80vh;
    margin: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    background: #fff;
    display: block;
}

#fullscreen-gallery .close-gallery {
    position: absolute;
    top: 32px;
    right: 48px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s;
}

#fullscreen-gallery .close-gallery:hover {
    color: #ff3860;
}

#fullscreen-gallery .prev,
#fullscreen-gallery .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0 24px;
    transition: color 0.2s;
}

#fullscreen-gallery .prev:hover,
#fullscreen-gallery .next:hover {
    color: #6a11cb;
}

#fullscreen-gallery .prev {
    left: 32px;
}

#fullscreen-gallery .next {
    right: 32px;
}

#fullscreen-gallery .carousel-images img {
    max-width: 90vw;
    max-height: 80vh;
    margin: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    background: #fff;
    display: none;
}

#fullscreen-gallery .carousel-images img.active {
    display: block;
}

/* Glide modal overlay */
.glide-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 30, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.glide-modal-content {
    background: #222;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 32px 16px 16px 16px;
    max-width: 1000px;
    width: 95vw;
    /* Мало смањено због маргина */
    height: 95vh;
    /* <-- ИСПРАВКА: Контејнер је сада 95% висине екрана */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.glide-modal-content img {
    max-width: 100%;
    max-height: 100%;
    /* <-- ИСПРАВКА: Слика ће заузети максимално расположиву висину унутар контејнера */
    object-fit: contain;
    height: auto;
    border-radius: 12px;
    /* Уклоните позадину и сенку са слике ако желите да се боље уклопи */
    /* background: #fff; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); */
    margin: auto;
}

.glide-modal-close {
    position: absolute;
    top: 12px;
    right: 24px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
}

/* Custom slideshow modal */
.custom-slideshow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 30, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.custom-slideshow-content {
    background: #222;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 32px 16px 16px 16px;
    max-width: 1400px;
    width: 98vw;
    height: 90vh;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.custom-slideshow-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    height: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin: 0 32px;
}

.custom-slideshow-close {
    position: absolute;
    top: 12px;
    right: 24px;
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
}

.custom-slideshow-prev,
.custom-slideshow-next {
    font-size: 2.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0 24px;
    transition: color 0.2s;
}

.custom-slideshow-prev:hover,
.custom-slideshow-next:hover {
    color: #6a11cb;
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }

    .card {
        width: 98vw;
        min-height: 260px;
        margin-left: 0;
        margin-right: 0;
    }

    .card img {
        height: 180px;
    }
}