/* Axios Todij Masonry Gallery CSS */
.axios-todij-masonry-gallery {
    display: block;
    column-fill: balance;
    position: relative;
}

.axios-todij-masonry-gallery .masonry-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    margin-bottom: 15px;
}

.axios-todij-masonry-gallery .masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Glass Effect Styles */
.axios-todij-masonry-gallery.glass-effect-enabled {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: background 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                backdrop-filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                -webkit-backdrop-filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease;
}

.axios-todij-masonry-gallery.glass-effect-enabled .masonry-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                -webkit-backdrop-filter 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.axios-todij-masonry-gallery.glass-effect-enabled .masonry-item:hover {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.35),
                0 4px 16px rgba(255, 255, 255, 0.1) inset;
}

/* Glass Intensity Variations */
.axios-todij-masonry-gallery.glass-intensity-low {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.axios-todij-masonry-gallery.glass-intensity-low .masonry-item {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.axios-todij-masonry-gallery.glass-intensity-medium {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.axios-todij-masonry-gallery.glass-intensity-medium .masonry-item {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.axios-todij-masonry-gallery.glass-intensity-high {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.axios-todij-masonry-gallery.glass-intensity-high .masonry-item {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Hover Effects */
.axios-todij-masonry-gallery.hover-zoom .masonry-item:hover img {
    transform: scale(1.1);
}

.axios-todij-masonry-gallery.hover-zoom-out .masonry-item:hover img {
    transform: scale(0.95);
}

.axios-todij-masonry-gallery.hover-rotate .masonry-item:hover img {
    transform: rotate(3deg) scale(1.05);
}

/* Shimmer Effect for Glass */
.axios-todij-masonry-gallery.glass-effect-enabled .masonry-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    opacity: 0;
    border-radius: 8px;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.axios-todij-masonry-gallery.glass-effect-enabled .masonry-item:hover::after {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Loading Animation */
.axios-todij-masonry-gallery .masonry-item {
    opacity: 0;
    animation: fadeInMasonry 0.6s ease forwards;
}

.axios-todij-masonry-gallery .masonry-item:nth-child(1) { animation-delay: 0.1s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(2) { animation-delay: 0.2s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(3) { animation-delay: 0.3s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(4) { animation-delay: 0.4s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(5) { animation-delay: 0.5s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(6) { animation-delay: 0.6s; }
.axios-todij-masonry-gallery .masonry-item:nth-child(n+7) { animation-delay: 0.7s; }

@keyframes fadeInMasonry {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .axios-todij-masonry-gallery {
        columns: 1 !important;
        gap: 10px !important;
    }
    
    .axios-todij-masonry-gallery.glass-effect-enabled {
        padding: 15px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .axios-todij-masonry-gallery .masonry-item {
        margin-bottom: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .axios-todij-masonry-gallery {
        columns: 2 !important;
        gap: 12px !important;
    }
}

@media (min-width: 1025px) {
    .axios-todij-masonry-gallery {
        columns: 3;
        gap: 15px;
    }
}

/* Performance Optimizations */
.axios-todij-masonry-gallery .masonry-item {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.axios-todij-masonry-gallery .masonry-item img {
    will-change: transform, filter;
    backface-visibility: hidden;
}

/* Prefers Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .axios-todij-masonry-gallery .masonry-item,
    .axios-todij-masonry-gallery .masonry-item::after,
    .axios-todij-masonry-gallery .masonry-item img {
        transition: none !important;
        animation: none !important;
    }
    
    .axios-todij-masonry-gallery .masonry-item:hover {
        transform: none !important;
    }
}
