/* ============================================
   ESTILOS DA GALERIA MODERNA - WREN 2026
   ============================================ */

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.gallery-title {
    color: #2c3e50;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 3rem;
    position: relative;
}

.gallery-title span {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.gallery-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px; 
}

.gallery-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    margin: 15px auto;
    border-radius: 2px;
}

.section-title {
    color: #2c3e50;
    font-weight: 600;
    margin: 40px 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #e0e7ef;
    position: relative;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.section-title i {
    margin-right: 10px;
    color: #3498db;
}

.section-title .badge-count {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    color: white;
    border-radius: 20px;
    padding: 2px 15px;
    font-size: 0.9rem;
    margin-left: 10px;
    vertical-align: middle;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1;
}

.gallery-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

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

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.gallery-item:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item .overlay h6 {
    margin-bottom: 5px;
    font-weight: 400;
    letter-spacing: 1px;
}

.gallery-item .overlay small {
    opacity: 0.8;
    font-size: 0.8rem;
}

.gallery-item .photo-number {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    backdrop-filter: blur(5px);
    z-index: 5;
}

/* ============================================
   MODAL PERSONALIZADO
   ============================================ */
.custom-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.custom-modal .modal-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.custom-modal .modal-dialog {
    max-width: 90vw;
    margin: 0 auto;
}

.image-viewer {
    position: relative;
    background: rgba(0,0,0,0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    max-width: 1000px;
    margin: 0 auto;
}

.image-viewer img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.image-viewer .nav-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.image-viewer .nav-controls button {
    pointer-events: auto;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer .nav-controls button:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.image-viewer .top-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.image-viewer .top-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer .top-controls button:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
    z-index: 10;
}

.image-info {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    padding: 10px 20px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    width: 80%;
}

.image-info h5 {
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
}

.image-info small {
    opacity: 0.8;
}

/* ============================================
   MODO FULLSCREEN
   ============================================ */
.image-viewer.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
}

.image-viewer.fullscreen img {
    max-height: 100vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-container {
        padding: 15px;
    }

    .image-viewer .nav-controls button {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

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

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

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}