/* ===================================================
   Galeria de portfólio (pf-*.php) — mesmo estilo de
   visualização das galerias de cliente: grade em linhas
   justificadas + lightbox com tira de miniaturas.
   Uso: incluir apenas nas páginas que adotarem este estilo.
   =================================================== */

:root {
    --pfg-bg-secondary: #f2f2f2;
    --pfg-text-primary: #1a1a1a;
    --pfg-text-secondary: #888888;
    --pfg-text-light: #ffffff;
    --pfg-accent: #333333;
    --pfg-accent-blue: #4a9fd8;
    --pfg-transition: 0.3s ease;
}

/* ===== CABEÇALHO DO EVENTO ===== */
.event-description {
    background-color: #ffffff;
    padding: 0 0 48px;
    padding-top: 100px;
}

.event-info {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.event-info h2 {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.event-info h2 .theme-gradient {
    color: #0066cc;
}

.event-info p {
    color: #7a7a7a;
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.374px;
    margin-bottom: 8px;
}

.event-meta {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.224px;
    color: #7a7a7a;
}

.event-meta-item .icon {
    color: #0066cc;
    font-size: 18px;
}

/* ===== GRADE (linhas justificadas) ===== */
.gallery-section {
    background-color: #f5f5f7;
    padding: 48px 0 80px;
}

.gallery-section .container {
    max-width: 1400px;
}

.justified-grid {
    display: block;
    line-height: 0;
}

.justified-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.pfg-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--pfg-bg-secondary);
    line-height: 0;
    flex-shrink: 0;
    border-radius: 6px;
}

.pfg-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pfg-item:hover img {
    transform: scale(1.03);
}

.pfg-item .pfg-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 45%);
    opacity: 0;
    transition: opacity var(--pfg-transition);
}

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

.pfg-download-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--pfg-text-light);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--pfg-transition);
}

.pfg-download-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .event-description {
        padding-top: 80px;
    }

    .event-info h2 {
        font-size: 28px;
    }

    .event-meta {
        gap: 16px;
    }

    .justified-row {
        gap: 3px;
        margin-bottom: 3px;
    }

    .gallery-section {
        padding: 32px 0 60px;
    }
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    flex-direction: column;
}

.lightbox.open {
    display: flex;
}

.lightbox-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.lightbox-btn {
    background: none;
    border: none;
    color: #555;
    padding: 10px;
    cursor: pointer;
    transition: color var(--pfg-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
}

.lightbox-btn:hover {
    color: #111;
}

.lightbox-filename-top {
    font-size: 12px;
    color: var(--pfg-text-secondary);
    letter-spacing: 0.5px;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
    position: relative;
    min-height: 0;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    padding: 20px 10px;
    cursor: pointer;
    transition: color var(--pfg-transition);
    z-index: 10;
    font-size: 22px;
    width: auto;
    height: auto;
    border-radius: 0;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    color: #333;
    background: none;
}

.lightbox-nav:active {
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 8px;
}

.lightbox-next {
    right: 8px;
}

.lightbox-bottom-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 4px 20px 16px;
    flex-shrink: 0;
}

.lightbox-action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--pfg-text-primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 6px 4px;
    text-decoration: none;
    transition: color var(--pfg-transition);
}

.lightbox-action-link:hover {
    color: var(--pfg-accent-blue);
}

.lightbox-filmstrip-wrapper {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 0;
    flex-shrink: 0;
}

.lightbox-filmstrip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: thin;
}

.filmstrip-item {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    cursor: pointer;
    opacity: 0.55;
    border-bottom: 3px solid transparent;
    transition: opacity var(--pfg-transition), border-color var(--pfg-transition);
}

.filmstrip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.filmstrip-item:hover {
    opacity: 0.85;
}

.filmstrip-item.active {
    opacity: 1;
    border-bottom-color: var(--pfg-accent-blue);
}

@media (max-width: 768px) {
    .lightbox-bottom-actions {
        gap: 18px;
    }

    .filmstrip-item {
        width: 44px;
        height: 44px;
    }
}

/* ===== FADE IN ===== */
@keyframes pfgFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pfg-item.fade-in {
    animation: pfgFadeInUp 0.5s ease forwards;
    opacity: 0;
}
