/* =====================================
   PROJECT MODAL
===================================== */

.project-modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);

    z-index: 9999;
}

.project-modal-card {
    position: relative;

    width: min(900px, 92vw);

    max-height: 90vh;
    overflow-y: auto;

    padding: 40px;

    background: var(--cl-pink);

    border: 8px solid var(--cl-blue);
    border-radius: 24px;

    box-shadow: 14px 14px 0 var(--cl-blue);

    animation: modalPop .18s ease-out;
}

@keyframes modalPop {

    from {
        transform: scale(.9);
        opacity: 0;
    }

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

}

.project-modal-close {

    position: absolute;

    top: 16px;
    right: 16px;

    width: 54px;
    height: 54px;

    border: 4px solid var(--cl-blue);
    border-radius: 50%;

    background: var(--cl-orange);

    color: white;

    font-size: 1.5rem;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 4px 4px 0 var(--cl-blue);

    transition: .15s;

}

.project-modal-close:hover {

    transform: translate(-2px, -2px);

    box-shadow: 6px 6px 0 var(--cl-blue);

}

.project-modal-close:active {

    transform: translate(4px, 4px);

    box-shadow: none;

}

#modalTitle {

    margin: 0 0 20px;

    text-align: center;

    color: var(--cl-blue);

    font-size: 2.2rem;

}

#modalDescription {

    margin-bottom: 30px;

    padding: 18px;

    border: 3px solid var(--cl-blue);
    border-radius: 12px;

    background: white;

    font-family: "Courier New", monospace;

    font-size: 1.05rem;
    line-height: 1.6;

    color: black;

}

/* =====================================
   PROJECT IMAGE CAROUSEL
===================================== */

.modal-gallery {

    display: flex;

    gap: 20px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    padding: 8px 4px 18px;

    margin-bottom: 30px;

}

/* Chrome / Edge / Brave */

.modal-gallery::-webkit-scrollbar {

    height: 10px;

}

.modal-gallery::-webkit-scrollbar-track {

    background: white;

    border: 2px solid var(--cl-blue);

    border-radius: 20px;

}

.modal-gallery::-webkit-scrollbar-thumb {

    background: var(--cl-orange);

    border-radius: 20px;

}

/* Firefox */

.modal-gallery {

    scrollbar-width: thin;
    scrollbar-color: var(--cl-orange) white;

}

.modal-gallery img {

    flex: 0 0 auto;

    width: 320px;
    height: 190px;

    object-fit: cover;

    scroll-snap-align: center;

    border: 5px solid var(--cl-blue);
    border-radius: 16px;

    background: white;

    box-shadow: 6px 6px 0 var(--cl-blue);

    transition:
        transform .18s ease,
        box-shadow .18s ease;

    cursor: pointer;

}

.modal-gallery img:hover {

    transform: translateY(-6px);

    box-shadow: 10px 10px 0 var(--cl-blue);

}

.modal-gallery img:active {

    transform: translateY(2px);

    box-shadow: 3px 3px 0 var(--cl-blue);

}

/* =====================================
   ACTION BUTTONS
===================================== */

.project-modal-actions {

    display: flex;

    justify-content: center;

    gap: 20px;

    flex-wrap: wrap;

}

.modal-button {

    display: flex;
    justify-content: center;
    align-items: center;

    width: 220px;
    height: 70px;

    text-decoration: none;

    font-size: 1.2rem;
    font-weight: bold;

    color: black;

    background: var(--cl-lime);

    border: 6px solid var(--cl-blue);

    border-radius: 50px;

    box-shadow: 6px 6px 0 var(--cl-blue);

    transition: .12s;

}

.modal-button:hover {

    background: var(--cl-orange);

    color: white;

    transform: translate(-2px, -2px);

    box-shadow: 8px 8px 0 var(--cl-blue);

}

.modal-button:active {

    transform: translate(6px, 6px);

    box-shadow: none;

}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 768px) {

    .project-modal-card {

        width: 95vw;

        max-height: 90vh;

        overflow-y: auto;

        padding: 28px;

    }

    .modal-gallery img {

        width: 260px;
        height: 155px;

    }

    .project-modal-actions {

        flex-direction: column;

        align-items: center;

    }

    .modal-button {

        width: 100%;

    }

}

/* =====================================
   IMAGE LIGHTBOX
===================================== */

.image-lightbox {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, .9);

    z-index: 10000;
}

.image-lightbox img {
    max-width: 92vw;
    max-height: 92vh;

    border: 6px solid white;
    border-radius: 12px;

    object-fit: contain;
}

.lightbox-close {
    position: absolute;

    top: 20px;
    right: 20px;

    width: 50px;
    height: 50px;

    border: none;
    border-radius: 50%;

    background: white;

    font-size: 1.5rem;
    font-weight: bold;

    cursor: pointer;
}

/* =====================================
   LIGHTBOX NAVIGATION ARROWS
===================================== */

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    width: 60px;
    height: 60px;
    
    background: white;
    border: none;
    border-radius: 50%;
    
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s ease, background 0.1s ease;
}

.lightbox-nav:hover {
    background: var(--cl-orange);
    color: white;
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.9);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}



/* Make sure mobile layout stacks nicely or hides if too small */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

/* =====================================
   HIDDEN
===================================== */

.hidden {
    display: none !important;
}


