/**
 * Galería grid del detalle (plantilla por defecto / legacy).
 */

.apis-detail-gallery-grid
{
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.apis-detail-gallery-grid .apis-gallery-slider
{
    display: flex;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.apis-detail-gallery-grid .img-main
{
    width: 60%;
    max-height: 500px;
    position: relative;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.apis-detail-gallery-grid .img-main img
{
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.apis-detail-gallery-grid .img-main:hover img
{
    transform: scale(1.05);
}

.apis-detail-gallery-grid .apis-gallery-zoom-icon
{
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 3;
}

.apis-detail-gallery-grid .apis-gallery-zoom-icon i
{
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.8);
}

.apis-detail-gallery-grid .img-main:hover .apis-gallery-zoom-icon,
.apis-detail-gallery-grid .img-secondary-wrapper:hover .apis-gallery-zoom-icon
{
    opacity: 1;
}

.apis-detail-gallery-grid .img-main:hover .apis-gallery-zoom-icon i,
.apis-detail-gallery-grid .img-secondary-wrapper:hover .apis-gallery-zoom-icon i
{
    transform: scale(1);
}

.apis-detail-gallery-grid .img-secondary-wrapper .apis-gallery-zoom-icon i
{
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
}

.apis-detail-gallery-grid .images-secondary
{
    width: 40%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: min-content;
    align-content: start;
    gap: 1rem;
    max-height: 500px;
    padding: 4px;
}

.apis-detail-gallery-grid .img-secondary-wrapper
{
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    height: fit-content;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

.apis-detail-gallery-grid .img-secondary-wrapper img
{
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 10px;
    display: block;
}

.apis-detail-gallery-grid .img-secondary-wrapper:hover img
{
    transform: scale(1.1);
}

.apis-detail-gallery-grid .apis-gallery-view-all
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.apis-detail-gallery-grid .apis-gallery-view-all:hover
{
    color: #fff;
}

@media (max-width: 1200px)
{
    .apis-detail-gallery-grid .apis-gallery-slider
    {
        flex-direction: column;
    }

    .apis-detail-gallery-grid .img-main
    {
        width: 100%;
        border-radius: 8px 8px 0 0;
    }

    .apis-detail-gallery-grid .img-main img
    {
        height: 400px;
    }

    .apis-detail-gallery-grid .images-secondary
    {
        width: 100%;
        border-radius: 0 0 8px 8px;
    }
}

@media (max-width: 992px)
{
    .apis-detail-gallery-grid .img-secondary-wrapper img
    {
        height: 150px;
    }

    .apis-detail-gallery-grid .img-main img
    {
        height: 300px;
    }

    .apis-detail-gallery-grid .apis-gallery-view-all
    {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 768px)
{
    .apis-detail-gallery-grid .img-main img
    {
        height: 250px;
    }

    .apis-detail-gallery-grid .img-secondary-wrapper img
    {
        height: 170px;
    }
}
