/* ================================================================
   PORTFOLIO.CSS — Estilos exclusivos da página portfolio.html
   Arquivo: css/portfolio.css
================================================================ */


/* ================================================================
   MINI HERO — reutiliza .page-hero do servicos.css
   Obs: se servicos.css não estiver linkado, copiar os estilos
   do .page-hero aqui. Para evitar duplicação, centralize em
   um futuro pages.css global.
================================================================ */
.page-hero {
    min-height: 42vh;
    background: var(--grad-hero);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 130px 0 70px;
}
.page-hero-bg { position: absolute; inset: 0; overflow: hidden; }
.page-hero-content { position: relative; z-index: 2; }

.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
}
.breadcrumb a { color: rgba(255,255,255,0.45); transition: var(--t); }
.breadcrumb a:hover { color: var(--laranja); }
.breadcrumb span:last-child { color: rgba(255,255,255,0.8); font-weight: 700; }

.page-hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    color: var(--branco); letter-spacing: 3px; line-height: 1;
    margin-bottom: 16px;
}
.page-hero-title .colorido {
    display: block;
    background: var(--grad-marca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-hero-sub { color: rgba(255,255,255,0.55); font-size: 1rem; max-width: 480px; margin-bottom: 28px; }

/* Mini estatísticas no hero do portfólio */
.hero-porto-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.hps-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hps-item strong {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--branco);
    line-height: 1;
    background: var(--grad-marca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hps-item span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
/* Separador vertical entre os stats */
.hps-sep {
    width: 1px; height: 36px;
    background: rgba(255,255,255,0.12);
}


/* ================================================================
   SEÇÃO GALERIA
================================================================ */
#galeria {
    padding: 70px 0 100px;
    background: var(--cinza-claro);
}


/* ================================================================
   BOTÕES DE FILTRO
================================================================ */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.filtro-btn {
    background: var(--branco);
    border: 1.5px solid rgba(0,0,0,0.09);
    color: var(--cinza-texto);
    padding: 9px 20px;
    border-radius: 100px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
}
.filtro-btn:hover {
    border-color: var(--roxo);
    color: var(--roxo);
    background: rgba(139,47,201,0.04);
}
/* Estado ativo: fundo gradiente da marca */
.filtro-btn.ativo {
    background: var(--grad-marca);
    border-color: transparent;
    color: var(--branco);
    box-shadow: 0 4px 16px rgba(139,47,201,0.3);
}

/* Contador de resultados */
.filtro-contador {
    font-size: 0.82rem;
    color: var(--cinza);
    margin-bottom: 28px;
}
.filtro-contador strong { color: var(--roxo); }


/* ================================================================
   GRADE DO PORTFÓLIO — 4 colunas → 2 → 1
================================================================ */
.porto-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media(max-width:1024px) { .porto-grid-full { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:768px)  { .porto-grid-full { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:420px)  { .porto-grid-full { grid-template-columns: 1fr; } }


/* ================================================================
   ITEM DO PORTFÓLIO (.pi)
================================================================ */
.pi {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 4/3;       /* proporção fixa para grade uniforme */
    background: #e0e0e0;      /* cor de fundo enquanto imagem carrega */
}

.pi img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.pi:hover img { transform: scale(1.08); }

/* Overlay com gradiente e info */
.pi-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to top,
        rgba(10,0,20,0.92) 0%,
        rgba(10,0,20,0.3)  50%,
        transparent        100%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    gap: 5px;
}
.pi:hover .pi-overlay { opacity: 1; }

/* Badge da categoria */
.pi-cat {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--laranja);
    display: block;
}

.pi-titulo {
    color: var(--branco);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    line-height: 1.1;
}

/* "🔍 Ver detalhes" */
.pi-zoom {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    display: block;
    transition: color 0.2s ease;
}
.pi:hover .pi-zoom { color: var(--verde); }

/* Animação de saída/entrada do filtro */
.pi.saindo {
    animation: pi-sair 0.25s ease forwards;
}
.pi.entrando {
    animation: pi-entrar 0.4s ease forwards;
}
/* Item oculto pelo filtro */
.pi.oculto {
    display: none;
}

@keyframes pi-sair {
    from { opacity:1; transform: scale(1); }
    to   { opacity:0; transform: scale(0.9); }
}
@keyframes pi-entrar {
    from { opacity:0; transform: scale(0.9); }
    to   { opacity:1; transform: scale(1); }
}

/* Mensagem vazia */
.sem-resultados {
    text-align: center;
    padding: 60px 0;
    color: var(--cinza);
    font-size: 1.1rem;
}


/* ================================================================
   LIGHTBOX — Visualizador de imagem em tela cheia
================================================================ */
.lightbox {
    position: fixed; inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fundo escuro semitransparente */
.lb-overlay {
    position: absolute; inset: 0;
    background: rgba(5, 0, 15, 0.94);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

/* Container central do lightbox */
.lb-conteudo {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 920px;
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0,0,0,0.8);
    animation: lb-abrir 0.3s ease;
    display: flex;
    flex-direction: column;
}
@keyframes lb-abrir {
    from { opacity:0; transform: scale(0.94) translateY(20px); }
    to   { opacity:1; transform: scale(1)    translateY(0); }
}

/* Botão fechar (✕) */
.lb-fechar {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 10;
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: var(--branco);
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--t);
}
.lb-fechar:hover { background: var(--vermelho); border-color: var(--vermelho); }

/* Área da imagem */
.lb-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: #0a0a0a;
    overflow: hidden;
}
.lb-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}
/* Quando trocando de imagem, a foto fica transparente */
.lb-img.carregando { opacity: 0; }

/* Spinner de loading */
.lb-loader {
    position: absolute; inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}
.lb-loader::after {
    content: '';
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--roxo);
    border-radius: 50%;
    animation: girar 0.7s linear infinite;
}
.lb-loader.visivel { display: flex; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Botões de navegação (‹ e ›) */
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: var(--branco);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--t);
}
.lb-nav:hover { background: var(--roxo); border-color: var(--roxo); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* Painel de info abaixo da imagem */
.lb-info {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.lb-titulo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--branco);
    margin-bottom: 4px;
}
.lb-desc { font-size: 0.88rem; color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 14px; }
.lb-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.lb-contador { font-size: 0.78rem; color: rgba(255,255,255,0.3); }

/* Botão "Pedir igual" no lightbox */
.lb-wpp {
    display: inline-flex; align-items: center; gap: 8px;
    background: #25D366; color: var(--branco);
    padding: 10px 20px; border-radius: 8px;
    font-weight: 800; font-size: 0.85rem;
    transition: var(--t);
}
.lb-wpp:hover { background: #1db954; transform: translateY(-2px); }

/* Mobile: ajusta lightbox */
@media(max-width:600px){
    .lb-conteudo { width: 96vw; border-radius: 14px; }
    .lb-nav { width: 36px; height: 36px; font-size: 1.1rem; }
    .lb-prev { left: 6px; }
    .lb-next { right: 6px; }
    .lb-info { padding: 14px 16px; }
}