/* gallery.css - Estilos para a seção Galeria */

/* Container principal */
.gallery-container-main {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-section {
    background:
        linear-gradient(150deg, rgba(255,152,152,0.18), rgba(255,234,147,0.16), rgba(150,207,255,0.14), rgba(210,153,255,0.16)),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06) 1px, transparent 1px, transparent 14px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 1px, transparent 1px, transparent 18px),
        #141414;
    background-blend-mode: screen, normal, normal, normal;
    border-radius: 24px 18px 24px 12px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 250%;
    height: 250%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 28%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.08), transparent 24%);
    pointer-events: none;
    animation: paperShimmer 11s ease-in-out infinite;
}

.gallery-section::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 2rem;
    width: 160px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 65%);
    border-radius: 0 0 22px 22px;
    transform: rotate(-4deg);
    opacity: 0.35;
    pointer-events: none;
}

/* Header da Galeria */
.gallery-header {
    margin-bottom: 2.5rem;
}

.gallery-header h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.gallery-header p {
    color: #aaa;
    font-size: 1.1rem;
    max-width: 700px;
    line-height: 1.6;
}

/* Filtros da Galeria */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: #222;
    border-radius: 12px;
    border: 2px solid #333;
    justify-content: center;
}

.filter-btn {
    background: #2a2a2a;
    color: #fff;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.filter-btn:hover {
    background: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    border-color: #ff4444;
    box-shadow: 0 5px 20px rgba(255, 68, 68, 0.4);
    transform: translateY(-3px);
}

/* Grid da Galeria */
.gallery-grid-container {
    margin-bottom: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2.5rem;
}

.gallery-item {
    background: #222;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid #333;
}

.gallery-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    border-color: #ff4444;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 320px;
    max-height: 400px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    box-sizing: border-box;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
    display: block;
}

/* Classes de tamanho para imagens - CORRIGIDAS */
.size-large .gallery-image-container {
    min-height: 420px;
    max-height: 520px;
}

.size-medium .gallery-image-container {
    min-height: 380px;
    max-height: 480px;
}

.size-small .gallery-image-container {
    min-height: 340px;
    max-height: 440px;
}

.size-wide .gallery-image-container {
    min-height: 300px;
    max-height: 380px;
}

/* Forçar proporções específicas */
.size-large .gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.size-medium .gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.size-small .gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.size-wide .gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Garantir que as imagens não distorçam */
.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover .gallery-image {
    transform: none;
}

.gallery-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    z-index: 10;
}

/* Info da Galeria */
.gallery-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.gallery-description {
    color: #ccc;
    margin: 0 0 1.2rem 0;
    font-size: 1rem;
    line-height: 1.6;
    flex: 1;
}

.gallery-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.gallery-date {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-size {
    display: none;
}

/* Tags da Galeria */
.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-tag {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

/* Loading e Error */
.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 2px dashed #333;
}

.gallery-loading i {
    font-size: 3rem;
}

.gallery-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(255, 68, 68, 0.3);
}

.gallery-error i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.gallery-error h3 {
    margin: 0 0 1rem 0;
    color: #fff;
    font-size: 1.5rem;
}

.retry-btn {
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
    font-size: 1rem;
}

.retry-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.4);
}

/* Estatísticas da Galeria */
.gallery-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: #222;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 2px solid #333;
    transition: all 0.4s;
}

.stat-card:hover {
    border-color: #ff4444;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    color: #aaa;
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Classes de tamanho para imagens */
.size-large .gallery-image-container {
    min-height: 420px;
}

.size-medium .gallery-image-container {
    min-height: 380px;
}

.size-small .gallery-image-container {
    min-height: 340px;
}

.size-wide .gallery-image-container {
    min-height: 300px;
}

.size-large .gallery-image {
    max-width: 100%;
    max-height: 100%;
}

.size-medium .gallery-image {
    max-width: 100%;
    max-height: 100%;
}

.size-small .gallery-image {
    max-width: 100%;
    max-height: 100%;
}

.size-wide .gallery-image {
    max-width: 100%;
    max-height: 100%;
}

/* Botões da Galeria */
.gallery-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.gallery-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.gallery-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(156, 39, 176, 0.4);
}

/* Responsividade */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .gallery-image-container {
        min-height: 280px;
        max-height: 350px;
    }
    
    .gallery-filters {
        justify-content: center;
    }
    
    .gallery-stats {
        grid-template-columns: 1fr;
    }
    
    .gallery-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 1.5rem;
    }
    
    .gallery-filters {
        padding: 1rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-image-container {
        min-height: 240px;
        max-height: 300px;
        padding: 8px;
    }
    
    .gallery-item {
        min-height: auto;
    }
}
@keyframes paperShimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
