* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Montserrat", sans-serif;
    background: #000000;
    color: #ffffff;
}

.capa {
    width: 100%;
    max-height: 80vh;
    object-fit: cover;
}

.titulo {
    font-size: 5rem;
    text-align: right;
    letter-spacing: 7px;
    padding: 5px;
    margin-bottom: 30vh;
}

.bloco {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.bloco[data-tipo="descricao"] .desc-content,
.bloco[data-tipo="descricao"] .desc-content p{
    font-size: 1.3rem;
    letter-spacing: 0px;
    line-height: 1.8;
    font-variant: none;
    margin-bottom: 0.6em;
    max-width: 800px;
    font-weight: 500;
    text-align: center;
    color: #ffffffbd;
    word-spacing: 6px;
}

.bloco[data-tipo="descricao"] .desc-content h1
{
    font-variant: small-caps;
    max-width: 800px;
    font-weight: 600;
    text-align: center;
    line-height: 1.8;
    color: #ffffff;
    word-spacing: 6px;
    letter-spacing: -1.5px;
}
.bloco[data-tipo="descricao"] .desc-content h2{
    font-variant: small-caps;
    max-width: 800px;
    font-weight: 600;
    text-align: center;
    line-height: 1.8;
    color: #ffffff;
    word-spacing: 6px;
    letter-spacing: -1.5px;
}
.bloco[data-tipo="descricao"] .desc-content h3 {
    font-variant: small-caps;
    max-width: 800px;
    font-weight: 600;
    text-align: center;
    line-height: 1.8;
    color: #ffffff;
    word-spacing: 6px;
    letter-spacing: -1.5px;
}
.bloco[data-tipo="descricao"] .desc-content p {
    font-size: 1.5rem;
}

.bloco[data-tipo="descricao"] .desc-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.4em;
}

.bloco[data-tipo="descricao"] .desc-content h2 {
    font-size: 2rem;
    margin-bottom: 0.4em;
}

.bloco[data-tipo="descricao"] .desc-content h3 {
    font-size: 1.7rem;
    margin-bottom: 0.3em;
}

.bloco[data-tipo="descricao"] .desc-content ul,
.bloco[data-tipo="descricao"] .desc-content ol {
    font-size: 1.3rem;
    max-width: 800px;
    line-height: 1.8;
    color: #ffffff;
    padding-left: 1.5em;
}

.desc-interna-item a,
.bloco[data-tipo="descricao"] .desc-content a {
    color: #ffffff;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: opacity 0.2s;
}

.desc-interna-item a:hover,
.bloco[data-tipo="descricao"] .desc-content a:hover {
    opacity: 0.6;
}

.desc-interna-item p {
    font-size: 1.3rem;
    letter-spacing: 0px;
    font-weight: 500;
    line-height: 1.8;
    font-variant: none;
    margin-bottom: 0.6em;
}

.desc-interna-item h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 0.4em;
}

.desc-interna-item h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.4em;
}

.desc-interna-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0px;
    line-height: 1.3;
    margin-bottom: 0.3em;
}
#conteudo {
    max-width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bloco img,
.bloco video {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;

}

.bloco-youtube .youtube-wrapper {
    position: relative;
    width: 80%;
    aspect-ratio: 16 / 9;
}

.bloco-youtube .youtube-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 80vh;
    border-radius: 6px;
    border: none;
}

.bloco:has(img),
.bloco:has(video) {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
}

.desc-interna-item {
    font-size: 20px;
    word-spacing: 6px;
    letter-spacing: -1.5px;
    font-variant: small-caps;
    max-width: 1400px;
    font-weight: 600;
    text-align: justify;
    line-height: 1.8;
    color: #ffffff;
}

/* Zoom overlay */
#zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#zoom-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#zoom-close {
    position: absolute;
    top: 24px;
    right: 36px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 20001;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

#zoom-close:hover { opacity: 1; }

#zoom-controls {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20002;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 40px;
    padding: 8px 16px;
}

#zoom-controls button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

#zoom-controls button:hover {
    background: rgba(255,255,255,0.15);
}

#zoom-level {
    font-size: 0.8rem;
    color: #fff;
    min-width: 44px;
    text-align: center;
    opacity: 0.7;
    font-family: "Montserrat", sans-serif;
}

#zoom-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#zoom-img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.15s ease;
    user-select: none;
    pointer-events: none;
}

/* Modal de imagem */
#proj-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#proj-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

#proj-modal-close {
    position: absolute;
    top: 32px;
    right: 40px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#proj-modal-close:hover {
    opacity: 1;
}

#proj-modal-prev,
#proj-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 10001;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

#proj-modal-prev {
    left: 20px;
}

#proj-modal-next {
    right: 20px;
}

#proj-modal-prev:hover {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

#proj-modal-next:hover {
    opacity: 1;
    transform: translateY(-50%) translateX(4px);
}

#proj-modal-body {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 90vw;
    max-height: 85vh;
}

#proj-modal-info {
    flex: 0 0 960px;
    padding: 0 20px;
    color: #fff;
}

#proj-modal-info p {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.8;
    font-variant: none;
    letter-spacing: -1px;
    word-spacing: 5px;
    text-align: justify;
}

#proj-modal-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 85vh;
}

#proj-modal-img {
    max-width: 70vw;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

#proj-modal-iframe {
    width: 70vw;
    height: calc(70vw * 9 / 16);
    max-height: 85vh;
    border: none;
    border-radius: 6px;
    display: block;
}

.bloco[data-bloco-id] img {
    cursor: pointer;
}

.bloco-youtube .youtube-wrapper {
    cursor: pointer;
}

@media (max-width: 768px) {
    #proj-modal-body {
        flex-direction: column;
        max-width: 100vw;
        max-height: 100vh;
        padding: 60px 16px 20px;
        gap: 16px;
        box-sizing: border-box;
    }

    #proj-modal-info {
        flex: 0 0 auto;
        width: 100%;
        text-align: center;
        order: 2;
    }

    #proj-modal-img-wrap {
        order: 1;
        max-height: 60vh;
    }

    #proj-modal-img {
        max-width: 95vw;
        max-height: 60vh;
    }

    #proj-modal-prev {
        left: 8px;
        font-size: 2rem;
    }

    #proj-modal-next {
        right: 8px;
        font-size: 2rem;
    }

    #proj-modal-iframe {
        width: 95vw;
        height: calc(95vw * 9 / 16);
    }
}

/* Layout 2 por linha */
#conteudo.layout-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

#conteudo.layout-2col .bloco[data-tipo="descricao"],
#conteudo.layout-2col .bloco-youtube {
    grid-column: 1 / -1;
}

#conteudo.layout-2col .bloco {
    min-height: 80vh;
}

#conteudo.layout-2col .bloco img,
#conteudo.layout-2col .bloco video {
    align-items: flex-start;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
}

#conteudo.layout-2col .bloco:has(img),
#conteudo.layout-2col .bloco:has(video) {
    flex-direction: column;
    align-items: flex-start;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
}

#conteudo.layout-2col .bloco:has(img) .desc-interna-item,
#conteudo.layout-2col .bloco:has(video) .desc-interna-item {
    width: 100%;
    max-width: 100%;
    text-align: justify;
    align-items: flex-start;
    padding-left: 0;
}

#conteudo.layout-2col .bloco:has(img) .desc-interna-item ul,
#conteudo.layout-2col .bloco:has(img) .desc-interna-item ol,
#conteudo.layout-2col .bloco:has(video) .desc-interna-item ul,
#conteudo.layout-2col .bloco:has(video) .desc-interna-item ol {
    padding-left: 1.2em;
    list-style-position: inside;
}

/* Language switcher */
#lang-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #111;
    color: white;
    border: 1px solid #444;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 12px;
    font-weight: 900;
    word-spacing: 6px;
    letter-spacing: -1.5px;
    font-variant: small-caps;
    cursor: pointer;
    transition: all 0.6s;
    z-index: 9999;
}

#smooth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

#btn-voltar {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: #111;
    color: white;
    border: 1px solid #444;
    border-radius: 50%;
    width: 80px;
    word-spacing: 6px;
    letter-spacing: -1.5px;
    font-variant: small-caps;
    height: 80px;
    font-size: 20px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.6s;
}

#lang-btn:hover {
    background: #222;
    border-color: #666;
}

#btn-voltar:hover {
    background: #222;
    border-color: #666;
}

.bloco-youtube {
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    gap: 20px;
}

.bloco-youtube .desc-interna-item {
    width: 80%;
    max-width: none;
    font-size: 20px;
    word-spacing: 6px;
    letter-spacing: -1.5px;
    font-variant: small-caps;
    font-weight: 600;
    text-align: left;
    line-height: 1.8;
    color: #ffffff;
}

@media (max-width: 1024px) {
    .titulo {
        font-size: 2.2rem;
        letter-spacing: 3px;
        margin-bottom: 100px;
    }

    /* 1 coluna em qualquer layout */
    #conteudo,
    #conteudo.layout-2col {
        display: flex;
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    #conteudo.layout-2col .bloco[data-tipo="descricao"],
    #conteudo.layout-2col .bloco-youtube {
        grid-column: unset;
    }

    /* Todos os blocos: exatamente 500px */
    .bloco,
    #conteudo.layout-2col .bloco {
        height: 500px;
        min-height: 500px;
        max-height: 500px;
        padding: 16px;
        overflow: hidden;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .bloco:has(img),
    .bloco:has(video),
    #conteudo.layout-2col .bloco:has(img),
    #conteudo.layout-2col .bloco:has(video) {
        flex-direction: column;
        align-items: center;
    }

    .bloco img,
    .bloco video,
    #conteudo.layout-2col .bloco img,
    #conteudo.layout-2col .bloco video {
        max-height: 280px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .desc-interna-item,
    #conteudo.layout-2col .bloco:has(img) .desc-interna-item,
    #conteudo.layout-2col .bloco:has(video) .desc-interna-item {
        max-width: 100%;
        width: 100%;
        font-size: 14px;
        word-spacing: 2px;
    }

    .bloco-youtube .youtube-wrapper {
        width: 100%;
    }

    .bloco-youtube .desc-interna-item {
        width: 100%;
    }

    .bloco[data-tipo="descricao"] .desc-content p {
        font-size: 1.1rem;
        word-spacing: 2px;
    }

    .bloco[data-tipo="descricao"] .desc-content h1 { font-size: 1.8rem; }
    .bloco[data-tipo="descricao"] .desc-content h2 { font-size: 1.5rem; }
    .bloco[data-tipo="descricao"] .desc-content h3 { font-size: 1.2rem; }

    .bloco[data-tipo="descricao"] .desc-content ul,
    .bloco[data-tipo="descricao"] .desc-content ol {
        font-size: 1rem;
    }

    #btn-voltar {
        width: 56px;
        height: 56px;
        font-size: 14px;
        bottom: 16px;
        left: 16px;
    }

    #lang-btn {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 10px;
    }
}