/* Portfólio: cards, filtros e modal (usado em index.html e portfolio.html) */

/* ── Grid & cards ─────────────────────────────────────────────────────────── */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 1000px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .pf-grid { grid-template-columns: 1fr; gap: 20px; } }

.pf-card {
  display: flex; flex-direction: column; background: #fff; color: #1C2624;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(11,46,61,0.06), 0 8px 24px rgba(11,46,61,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pfCardIn 0.45s ease backwards; /* backwards: não trava o transform do :hover */
}
.pf-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(11,46,61,0.08), 0 18px 40px rgba(11,46,61,0.14); }
.pf-card:focus-visible { outline: 3px solid #F2A93B; outline-offset: 3px; }

.pf-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #123549, #0B2E3D); }
.pf-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.pf-card:hover .pf-card-media img { transform: scale(1.04); }
.pf-card-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(4,14,17,0.55)); pointer-events: none; }

.pf-tag { position: absolute; left: 14px; top: 14px; z-index: 1; background: #7A9E93; color: #0B2E3D; font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 999px; }
.pf-exemplo { position: absolute; right: 14px; top: 14px; z-index: 1; background: #C1652F; color: #fff; font-weight: 700; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; padding: 5px 9px; border-radius: 4px; }

.pf-card-body { padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pf-card-title { font-family: 'Spectral', serif; font-weight: 700; font-size: 19px; line-height: 1.25; color: #0B2E3D; margin: 0; }
.pf-loc { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: #55625E; }
.pf-loc svg { flex-shrink: 0; }
.pf-card-media picture, .pf-stage picture, .pf-thumb picture { display: block; width: 100%; height: 100%; }
.pf-metrics { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; margin-top: 8px; padding-top: 14px; border-top: 1px solid #EEE8DA; }
.pf-metric-label { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #6E7B77; font-weight: 600; }
.pf-metric-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7A9E93; }
.pf-metric-label.is-gold::before { background: #F2A93B; }
.pf-metric-value { font-family: 'Spectral', serif; font-weight: 700; font-size: 18px; color: #0B2E3D; margin-top: 3px; white-space: nowrap; }
.pf-metric-value small { display: block; font-family: 'Work Sans', sans-serif; font-size: 12px; font-weight: 500; color: #55625E; }
.pf-economia { margin-top: 4px; padding: 10px 12px; background: #F5F3EC; border-left: 3px solid #F2A93B; border-radius: 4px; font-size: 14px; color: #1C2624; }
.pf-economia strong { font-family: 'Spectral', serif; font-weight: 700; font-size: 16px; color: #0B2E3D; }
.pf-nota { margin: 0; font-size: 11.5px; line-height: 1.45; color: #7A8783; }
.pf-more { margin-top: auto; padding-top: 12px; font-weight: 700; font-size: 14px; color: #0B2E3D; display: inline-flex; align-items: center; gap: 6px; }
.pf-more span { transition: transform 0.2s ease; }
.pf-card:hover .pf-more span { transform: translateX(4px); }

/* Card-convite no fim da grid */
.pf-card-cta { background: linear-gradient(150deg, #0B2E3D, #163C4A); color: #fff; padding: 34px 28px; justify-content: center; gap: 14px; position: relative; }
.pf-card-cta:hover { box-shadow: 0 18px 40px rgba(11,46,61,0.3); }
.pf-card-cta .pf-cta-eyebrow { font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #F2A93B; }
.pf-card-cta .pf-cta-title { font-family: 'Spectral', serif; font-weight: 700; font-size: 26px; line-height: 1.2; margin: 0; }
.pf-card-cta p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #C8DAD4; }
.pf-card-cta .pf-cta-btn { align-self: flex-start; margin-top: 8px; background: #F2A93B; color: #0B2E3D; font-weight: 700; font-size: 14.5px; padding: 13px 24px; border-radius: 999px; transition: background 0.2s; }
.pf-card-cta:hover .pf-cta-btn { background: #DD9A2E; }

img.is-broken { visibility: hidden; }

/* ── Filtros ──────────────────────────────────────────────────────────────── */
.pf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.pf-chip {
  font: 600 14px 'Work Sans', sans-serif; color: #0B2E3D; background: transparent;
  border: 1px solid #D9D2C0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.pf-chip:hover { border-color: #0B2E3D; }
.pf-chip:focus-visible { outline: 3px solid #F2A93B; outline-offset: 2px; }
.pf-chip[aria-pressed="true"] { background: #0B2E3D; border-color: #0B2E3D; color: #fff; }
.pf-chip .pf-count { margin-left: 6px; opacity: 0.55; font-weight: 500; }
@media (max-width: 640px) {
  .pf-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -24px 28px; padding: 0 24px 4px; scrollbar-width: none; }
  .pf-filters::-webkit-scrollbar { display: none; }
}

/* Aviso de dados ilustrativos */
.pf-demo-note { max-width: 760px; margin: 0 auto 28px; padding: 12px 16px; border: 1px dashed #C1652F; border-radius: 6px; background: #FBF1EA; color: #7A3B16; font-size: 13.5px; line-height: 1.5; text-align: center; }
.pf-demo-note code { font-size: 12.5px; background: rgba(193,101,47,0.12); padding: 1px 5px; border-radius: 3px; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.pf-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 32px; }
.pf-modal.is-open { display: flex; }
.pf-backdrop { position: absolute; inset: 0; background: rgba(4,14,17,0.82); backdrop-filter: blur(4px); animation: pfFade 0.2s ease both; }
.pf-dialog {
  position: relative; width: 100%; max-width: 1140px; height: min(720px, calc(100vh - 64px));
  background: #fff; border-radius: 12px; overflow: hidden;
  display: grid; grid-template-columns: 1.45fr 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  animation: pfIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.pf-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: none; background: #fff; color: #0B2E3D; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18); transition: transform 0.2s;
}
.pf-close:hover { transform: rotate(90deg); }
.pf-close:focus-visible, .pf-nav:focus-visible, .pf-thumb:focus-visible { outline: 3px solid #F2A93B; outline-offset: 2px; }

.pf-gallery { position: relative; background: #08181F; display: flex; flex-direction: column; min-height: 0; }
.pf-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; user-select: none; }
.pf-stage img { width: 100%; height: 100%; object-fit: cover; display: block; animation: pfFade 0.3s ease both; }
.pf-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.92); color: #0B2E3D; font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: background 0.2s;
}
.pf-nav:hover { background: #fff; }
.pf-nav[hidden] { display: none; }
.pf-prev { left: 16px; }
.pf-next { right: 16px; }
.pf-counter { position: absolute; left: 16px; bottom: 16px; z-index: 2; background: rgba(4,14,17,0.7); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: 0.5px; padding: 6px 11px; border-radius: 999px; }
.pf-thumbs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; scrollbar-width: thin; }
.pf-thumbs:empty { display: none; }
.pf-thumb { flex: 0 0 auto; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #123549; cursor: pointer; opacity: 0.55; transition: opacity 0.2s, border-color 0.2s; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-thumb:hover { opacity: 0.85; }
.pf-thumb[aria-current="true"] { opacity: 1; border-color: #F2A93B; }

.pf-info { padding: 40px 34px 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.pf-info > * { flex-shrink: 0; } /* a coluna rola; os blocos não devem ser espremidos */
.pf-info-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; color: #55625E; }
.pf-info-meta .pf-pill { background: #E7EEEC; color: #0B2E3D; font-weight: 700; font-size: 12px; padding: 5px 11px; border-radius: 999px; }
.pf-info h2 { font-family: 'Spectral', serif; font-weight: 700; font-size: 28px; line-height: 1.2; color: #0B2E3D; margin: 0; padding-right: 36px; }
.pf-info .pf-resumo { margin: 0; font-size: 15px; line-height: 1.65; color: #1C2624; }
.pf-highlight { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #E4DCC9; border-radius: 8px; overflow: hidden; }
.pf-highlight > div { background: #F5F3EC; padding: 16px 18px; }
.pf-highlight .pf-hl-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #6E7B77; font-weight: 600; }
.pf-highlight .pf-hl-value { font-family: 'Spectral', serif; font-weight: 700; font-size: 24px; color: #0B2E3D; margin-top: 4px; white-space: nowrap; }
.pf-highlight .pf-hl-value small { font-family: 'Work Sans', sans-serif; font-size: 13px; font-weight: 500; color: #55625E; }
.pf-specs { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 14px; }
.pf-specs dt { color: #6E7B77; }
.pf-specs dd { margin: 0; color: #0B2E3D; font-weight: 600; }
.pf-quote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid #F2A93B; }
.pf-quote p { margin: 0; font-family: 'Spectral', serif; font-style: italic; font-size: 16.5px; line-height: 1.5; color: #0B2E3D; }
.pf-quote cite { display: block; margin-top: 6px; font-style: normal; font-size: 13px; color: #55625E; }
.pf-info-cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.pf-wa-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: #F2A93B; color: #0B2E3D; font-weight: 700; font-size: 15.5px; padding: 15px 22px; border-radius: 999px; transition: background 0.2s; }
.pf-wa-btn:hover { background: #DD9A2E; color: #0B2E3D; }
.pf-info-cta small { text-align: center; font-size: 12.5px; color: #6E7B77; }

@media (max-width: 860px) {
  .pf-modal { padding: 0; }
  .pf-dialog { grid-template-columns: 1fr; height: 100%; max-width: none; border-radius: 0; overflow-y: auto; display: block; }
  .pf-stage { flex: none; aspect-ratio: 4 / 3; }
  .pf-info { overflow: visible; padding: 26px 22px 36px; }
  .pf-info h2 { font-size: 24px; padding-right: 0; }
  .pf-highlight > div { padding: 14px; }
  .pf-highlight .pf-hl-value { font-size: 19px; }
  .pf-close { position: fixed; }
}

@keyframes pfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pfIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pfCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .pf-card, .pf-card-media img, .pf-backdrop, .pf-dialog, .pf-stage img, .pf-close { animation: none !important; transition: none !important; }
}
