/* Estilos para a Galeria - Estilo Pinterest */
.gallery-section {
    padding: 120px 2rem 80px;
    background: var(--bg-dark);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, rgba(44, 62, 80, 0.2) 100%);
    z-index: 0;
    pointer-events: none;
}

.gallery-section .section-title {
    position: relative;
    display: block;
    margin-bottom: 1.5rem;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.gallery-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    animation: titleUnderline 2s ease-in-out infinite alternate;
}

@keyframes titleUnderline {
    0% {
        width: 80px;
        opacity: 0.7;
    }
    100% {
        width: 120px;
        opacity: 1;
    }
}

/* Container da galeria estilo Pinterest */
.gallery-masonry {
    column-count: 5;
    column-gap: 4px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

/* Item da galeria */
.gallery-item {
    break-inside: avoid;
    margin-bottom: 4px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateZ(0);
    display: inline-block;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    line-height: 0;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
    backface-visibility: hidden;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item-overlay i {
    color: white;
    font-size: 1.8rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 8px rgba(212, 175, 55, 0.2);
    z-index: 3;
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

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

.gallery-item:hover .gallery-item-overlay i {
    transform: scale(1);
}

/* Placeholder para imagens */
.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8), rgba(52, 152, 219, 0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.placeholder-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-light);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loader da galeria */
.gallery-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.gallery-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-light);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.gallery-loader-text {
    color: var(--text-light);
    font-size: 1rem;
    text-align: center;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px auto;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 10px;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.pagination-number:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.pagination-number.active {
    background: var(--gold-gradient);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.pagination-prev,
.pagination-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-prev.disabled:hover,
.pagination-next.disabled:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-light);
    font-weight: 600;
    opacity: 0.7;
}

.pagination-info {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Lightbox (mantido do arquivo anterior) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold-light);
    animation: spin 1s ease-in-out infinite;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(212, 175, 55, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 4px;
    max-width: 80%;
    margin: 0 auto;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Responsividade */
@media (max-width: 1400px) {
    .gallery-masonry {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .gallery-masonry {
        column-count: 3;
    }

    .gallery-section {
        padding: 100px 1.5rem 60px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 4px;
    }

    .gallery-item {
        margin-bottom: 4px;
    }

    .gallery-section {
        padding: 80px 1rem 50px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .pagination {
        gap: 5px;
        margin: 20px auto;
    }

    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .pagination-prev,
    .pagination-next {
        width: 32px;
        height: 32px;
    }

    .pagination-info {
        font-size: 0.8rem;
    }

    .lightbox-image {
        max-height: 80vh;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        opacity: 0.8;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .lightbox-counter {
        top: 15px;
        left: 15px;
        font-size: 0.8rem;
    }

    .lightbox-caption {
        max-width: 90%;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 3px;
    }

    .gallery-item {
        margin-bottom: 3px;
        border-radius: 3px;
    }

    .gallery-section {
        padding: 70px 0.8rem 40px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .pagination {
        gap: 4px;
        margin: 15px auto;
    }

    .pagination-numbers {
        gap: 4px;
    }

    .pagination-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .pagination-prev,
    .pagination-next {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .pagination-info {
        font-size: 0.75rem;
        margin-top: 8px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 35px;
        height: 35px;
        opacity: 0.7;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
    }

    .lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .lightbox-caption {
        bottom: 10px;
        font-size: 0.85rem;
        padding: 6px;
    }
}

/* Estilos específicos para dispositivos com tela sensível ao toque */
@media (hover: none) {
    .gallery-item-overlay {
        opacity: 0.5;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4));
    }

    .gallery-item-overlay i {
        opacity: 0.8;
    }

    .lightbox-prev,
    .lightbox-next,
    .lightbox-close {
        opacity: 0.7;
    }
}
