﻿/* Gallery */

.hy-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 0 10px;
    box-sizing: border-box;
}

/* Modal Image */
.hy-modal-content {
    margin: auto;
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

/* Close Button */
.hy-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--light-color);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
}

/* Responsive Tweaks */
@media (max-width: 768px) {
    .hy-modal-content {
        max-height: 70vh;
    }

    .hy-modal-close {
        font-size: 28px;
        right: 15px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .hy-modal-close {
        font-size: 26px;
        right: 12px;
        top: 8px;
    }
}

.hy-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 50px;
    box-sizing: border-box;
}

.hy-modal-content {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: none;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.hy-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 35px;
    color: var(--light-color);
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: 0.3s ease;
}

    .hy-modal-close:hover {
        color: var(--base-color);
    }

@media (max-width: 768px) {
    .hy-modal-content {
        max-width: 65vw;
        max-height: 80vh;
        margin-top: 65px;
        width: auto;
        height: auto;
    }

    .hy-modal-close {
        font-size: 28px;
        right: 15px;
        top: 15px;
    }
}

@media (min-width:320px) and (max-width:530px) {
    .hy-modal-content {
        max-width: 75vw;
        max-height: 100vh;
        margin-top: 200px;
        width: auto;
        height: auto;
    }
}

@media (min-width:531px) and (max-width:767px) {
    .hy-modal-content {
        max-width: 75vw;
        max-height: 100vh;
        margin-top: 80px;
        width: auto;
        height: auto;
    }
}

@media (min-width:768px) and (max-width:992px) {
    .hy-modal-content {
        max-width: 75vw;
        max-height: 80vh;
        margin-top: 50px;
        width: auto;
        height: auto;
    }
}

.hy-carousel-container {
    margin: 50px 0;
    overflow: hidden;
    position: relative;
    /* padding: 10px 0; */
}

/* Top Carousel (Right to Left) */
.hy-carousel-wrapper {
    overflow: hidden;
    width: 100%;
}

.hy-top-carousel {
    display: flex;
    animation: hy-slide-right-left 250s linear infinite;
    width: max-content;
    backface-visibility: hidden;
    will-change: transform;
}

    .hy-top-carousel:hover {
        animation-play-state: paused;
    }

/* Carousel Item Styling */
.hy-carousel-item {
    min-width: 300px;
    /* height: 220px; */
    border-radius: 10px;
    margin: 0 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 300px;
    flex: 0 0 auto;
}

    .hy-carousel-item:hover {
        transform: translateY(-8px);
    }

.hy-carousel-img {
    transition: transform 0.5s ease;
    width: 100%;
    max-width: 400px;
    height: 300px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    margin: auto;
    border-radius: 8px;
}

.hy-carousel-item:hover .hy-carousel-img {
    transform: scale(1.05);
}

.hy-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(5, 120, 175, 0.85);
    padding: 15px;
    color: var(--light-color);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.hy-carousel-item:hover .hy-carousel-overlay {
    transform: translateY(0);
}

.hy-carousel-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--light-color);
}

.hy-carousel-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Animations */
@keyframes hy-slide-right-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes hy-slide-left-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hy-header h1 {
        font-size: 2.2rem;
    }

    .hy-carousel-item {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hy-header h1 {
        font-size: 1.8rem;
    }

    .hy-header p {
        font-size: 1rem;
    }

    .hy-carousel-title {
        font-size: 1.4rem;
    }

    .hy-carousel-item {
        height: 160px;
    }
}

@media (max-width: 576px) {
    .hy-container {
        padding: 20px 15px;
    }

    .hy-header h1 {
        font-size: 1.6rem;
    }

    .hy-carousel-container {
        margin: 40px 0;
    }

    .hy-carousel-item {
        height: 200px;
        margin: 0 10px;
    }

    .hy-carousel-controls {
        display: none;
    }
}

/*******************************************************/
/**************** ## Gallery Item ****************/
/*******************************************************/

.gallery-item {
    margin-bottom: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--light-color);
    text-align: center;
}

    .gallery-item .image {
        margin: 10px;
        overflow: hidden;
        position: relative;
        border-radius: 10px;
        aspect-ratio: 1 / 1;
    }

        .gallery-item .image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
            filter: brightness(0.85);
        }

    /* Hover zoom */
    .gallery-item:hover .image img {
        transform: scale(1.15);
    }

    .gallery-item.style-two {
        border: 1px solid var(--border-color);
    }

        .gallery-item.style-two .image {
            display: block;
        }

@media (max-width: 768px) {
    .gallery-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 375px) {
    .gallery-item {
        margin-bottom: 15px;
    }
}
