/* ==========================================================================
   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);
    --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);
    background-image: 
        linear-gradient(var(--c-gray) 1px, transparent 1px),
        linear-gradient(90deg, var(--c-gray) 1px, transparent 1px);
    background-size: 40px 40px;
    padding-bottom: 70px;
}

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

/* ==========================================================================
   2. ESTILO MOBILE FIRST
   ========================================================================== */

/* --- HEADER --- */
header {
    position: fixed; 
    top: 15px; 
    left: 0; right: 0; 
    margin: 0 auto; 
    width: 94%;
    height: 60px;
    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;
}

header img { 
    height: 45px;
    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 --- */
.hero-container {
    margin-top: 95px; 
    margin-bottom: 60px;
    padding: 0 15px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
}

/* --- 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 MAIN (legado, não usado mais) --- */
.card-main {
    grid-column: span 12;
    padding: 25px;
    display: flex; flex-direction: column; justify-content: center;
    min-height: auto;
}
.card-main h1 {
    font-size: 1.8rem;
    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: 10px;
    background: var(--c-red); color: white;
    padding: 12px 18px;
    font-size: 0.85rem; font-weight: 700; text-decoration: none;
    border: var(--border-thick);
    box-shadow: 4px 4px 0px var(--c-black);
    margin-top: 15px; width: 100%;
    text-align: center;
}
.btn-hero i {
    font-size: 1.5rem;
}

/* ==========================================================================
   CARD DE VÍDEO (HERO)
   ========================================================================== */
.card-visual {
    grid-column: span 12;
    /* Remove height fixa de 250px e usa proporção retrato */
    aspect-ratio: 9 / 16;
    height: auto;
    max-height: 80vh; /* Evita que fique exageradamente grande */
    padding: 0;
    order: 2; /* Vídeo aparece depois no mobile */
}
.card-visual img, .card-visual video { 
    width: 100%; height: 100%; object-fit: cover; 
    border-bottom: var(--border-thick); 
}
.card-visual video {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
    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;
}

/* ==========================================================================
   SERVICES BOX (CARD ÚNICO COM OS 3 SERVIÇOS)
   ========================================================================== */
.services-box {
    grid-column: span 12;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    order: 1; /* Caixa de serviços aparece antes do vídeo no mobile */
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border: 2px solid var(--c-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.service-text h3 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.service-text p {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

/* ==========================================================================
   STATS, TÍTULOS, SLIDERS
   ========================================================================== */

/* CARD: Stats */
.card-stat {
    grid-column: span 6;
    text-align: center; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 15px 5px;
    min-height: 140px;
    order: 3; /* No mobile, os status vêm por último na grade do hero */
}

.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%;
    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 GALERIA --- */
.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; }

/* --- 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;
}

/* --- BOTÃO FLUTUANTE ORÇAMENTO (MOBILE) --- */
.whatsapp-float {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    padding: 18px 15px;
    background: #25d366; color: white;
    border-top: var(--border-thick);
    box-shadow: 0 -4px 0px var(--c-black);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 900; text-decoration: none; border-radius: 0;
}


/* ==========================================================================
   3. VERSÃO DESKTOP (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {

    body { padding-bottom: 0; }

    /* HEADER */
    header {
        width: 100%; max-width: 90dvw;
        height: 80px;
        top: 20px;
        padding: 0 40px;
    }
    header img { height: 55px; padding: 5px; }
    .nav-cta { padding: 10px 20px; font-size: 0.95rem; }

    /* HERO */
    .hero-container {
        width: auto;
        margin: 120px 3dvw 80px;
        padding: 0 40px;
    }

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

    /* ========================================
       HERO GRID: Vídeo (4 cols) + Serviços (8 cols)
       Tudo cabe na tela de uma vez!
       ======================================== */
    .card-visual { 
        grid-column: span 4; 
        width: 100%;
        aspect-ratio: auto; /* Remove o 9:16 do mobile para preencher o grid */
        height: calc(100dvh - 200px); /* Se adapta à altura da janela */
        max-height: 550px; /* Limite máximo agradável */
        min-height: 450px;
        order: 0; /* Restaura a ordem no desktop (Vídeo antes dos Serviços) */
    }

    .services-box {
        grid-column: span 8;
        height: calc(100dvh - 200px);
        max-height: 550px;
        min-height: 450px;
        padding: 30px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 15px;
        order: 0;
    }

    /* Como a caixa de serviços ficou mais larga (8 cols), 
       podemos organizar os itens em duas colunas ou manter espaçado */
    .services-box .service-item {
        gap: 20px;
    }

    .service-icon {
        width: 60px; height: 60px; min-width: 60px;
        font-size: 1.6rem;
    }

    .service-text h3 { font-size: 1.2rem; }
    .service-text p { font-size: 0.95rem; }

    .btn-hero {
        padding: 20px 30px;
        font-size: 1.15rem;
        margin-top: 15px;
        max-width: 100%;
    }
    .btn-hero i { font-size: 2rem; }

    .card-main { grid-column: span 8; padding: 60px; order: 0; }
    .card-main h1 { font-size: 3.5rem; }

    .highlight { line-height: 6rem; }

    /* STATS */
    .card-stat { 
        grid-column: span 3; 
        aspect-ratio: auto; 
        height: 200px; 
        order: 0;
    }
    .icon-lg { font-size: 3rem; }
    .stat-num { font-size: 3rem; }

    /* SLIDERS -> GRIDS */
    #projetos .slider-track, 
    #video-slider {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        overflow: visible;
        margin: 0 auto;
        padding: 0 40px 40px;
    }

    .slide-item, .video-card {
        flex: unset;
        max-width: 100%;
        height: 400px;
    }

    /* HOVER */
    .video-card:hover .play-btn { 
        transform: translate(-50%, -50%) scale(1.1); 
        box-shadow: 8px 8px 0px var(--c-black); 
    }
    
    /* FLOAT DESKTOP */
    .whatsapp-float {
        bottom: 30px; right: 30px; left: auto;
        width: auto;
        padding: 20px 30px;
        font-size: 1.1rem;
        border: var(--border-thick);
        box-shadow: 6px 6px 0px var(--c-black);
    }
    .whatsapp-float:hover { 
        transform: translate(-4px, -4px); 
        box-shadow: 12px 12px 0px var(--c-black); 
        background: #128C7E;
    }
}