/**
 * IC Acabamentos — Single Projeto
 * Hero, descrição e galeria em grid com lightbox in-page.
 */

.projeto-single-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 5rem 1.5rem 4rem;
    color: var(--charcoal);
}

/* ─── Hero ─── */
.projeto-hero {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-soft);
}
.projeto-hero .eyebrow {
    display: block;
    font-size: .72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: .6rem;
}
.projeto-hero h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    letter-spacing: -0.01em;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.projeto-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.25rem;
}
.projeto-meta-item { display: flex; flex-direction: column; line-height: 1.3; }
.projeto-meta-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-soft);
    font-weight: 600;
}
.projeto-meta-value {
    font-size: 1rem;
    color: var(--charcoal);
    font-weight: 500;
    margin-top: 2px;
}

/* ─── Hero image ─── */
.projeto-hero-img {
    margin: 0 0 3rem;
    /* centraliza horizontalmente caso a imagem seja mais estreita que a coluna */
    display: flex;
    justify-content: center;
}
.projeto-hero-img-btn {
    appearance: none;
    background: none;     /* sem fundo: container shrink-fit na imagem, zero borda */
    border: 0;
    padding: 0;
    /* shrink-to-fit: container adota o tamanho real renderizado da imagem */
    display: inline-block;
    line-height: 0;
    cursor: zoom-in;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
    transition: box-shadow .35s ease, transform .35s ease;
    /* limita largura à coluna pra não estourar */
    max-width: 100%;
}
.projeto-hero-img-btn:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
    transform: translateY(-2px);
}
.projeto-hero-img-btn img {
    display: block;
    /* NUNCA cortar nem deixar fundo aparecendo. A imagem dita o tamanho;
       o container espreme em volta dela. */
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
}

/* ─── Conteúdo (descrição) ─── */
.projeto-conteudo {
    max-width: 70ch;
    margin: 0 auto 3.5rem;
    color: var(--charcoal);
    font-size: 1.05rem;
    line-height: 1.7;
}
.projeto-conteudo p { margin: 0 0 1.1rem; }
.projeto-conteudo h2, .projeto-conteudo h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    margin: 2rem 0 .8rem;
    font-weight: 400;
}

/* ─── Galeria em grid ─── */
.projeto-galeria-sec { margin-top: 1rem; }
.projeto-galeria-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 1rem;
}
.projeto-galeria-header .eyebrow {
    font-size: .72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: .4rem;
}
.projeto-galeria-header h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    margin: 0;
    color: var(--charcoal);
    font-weight: 400;
}

.projeto-galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .8rem;
}

.projeto-galeria-item {
    appearance: none;
    border: 0;
    padding: 0;
    background: var(--sand, #f0ece6);
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    transition: transform .3s ease, box-shadow .3s ease;
}
.projeto-galeria-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .1);
}
.projeto-galeria-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease;
    display: block;
}
.projeto-galeria-item:hover img { transform: scale(1.06); }

@media (max-width: 700px) {
    .projeto-single-wrap { padding: 3rem 1rem; }
    .projeto-galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: .5rem;
    }
    .projeto-meta-row { gap: 1.2rem; }
}

/* ─── Lightbox ─── */
.pj-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 9, .92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}
.pj-lightbox.is-open { display: flex; }
body.pj-lb-lock { overflow: hidden; }

.pj-lightbox-stage {
    max-width: min(1400px, 96vw);
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pj-lightbox-stage img {
    max-width: 100%;
    max-height: 88vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.pj-lb-close,
.pj-lb-nav {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}
.pj-lb-close:hover,
.pj-lb-nav:hover { background: rgba(255, 255, 255, .25); }
.pj-lb-close svg,
.pj-lb-nav svg { width: 24px; height: 24px; }
.pj-lb-close { top: 18px; right: 18px; }
.pj-lb-nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.pj-lb-nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
.pj-lb-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    background: rgba(0, 0, 0, .35);
    padding: 5px 12px;
    border-radius: 999px;
}

@media (max-width: 600px) {
    .pj-lightbox { padding: 12px; }
    .pj-lb-close, .pj-lb-nav { width: 40px; height: 40px; }
    .pj-lb-close { top: 10px; right: 10px; }
    .pj-lb-nav--prev { left: 10px; }
    .pj-lb-nav--next { right: 10px; }
}
