/* --- CONTAINER GLOBAL DA PÁGINA --- */


.container-trabalho {
    max-width: 1300px !important;
    margin: 0 auto;
    padding: 70px 2% !important;
    text-align: center;
    width: 100%;
    background: transparent !important;
}

/* --- MÓDULO 2: GRID DE IMAGENS --- */
.modulo-grid {
    width: 100%;
    max-width: 1000px;
    /* Alinhado com vídeo e carrossel */
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-item img {
    width: 100%;
    display: block;
}

/* --- MÓDULO 3: CARROSSEL --- */
.modulo-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 60px;
}

.modulo-carousel,
.modulo-video {
    width: 100%;
    max-width: 1000px;
    /* Alinhamento visual idêntico */
    margin: 0 auto 60px;
    /* Centraliza e dá espaçamento embaixo */
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    display: block;
}

.slide video {
    width: 100%;
    height: 560px; /* Mesma altura que você usa nas imagens */
    object-fit: contain; /* Ou 'contain', dependendo da sua preferência anterior */
    display: block;
    background: oklch(21.88% 0.024 186.34 / 0.1);
}

.video-grid {
    width: 100%;
    height: 560px; /* Ou a altura que você usa no seu grid */
    object-fit: contain;
    display: block;
        background: oklch(21.88% 0.024 186.34 / 0.1);

}

/* Botões do Carrossel */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 5;
}

.btn-prev {
    left: 0;
}

.btn-next {
    right: 0;
}

/* Legendas (Figcaption comum a todos) */
figcaption {
    padding: 15px 15px 15px 15px; /* Remove o padding do topo pois o 'gap' já resolve */
    background: black;    /* O fundo agora vem do carousel-footer */
    color: #ccc;
    font-size: 14px;
    text-align: center;
    text-transform: none;
    letter-spacing: 2px;
        font-family: 'Gentium Book Basic', serif !important;

}

/* --- VÍDEO --- */
.modulo-video {
    width: 100%;
    max-width: 1000px;
    /* Alinhado com o carrossel */
    margin: 60px auto;
    /* Margem para separar dos outros blocos */
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* Proporção 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.slide img,
.grid-item img {
    width: 100%;
    height: 560px;
    /* Mantém a altura padrão da sua página */
    object-fit: contain;
    /* O SEGREDO: garante que a imagem inteira caiba na caixa */
    background-color: oklch(21.88% 0.024 186.34 / 0.1);
    display: block;
}


/*sliders ==================================================*/
.modulo-comparacao {
    width: 100%;
    max-width: 1000px;
    margin: 60px auto;
    position: relative;
}

.comparacao-container {
    position: relative;
    width: 100%;
    height: 560px;
    /* Mesma altura que padronizamos antes */
    overflow: hidden;
    background-color: oklch(21.88% 0.024 186.34 / 0.1);
}

.comparacao-container img {
    width: 1000px;
    /* Largura fixa igual ao container */
    height: 560px;
    object-fit: contain;
    /* Garante que não corte conforme seu pedido anterior */
    display: block;
    pointer-events: none;
}

/* Imagem que fica por cima (o "Antes") */
.img-sobreposta {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

/* Barra invisível de controle (Input) */
.slider-barra {
    position: absolute;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    top: 0;
    left: 0;
    margin: 0;
    z-index: 10;
    /* Aumente para 10 para garantir que esteja no topo */
    cursor: ew-resize;
}

.slider-linha {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    z-index: 5;
    /* Menor que a barra para não bloquear o clique */
    pointer-events: none;
    /* Garante que a linha não "roube" o clique */
}

/* Remove a bolinha em navegadores Chrome, Edge e Safari */
.slider-barra::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 2px;
    /* Deixa da mesma largura que a sua linha */
    height: 560px;
    /* Mesma altura do container */
    background: transparent;
    /* Torna a bolinha invisível */
    cursor: ew-resize;
}

/* Remove a bolinha no Firefox */
.slider-barra::-moz-range-thumb {
    width: 2px;
    height: 560px;
    background: transparent;
    border: none;
    cursor: ew-resize;
}

/* Título Principal */
.shardlake-title {
    font-family: 'IM Fell English SC', serif;
    /* Fonte com serifa clássica */
    font-size: 32px;
    /* Tamanho imponente mas equilibrado */
    color: #ffffff;
    /* Branco puro para destaque */
    text-transform: lowercase;
    /* Letras maiúsculas para o projeto */
    letter-spacing: 2px;
    /* Espaçamento entre letras para elegância */
    text-align: center;
    /* Centralizado com o conteúdo visual */
    margin-bottom: 0px;
    /* Espaço pequeno para o subtítulo */
    display: inline-block;
    /* Permite que a linha acompanhe o texto */
    width: 100%;
    font-weight: 400;
    /* Garante que ocupe o centro */
    margin: 1px 0 20px;
}

/* Subtítulo */
.shardlake-subtitle {
    font-family: 'Gentium Book Basic', serif;
    /* Fonte mais leve para o subtítulo */
    font-size: 18px;
    /* Menor que o título */
    color: #cecece;
    /* Cinza claro para reduzir o contraste */
    text-align: center;
    /* Alinhado com o título principal */
    font-weight: 400;
    /* Peso normal (não negrito) */
    max-width: 800px;
    /* Limita a largura para não esticar muito */
    margin: 0 auto 40px;
    /* Centraliza e dá espaço para o vídeo abaixo */
    line-height: 1.4;
    text-transform: none
}

/* ==========================================================================
   ESPECÍFICO zoom nas imagens
   ========================================================================== */
/* Container do link */
.zoom-link {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

/* Escurece levemente a imagem no hover */
.zoom-link img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.zoom-link:hover img {
    filter: brightness(0.7);
    transform: scale(1.05); /* Pequeno zoom na imagem para dar feedback */
}

/* O Ícone de Zoom que aparece no Hover */
.zoom-link::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 50px; /* Ajuste conforme o tamanho do seu ícone */
    height: 50px;
    background-image: url('/_image/icons/enlarge_icon.png'); /* Caminho do seu ícone */
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* Garante que o ícone não atrapalhe o clique */
}

.zoom-link:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* ... Mantenha o início do seu CSS igual ... */

/* Estilos do Lightbox */
#lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    overflow: auto; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none;
}

#lightbox::-webkit-scrollbar { display: none; }

#lightbox.active { display: block; }

#lightbox img {
    display: block;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* Quando a imagem está em modo 4K */
#lightbox img.full-res {
    max-width: none !important; /* Remove o limite de largura */
    max-height: none !important; /* Remove o limite de altura */
    position: relative !important; /* Permite que ela "corra" no scroll */
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin: 5vh auto; /* Dá um respiro nas bordas */
    cursor: grab !important; /* Ativa a mãozinha */
    display: block;
    transition: opacity 0.3s ease !important;
}

#lightbox.dragging img {
    cursor: grabbing !important;
    transition: none;
}


/*bolinahssssssssssssssssssssssssssss*/
/* --- NOVA ESTRUTURA PARA BOLINHAS E LEGENDA --- */
.carousel-footer {
    display: flex;
    flex-direction: column; /* Empilha: Bolinhas em cima, Legenda embaixo */
    align-items: center;    /* Centraliza os dois */
    gap: 12px;               /* Espaço entre eles */
    padding: 30px 0;
    width: 100%;
    background: #000;       /* Mantém o fundo preto da legenda */
}
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    position: relative; /* Mude de absolute para relative se quiser apenas um ajuste fino */
    top: 15px;          /* Aumente este valor para descer as bolinhas */
    width: 100%;
    z-index: 5;
    margin-bottom: 20px; /* Garante que ela empurre a legenda para baixo e não suba nela */
}

.dot {
    height: 10px;           /* Reduzi um pouco para ficar mais elegante */
    width: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dot.active {
    background-color: white;
}


/* ==========================================================================
   ESPECÍFICO MOBILE - PÁGINA SOLAS
   ========================================================================== */
@media (max-width: 768px) {

   html, body {
        /* Trava a janela para não balançar */
        overflow-x: hidden !important;
        position: relative;
        width: 100%;
        max-width: 100vw;
    }

    .container-trabalho {
        /* Garante que o padding não "estique" o site para fora da tela */
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* 2. Grid de Imagens (Passa de 2 colunas para 1) */
    .modulo-grid {
        grid-template-columns: 1fr;
        /* Força uma imagem por linha */
        gap: 15px;
        margin-bottom: 40px;
    }

    /* 3. Redução da Altura Fixa (Carrossel e Sliders) */
    .slide img,
    .grid-item img,
    .comparacao-container,
    .comparacao-container img {
        height: 300px !important;
        /* Altura menor para caber na tela do celular */
    }

    /* 5. Títulos e Blocos de Texto */
    .shardlake-title {
        font-size: 24px !important;
        /* Título menos agressivo */
        margin-top: 40px;
    }

    .shardlake-subtitle {
        font-size: 16px !important;
        margin-bottom: 30px;
    }

    .content-block p {
        font-size: 16px;
        line-height: 1.5;
    }

    /* 6. Espaçamento entre Módulos */
    .modulo-carousel,
    .modulo-video,
    .modulo-comparacao {
        margin: 30px auto;
        /* Reduz o espaço entre seções */
    }

    /* 1. O container agora tem altura automática para respeitar a foto */
    .comparacao-container {
        width: 100% !important;
        height: 350px !important;
        position: relative;
        overflow: hidden;
        background: oklch(21.88% 0.024 186.34 / 0.1);

        /* AJUSTE MANUAL SEM O TRANSFORM */
        /* Tente valores pequenos aqui, como 1%, 2%, ou até valores negativos como -2% */
        /* Vá mudando de 1 em 1 até encaixar no centro */
        left: 0% !important;

        /* REMOVA OU COMENTE A LINHA DO TRANSFORM */
        transform: none !important;

        margin: 0 !important;
        padding: 0 !important;

        touch-action: manipulation !important;
    }

    /* REGRA PARA AS DUAS IMAGENS: Fixas na esquerda, conteúdo centralizado */
    .comparacao-container img,
    .img-sobreposta img {
        width: 100vw !important;
        /* Largura total da tela */
        height: 100% !important;
        /* Altura total do container */
        max-width: none !important;
        position: absolute !important;
        top: 0 !important;
        /* margin-left: -30px !important; */
        /* FIXA NA ESQUERDA PARA PARAR DE BALANÇAR */

        object-fit: contain !important;
        object-position: center !important;
        /* CENTRALIZA A FOTO DENTRO DO ESPAÇO */

        transform: none !important;
        /* REMOVE O TRANSFORM ANTERIOR */
    }

    .img-sobreposta {
        position: absolute;
        top: 0;
        left: 0;
        width: 50%;
        height: 100%;
        overflow: hidden;
        z-index: 2;
    }

    /* Sincronização da linha e barra */
    .slider-linha,
    .slider-barra {
        height: 100% !important;
    }


/* 1. MOLDURA DO CARROSSEL: Mantém tudo no lugar */
    .modulo-carousel {
        overflow: hidden !important;
        position: relative;
        width: 100%;
    }

    /* 2. A ESTEIRA (TRACK): Onde o movimento acontece */
    .carousel-track {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        touch-action: pan-x pan-y !important; /* CRUCIAL: Libera o dedo para os lados, trava a página */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Esconde scroll no Firefox */
        overscroll-behavior-y: auto !important;
        overscroll-behavior-x: contain !important;
    }

    /* Esconde a barra de scroll no Chrome/Safari/Edge */
    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    /* 3. O SLIDE (CADA FOTO): Garante que ocupa a tela toda */
    .slide {
        flex: 0 0 100% !important;
        width: 100% !important;
        scroll-snap-align: start;
        touch-action: manipulation !important;
        pointer-events: auto;
    }

    /* 4. LIMPEZA VISUAL */
    .nav-btn.btn-prev,
    .nav-btn.btn-next {
        display: none !important;
    }

    .slide video {
        height: 300px !important;
    }

    .video-grid {
        height: 300px !important;
    }

}