.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    /* allow scrolling when content is taller than screen */
    padding: 40px 0;
    /* add spacing so content doesn’t touch edges */
   /* overflow: hidden;
     Prevent modal from scrolling */

}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 700px;
    color: #050b42;
    width: 90%;
    max-height: 60vh;
    /* limit height */
    overflow-y: auto;
    /* scroll inside modal-content */
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    margin: 15px 0;
    border-radius: 8px;
}

#modal-gallery img {
    max-width: 100%;
    margin: 10px 0;
    border-radius: 6px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #fa0303;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: rgb(245, 89, 89);
}


/*  Servis ............................... */
/* Overlay Background */
.model-servs {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 25, 47, 0.85); /* dark overlay */
    backdrop-filter: blur(6px); /* modern blur effect */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Modal Box */
.model-content {
    background: linear-gradient(145deg, #0d1b2a, #1b263b); /* modern gradient */
    color: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 238, 255, 0.2);
    text-align: left;
    position: relative;
    animation: popup 0.4s ease;
}

/* Title */
.model-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
    color: #0ef;
    font-weight: 600;
    border-bottom: 2px solid rgba(0,238,255,0.2);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Paragraph */
.model-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccd6f6;
}

/* Close Button */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    font-size: 1.5rem;
    color: #0ef;
    transition: transform 0.3s ease, color 0.3s ease;
}

.close:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff4c60;
}

.model-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-header i {
    font-size: 1.8rem;
    color: #0ef;
}

#model-list {
    margin-top: 15px;
    padding-left: 20px;
    list-style: disc;
    color: #a8b2d1;
}

#model-list li {
    margin-bottom: 8px;
}

/* Animation */
@keyframes popup {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}