/* =================================================== */
/* 1. PALETA DE CORES E VARIÁVEIS                      */
/* =================================================== */
:root {
    --vermelho-bombeiro: #CE2029;
    --grafite-80: #333333;
    --fundo-claro: #F8F9FA;
    --branco: #FFFFFF;
    --texto-escuro: #212529;
}

/* =================================================== */
/* 2. RESET E CONFIGURAÇÕES GERAIS                     */
/* =================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--fundo-claro); color: var(--texto-escuro); padding-top: 100px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =================================================== */
/* 3. CABEÇALHO FIXO                                   */
/* =================================================== */
header {
    position: fixed; top: 0; left: 0; width: 100%; height: 100px;
    background-color: var(--grafite-80);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex; justify-content: space-between; align-items: center; padding: 0 5%; z-index: 1000;
}
.logo {
    background-color: var(--branco);
    padding: 10px 15px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center;
}
.logo img { max-height: 55px; }

.menu { display: flex; gap: 25px; font-weight: bold; font-size: 15px; color: var(--branco); }
.menu li:hover, .menu a:hover { color: var(--vermelho-bombeiro); cursor: pointer; transition: color 0.3s; }

.header-actions { display: flex; align-items: center; gap: 25px; }

.social-icons { display: flex; gap: 15px; }
.social-icons a { color: var(--branco); font-size: 20px; transition: color 0.3s ease, transform 0.3s ease; }
.social-icons a:hover { color: var(--vermelho-bombeiro); transform: scale(1.1); }

.btn-whatsapp {
    background-color: var(--vermelho-bombeiro); color: var(--branco);
    padding: 10px 20px; border-radius: 5px; font-weight: bold;
    display: flex; align-items: center; gap: 8px;
    transition: background-color 0.3s ease;
}
.btn-whatsapp:hover { background-color: #a8171f; }

/* =================================================== */
/* 4. HOME: HERO FULLSCREEN E DIFERENCIAIS             */
/* =================================================== */
.hero-fullscreen {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/topo_banner2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 50vh; 
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 0 5%;
    margin-bottom: 50px;
}
.hero-fullscreen .hero-content { width: 100%; max-width: 900px; color: var(--branco); }
.hero-fullscreen h2 { font-size: 22px; font-weight: 400; margin-bottom: 15px; color: #e0e0e0; text-transform: uppercase; letter-spacing: 2px; }
.hero-fullscreen h1 { font-size: 56px; font-weight: 800; margin-bottom: 35px; line-height: 1.2; color: var(--branco); text-shadow: 2px 2px 8px rgba(0,0,0,0.5); }
.hero-fullscreen .btn-red {
    background-color: var(--vermelho-bombeiro); color: var(--branco); border: none; cursor: pointer;
    font-size: 18px; padding: 15px 40px; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(206, 32, 41, 0.4); transition: 0.3s; border-radius: 5px; font-weight: bold;
}
.hero-fullscreen .btn-red:hover { background-color: #a8171f; }

.section-title { text-align: center; font-size: 28px; color: var(--vermelho-bombeiro); margin: 40px 0 20px; font-weight: 800;}
.features { display: flex; justify-content: center; gap: 20px; padding: 0 5%; margin-bottom: 50px; }
.feature-card {
    background-color: var(--branco); border: 1px solid #ddd; padding: 20px;
    border-radius: 8px; width: 30%; text-align: left; transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.feature-card h3 { color: var(--texto-escuro); margin-bottom: 10px; display: flex; align-items: center; gap: 10px;}
.feature-card p { font-size: 14px; color: #555; line-height: 1.5;}

/* =================================================== */
/* 5. CATEGORIAS (LINHA LEVE E PESADA - HOME)          */
/* =================================================== */
.categories { display: flex; justify-content: center; gap: 30px; padding: 0 5%; margin-bottom: 60px; }
.category-card {
    background-color: var(--branco); padding: 40px; border-radius: 8px;
    width: 45%; text-align: center; border: 1px solid #ddd;
}
.category-card h3 { font-size: 24px; margin-bottom: 20px; color: var(--grafite-80);}
.category-card img { max-width: 100%; height: 100px; object-fit: contain; margin-bottom: 20px; }
.category-card p { font-size: 15px; color: #555; margin-bottom: 25px; text-align: center; line-height: 1.6;}
.btn-outline {
    border: 2px solid var(--vermelho-bombeiro); color: white; padding: 10px 25px;
    border-radius: 5px; font-weight: bold; background: var(--vermelho-bombeiro); cursor: pointer; transition: 0.3s;
}
.btn-outline:hover { background-color: var(--grafite-80); color: var(--branco); }

/* =================================================== */
/* 6. CARROSSEL DE PRODUTOS E DEPOIMENTOS (HOME)       */
/* =================================================== */
.carousel-wrapper { display: flex; align-items: center; justify-content: center; position: relative; padding: 0 5%; margin-bottom: 50px; width: 100%; }
.carousel-control {
    background-color: var(--vermelho-bombeiro); color: white; border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 16px; position: absolute; z-index: 10; transition: background-color 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}
.carousel-control:hover { background-color: #a8171f; }
.carousel-control.prev { left: 2%; }
.carousel-control.next { right: 2%; }

.products-carousel, .testimonials-carousel {
    display: flex; overflow-x: auto; gap: 20px; padding: 15px 5px; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; width: 90%; scrollbar-width: none;
}
.products-carousel::-webkit-scrollbar, .testimonials-carousel::-webkit-scrollbar { display: none; }

/* Base do card de produto da HOME */
.product-card {
    background-color: var(--branco); border: 1px solid #ddd; border-radius: 8px;
    width: 23%; padding: 20px; text-align: center; transition: 0.3s;
}
.product-card:hover { border-color: var(--vermelho-bombeiro); }
.product-card img { width: 100%; height: 150px; object-fit: contain; margin-bottom: 15px; }
.product-card h4 { font-size: 16px; margin-bottom: 15px; height: 40px; color: var(--grafite-80);}

/* Adaptação do card de produto para o CARROSSEL */
.products-carousel .product-card {
    min-width: 280px; max-width: 280px; flex: 0 0 auto; scroll-snap-align: start;
    display: flex; flex-direction: column; justify-content: space-between;
}
.card-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.card-actions .btn-red { width: 100%; padding: 10px; font-size: 14px; background-color: var(--vermelho-bombeiro); color: white; border: none; border-radius: 5px; cursor: pointer;}
.card-actions .btn-red:hover { background-color: #a8171f; }

.testimonials-carousel .testi-card {
    min-width: 320px; max-width: 320px; flex: 0 0 auto; scroll-snap-align: start;
    background-color: var(--branco); border: 1px solid #ddd; padding: 25px;
    border-radius: 8px; font-size: 14px; color: #555; font-style: italic; box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.testi-header { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-style: normal;}
.testi-header img { width: 50px; height: 50px; border-radius: 50%; background: #eee; }
.testi-header h4 { font-size: 15px; color: var(--grafite-80);}
.stars { color: #f5b301; margin-bottom: 10px; font-size: 18px;}


/* =================================================== */
/* 7. PÁGINAS INTERNAS (INSTITUCIONAL, LEVE E PESADA)  */
/* =================================================== */
.content-page { 
    padding: 40px 5%; 
    background-color: var(--fundo-claro); 
    width: 100%; 
    box-sizing: border-box; 
    line-height: 1.8;
}
.page-header { text-align: center; margin-bottom: 40px; }
.page-header h2, .content-page h2 { color: var(--vermelho-bombeiro); font-size: 32px; margin-bottom: 15px; }
.page-header p { color: #555; font-size: 1rem; max-width: 800px; margin: 0 auto; line-height: 1.4; }

/* --- BASE DO BANNER (Formato, sombra, textos) --- */
.page-banner {
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--branco);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-banner h2 {
    color: var(--branco) !important;
    font-size: 36px !important;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.page-banner p {
    color: #eeeeee !important;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

/* --- FUNDOS ESPECÍFICOS PARA CADA PÁGINA --- */
.bg-linha-leve {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/banner-linha-leve.jpg');
}

.bg-linha-pesada {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/banner-linha-pesada.jpg');
}

.bg-institucional {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/banner-institucional.jpg');
}
.bg-galeria {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/banner-galeria.jpg');
}
.bg-contato {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/imagens/banner-contato.jpg');
}

/* Institucional Específico */
.mvv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin: 40px 0; }
.mvv-card { background: #fff; padding: 30px; border-radius: 8px; border-left: 5px solid var(--vermelho-bombeiro); border-right: 1px solid #ddd; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}
.mvv-card h3 { color: var(--grafite-80); margin-bottom: 10px; }
.pdf-link { display: inline-block; margin-top: 20px; padding: 12px 25px; background: var(--grafite-80); color: white; border-radius: 5px; font-weight: bold; text-decoration: none; }
.pdf-link:hover { background: var(--vermelho-bombeiro); }

/* --- GRID DE PRODUTOS IDÊNTICO À IMAGEM DE REFERÊNCIA --- */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 20px; 
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto;
}

/* SOBRESCREVE A CLASSE GLOBAL APENAS AQUI DENTRO */
.product-grid .product-card { 
    width: 100%; /* Corrige o erro dos 23% */
    padding: 0;  /* Remove o padding global para a imagem colar nas bordas */
    background: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 4px; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04); 
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-grid .product-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 6px 15px rgba(0,0,0,0.1); 
    border-color: var(--vermelho-bombeiro); /* Borda vermelha no hover igual ao antigo */
}

.product-grid .product-image { 
    width: 100%; 
    height: 180px; 
    padding: 20px; 
    box-sizing: border-box;
    display: flex; 
    align-items: center; 
    justify-content: center;
    background-color: transparent;
}

.product-grid .product-image img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
    margin-bottom: 0; /* Corrige margem global */
}

.product-grid .product-info { 
    padding: 0 20px 20px 20px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.product-grid .product-info h3 { 
    color: var(--grafite-80); 
    font-size: 16px; 
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px 0; /* Diminuí a margem para não afastar tanto do texto */
    min-height: 45px; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-grid .product-info p {
    color: #555;
    font-size: 13px;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.product-grid .btn-group { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-top: auto; 
}

.product-grid .btn-action { 
    display: block; 
    width: 100%;
    text-align: center; 
    padding: 12px; 
    border-radius: 4px; 
    font-weight: bold; 
    text-decoration: none; 
    font-size: 14px; 
    box-sizing: border-box;
    transition: all 0.2s; 
}

.product-grid .btn-pdf { background-color: transparent; color: #444; border: 1px solid #ccc; }
.product-grid .btn-pdf:hover { background-color: #f5f5f5; border-color: #aaa; }
.product-grid .btn-quote { background-color: var(--vermelho-bombeiro); color: #fff; border: 1px solid var(--vermelho-bombeiro); }
.product-grid .btn-quote:hover { background-color: #a71d2a; border-color: #a71d2a; }

/* =================================================== */
/* 8. RODAPÉ                                           */
/* =================================================== */
footer {
    background-color: var(--grafite-80); color: var(--branco); padding: 50px 5%;
    display: flex; justify-content: space-between; gap: 30px; border-top: 5px solid var(--vermelho-bombeiro);
}
.footer-col { width: 30%; }
.footer-col h3 { margin-bottom: 20px; font-size: 18px; color: var(--branco);}
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 10px; color: #ccc; line-height: 1.6;}
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px; margin-bottom: 10px; border: none; border-radius: 4px; font-family: inherit;
}
.contact-form .btn-red { width: 100%; font-size: 16px; background-color: var(--vermelho-bombeiro); color: white; border: none; padding: 12px; border-radius: 4px; cursor: pointer; font-weight: bold;}
.contact-form .btn-red:hover { background-color: #a8171f;}

/* =================================================== */
/* 9. RESPONSIVIDADE (MOBILE)                          */
/* =================================================== */
@media (max-width: 768px) {
    .hero-fullscreen { height: 60vh; text-align: center; justify-content: center; }
    .hero-fullscreen h1 { font-size: 32px; }
    .hero-fullscreen .btn-red { padding: 10px 20px; font-size: 14px; }
    
    .categories { flex-direction: column; }
    .category-card { width: 100%; }
    
    .features { flex-direction: column; }
    .feature-card { width: 100%; }
    
    .product-card { width: 100%; }
    
    footer { flex-direction: column; padding: 30px 5%; }
    .footer-col { width: 100%; margin-bottom: 20px; }
    
    header { height: auto; padding: 15px 5%; flex-direction: column; gap: 15px; }
    .menu { gap: 15px; font-size: 13px; }
    
    .btn-whatsapp { display: none; /* Esconde o botão do zap no cabeçalho em telas muito pequenas para não quebrar */ }
}
/* =================================================== */
    /* 10. GRID DA GALERIA (Enquadramento Automático)          */
    /* =================================================== */
    .gallery-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 5% 50px 5%;
    }

    .gallery-grid {
        display: grid;
        /* Adapta a quantidade de colunas automaticamente dependendo do tamanho da tela */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        width: 100%;
        /* Trava a proporção da foto em quadrado (1:1). Você pode mudar para 4/3 ou 16/9 se preferir retângulo */
        aspect-ratio: 1 / 1; 
        overflow: hidden;
        border-radius: 8px;
        cursor: pointer;
        position: relative;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* A mágica acontece aqui: preenche sem amassar a imagem */
        transition: transform 0.4s ease, filter 0.4s ease;
    }

    /* Efeito de zoom ao passar o mouse */
    .gallery-item:hover img {
        transform: scale(1.1);
        filter: brightness(0.8);
    }

    /* Ícone de "Lupa" que aparece no hover (opcional, deixa mais moderno) */
    .gallery-item::after {
        content: '\f002'; /* Código do ícone de lupa do FontAwesome */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 30px;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .gallery-item:hover::after {
        opacity: 1;
    }

    /* =================================================== */
    /* LIGHTBOX (A tela escura que amplia a foto)          */
    /* =================================================== */
    .lightbox-modal {
        display: none; /* Escondido por padrão */
        position: fixed;
        z-index: 2000; /* Fica por cima do cabeçalho */
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9); /* Fundo preto transparente */
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* Classe para mostrar o modal suavemente */
    .lightbox-modal.show {
        display: flex;
        opacity: 1;
    }

    .lightbox-content {
        max-width: 90%;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }

    .lightbox-modal.show .lightbox-content {
        transform: scale(1);
    }

    .lightbox-close {
        position: absolute;
        top: 20px;
        right: 35px;
        color: #f1f1f1;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.3s;
    }

    .lightbox-close:hover,
    .lightbox-close:focus {
        color: var(--vermelho-bombeiro, #CE2029);
    }
/* Estilos específicos para a página de Contato */
    .contact-container {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
        background: #fff;
        padding: 40px;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }

    /* Coluna de Informações (Esquerda) */
    .contact-info {
        flex: 1;
        min-width: 300px;
    }

    .contact-info h3 {
        color: var(--vermelho-bombeiro, #CE2029);
        font-size: 24px;
        margin-bottom: 20px;
    }

    .contact-info p {
        color: #555;
        line-height: 1.6;
        margin-bottom: 30px;
        font-size: 15px;
    }

    .info-item {
        display: flex;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }

    .info-icon {
        background-color: var(--grafite-80, #333);
        color: #fff;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 18px;
        flex-shrink: 0;
    }

    .info-text h4 {
        color: var(--grafite-80, #333);
        margin-bottom: 5px;
        font-size: 16px;
    }

    .info-text p {
        margin: 0;
        font-size: 14px;
    }

    /* Coluna do Formulário (Direita) */
    .contact-form-wrapper {
        flex: 1.5;
        min-width: 300px;
    }

    .custom-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .custom-form label {
        font-weight: 600;
        color: var(--grafite-80, #333);
        margin-bottom: 8px;
        font-size: 14px;
    }

    .custom-form input, 
    .custom-form select, 
    .custom-form textarea {
        padding: 12px 15px;
        border: 1px solid #ccc;
        border-radius: 5px;
        font-family: inherit;
        font-size: 14px;
        background-color: #fafafa;
        transition: border-color 0.3s;
    }

    .custom-form input:focus, 
    .custom-form select:focus, 
    .custom-form textarea:focus {
        outline: none;
        border-color: var(--vermelho-bombeiro, #CE2029);
        background-color: #fff;
    }

    .custom-form select {
        cursor: pointer;
    }

    .custom-form .btn-submit {
        background-color: var(--vermelho-bombeiro, #CE2029);
        color: white;
        border: none;
        padding: 15px 30px;
        font-size: 16px;
        font-weight: bold;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s;
        margin-top: 10px;
    }

    .custom-form .btn-submit:hover {
        background-color: #a8171f;
    }

    /* Fundo do Banner (Caso não tenha colocado no styles.css) */

    /* Responsividade */
    @media (max-width: 768px) {
        .custom-form {
            grid-template-columns: 1fr;
        }
        .contact-container {
            padding: 20px;
        }
    }
/* Estilo da Mensagem de Sucesso */
    .mensagem-sucesso {
        grid-column: 1 / -1;
        background-color: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
        padding: 15px;
        border-radius: 5px;
        margin-bottom: 20px;
        font-weight: bold;
        text-align: center;
        display: none; /* Fica escondida até o envio */
    }
/* Estilo da mensagem de sucesso exclusiva do rodapé */
    .mensagem-sucesso-rodape {
        background-color: #d4edda;
        color: #155724;
        border: 1px solid #c3e6cb;
        padding: 12px;
        border-radius: 4px;
        margin-bottom: 15px;
        font-size: 14px;
        font-weight: bold;
        text-align: center;
        display: none; /* Escondida por padrão */
    }