/**
 * Destination Gallery Widget - Frontend Styles
 */

/* Wrapper */
.leo-dest-gallery-wrapper {
    width: 100%;
}

/* Main Grid: 60% large + 40% small */
.leo-dest-gallery {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 10px;
    width: 100%;
}

/* Large Image Container */
.leo-dest-gallery-large {
    display: flex;
    aspect-ratio: 940 / 448;
}

.leo-dest-gallery-large .leo-dest-gallery-image {
    width: 100%;
    height: 100%;
}

.leo-dest-gallery-large .leo-dest-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Small Images Grid: 2x2 + button - ratio adjusted to match large image height at 60/40 split */
.leo-dest-gallery-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    position: relative;
    aspect-ratio: 940 / 672;
}

/* Image Links */
.leo-dest-gallery-image {
    display: block;
    overflow: hidden;
    position: relative;
}

.leo-dest-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.leo-dest-gallery-image:hover img {
    transform: scale(1.02);
}

/* Placeholder for missing images */
.leo-dest-gallery-placeholder {
    background: #f5f5f5;
}

/* Button - positioned at bottom right of small grid */
.leo-dest-gallery-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    line-height: 19px;
    font-weight: 600;
    color: #3E405B;
    background-color: #EAEAEA;
    padding: 15px 35px;
    border-radius: 10px;
    transition: all 0.3s ease;
    z-index: 10;
    white-space: nowrap;
}

.leo-dest-gallery-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leo-dest-gallery-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.leo-dest-gallery-button-icon svg {
    display: block;
}

.leo-dest-gallery-button.icon-left .leo-dest-gallery-button-icon {
    margin-right: 8px;
}

.leo-dest-gallery-button.icon-right .leo-dest-gallery-button-icon {
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 767px) {
    .leo-dest-gallery {
        grid-template-columns: 1fr;
    }

    .leo-dest-gallery-large {
        aspect-ratio: 940 / 448;
    }

    .leo-dest-gallery-small {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        aspect-ratio: auto;
    }

    .leo-dest-gallery-small .leo-dest-gallery-image {
        aspect-ratio: 1/1;
    }

    .leo-dest-gallery-button {
        position: relative;
        bottom: auto;
        right: auto;
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: 10px;
    }
}

/* Desktop: small images fill available space */
@media (min-width: 768px) {
    .leo-dest-gallery-small .leo-dest-gallery-image {
        aspect-ratio: auto;
    }
}
