/* ==========================================================================
   1. VARIÁVEIS & RESET (GLOBAL)
   ========================================================================== */
:root {
    /* Cores Mondrian */
    --c-cyan: #1CC2F3;
    --c-yellow: #FBDF1A;
    --c-red: #EE4640;
    --c-black: #000000;
    --c-white: #ffffff;
    --c-gray: #f4f4f4;

    /* Configuração "Pontuda" e "Sombra Grossa" */
    --border-thick: 3px solid var(--c-black);
    --shadow-hard: 6px 6px 0px var(--c-black); /* Sombra um pouco menor no mobile */
    --radius-sharp: 0px;
    --radius-slight: 4px;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Space Mono', monospace;
    outline: none;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

body {
    background-color: var(--c-white);
    color: var(--c-black);
    /* Grade de fundo */
    background-image: 
        linear-gradient(var(--c-gray) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-gray) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Garante que containers não vazem a tela */
.hero-container, section, footer {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* ==========================================================================
   2. ESTILO MOBILE (O "ARROZ COM FEIJÃO" BEM FEITO)
   ========================================================================== */

/* --- HEADER (CORREÇÃO DE PULO) --- */
header {
    position: fixed; 
    top: 15px; 
    /* Truque para centralizar sem bugs de zoom */
    left: 0; 
    right: 0; 
    margin: 0 auto; 
    width: 94%; /* Deixa uma margem segura nas laterais */
    
    height: 70px;
    background: var(--c-white);
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    padding: 0 15px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; /* Z-index alto para ficar acima de tudo */
}

header img { 
    height: 60px; /* Logo menor no celular */
    padding: 5px;
}

.nav-cta {
    background: var(--c-black); 
    color: var(--c-white);
    padding: 8px 14px; 
    font-weight: 700; text-decoration: none; font-size: 0.8rem;
    border: 2px solid var(--c-black);
    transition: 0.2s;
}

.nav-cta:hover { 
    background: var(--c-white); color: var(--c-black); 
    box-shadow: 3px 3px 0px var(--c-black);
}

/* --- HERO & GRID SYSTEM --- */
.hero-container {
    /* Margem superior segura para não esconder atrás do header */
    margin-top: 110px; 
    margin-bottom: 60px;
    padding: 0 15px; /* Padding lateral seguro */
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px; /* Gap menor no celular */
}

/* --- CARD MONDRIAN BASE --- */
.mondrian-card {
    background: var(--c-white);
    border: var(--border-thick);
    box-shadow: var(--shadow-hard);
    border-radius: var(--radius-sharp);
    position: relative;
    overflow: hidden;
}

/* CARD: Principal (Texto) */
.card-main {
    grid-column: span 12; /* Ocupa largura total */
    padding: 25px;
    display: flex; flex-direction: column; justify-content: center;
    min-height: auto; /* Altura automática baseada no texto */
}

.card-main h1 {
    font-size: 1.8rem; /* Fonte ajustada para não quebrar */
    line-height: 1.1; font-weight: 700; margin-bottom: 15px;
    text-transform: uppercase; letter-spacing: -1px;
}

.highlight { 
    background-color: var(--c-cyan);
    color: var(--c-black);
    padding: 0 5px;
    line-height:3rem;
}

.deco-dots { display: flex; gap: 8px; margin-bottom: 20px; }
.dot { width: 10px; height: 10px; border: 2px solid var(--c-black); }
.bg-red { background: var(--c-red); }
.bg-yellow { background: var(--c-yellow); }
.bg-blue { background: var(--c-cyan); }
.bg-black { background: var(--c-black); color: white; }

.btn-hero {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--c-red); color: white;
    padding: 14px 20px;
    font-size: 1.1rem; font-weight: 700; text-decoration: none;
    border: var(--border-thick);
    box-shadow: 4px 4px 0px var(--c-black);
    margin-top: 20px; width: 100%; /* Botão full width no celular */
    text-align: center;
    gap: 15px
}
.btn-hero i{
        font-size: 3rem;
    }
/* CARD: Visual (Imagem) */
.card-visual {
    grid-column: span 12;
    height: 250px; /* Altura fixa para imagem */
    padding: 0;
}
.card-visual img, .card-visual video { 
    width: 100%; height: 100%; object-fit: cover; 
    border-bottom: var(--border-thick); 
}
.card-label {
    position: absolute; bottom: 0; right: 0;
    background: var(--c-yellow); 
    border-top: var(--border-thick); border-left: var(--border-thick);
    padding: 6px 12px; font-weight: 700; font-size: 0.75rem;
}

/* CARD: Stats (CORREÇÃO DO QUADRADO GIGANTE) */
.card-stat {
    grid-column: span 6; /* Metade da tela */
    text-align: center; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 15px 5px;
    /* REMOVI O ASPECT-RATIO 1/1 */
    min-height: 140px; /* Altura fixa razoável */
}

.icon-lg { font-size: 1.8rem; margin-bottom: 8px; }
.stat-num { font-size: 1.5rem; font-weight: 700; display: block; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; }

/* --- SEÇÕES & TÍTULOS --- */
.section-title {
    font-size: 1.2rem; font-weight: 700; text-transform: uppercase;
    background: var(--c-black); color: white; display: inline-block;
    padding: 8px 12px; margin-bottom: 20px;
    box-shadow: 4px 4px 0px var(--c-cyan);
}
.title-container { text-align: center; margin-bottom: 30px; padding: 0 20px; }
.highlight-text { color: var(--c-cyan); }

/* --- SLIDERS (CARROSSEL MOBILE) --- */
.slider-track {
    display: flex; gap: 15px;
    overflow-x: auto; 
    scroll-snap-type: x mandatory;
    padding: 10px 20px 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }

.slide-item, .video-card {
    flex: 0 0 85%; /* Card ocupa 85% da tela */
    max-width: 300px;
    height: 400px;
    scroll-snap-align: center;
    padding: 0;
}

.slide-item img {
    width: 100%; height: 85%; object-fit: cover;
    border-bottom: var(--border-thick);
}
.slide-caption {
    height: 15%; display: flex; align-items: center; justify-content: center;
    font-weight: 700; letter-spacing: 1px; font-size: 0.8rem;
}
.slide-caption.text-white { color: white; }

/* --- VÍDEO --- */
.video-wrapper { margin: 40px auto; max-width: 1200px; }

.video-card { background: #000; cursor: pointer; }
.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

.play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: var(--c-yellow);
    border: var(--border-thick);
    box-shadow: 4px 4px 0px var(--c-black);
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.play-btn i { color: black; font-size: 1.2rem; margin-left: 2px; }
.video-card.playing .play-btn { opacity: 0; }

/* Garante que o vídeo do Card Visual preencha tudo */
.card-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz o vídeo cobrir o card sem distorcer */
    display: block;
    border-bottom: var(--border-thick); /* Mantém a borda preta embaixo igual às fotos */
}

/* --- FOOTER & FLOAT --- */
footer {
    background: var(--c-black); color: white;
    padding: 40px 20px; text-align: center;
    border-top: 5px solid var(--c-cyan);
    margin-top: 60px;
}

.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px;
    width: 60px; height: 60px;
    background: #25d366; color: white;
    border: var(--border-thick);
    box-shadow: 6px 6px 0px var(--c-black);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; z-index: 900;
    text-decoration: none; border-radius: 0;
}


/* ==========================================================================
   3. VERSÃO DESKTOP (OVERRIDES / TELAS GRANDES)
   Aqui mudamos o layout para PC, Tablets Grandes, etc.
   ========================================================================== */
@media (min-width: 1024px) {

    /* HEADER: Mais largo e elegante */
    header {
        width: 100%; max-width: 90dvw;
        height: 15dvh;
        top: 30px;
        padding: 0 40px;
    }
    header img { 
        height: 100px;
        padding: 8px;
    }

    .nav-cta {
        padding: 12px 24px;
        font-size: 1rem;
    }

    /* HERO: Margens maiores e Grid Ajustado */
    .hero-container {
        width: auto;
        margin: 180px 3dvw 100px;
        padding: 0 40px;
    }

    .bento-grid {
        gap: 30px;
        width: 100%;
    }

    /* CARD MAIN: Ocupa 2/3 da tela */
    .card-main { 
        grid-column: span 8; 
        padding: 60px;
    }
    .card-main h1 { font-size: 3.5rem; }
    .btn-hero {
        padding: 20px 40px;
        font-size: 1.3rem; 
    }

    
    .highlight { 
        line-height:6rem;
    }

    /* CARD VISUAL: Ocupa 1/3 da tela */
    .card-visual { 
        grid-column: span 4; 
        min-height: 100%; /* Acompanha altura do texto */
    }

    /* STATS: Ocupam 1/4 da tela cada (linha de 4) */
    .card-stat { 
        grid-column: span 3; 
        aspect-ratio: auto; 
        height: 250px; 
    }
    .icon-lg { font-size: 3rem; }
    .stat-num { font-size: 3rem; }

    /* SLIDERS -> VIRAM GRIDS (GALERIA) */
    /* Removemos o scroll horizontal e fazemos uma grade bonita */
    #projetos .slider-track, 
    #video-slider {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4 colunas lado a lado */
        gap: 30px;
        overflow: visible;
        margin: 0 auto;
        padding: 0 40px 40px;
    }

    /* ITENS DA GALERIA */
    .slide-item, .video-card {
        flex: unset; /* Desliga o flexbox do mobile */
        max-width: 100%;
        height: 400px;
    }

    /* HOVER EFFECTS (Só fazem sentido no Desktop) */
    .video-card:hover .play-btn { 
        transform: translate(-50%, -50%) scale(1.1); 
        box-shadow: 8px 8px 0px var(--c-black); 
    }
    
    .whatsapp-float {
        bottom: 30px; right: 30px;
        width: 70px; height: 70px; font-size: 35px;
    }
    .whatsapp-float:hover { 
        transform: translate(-4px, -4px); 
        box-shadow: 12px 12px 0px var(--c-black); 
        background: #128C7E;
    }
}