.anoflow-gallery {
    display: grid;
    gap: 15px;
    margin: 20px 0;
    /* Telas pequenas: 1 coluna */
    grid-template-columns: 1fr;
}

/* Tablets e telas médias: 2-3 colunas */
@media (min-width: 576px) {
    .anoflow-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .anoflow-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Telas grandes: máximo 4 colunas */
@media (min-width: 992px) {
    .anoflow-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

.anoflow-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    aspect-ratio: 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anoflow-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anoflow-link img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
}

.anoflow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anoflow-item:hover .anoflow-overlay {
    opacity: 1;
}

.anoflow-item:hover img {
    transform: scale(1.05);
}

.anoflow-caption i {
    color: #fff;
    font-size: 30px;
}

/* Lightbox Styles */
.anoflow-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anoflow-lightbox.active {
    display: flex;
    opacity: 1;
}

.anoflow-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.anoflow-lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
}

.anoflow-caption-text {
    color: white;
    font-size: 16px;
    margin-top: 15px;
    padding: 0 20px;
}

/* Navigation Buttons */
.anoflow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    user-select: none;
}

.anoflow-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.anoflow-prev {
    left: 20px;
}

.anoflow-next {
    right: 20px;
}

/* Close Button */
.anoflow-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.anoflow-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Counter */
.anoflow-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 575px) {
    .anoflow-nav {
        font-size: 18px;
        padding: 10px 14px;
    }
    
    .anoflow-prev {
        left: 10px;
    }
    
    .anoflow-next {
        right: 10px;
    }
    
    .anoflow-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .anoflow-counter {
        bottom: 15px;
        font-size: 12px;
    }
    
    .anoflow-caption-text {
        font-size: 14px;
        margin-top: 10px;
    }
}