/* =============================================
   improvements.css — v5 COMPLETO
   Carregado após site.css.php.
   Unifica phase25/26/27 + adiciona todas
   as melhorias prometidas.
   NÃO mexe em admin, upload, ou galeria.
   ============================================= */

/* ── 1. GOOGLE FONTS (Bebas Neue + Inter) ─── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

/* ── 2. TIPOGRAFIA: Bebas Neue nos títulos ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.hero h1,
.brand b,
.hero-title,
.cat .title,
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1.5px;
}
.hero h1 { letter-spacing: 2px; }
.brand b  { font-size: 22px; letter-spacing: 2px; }

/* ── 3. SCROLLBAR FINA ───────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg, #0b0b0b); }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent, #ffd400); }

/* ── 4. HEADER: blur + shadow ao rolar ───── */
.header {
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  transition: box-shadow .3s ease;
}
.header.scrolled {
  box-shadow: 0 4px 28px rgba(0,0,0,.8);
}

/* ── 5. NAV: transições suaves ───────────── */
.nav a, .nav .pill {
  transition: background .18s ease, border-color .18s ease,
              color .18s ease, transform .15s ease;
}
.nav a:hover:not(.active) { transform: translateY(-1px); }

/* ── 6. TEMA INK & CRIMSON ───────────────── */
/* Aplica acento vermelho nas bordas e hovers,
   mantendo o tema base configurado pelo admin */
.nav a.active,
.nav a.home-link,
.nav a.back-link {
  border-color: var(--accent, #ffd400) !important;
}
.footer-page-btn:hover {
  border-color: var(--accent, #ffd400) !important;
  color: var(--accent, #ffd400) !important;
}

/* ── 7. CATEGORY CARDS: hover premium ───── */
.cat,
a.card.home-item {
  transition: transform .22s ease, box-shadow .22s ease,
              border-color .22s ease !important;
}
.cat:hover,
a.card.home-item:hover {
  transform: translateY(-3px) scale(1.012) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.6) !important;
  border-color: var(--accent, #ffd400) !important;
}
.cat .thumb { overflow: hidden; }
.cat .thumb img {
  transition: transform .45s ease !important;
}
.cat:hover .thumb img {
  transform: scale(1.07) !important;
}

/* ── 8. HOME PORTAL CARDS ────────────────── */
a.card.portal-card,
.portal-card,
.brick {
  transition: transform .22s ease, box-shadow .22s ease !important;
}
a.card.portal-card:hover,
.portal-card:hover {
  transform: translateY(-3px) scale(1.012) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.6) !important;
}
.brick:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 14px 36px rgba(0,0,0,.55) !important;
}

/* ── 9. GALLERY ITEMS: hover zoom ────────── */
/* Seletor específico — não afeta .card.gallery-item do admin */
.gitem,
.pg-item {
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.gitem:hover,
.pg-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  position: relative;
  z-index: 2;
}
.gitem img,
.pg-item img {
  transition: transform .42s ease, filter .42s ease !important;
}
.gitem:hover img,
.pg-item:hover img {
  transform: scale(1.07) !important;
  filter: brightness(1.08) contrast(1.04) !important;
}

/* ── 10. CAPTIONS fade-in no hover ──────── */
.gcap, .pg-cap {
  transition: opacity .22s ease, transform .22s ease;
}
.gitem:hover .gcap,
.pg-item:hover .pg-cap {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ── 11. BOTÕES: transição suave ─────────── */
.btn, button.btn {
  transition: background .18s ease, transform .16s ease,
              box-shadow .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }

/* ── 12. MODAL PÚBLICO: fechar melhorado ── */
#imgModal .modal-close:hover {
  background: var(--accent, #ffd400) !important;
  border-color: var(--accent, #ffd400) !important;
  color: #000 !important;
}

/* ── 13. ANIMAÇÃO DE ENTRADA DA PÁGINA ───── */
@keyframes _imp_fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Só na área pública — admin tem classe .admin-page no body */
body:not(.admin-page) .wrap > *:nth-child(1) {
  animation: _imp_fadeUp .34s ease both;
}
body:not(.admin-page) .wrap > *:nth-child(2) {
  animation: _imp_fadeUp .34s .08s ease both;
}
body:not(.admin-page) .wrap > *:nth-child(3) {
  animation: _imp_fadeUp .34s .16s ease both;
}

/* ── 14. SMOOTH SCROLL ───────────────────── */
html { scroll-behavior: smooth; }

/* ── 15. LAZY LOAD FADE-IN (via JS) ──────── */
.gitem img[data-src],
.pg-item img[data-src],
.cat .thumb img[data-src],
.brick img[data-src],
a.card.home-item img[data-src] {
  opacity: 0;
}
.gitem img.loaded,
.pg-item img.loaded,
.cat .thumb img.loaded,
.brick img.loaded,
a.card.home-item img.loaded {
  opacity: 1;
  transition: opacity .38s ease;
}

/* ── 16. PHASE 25/26/27 UNIFICADOS ──────── */

/* Phase 2.5 — modal counter */
#imgModal { position: fixed; }
#imgModalCount {
  display: block !important;
  position: absolute !important;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  margin: 0 !important;
  padding: 7px 12px !important;
  line-height: 1 !important;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
}
@media (max-width:480px) {
  #imgModalCount { top: 8px; font-size: 14px; padding: 6px 10px !important; }
}

/* Phase 2.6 — portal cards (complementa site.css.php) */
.home-portal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.portal-card {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.portal-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portal-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.80), rgba(0,0,0,0));
}
.portal-card h2 {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: #fff;
  font-size: 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}

/* Phase 2.7 — cinema gallery */
.gallery-grid { gap: 2px !important; }
.gallery-grid img {
  filter: contrast(1.05) saturate(1.05);
  transition: transform .25s ease;
}
.gallery-grid img:active { transform: scale(.98); }
