/* ==========================================================================
   Petals Floral Gallery - Pure Image Viewing Lightbox & Showcase Styles
   ========================================================================== */

/* Gallery Card Hover Effects */
.gallery-item-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(23, 101, 102, 0.15);
}

.gallery-item-card .gallery-img-wrapper img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item-card:hover .gallery-img-wrapper img {
    transform: scale(1.06);
}

.gallery-item-card .petals-media-count-badge {
    transition: background 0.3s ease, transform 0.3s ease;
}

.gallery-item-card:hover .petals-media-count-badge {
    background: #176566;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(23, 101, 102, 0.35);
}

/* ==========================================================================
   Lightbox Modal Overlay (Pure Image Viewing)
   ========================================================================== */
.petals-gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(6, 18, 19, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.petals-gallery-modal.is-active {
    display: flex;
    opacity: 1;
}

/* Modal Content Container */
.petals-gallery-modal-dialog {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
}

/* Floating Close Button (Top-Right) */
.petals-modal-close-btn {
    position: fixed;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 101, 102, 0.2);
    color: #176566;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    z-index: 1000000;
}

.petals-modal-close-btn:hover {
    background: #176566;
    color: #ffffff;
    border-color: #176566;
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 6px 24px rgba(23, 101, 102, 0.45);
}

@media (max-width: 640px) {
    .petals-modal-close-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Modal Stage (Direct Image Container) */
.petals-modal-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
}

.petals-modal-media-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 88px;
    box-sizing: border-box;
    cursor: zoom-out;
}

@media (max-width: 640px) {
    .petals-modal-media-wrap {
        padding: 56px 16px 28px;
    }
}

.petals-modal-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: default;
    animation: petalsImgPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes petalsImgPop {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.petals-modal-video {
    max-width: 90vw;
    max-height: 85vh;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #000000;
    outline: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.petals-modal-iframe {
    width: 90vw;
    max-width: 1000px;
    height: 56.25vw;
    max-height: 75vh;
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

/* Floating Navigation Buttons (Matching Petals Theme Slider Controls) */
.petals-modal-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff !important;
    color: #176566 !important;
    border: 1px solid rgba(228, 228, 231, 0.9) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35) !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 1000000;
}

.petals-modal-nav-btn:hover {
    background: #176566 !important;
    color: #ffffff !important;
    border-color: #176566 !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 8px 28px rgba(23, 101, 102, 0.45) !important;
}

.petals-modal-nav-prev {
    left: 28px;
}

.petals-modal-nav-next {
    right: 28px;
}

.petals-modal-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.5;
}

@media (max-width: 640px) {
    .petals-modal-nav-btn {
        width: 40px;
        height: 40px;
    }
    .petals-modal-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    .petals-modal-nav-prev {
        left: 10px;
    }
    .petals-modal-nav-next {
        right: 10px;
    }
}
