/*
* Gallery 2 Widget Styles
* All styles are isolated with the webstudio_gallery2 prefix
*/

.webstudio_gallery2 {
    --primary-color: #5D5CDE;
    --light-bg: #FFFFFF;
    --dark-bg: #181818;
    --light-text: #FFFFFF;
    --dark-text: #1a1a1a;
    --overlay-bg: rgba(0, 0, 0, 0.6);
    --button-bg: rgba(255, 255, 255, 0.9);
    --button-hover-bg: #5D5CDE;
    --button-hover-text: #FFFFFF;
    --modal-bg: rgba(0, 0, 0, 0.9);
    --control-bg: rgba(0, 0, 0, 0.5);
    --thumb-active-border: #5D5CDE;
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --spacing: 20px;
    
    /* Ribbon colors */
    --premium-ribbon-bg: linear-gradient(135deg, #f2c94c, #b8751e);
    --modern-ribbon-bg: rgba(0, 0, 0, 0.8);
    --fullscreen-ribbon-bg: rgba(93, 92, 222, 0.9);
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: var(--dark-text);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Dark mode detection */
@media (prefers-color-scheme: dark) {
    .webstudio_gallery2 {
        --light-bg: #181818;
        --dark-bg: #121212;
        --light-text: #EEEEEE;
        --dark-text: #EEEEEE;
        --button-bg: rgba(40, 40, 40, 0.9);
        --button-hover-text: #FFFFFF;
        --modal-bg: rgba(10, 10, 10, 0.95);
        --control-bg: rgba(30, 30, 30, 0.7);
    }
}

.webstudio_gallery2 * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Gallery Filter */
.webstudio_gallery2__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.webstudio_gallery2__filter-button {
    padding: 8px 16px;
    border: none;
    background-color: #f5f5f5;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--dark-text);
    border: 1px solid rgba(0,0,0,0.1);
}

.dark .webstudio_gallery2__filter-button {
    background-color: #2a2a2a;
    color: var(--light-text);
    border: 1px solid rgba(255,255,255,0.1);
}

.webstudio_gallery2__filter-button:hover {
    background-color: #e6e6e6;
    transform: translateY(-2px);
}

.dark .webstudio_gallery2__filter-button:hover {
    background-color: #3a3a3a;
}

.webstudio_gallery2__filter-button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(93, 92, 222, 0.2);
}

/* Gallery Items Container */
.webstudio_gallery2__container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing);
}

.webstudio_gallery2__container.columns-1 {
    grid-template-columns: 1fr;
}

.webstudio_gallery2__container.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.webstudio_gallery2__container.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.webstudio_gallery2__container.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .webstudio_gallery2__container.columns-3,
    .webstudio_gallery2__container.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .webstudio_gallery2__container.columns-2,
    .webstudio_gallery2__container.columns-3,
    .webstudio_gallery2__container.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .webstudio_gallery2__filter {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .webstudio_gallery2__filter-button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Gallery Item */
.webstudio_gallery2__item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
    background-color: var(--light-bg);
}

.dark .webstudio_gallery2__item {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background-color: var(--dark-bg);
}

.webstudio_gallery2__item.hidden {
    display: none;
}

.webstudio_gallery2__item.visible {
    animation: fadeInUp 0.5s forwards;
}

.webstudio_gallery2__image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* Default 4:3 aspect ratio */
}

/* RIBBON STYLES SECTION */

/* Original Ribbon - Vertical on right side */
.webstudio_gallery2__ribbon {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-color);
    color: white;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
}

/* Corner Ribbon - Exact triangular corner banner */
.webstudio_gallery2__ribbon-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 80px 80px 0;
    border-color: transparent #1EB53A transparent transparent;
    z-index: 5;
}

.webstudio_gallery2__ribbon-corner-text {
    position: absolute;
    top: 20px;
    right: -65px;
    transform: rotate(45deg);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
    z-index: 6;
}

/* Premium Ribbon - Corner diagonal ribbon */
.webstudio_gallery2__ribbon-premium {
    position: absolute;
    top: 20px;
    right: -34px;
    background: var(--premium-ribbon-bg);
    color: white;
    padding: 6px 0;
    width: 120px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transform: rotate(45deg);
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: 'Georgia', serif;
    text-transform: uppercase;
}

/* Add clean edges to the ribbon */
.webstudio_gallery2__ribbon-premium::before,
.webstudio_gallery2__ribbon-premium::after {
    content: '';
    position: absolute;
    bottom: -5px;
    border-style: solid;
    z-index: -1;
}

.webstudio_gallery2__ribbon-premium::before {
    left: 0;
    border-width: 5px 0 0 5px;
    border-color: transparent transparent transparent rgba(184, 117, 30, a.7);
}

.webstudio_gallery2__ribbon-premium::after {
    right: 0;
    border-width: 5px 5px 0 0;
    border-color: transparent rgba(184, 117, 30, 0.7) transparent transparent;
}

/* Modern Ribbon - Clean bar at bottom */
.webstudio_gallery2__ribbon-modern {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--modern-ribbon-bg);
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 5;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__ribbon-modern {
    transform: translateY(0);
}

/* Fullscreen Gallery Ribbon - Center prominent display */
.webstudio_gallery2__ribbon-fullscreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: var(--fullscreen-ribbon-bg);
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    z-index: 5;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__ribbon-fullscreen {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* END RIBBON STYLES SECTION */

.webstudio_gallery2__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

/* Hover Effects */
.webstudio_gallery2__container.hover-zoom .webstudio_gallery2__image:hover {
    transform: scale(1.1);
}

.webstudio_gallery2__container.hover-rotate .webstudio_gallery2__image:hover {
    transform: rotate(5deg) scale(1.1);
}

.webstudio_gallery2__container.hover-blur .webstudio_gallery2__image:hover {
    filter: blur(2px);
}

.webstudio_gallery2__container.hover-grayscale .webstudio_gallery2__image:hover {
    filter: grayscale(100%);
}

.webstudio_gallery2__container.hover-sepia .webstudio_gallery2__image:hover {
    filter: sepia(100%);
}

/* Shine effect */
.webstudio_gallery2__container.hover-shine .webstudio_gallery2__image-wrapper::before {
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 2;
    display: block;
    content: '';
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 100%);
    transform: skewX(-25deg);
    opacity: 0;
    transition: all 0.7s ease;
}

.webstudio_gallery2__container.hover-shine .webstudio_gallery2__image-wrapper:hover::before {
    opacity: 1;
    left: 125%;
}

/* Circle effect */
.webstudio_gallery2__container.hover-circle .webstudio_gallery2__image-wrapper::before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: block;
    content: '';
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 100%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.webstudio_gallery2__container.hover-circle .webstudio_gallery2__image-wrapper:hover::before {
    opacity: 1;
    width: 120%;
    height: 120%;
}

/* Frame effect */
.webstudio_gallery2__container.hover-frame .webstudio_gallery2__image-wrapper::before {
    position: absolute;
    top: 15px;
    left: 15px;
    bottom: 15px;
    right: 15px;
    border: 1px solid rgba(255,255,255,0.8);
    content: '';
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(1.1);
    z-index: 2;
}

.webstudio_gallery2__container.hover-frame .webstudio_gallery2__image-wrapper:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Overlay */
.webstudio_gallery2__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    opacity: 1;
}

/* Overlay styles */
.webstudio_gallery2__container.overlay-fade .webstudio_gallery2__overlay {
    opacity: 0;
}

.webstudio_gallery2__container.overlay-fade .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    opacity: 1;
}

.webstudio_gallery2__container.overlay-slide-up .webstudio_gallery2__overlay {
    transform: translateY(100%);
    opacity: 1;
}

.webstudio_gallery2__container.overlay-slide-up .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: translateY(0);
}

.webstudio_gallery2__container.overlay-slide-down .webstudio_gallery2__overlay {
    transform: translateY(-100%);
    opacity: 1;
}

.webstudio_gallery2__container.overlay-slide-down .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: translateY(0);
}

.webstudio_gallery2__container.overlay-slide-left .webstudio_gallery2__overlay {
    transform: translateX(100%);
    opacity: 1;
}

.webstudio_gallery2__container.overlay-slide-left .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: translateX(0);
}

.webstudio_gallery2__container.overlay-slide-right .webstudio_gallery2__overlay {
    transform: translateX(-100%);
    opacity: 1;
}

.webstudio_gallery2__container.overlay-slide-right .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: translateX(0);
}

.webstudio_gallery2__container.overlay-zoom-in .webstudio_gallery2__overlay {
    transform: scale(0.5);
    opacity: 0;
}

.webstudio_gallery2__container.overlay-zoom-in .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: scale(1);
    opacity: 1;
}

.webstudio_gallery2__container.overlay-zoom-out .webstudio_gallery2__overlay {
    transform: scale(1.5);
    opacity: 0;
}

.webstudio_gallery2__container.overlay-zoom-out .webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__overlay {
    transform: scale(1);
    opacity: 1;
}

/* Caption */
.webstudio_gallery2__caption {
    color: var(--light-text);
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

.webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__caption {
    opacity: 1;
}

.webstudio_gallery2__caption-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    max-width: 90%;
    line-height: 1.3;
}

.webstudio_gallery2__caption-text {
    font-size: 16px;
    max-width: 90%;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

/* Button */
.webstudio_gallery2__button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: var(--button-bg);
    color: var(--dark-text);
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark .webstudio_gallery2__button {
    color: var(--light-text);
}

.webstudio_gallery2__image-wrapper:hover .webstudio_gallery2__button {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.webstudio_gallery2__button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
}

/* Show More Button */
.webstudio_gallery2__show-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.webstudio_gallery2__show-more {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(93, 92, 222, 0.2);
}

.webstudio_gallery2__show-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(93, 92, 222, 0.3);
}

/* Modal */
.webstudio_gallery2__modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webstudio_gallery2__modal.show {
    opacity: 1;
}

.webstudio_gallery2__modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Modal Animations */
.webstudio_gallery2__modal.animation-fade .webstudio_gallery2__main-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.webstudio_gallery2__modal.animation-fade.show .webstudio_gallery2__main-image {
    opacity: 1;
}

.webstudio_gallery2__modal.animation-slide .webstudio_gallery2__main-image {
    transform: translateX(50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.webstudio_gallery2__modal.animation-slide.show .webstudio_gallery2__main-image {
    transform: translateX(0);
    opacity: 1;
}

.webstudio_gallery2__modal.animation-zoom .webstudio_gallery2__main-image {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.webstudio_gallery2__modal.animation-zoom.show .webstudio_gallery2__main-image {
    transform: scale(1);
    opacity: 1;
}

/* Main Image Container */
.webstudio_gallery2__main-image-container {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

/* Main Image */
.webstudio_gallery2__main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Modal Caption */
.webstudio_gallery2__modal-caption {
    color: var(--light-text);
    text-align: center;
    padding: 15px;
    font-size: 16px;
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0.9;
}

/* Navigation Buttons */
.webstudio_gallery2__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--control-bg);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

.webstudio_gallery2__nav:hover {
    opacity: 1;
    background-color: var(--primary-color);
}

.webstudio_gallery2__nav--prev {
    left: 20px;
}

.webstudio_gallery2__nav--next {
    right: 20px;
}

/* Close Button */
.webstudio_gallery2__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--control-bg);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

.webstudio_gallery2__close:hover {
    opacity: 1;
    background-color: #f44336;
}

/* Fullscreen Button */
.webstudio_gallery2__fullscreen {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--control-bg);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10;
}

.webstudio_gallery2__fullscreen:hover {
    opacity: 1;
    background-color: var(--primary-color);
}

/* Zoom Controls */
.webstudio_gallery2__zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.webstudio_gallery2__zoom-controls button {
    background-color: var(--control-bg);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.webstudio_gallery2__zoom-controls button:hover {
    opacity: 1;
    background-color: var(--primary-color);
}

.webstudio_gallery2__zoom-reset {
    width: auto !important;
    border-radius: 18px !important;
    padding: 0 15px !important;
}

/* Thumbnails */
.webstudio_gallery2__thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 10px;
    background-color: var(--control-bg);
    border-radius: 8px;
    overflow-x: auto;
    max-width: 80%;
    scrollbar-width: thin;
    z-index: 10;
}

.webstudio_gallery2__thumbnails::-webkit-scrollbar {
    height: 5px;
}

.webstudio_gallery2__thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.webstudio_gallery2__thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.webstudio_gallery2__thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.webstudio_gallery2__thumbnail:hover {
    opacity: 0.9;
}

.webstudio_gallery2__thumbnail.active {
    opacity: 1;
    border: 2px solid var(--thumb-active-border);
}

/* Item thumbnails (hidden) */
.webstudio_gallery2__item-thumbnails {
    display: none;
}

.webstudio_gallery2__item-thumbnail {
    width: 0;
    height: 0;
    visibility: hidden;
}

/* Modal Actions */
.webstudio_gallery2__modal-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* Share Buttons */
.webstudio_gallery2__share-buttons {
    display: flex;
    gap: 8px;
}

.webstudio_gallery2__share-button {
    background-color: var(--control-bg);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.webstudio_gallery2__share-button:hover {
    opacity: 1;
    background-color: var(--primary-color);
}

/* Download Button */
.webstudio_gallery2__download-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--control-bg);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: 14px;
}

.webstudio_gallery2__download-button:hover {
    opacity: 1;
    background-color: var(--primary-color);
}

/* Swipe indicator for mobile */
.webstudio_gallery2__swipe-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.webstudio_gallery2__swipe-indicator.show {
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 0.9; }
    80% { opacity: 0.9; }
    100% { opacity: 0; }
}

/* Mobile-specific controls panel */
.webstudio_gallery2__modal-controls-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: none;
    justify-content: space-around;
    background-color: var(--control-bg);
    padding: 10px 0;
    z-index: 20;
}

.webstudio_gallery2__modal-controls-mobile button {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading indicator */
.webstudio_gallery2__loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Page indicator */
.webstudio_gallery2__page-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--control-bg);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    opacity: 0.8;
    z-index: 10;
}

/* Animation classes */
.webstudio_gallery2__container.animation-fade-up .webstudio_gallery2__item:not(.animated) {
    opacity: 0;
    transform: translateY(30px);
}

.webstudio_gallery2__item.animated {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) rotateY(0);
    transition: all 0.5s ease;
}

/* Image loading transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .webstudio_gallery2__button {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        padding: 10px 18px;
        font-size: 16px;
    }
    
    .webstudio_gallery2__caption {
        opacity: 1;
    }
    
    .webstudio_gallery2__nav {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .webstudio_gallery2__close {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    .webstudio_gallery2__thumbnails {
        max-width: 90%;
        bottom: 80px;
    }
    
    .webstudio_gallery2__thumbnail {
        width: 50px;
        height: 40px;
    }
    
    .webstudio_gallery2__ribbon-premium {
        font-size: 11px;
        width: 100px;
    }
}

@media (max-width: 480px) {
    .webstudio_gallery2__caption-title {
        font-size: 18px;
    }
    
    .webstudio_gallery2__caption-text {
        font-size: 14px;
    }
    
    .webstudio_gallery2__button {
        font-size: 14px;
        padding: 8px 14px;
    }
}