/* Extracted from Views/Projects/view.cshtml @section styles */

body {
    background-color: #fff !important;
}

.projdiv {
    display: block;
    margin-left: 15%;
    margin-right: 5%;
}

.galleryproj {
    display: block;
    margin-left: 15%;
    margin-right: 5%;
}

.desproj {
    display: block;
    margin-left: 15%;
    margin-right: 5%;
}

.divarrow {
    position: fixed;
    height: 100%;
    width: 5%;
    top: 0;
    right: 0;
}

.projectgallery {
    display: none
}

.projectdescription {
    display: none
}

.gallery-item {
    position: relative
}

.gallery-active .slick-dots {
    position: fixed;
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: center;
    gap: 3px;
    flex-flow: column nowrap;
    direction: ltr;
    left: 15px;
    bottom: 20px;
    z-index: 220;
}

    .gallery-active .slick-dots li {
        list-style: none;
        line-height: 0;
        padding: 2px;
    }

        .gallery-active .slick-dots li button {
            text-indent: -9999999999px;
            padding: 0;
            border: 2px solid #000;
            border-radius: 0%;
            width: 16px;
            height: 16px;
            background: white;
        }

        .gallery-active .slick-dots li.slick-active button {
            border-color: #000;
            background: #000;
        }

.galleryproj {
    animation-duration: 4s;
    animation-delay: 2s;
    display: block;
    margin-left: 15%;
    margin-right: 5%;
    transition: .3s all ease;
}

.desproj {
    animation-duration: 4s;
    animation-delay: 2s;
    display: block;
    margin-left: 15%;
    margin-right: 5%;
    transition: .3s all ease;
}

.projectdes {
    animation-duration: 5s;
    animation-delay: 3s;
    transition: .3s all ease;
}

gallery-active {
    position: relative
}

.slick-prev {
    position: absolute;
    top: 50%;
    left: 10px;
    z-index: 1999;
}

.slick-next {
    position: absolute;
    top: 50%;
    right: 10px;
}

/* ///////*/

/* Updated CSS to fix the line display issue */
.galleryproj {
    display: block;
    margin-left: 15%;
    margin-right: 5%;
    height: 90vh; /* Use viewport height but leave some space */
}

.desproj {
    display: block;
    margin-left: 15%;
    margin-right: 5%;
}

.gallery-active {
    height: 100%;
}

.gallery-item {
    position: relative;
    height: 100%;
}

    /* Image container initial state */
    .gallery-item.is-loading::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 50px;
        height: 50px;
        border: 5px solid #f3f3f3;
        border-top: 5px solid #3498db;
        border-radius: 50%;
        animation: spin 2s linear infinite;
        z-index: 5;
    }

    /* Fade out loading indicator when image is loaded */
    .gallery-item.slick-loading::before {
        display: block;
    }

    .gallery-item img.slick-loading + .gallery-item::before {
        display: none;
    }

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Improved arrow styles to be more visible */
.slick-prev, .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Prev arrow on the left, next arrow on the right: the right arrow
   advances forward so the active dot moves top to bottom. */
.slick-prev {
    left: 20px !important;
    right: auto !important;
}

.slick-next {
    right: 20px !important;
    left: auto !important;
}

    .slick-prev img, .slick-next img {
        width: 10px;
        height: 10px;
        max-width: none !important;
        max-height: none !important;
    }

/* Make arrows always visible */
.slick-arrow {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

    .slick-arrow:hover {
        opacity: 1;
    }

/* The key fix - make sure images can expand properly */
.gallery-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh; /* Slightly smaller to ensure no scrolling */
    object-fit: contain;
    margin: 0 auto;
    display: block !important; /* Force display block */
    pointer-events: auto; /* Enable pointer events for zoom icon */
}

/* Fix slick slider container heights */
.slick-list, .slick-track, .slick-slide {
    height: 100%;
}

/* Ensure images are visible */
.slick-slide {
    opacity: 1;
    visibility: visible;
}

/* Zoom Icon Styles */
.zoom-icon {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 15;
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item:hover .zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.zoom-icon:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.zoom-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Fancybox customization */
.fancybox-toolbar {
    background: rgba(0, 0, 0, 0.8);
}

.fancybox-caption {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.text-justified {
    text-align: justify;
}

.fancybox-button.fancybox-button--download {
    display: none !important;
}
