/**
 * Gallery CSS - Estilos da página de galeria (Carrossel)
 */

/* ==================== CARROSSEL DA GALERIA ==================== */

.gallery-carousel-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(80, 115, 160, 0.3) 0%,
        rgba(60, 95, 140, 0.4) 50%,
        rgba(80, 115, 160, 0.3) 100%);
    border: 1px solid rgba(212, 175, 90, 0.3);
}

.gallery-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    cursor: pointer;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-slide:hover img {
    transform: scale(1.02);
}

/* ==================== NAVEGACAO ==================== */

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 22, 40, 0.7);
    border: 1px solid rgba(212, 175, 90, 0.4);
    color: var(--gold);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.gallery-nav:hover {
    background: rgba(212, 175, 90, 0.2);
    border-color: var(--gold);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav svg {
    width: 24px;
    height: 24px;
}

.gallery-prev {
    left: 1rem;
}

.gallery-next {
    right: 1rem;
}

/* ==================== CAPTION BAR ==================== */

.gallery-caption-bar {
    padding: 1.2rem 1.5rem;
    background: rgba(10, 22, 40, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(212, 175, 90, 0.2);
}

.gallery-caption-bar span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--cream);
}

.gallery-counter {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    color: var(--gold) !important;
}

/* ==================== INDICADORES ==================== */

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(10, 22, 40, 0.5);
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 90, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.gallery-dot:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 90, 0.3);
}

.gallery-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.2);
}

/* ==================== LIGHTBOX ==================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 22, 40, 0.98);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(212, 175, 90, 0.1);
    border: 1px solid rgba(212, 175, 90, 0.3);
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.lightbox-close:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

/* ==================== RESPONSIVE CARROSSEL ==================== */

@media (max-width: 768px) {
    .gallery-carousel-wrapper {
        border-radius: 12px;
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .gallery-carousel {
        aspect-ratio: 4 / 3;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }

    .gallery-prev {
        left: 0.5rem;
    }

    .gallery-next {
        right: 0.5rem;
    }

    .gallery-caption-bar {
        padding: 0.8rem 1rem;
    }

    .gallery-caption-bar span {
        font-size: 1rem;
    }

    .gallery-counter {
        font-size: 0.8rem !important;
    }

    .gallery-indicators {
        padding: 0.8rem;
        gap: 0.4rem;
    }

    .gallery-dot {
        width: 8px;
        height: 8px;
    }
}

/* ==================== AJUSTE PAGE-FOOTER NA GALERIA ==================== */

/* Reduz espaço quando page-footer é seguido pelo mural */
.page-footer:has(+ .messages-wall) {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: none;
}

/* ==================== MURAL DE RECADOS ==================== */

.messages-wall {
    margin-top: 0;
    padding-top: 3rem;
    border-top: 1px solid rgba(196, 160, 122, 0.3);
}

.messages-wall-header {
    text-align: center;
    margin-bottom: 3rem;
}

.messages-wall-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--rose-gold-light);
    margin-bottom: 1rem;
}

.messages-wall-header p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: rgba(245, 240, 232, 0.7);
    font-style: italic;
}

.messages-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.message-wall-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(80, 115, 160, 0.75) 0%,
        rgba(60, 95, 140, 0.85) 50%,
        rgba(80, 115, 160, 0.75) 100%);
    border: 1px solid rgba(212, 175, 90, 0.4);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.message-wall-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(212, 175, 90, 0.1) 45%,
        rgba(212, 175, 90, 0.2) 50%,
        rgba(212, 175, 90, 0.1) 55%,
        transparent 60%
    );
    animation: holographic-scan 3s linear infinite;
    pointer-events: none;
}

.message-wall-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                0 0 30px rgba(212, 175, 90, 0.2);
}

.message-wall-quote {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-family: Georgia, serif;
    font-size: 4rem;
    color: rgba(212, 175, 90, 0.2);
    line-height: 1;
}

.message-wall-content {
    margin-bottom: 1.5rem;
    padding-top: 1rem;
}

.message-wall-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cream);
    font-style: italic;
}

.message-wall-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 90, 0.15);
}

.message-wall-author .author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
}

.message-wall-author .author-info {
    display: flex;
    flex-direction: column;
}

.message-wall-author .author-info strong {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--cream);
}

.message-wall-author .message-date {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: rgba(245, 240, 232, 0.5);
}

/* Loading State */
.messages-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: rgba(245, 240, 232, 0.7);
}

.messages-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 90, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .messages-wall {
        margin-top: 0;
        padding-top: 2rem;
    }

    .messages-wall-header h2 {
        font-size: 2.2rem;
    }

    .messages-wall-header p {
        font-size: 1rem;
    }

    .messages-wall-grid {
        grid-template-columns: 1fr;
    }

    .message-wall-card {
        padding: 1.5rem;
    }
}
