.modernpress-gallery-layout-1 {
        padding: 20px;
    }

    .modernpress-gallery-layout-1 .gallery-grid {
        display: grid;
    }

    .modernpress-gallery-layout-1 .gallery-item {
        position: relative;
        overflow: hidden;
        border-radius: 8px;
    }

    .modernpress-gallery-layout-1 .gallery-item-inner {
        position: relative;
        width: 100%;
        padding-bottom: 100%;
    }

    .modernpress-gallery-layout-1 .gallery-item-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .modernpress-gallery-layout-1 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .modernpress-gallery-layout-1 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 20px;
        text-align: center;
    }

    .modernpress-gallery-layout-1 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    .modernpress-gallery-layout-1 .gallery-item:hover .gallery-item-image img {
        transform: scale(1.1);
    }

    .modernpress-gallery-layout-1 .gallery-item-title {
        color: white;
        font-size: 18px;
        margin: 0 0 10px;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-1 .gallery-item-category {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        transform: translateY(20px);
        transition: transform 0.3s ease 0.1s;
    }

    .modernpress-gallery-layout-1 .gallery-item:hover .gallery-item-title,
    .modernpress-gallery-layout-1 .gallery-item:hover .gallery-item-category {
        transform: translateY(0);
    }

    @media (max-width: 1024px) {
        .modernpress-gallery-layout-1 .gallery-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
    }

    @media (max-width: 767px) {
        .modernpress-gallery-layout-1 {
            padding: 10px;
        }
    }

    

    /* Lightbox zoom animation */
    .elementor-lightbox .dialog-lightbox-image {
        transition: transform 0.3s ease-out;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="zoom"] {
        transform: scale(0.9);
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="fade"] {
        opacity: 0;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="slide"] {
        transform: translateX(100px);
    }

    .elementor-lightbox .dialog-lightbox-image.elementor-lightbox-item--active {
        transform: scale(1);
        opacity: 1;
    }

    /* gallery widget layout 2 css  */

    .modernpress-gallery-layout-2 {
        padding: 20px;
    }

    .modernpress-gallery-layout-2 .masonry-grid {
        display: block;
    }

    .modernpress-gallery-layout-2 .gallery-item {
        break-inside: avoid;
        margin-bottom: var(--gap);
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        transform: translateY(50px);
        opacity: 0;
        animation: fadeInUp 0.6s ease forwards;
    }

    .modernpress-gallery-layout-2 .gallery-item:nth-child(even) {
        animation-delay: 0.2s;
    }

    .modernpress-gallery-layout-2 .gallery-item:nth-child(3n) {
        animation-delay: 0.4s;
    }

    @keyframes fadeInUp {
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .modernpress-gallery-layout-2 .gallery-item.tall {
        height: 600px;
    }

    .modernpress-gallery-layout-2 .gallery-item.wide {
        height: 400px;
    }

    .modernpress-gallery-layout-2 .gallery-item.normal {
        height: 300px;
    }

    .modernpress-gallery-layout-2 .gallery-item-inner {
        position: relative;
        height: 100%;
        width: 100%;
    }

    .modernpress-gallery-layout-2 .gallery-item-image {
        height: 100%;
        width: 100%;
    }

    .modernpress-gallery-layout-2 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-2 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        display: flex;
        align-items: flex-end;
        padding: 30px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modernpress-gallery-layout-2 .overlay-content {
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-2 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    .modernpress-gallery-layout-2 .gallery-item:hover .overlay-content {
        transform: translateY(0);
    }

    .modernpress-gallery-layout-2 .gallery-item:hover .gallery-item-image img {
        transform: scale(1.1);
    }

    .modernpress-gallery-layout-2 .gallery-item-title {
        color: white;
        font-size: 20px;
        margin: 0 0 8px;
        font-weight: 600;
    }

    .modernpress-gallery-layout-2 .gallery-item-category {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        display: block;
    }

    @media (max-width: 1024px) {
        .modernpress-gallery-layout-2 .masonry-grid {
            columns: 3;
        }

        .modernpress-gallery-layout-2 .gallery-item.tall {
            height: 500px;
        }
    }

    @media (max-width: 767px) {
        .modernpress-gallery-layout-2 .masonry-grid {
            columns: 2;
        }

        .modernpress-gallery-layout-2 .gallery-item.tall {
            height: 400px;
        }

        .modernpress-gallery-layout-2 .gallery-item.wide {
            height: 300px;
        }

        .modernpress-gallery-layout-2 .gallery-item.normal {
            height: 250px;
        }
    }

    @media (max-width: 480px) {
        .modernpress-gallery-layout-2 .masonry-grid {
            columns: 1;
        }
    }

    /* Add lightbox icon */


    /* Overlay animation */
    .modernpress-gallery-layout-2 .gallery-item-overlay {
        opacity: 0;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.4),
                rgba(0, 0, 0, 0.8));
    }

    .modernpress-gallery-layout-2 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    /* Lightbox animations */
    .elementor-lightbox .dialog-lightbox-image {
        transition: all 0.3s ease-out;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="zoom"] {
        transform: scale(0.9);
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="fade"] {
        opacity: 0;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="slide"] {
        transform: translateY(50px);
    }

    .elementor-lightbox .dialog-lightbox-image.elementor-lightbox-item--active {
        transform: scale(1) translateY(0);
        opacity: 1;
    }


    /* gallery widget layout 3 css  */

    .modernpress-gallery-layout-3 {
        padding: 20px;
    }

    .modernpress-gallery-layout-3 .metro-grid {
        display: grid;
        grid-auto-rows: 250px;
    }

    .modernpress-gallery-layout-3 .gallery-item {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        grid-column: span 1;
        grid-row: span 1;
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .modernpress-gallery-layout-3 .gallery-item.wide {
        grid-column: span 2;
    }

    .modernpress-gallery-layout-3 .gallery-item.tall {
        grid-row: span 2;
    }

    .modernpress-gallery-layout-3 .gallery-item.wide.tall {
        grid-column: span 2;
        grid-row: span 2;
    }

    .modernpress-gallery-layout-3 .gallery-item:nth-child(2n) {
        animation-delay: 0.2s;
    }

    .modernpress-gallery-layout-3 .gallery-item:nth-child(3n) {
        animation-delay: 0.3s;
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modernpress-gallery-layout-3 .gallery-item-inner {
        position: relative;
        width: 100%;
        height: 100%;
    }

    .modernpress-gallery-layout-3 .gallery-item-image {
        width: 100%;
        height: 100%;
    }

    .modernpress-gallery-layout-3 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-3 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modernpress-gallery-layout-3 .overlay-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        transform: scale(1.2);
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-3 .overlay-content {
        position: relative;
        z-index: 1;
        padding: 20px;
        color: white;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .overlay-background {
        transform: scale(1);
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .overlay-content {
        transform: translateY(0);
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .gallery-item-image img {
        transform: scale(1.1);
    }

    .modernpress-gallery-layout-3 .gallery-item-title {
        font-size: 20px;
        font-weight: 600;
        margin: 0 0 10px;
    }

    .modernpress-gallery-layout-3 .gallery-item-category {
        display: block;
        font-size: 14px;
        margin-bottom: 15px;
        color: rgba(255, 255, 255, 0.8);
    }

    .modernpress-gallery-layout-3 .view-more {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 2px solid white;
        border-radius: 50%;
        color: white;
        transition: all 0.3s ease;
    }

    .modernpress-gallery-layout-3 .view-more svg {
        width: 20px;
        height: 20px;
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .view-more {
        background: white;
        color: #333;
    }

    .modernpress-gallery-layout-3 .gallery-item:hover .view-more svg {
        transform: rotate(90deg);
    }

    /* Responsive Breakpoints */
    @media (max-width: 1200px) {
        .modernpress-gallery-layout-3 .metro-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (max-width: 992px) {
        .modernpress-gallery-layout-3 .metro-grid {
            grid-template-columns: repeat(2, 1fr);
            grid-auto-rows: 200px;
        }
    }

    @media (max-width: 576px) {
        .modernpress-gallery-layout-3 .metro-grid {
            grid-template-columns: 1fr;
        }

        .modernpress-gallery-layout-3 .gallery-item.wide,
        .modernpress-gallery-layout-3 .gallery-item.tall,
        .modernpress-gallery-layout-3 .gallery-item.wide.tall {
            grid-column: span 1;
            grid-row: span 1;
        }

        .modernpress-gallery-layout-3 .gallery-item-title {
            font-size: 18px;
        }
    }

    /* Touch Device Optimizations */
    @media (hover: none) {
        .modernpress-gallery-layout-3 .gallery-item-overlay {
            opacity: 1;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        }

        .modernpress-gallery-layout-3 .overlay-content {
            transform: none;
        }

        .modernpress-gallery-layout-3 .view-more {
            display: none;
        }
    }

    /* Overlay animation */
    .modernpress-gallery-layout-2 .gallery-item-overlay {
        opacity: 0;
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.4),
                rgba(0, 0, 0, 0.8));
    }

    .modernpress-gallery-layout-2 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    /* Lightbox animations */
    .elementor-lightbox .dialog-lightbox-image {
        transition: all 0.3s ease-out;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="zoom"] {
        transform: scale(0.9);
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="fade"] {
        opacity: 0;
    }

    .elementor-lightbox .dialog-lightbox-image[data-animation="slide"] {
        transform: translateY(50px);
    }

    .elementor-lightbox .dialog-lightbox-image.elementor-lightbox-item--active {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    /* gallery widget layout 4 css  */

    .modernpress-gallery-layout-4 {
        position: relative;
        padding: 20px;
    }

    .modernpress-gallery-layout-4 .carousel-container {
        position: relative;
        overflow: hidden;
    }

    .modernpress-gallery-layout-4 .carousel-track {
        display: flex;
        transition: transform 0.5s ease-in-out;
        will-change: transform;
    }

    .modernpress-gallery-layout-4 .gallery-item {
        flex: 0 0 calc(33.333% - (var(--gap) * 2/3));
        position: relative;
        border-radius: 12px;
        overflow: hidden;
    }

    .modernpress-gallery-layout-4 .gallery-item-inner {
        position: relative;
        padding-bottom: 75%;
    }

    .modernpress-gallery-layout-4 .gallery-item-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .modernpress-gallery-layout-4 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-4 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        display: flex;
        align-items: flex-end;
        padding: 20px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modernpress-gallery-layout-4 .overlay-content {
        transform: translateY(20px);
        transition: transform 0.3s ease;
        color: white;
    }

    .modernpress-gallery-layout-4 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    .modernpress-gallery-layout-4 .gallery-item:hover .overlay-content {
        transform: translateY(0);
    }

    .modernpress-gallery-layout-4 .gallery-item:hover .gallery-item-image img {
        transform: scale(1.1);
    }

    .modernpress-gallery-layout-4 .gallery-item-title {
        font-size: 18px;
        font-weight: 600;
        margin: 0 0 8px;
    }

    .modernpress-gallery-layout-4 .gallery-item-category {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }

    .modernpress-gallery-layout-4 .carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #333;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 10;
    }

    .modernpress-gallery-layout-4 .carousel-nav:hover {
        background: #0D3FB0;
        color: white;
    }

    .modernpress-gallery-layout-4 .carousel-prev {
        left: 5px;
    }

    .modernpress-gallery-layout-4 .carousel-next {
        right: 5px;
    }

    .modernpress-gallery-layout-4 .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
    }

    .modernpress-gallery-layout-4 .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .modernpress-gallery-layout-4 .carousel-dot.active {
        background: #0D3FB0;
        transform: scale(1.2);
    }

    @media (max-width: 1200px) {
        .modernpress-gallery-layout-4 .gallery-item {
            flex: 0 0 calc(50% - (var(--gap) * 1/2));
        }
    }

    @media (max-width: 768px) {
        .modernpress-gallery-layout-4 .gallery-item {
            flex: 0 0 100%;
        }

        .modernpress-gallery-layout-4 .carousel-nav {
            display: none;
        }
    }

    /* gallery widget layout 5 css  */

    .modernpress-gallery-layout-5 {
        padding: 20px;
    }

    .modernpress-gallery-layout-5 .filter-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 30px;
        justify-content: center;
    }

    .modernpress-gallery-layout-5 .filter-button {
        padding: 8px 20px;
        border: 2px solid #eee;
        border-radius: 25px;
        background: transparent;
        color: #333;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .modernpress-gallery-layout-5 .filter-button:hover,
    .modernpress-gallery-layout-5 .filter-button.active {
        background: #333;
        color: white;
        border-color: #333;
    }

    .modernpress-gallery-layout-5 .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--gap);
    }

    .modernpress-gallery-layout-5 .gallery-item {
        opacity: 1;
        transform: scale(1);
        transition: all 0.5s ease;
        position: relative;
        border-radius: 12px;
        overflow: hidden;
    }

    .modernpress-gallery-layout-5 .gallery-item.hidden {
        opacity: 0;
        transform: scale(0.8);
        position: absolute;
        pointer-events: none;
    }

    .modernpress-gallery-layout-5 .gallery-item-inner {
        position: relative;
        padding-bottom: 100%;
    }

    .modernpress-gallery-layout-5 .gallery-item-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .modernpress-gallery-layout-5 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-5 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 20px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modernpress-gallery-layout-5 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
    }

    .modernpress-gallery-layout-5 .gallery-item:hover .gallery-item-image img {
        transform: scale(1.1);
    }

    .modernpress-gallery-layout-5 .gallery-item-title {
        color: white;
        font-size: 20px;
        margin: 0 0 10px;
        transform: translateY(20px);
        transition: transform 0.3s ease;
    }

    .modernpress-gallery-layout-5 .gallery-item-category {
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
        transform: translateY(20px);
        transition: transform 0.3s ease 0.1s;
    }

    .modernpress-gallery-layout-5 .gallery-item:hover .gallery-item-title,
    .modernpress-gallery-layout-5 .gallery-item:hover .gallery-item-category {
        transform: translateY(0);
    }

    @media (max-width: 768px) {
        .modernpress-gallery-layout-5 .gallery-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
    }

    /* gallery widget layout 6 css  */

    .modernpress-gallery-layout-6 {
        padding: 20px;
    }

    .modernpress-gallery-layout-6 .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--gap);
        perspective: 1000px;
    }

    .modernpress-gallery-layout-6 .gallery-item {
        position: relative;
        transform-style: preserve-3d;
        border-radius: 12px;
        overflow: hidden;
    }

    .modernpress-gallery-layout-6 .gallery-item-inner {
        position: relative;
        padding-bottom: 100%;
        transform-style: preserve-3d;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-6 .gallery-item-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
    }

    .modernpress-gallery-layout-6 .gallery-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-6 .gallery-item-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg,
                rgba(0, 0, 0, 0.8) 0%,
                rgba(0, 0, 0, 0.6) 100%);
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transform: translateZ(-100px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-6 .overlay-content {
        text-align: center;
        color: white;
        padding: 20px;
        transform: translateY(20px);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modernpress-gallery-layout-6 .gallery-item-title {
        font-size: 24px;
        font-weight: 600;
        margin: 0 0 10px;
    }

    .modernpress-gallery-layout-6 .gallery-item-category {
        display: block;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
        margin-bottom: 20px;
    }

    .modernpress-gallery-layout-6 .gallery-item-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 24px;
        background: white;
        color: #333;
        text-decoration: none;
        border-radius: 30px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .modernpress-gallery-layout-6 .gallery-item-link svg {
        transition: transform 0.3s ease;
    }

    /* Hover Effects */
    .modernpress-gallery-layout-6 .gallery-item:hover .gallery-item-inner {
        transform: rotateY(180deg);
    }

    .modernpress-gallery-layout-6 .gallery-item:hover .gallery-item-overlay {
        opacity: 1;
        transform: rotateY(180deg) translateZ(0);
    }

    .modernpress-gallery-layout-6 .gallery-item:hover .overlay-content {
        transform: translateY(0);
    }

    .modernpress-gallery-layout-6 .gallery-item-link:hover {
        background: #333;
        color: white;
        transform: translateY(-2px);
    }

    .modernpress-gallery-layout-6 .gallery-item-link:hover svg {
        transform: translateX(4px);
    }

    /* Mouse Move Effect */
    .modernpress-gallery-layout-6 .gallery-item.mouse-move {
        transition: transform 0.2s ease-out;
    }

    .modernpress-gallery-layout-6 .gallery-item.mouse-move .gallery-item-image img {
        transition: transform 0.2s ease-out;
    }

    .modernpress-gallery-layout-6 .gallery-item.mouse-move:hover {
        transform: perspective(1000px) rotateX(var(--rotateX)) rotateY(var(--rotateY));
    }

    /* Loading Animation */
    .modernpress-gallery-layout-6 .gallery-item {
        opacity: 0;
        transform: translateY(50px);
        animation: fadeInUp 0.6s ease forwards;
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modernpress-gallery-layout-6 .gallery-item:nth-child(2n) {
        animation-delay: 0.2s;
    }

    .modernpress-gallery-layout-6 .gallery-item:nth-child(3n) {
        animation-delay: 0.4s;
    }

    /* Responsive Styles */
    @media (max-width: 1200px) {
        .modernpress-gallery-layout-6 .gallery-grid {
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        }
    }

    @media (max-width: 768px) {
        .modernpress-gallery-layout-6 .gallery-item-title {
            font-size: 20px;
        }

        .modernpress-gallery-layout-6 .gallery-item-link {
            padding: 10px 20px;
            font-size: 14px;
        }
    }

    @media (hover: none) {
        .modernpress-gallery-layout-6 .gallery-item-overlay {
            opacity: 1;
            transform: none;
            background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
        }

        .modernpress-gallery-layout-6 .gallery-item:hover .gallery-item-inner {
            transform: none;
        }

        .modernpress-gallery-layout-6 .gallery-item:hover .gallery-item-overlay {
            transform: none;
        }
    }