/* Tour Gallery Styles */

/* Wrapper Styles */
.tour-gallery-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

/* Single Image Layout */
.tour-gallery-single a,
.tour-gallery-single img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: cover;
}
.tour-gallery-single a {
     overflow: hidden;
}

/* Grid Layout (Desktop) */
.tour-gallery-grid {
    display: flex;
    gap: 10px;
    position: relative;
    /* max-height is controlled by widget setting */
    height: auto;
    align-items: stretch;
}

/* General Gallery Item Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    font-size: 0;
}

/* Image Styles within Items */
.tour-gallery-wrapper .gallery-item a img,
.tour-gallery-wrapper .gallery-item img {
    display: block;
    width: 100%;
    height: 100% !important; /* Important needed to override potential inline styles */
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Image Hover Effect */
.gallery-item a:hover img {
    transform: scale(1.05);
}

/* Large Item Specifics (Desktop) */
.gallery-item-large {
    flex: 1.8;
}

/* Small Items Wrapper (Desktop) */
.gallery-item-small-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

/* Apply height 100% specifically to small items within the grid */
.gallery-item-small-wrapper .gallery-item {
     height: 100%;
}

/* Small Item Specifics */
.gallery-item-small {
    /* Styles inherited or defined in media queries */
}

/* "Show All" Button Styling */
.tour-gallery-show-all-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    /* NOTE: Colors, padding, border, typography, radius are controlled by Elementor settings */
}

.tour-gallery-show-all-button:hover {
    transform: translateY(-2px);
}

/* Icon Styling */
.tour-gallery-show-all-button .elementor-button-icon {
    display: inline-flex;
    align-items: center;
    /* Spacing is controlled by widget setting */
}

.tour-gallery-show-all-button .elementor-button-icon i,
.tour-gallery-show-all-button .elementor-button-icon svg {
     line-height: 1;
}

/* Placeholder Style */
.gallery-item-placeholder {
    background-color: #f0f0f0;
}

/* --- Responsive Adjustments --- */

/* Tablet & Mobile */
@media (max-width: 767px) {
    .tour-gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item-large {
        grid-column: auto;
        grid-row: auto;
        /* aspect-ratio is controlled by widget setting via inline style */
    }

    .gallery-item-small-wrapper {
        grid-column: auto;
        grid-row: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
    }

    .gallery-item-small-wrapper .gallery-item,
    .gallery-item-small
    {
        aspect-ratio: 16/9;
    }

    .tour-gallery-show-all-button {
       bottom: 10px;
       right: 10px;
       /* Padding & font-size are controlled by Elementor settings */
    }
}

/* Smaller Mobile */
@media (max-width: 480px) {
     /* Adjust large image aspect ratio for very small screens */
     /* NOTE: This overrides the widget setting on very small screens */
     .gallery-item-large {
        aspect-ratio: 4 / 3;
    }

     /* Small items wrapper inherits styles from 767px breakpoint */

     /* Button inherits styles from 767px breakpoint */

}