/* ============================================================
   PORTFÓLIO (portfolio.php e portfolio-detalhe.php)
============================================================ */
.pf-hero { background: var(--black); color: var(--white); padding: 80px 0 72px; }
.pf-hero .pf-tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--orange); margin-bottom: 12px; }
.pf-hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; line-height: 1.1; letter-spacing: -1.5px; margin: 0 0 14px; color: var(--white); }
.pf-hero p { font-size: 18px; color: rgba(255,255,255,0.7); margin: 0; max-width: 680px; }

.pf-body { background: var(--white); padding: 56px 0 96px; }

/* Filtros */
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.pf-filter { border: 1px solid #ddd; background: var(--white); color: #333; font-family: inherit; font-size: 15px; font-weight: 600; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: all var(--transition); }
.pf-filter:hover { border-color: var(--orange); color: var(--orange); }
.pf-filter.is-active { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* Grid de cards */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.pf-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid #eee; border-radius: 18px; overflow: hidden; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.pf-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.08); border-color: rgba(243,103,36,0.4); }
.pf-card[hidden] { display: none; }
.pf-thumb { position: relative; aspect-ratio: 4 / 3; background: #f1f1f1; overflow: hidden; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-thumb-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 42px; color: #ccc; }
.pf-badge { position: absolute; top: 14px; left: 14px; background: var(--orange); color: var(--white); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pf-info { padding: 22px 22px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.pf-cats { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--orange); margin-bottom: 6px; }
.pf-info h2 { font-size: 20px; font-weight: 800; line-height: 1.3; margin: 0 0 8px; color: var(--black); }
.pf-info p { font-size: 15px; color: var(--gray); line-height: 1.55; margin: 0 0 16px; flex-grow: 1; }
.pf-more { font-size: 15px; font-weight: 700; color: var(--orange); }
.pf-more i { margin-left: 6px; transition: transform var(--transition); }
.pf-card:hover .pf-more i { transform: translateX(4px); }

.pf-empty { text-align: center; padding: 60px 20px; color: var(--gray); }
.pf-empty i { font-size: 44px; color: #ccc; margin-bottom: 14px; display: block; }

/* CTA */
.pf-cta { background: var(--light); padding: 80px 0; text-align: center; }
.pf-cta h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 900; letter-spacing: -1px; line-height: 1.2; margin: 0 0 12px; color: var(--black); }
.pf-cta p { font-size: 18px; color: var(--gray); margin: 0 auto 28px; max-width: 620px; }
.pf-cta .btn-primary { font-size: 16px; padding: 14px 28px; }

/* Detalhe */
.pf-back { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 20px; transition: color var(--transition); }
.pf-back:hover { color: var(--orange); }
.pf-detail { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; }
.pf-detail-full { grid-template-columns: 1fr; max-width: 900px; margin: 0 auto; }
.pf-cover { border-radius: 20px; overflow: hidden; margin-bottom: 36px; background: #f1f1f1; }
.pf-cover img { width: 100%; height: auto; display: block; }
.pf-content { font-size: 17px; color: #333; line-height: 1.75; }
.pf-content h2, .pf-content h3 { color: var(--black); font-weight: 800; line-height: 1.3; margin: 28px 0 12px; }
.pf-content h2 { font-size: 26px; }
.pf-content h3 { font-size: 21px; }
.pf-content p { margin: 0 0 16px; }
.pf-content ul, .pf-content ol { margin: 0 0 16px; padding-left: 22px; }
.pf-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 12px 0; }
.pf-content a { color: var(--orange); font-weight: 600; }
.pf-content iframe { max-width: 100%; border-radius: 12px; }

.pf-side { position: sticky; top: 110px; background: var(--light); border-radius: 18px; padding: 26px; }
.pf-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray); margin: 0 0 10px; }
.pf-side-block + .pf-side-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e6e6e6; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { font-size: 13px; font-weight: 600; background: var(--white); border: 1px solid #e3e3e3; border-radius: 999px; padding: 4px 12px; color: #444; }
.pf-side .btn-primary { display: block; text-align: center; font-size: 15px; padding: 13px 18px; }
.pf-side p { font-size: 15px; color: var(--gray); line-height: 1.5; margin: 0 0 14px; }

.pf-gallery-title { font-size: 24px; font-weight: 800; color: var(--black); margin: 44px 0 18px; }
.pf-gallery { display: grid; grid-template-columns: 1fr; gap: 20px; }
.pf-gallery a { display: block; border-radius: 16px; overflow: hidden; background: #f1f1f1; cursor: zoom-in; }
.pf-gallery img { display: block; width: 100%; height: auto; }
.pf-files { margin-top: 28px; display: grid; gap: 10px; }
.pf-files a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid #eee; border-radius: 12px; font-weight: 600; color: #333; }
.pf-files a i { color: #e11d48; font-size: 20px; }

/* Lightbox */
.pf-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; z-index: 3000; padding: 20px; }
.pf-lightbox.is-open { display: flex; }
.pf-lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.pf-lb-btn { position: absolute; background: rgba(255,255,255,0.12); border: none; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pf-lb-btn:hover { background: var(--orange); }
.pf-lb-close { top: 20px; right: 20px; }
.pf-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.pf-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 991px) {
    .pf-grid { grid-template-columns: repeat(2, 1fr); }
    .pf-detail { grid-template-columns: 1fr; gap: 36px; }
    .pf-side { position: static; }
}
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .pf-hero { padding: 52px 0 44px; }
    .pf-hero p { font-size: 16px; }
    .pf-body { padding: 36px 0 64px; }
    .pf-grid { grid-template-columns: 1fr; gap: 20px; }
    .pf-gallery { gap: 12px; }
    .pf-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; }
    .pf-filter { flex-shrink: 0; }
    .pf-content { font-size: 16px; }
    .pf-lb-prev, .pf-lb-next { top: auto; bottom: 20px; transform: none; }
}
