/* Single Projeto — layout editorial */
.single-projeto {
    background: #eee7df;
}

.single-projeto .elephant-header-spacer {
    display: none !important;
}

.single-projeto .elephant-project {
    width: 100%;
    overflow: hidden;
    background: #eee7df;
    color: #000;
}

.elephant-project__hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.elephant-project__hero-shade {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .06);
    pointer-events: none;
}

.elephant-project__title {
    position: absolute;
    left: 50%;
    bottom: clamp(30px, 5.2vh, 66px);
    transform: translateX(-50%);
    width: min(92vw, 1180px);
    margin: 0;
    color: #fff;
    font-family: "Elephant Span", 'Times New Roman', serif;
    font-size: clamp(38px, 4.2vw, 76px);
    font-weight: 400;
    line-height: .95;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: -.025em;
    z-index: 2;
}

/* Cabeçalho branco em cima do hero; passa a preto ao sair do hero. */
.single-projeto:not(.elephant-project-scrolled) #main-menu > li > a,
.single-projeto:not(.elephant-project-scrolled) #mobile-menu > li > a {
    color: #fff !important;
}

.single-projeto.elephant-project-scrolled #main-menu > li > a,
.single-projeto.elephant-project-scrolled #mobile-menu > li > a {
    color: #000 !important;
}

.single-projeto.elephant-project-scrolled header .site-lelephant {
    filter: none !important;
}

.elephant-project__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    min-height: 760px;
    margin-top: 10px;
    background: #eee7df;
}

/* Sem imagem lateral, o conteúdo permanece legível, sem painel vazio. */
.elephant-project__intro--no-media {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
}
.elephant-project__intro--no-media .elephant-project__intro-copy {
    max-width: 900px;
    padding: clamp(48px, 7vw, 118px) clamp(34px, 7vw, 128px);
}

.elephant-project__intro-media {
    min-width: 0;
    height: 100%;
    min-height: 760px;
    overflow: hidden;
    background: #e7dfd6;
}

.elephant-project__intro-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 760px;
    object-fit: cover;
    object-position: center;
}

.elephant-project__intro-copy {
    position: relative;
    min-width: 0;
    padding: clamp(48px, 7vw, 118px) clamp(36px, 7vw, 128px) clamp(70px, 8vw, 140px) clamp(34px, 4.3vw, 82px);
}

.elephant-project__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    align-items: start;
    width: 100%;
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.elephant-project__meta-scope {
    text-align: left;
}

.elephant-project__meta-year {
    text-align: right;
    white-space: nowrap;
}

.elephant-project__description {
    width: min(100%, 590px);
    margin-top: clamp(72px, 7vw, 118px);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.36;
    font-weight: 400;
}

.elephant-project__description > :first-child {
    margin-top: 0;
}

.elephant-project__description > :last-child {
    margin-bottom: 0;
}

.elephant-project__description p {
    margin: 0 0 .45em;
    font: inherit;
}

/* The legacy theme uses generic .p1/.p2/.p3 classes for old fade effects.
   Project editor content may inherit those classes, so keep editorial copy visible. */
.elephant-project__description p,
.elephant-project__description .p1,
.elephant-project__description .p2,
.elephant-project__description .p3 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.elephant-project__gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    /* Preservar a ordem definida no Pods; não preencher os espaços vazios. */
    grid-auto-flow: row;
    /* A altura de cada linha segue a imagem mais alta do par. */
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 10px 0 0;
    padding: 0;
    background: #eee7df;
}

.elephant-project__gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    background: #e5ddd3;
}

.elephant-project__gallery-item.is-wide {
    grid-column: 1 / -1;
}

.elephant-project__gallery-item.is-half {
    grid-column: span 1;
}

/* Cada linha mantém a altura da imagem mais alta.
   Só uma imagem com menor proporção/altura precisa de ser recortada
   para preencher a célula; as restantes mantêm o enquadramento original. */
.elephant-project__gallery-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.elephant-project__gallery .elephant-project__lightbox-trigger {
    height: 100%;
}

/* Imagem horizontal final: a seguir à galeria e antes da ficha técnica. */
.elephant-project__final-image-wrap {
    margin: 10px 0 0;
    width: 100%;
    background: #eee7df;
}
.elephant-project__final-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}
.elephant-project__final-image-wrap .elephant-project__lightbox-trigger {
    height: auto;
}

/* Imagens clicáveis + lightbox/slider do projeto */
.elephant-project__lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
}

.elephant-project__lightbox-trigger:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: -1px;
}

.elephant-project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px 72px;
    background: rgba(0, 0, 0, .96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
}

.elephant-project-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.elephant-project-lightbox-open {
    overflow: hidden !important;
}

.elephant-project-lightbox__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.elephant-project-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 1;
    transform: translateX(0);
    transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
}

.elephant-project-lightbox.is-changing .elephant-project-lightbox__image {
    opacity: .25;
}

.elephant-project-lightbox__close,
.elephant-project-lightbox__nav {
    position: absolute;
    z-index: 3;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.elephant-project-lightbox__close {
    top: 24px;
    right: 28px;
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.elephant-project-lightbox__nav {
    top: 50%;
    width: 52px;
    height: 72px;
    transform: translateY(-50%);
    font-size: 44px;
}

.elephant-project-lightbox__nav--prev {
    left: 14px;
}

.elephant-project-lightbox__nav--next {
    right: 14px;
}

.elephant-project-lightbox__counter {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 3;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255,255,255,.78);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 11px;
    line-height: 16px;
    letter-spacing: .03em;
}

.elephant-project__technical {
    margin-top: 10px;
    background: #eee7df;
    padding: clamp(80px, 8vw, 145px) 0 clamp(42px, 4vw, 72px);
}

.elephant-project__technical-inner {
    width: min(82vw, 1440px);
    margin: 0 auto;
}

.elephant-project__technical-title {
    margin: 0 0 clamp(48px, 5vw, 88px);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.elephant-project__technical-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(0, 0, 0, .28);
}

.elephant-project__technical-cell {
    display: grid;
    grid-template-columns: minmax(120px, .65fr) minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
    min-height: 48px;
    padding: 12px 0 11px;
    border-bottom: 1px solid rgba(0, 0, 0, .28);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
}

.elephant-project__technical-cell:nth-child(odd) {
    padding-right: clamp(20px, 4vw, 80px);
}

.elephant-project__technical-cell:nth-child(even) {
    padding-left: clamp(20px, 4vw, 80px);
}

.elephant-project__technical-cell span,
.elephant-project__technical-cell strong {
    font: inherit;
    font-weight: 400;
}

.elephant-project__navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 40px;
    margin-top: clamp(92px, 10vw, 180px);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 13px;
    line-height: 18px;
    text-transform: uppercase;
}

.elephant-project__nav-side--next {
    text-align: right;
}

.elephant-project__navigation a {
    color: #000;
    text-decoration: none;
}

.elephant-project-reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
}

.elephant-project-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .elephant-project__hero {
        min-height: 520px;
    }

    .elephant-project__title {
        bottom: 34px;
        font-size: clamp(34px, 7vw, 56px);
    }

    .elephant-project__intro {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .elephant-project__intro-media,
    .elephant-project__intro-image {
        min-height: 0;
        height: auto;
    }

    .elephant-project__intro-image {
        aspect-ratio: 4 / 5;
    }

    .elephant-project__intro-copy {
        padding: 42px 28px 76px;
    }

    .elephant-project__meta {
        gap: 20px;
    }

    .elephant-project__meta-scope {
        text-align: left;
    }

    .elephant-project__description {
        margin-top: 56px;
        font-size: 16px;
        line-height: 1.42;
    }

    .elephant-project__technical-inner {
        width: calc(100% - 56px);
    }
}

@media (max-width: 767px) {
    /* Manter pares verticais também em mobile, com espaçamento reduzido. */
    .elephant-project__gallery {
        gap: 6px;
    }

    .elephant-project__technical {
        padding-top: 70px;
    }

    .elephant-project-lightbox {
        padding: 58px 18px 44px;
    }

    .elephant-project-lightbox__close {
        top: 8px;
        right: 10px;
    }

    .elephant-project-lightbox__nav {
        width: 42px;
        height: 62px;
        font-size: 36px;
    }

    .elephant-project-lightbox__nav--prev {
        left: 0;
    }

    .elephant-project-lightbox__nav--next {
        right: 0;
    }

    .elephant-project__technical-title {
        margin-bottom: 38px;
    }

    .elephant-project__technical-grid {
        grid-template-columns: 1fr;
    }

    .elephant-project__technical-cell,
    .elephant-project__technical-cell:nth-child(odd),
    .elephant-project__technical-cell:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 0 14px;
    }

    .elephant-project__technical-cell span {
        opacity: .55;
        font-size: 11px;
        text-transform: uppercase;
    }

    .elephant-project__navigation {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-top: 80px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .elephant-project-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =====================================================================
 * Entrada do single Projeto — mesma linguagem de fade da homepage.
 * Não altera tipografia, geometria, cores nem o comportamento do header
 * ao sair do hero; apenas controla a entrada inicial.
 * ===================================================================== */
body.single-projeto header.menu-transparente {
    opacity: 0;
    transition: opacity 2s ease;
}

body.single-projeto.elephant-project-entry-ready header.menu-transparente {
    opacity: 1;
}

body.single-projeto .elephant-project__title {
    opacity: 0;
    transition: opacity 2s ease .28s;
}

body.single-projeto.elephant-project-entry-ready .elephant-project__title {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    body.single-projeto header.menu-transparente,
    body.single-projeto .elephant-project__title {
        opacity: 1 !important;
        transition: none !important;
    }
}
