/* ==========================================================================
   Global Feature Modal Lightbox (Gutenberg Friendly)
   Targeting Screenshot 2 UI Match
   ========================================================================== */

.feature-card {
    display: flex;
    flex-direction: column;
}

.card-desc {
    flex-grow: 1;
}

.card-gallery-img {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-gallery-img img {
    border: solid 1px #ccc;
    border-radius: 6px;
    object-fit: cover !important;
}

.card-gallery-img .wp-block-image {
    width: 100% !important;
    height: 80px;
}

.modal-main-image-wrapper {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

/* Hover Zoom Lens Box */
.img-zoom-lens {
    position: absolute;
    width: 220px;
    height: 180px;
    border: 2px solid #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background-repeat: no-repeat;
    pointer-events: none;
    display: none;
    z-index: 10;
    background-color: #ffffff;
    border-radius: 4px;
}

.feature-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.feature-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.feature-modal-container {
    background-color: #ffffff;
    width: 90%;
    max-width: 1280px;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    padding: 0;
    margin: 5vh auto;
    overflow-y: auto;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 60% 40%;
}

/* ==========================================================================
   Left Side: Gallery Section
   ========================================================================== */

.modal-gallery-section {
    display: flex;
    background-color: #ffffff;
    padding: 24px;
    border-right: 1px solid #eeeeee;
}

.modal-thumbnails-wrapper {
    width: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-right: 20px;
    overflow-y: auto;
}

.modal-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ccc;
    transition: all 0.2s ease;
    height: 100px;
}

.modal-thumb.active-thumb {
    border-color: #b92525;
}

.modal-main-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

#modal-active-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 5;
    transition: background-color 0.2s;
}

.slider-arrow:hover {
    background-color: rgba(185, 37, 37, 0.8);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* ==========================================================================
   Right Side: Content Section
   ========================================================================== */

.modal-content-section {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.modal-badges-target {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.modal-title-target {
    font-size: 18px;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.3;
    margin: 0 0 15px 0;
    color: #333333;
}

.modal-desc-target {
    font-size: 15px;
    line-height: 1.5;
    color: #555555;
    font-family: Manrope, sans-serif;
}

.modal-close-btn {
    position: absolute;
    top: 0;
    right: 14px;
    background: none;
    border: none;
    font-size: 40px;
    color: #999999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #b92525;
}

/* ==========================================================================
   Responsive Breakpoints for Mobile
   ========================================================================== */

@media (max-width: 900px) {
    .modal-body-grid {
        grid-template-columns: 100%;
    }

    .modal-gallery-section {
        border-right: none;
        border-bottom: 1px solid #eeeeee;
    }

    .modal-gallery-section {
        flex-direction: column-reverse;
        padding: 20px;
    }

    .modal-thumbnails-wrapper {
        width: 100%;
        flex-direction: row;
        margin-right: 0;
        margin-top: 15px;
        overflow-x: auto;
        justify-content: start;
        padding-bottom: 5px;
    }

    .modal-thumb {
        width: 80px;
    }

    .modal-main-image-wrapper {
        aspect-ratio: 16/9;
        padding: 0;
    }

    .modal-content-section {
        padding: 20px;
    }

    .modal-title-target {
        font-size: 22px;
    }
}