/* --- GERAL & TIPOGRAFIA --- */
body {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html { scroll-padding-top: 130px; }
.text-justify { text-align: justify; }

/* Títulos Finos */
h2, .section-title, .cert-title-large {
    font-weight: 300 !important;
    margin-bottom: 0 !important;
}
.cert-title-large {
    color: #198754;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* --- NAVBAR (Versão Desktop) --- */
.navbar { height: 110px !important; padding: 0 !important; }
.navbar-brand { height: 100%; padding: 0 !important; display: flex; align-items: center; }
.logo { height: 95px !important; width: auto; margin: 0 15px; object-fit: contain; }
.brand-text { font-size: 1.4rem; font-weight: 400; }

/* --- HERO (ANIMAÇÃO) --- */
.hero {
    margin-top: 110px; /* Precisa bater com a altura da navbar */
    height: 90vh; 
    background-size: cover;
    background-position: center;
    animation: slide 18s infinite;
    position: relative;
}
.hero .overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex; align-items: center; justify-content: center;
}
@keyframes slide {
    0%, 100% { background-image: url("../img/carrossel1.png"); }
    33% { background-image: url("../img/carrossel2.png"); }
    66% { background-image: url("../img/carrossel3.png"); }
}

/* --- BARRAS DECORATIVAS --- */
.barra-titulo-full { display: flex; width: 100%; height: 5px; margin: 5px 0 25px; }
.barra-metade-ouro { background-color: #d4af37; width: 50%; border-radius: 2px 0 0 2px; }
.barra-metade-verde { background-color: #198754; width: 50%; border-radius: 0 2px 2px 0; }

.custom-bar { height: 6px; width: 100%; border-radius: 2px; }
.bar-gold { background-color: #d4af37; }
.bar-green { background-color: #198754; }

/* --- IMAGENS GERAIS --- */
.sobre-img, .contact-img, .sust-img {
    width: 100%; height: 100%; min-height: 400px;
    object-fit: cover; border-radius: 15px; transition: transform 0.3s;
}
.sobre-img:hover, .contact-img:hover, .sust-img:hover { transform: scale(1.02); }

/* --- PRODUTOS (CARDS & CARROSSEL) --- */
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: #198754; border-radius: 50%; padding: 15px;
}
.product-card {
    height: 100%; display: flex; flex-direction: column; 
    justify-content: space-between; transition: 0.3s;
}
.product-card:hover {
    transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Imagem e Botão Verde */
.img-container {
    position: relative; overflow: hidden;
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
}
.card-img-fixed {
    height: 250px; width: 100%; object-fit: contain;
    padding: 10px; background-color: #fff; cursor: pointer;
}
.btn-plus {
    position: absolute; bottom: 0; left: 0;
    width: 40px; height: 40px;
    background-color: #198754; color: white;
    border-radius: 0 15px 0 0; 
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; cursor: pointer; z-index: 10; transition: 0.2s;
}
.btn-plus:hover { background-color: #146c43; width: 50px; height: 50px; }

/* --- QUADRADINHOS DE COR (MODAL) --- */
.color-square {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 1px solid #ccc;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
}

/* --- CERTIFICAÇÕES (TABS & INTERAÇÃO) --- */
.nav-pills .nav-link, .nav-pills .nav-link:focus, .nav-pills .nav-link.active {
    box-shadow: none !important; outline: none !important; background: transparent !important; padding: 0; width: 100%;
}
.cert-nav-item {
    cursor: pointer; transition: 0.3s;
    background-color: #f8f9fa; border: 1px solid #dee2e6;
    padding: 20px; display: flex; align-items: center; justify-content: center;
    position: relative; min-height: 150px; border-radius: 4px;
}
.cert-thumb-img { max-width: 100%; max-height: 100px; transition: transform 0.3s; }
.nav-pills .nav-link.active .cert-nav-item {
    background-color: #dbe0e5; border-color: #adb5bd;
    border-bottom: 4px solid #198754 !important;
    transform: translateY(-2px);
}
.nav-pills .nav-link.active .cert-thumb-img, .cert-nav-item:hover .cert-thumb-img {
    transform: scale(1.1);
}
.nav-pills .nav-link.active .cert-nav-item::after {
    content: ''; position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
    border: 10px solid transparent; border-top-color: #dbe0e5; z-index: 10;
}
.cert-content-box {
    background-color: #fff; border-top: 2px solid #e9ecef;
    padding: 40px 20px; margin-top: 20px; animation: fadeIn 0.5s;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.cert-big-img { max-width: 200px; width: 100%; height: auto; }

/* --- FORMULÁRIO & FOOTER --- */
.form-effect:focus { box-shadow: 0 0 15px rgba(25, 135, 84, 0.4); border-color: #198754; }
.btn-effect:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(25, 135, 84, 0.4); }

.social-link { color: #6c757d; font-size: 2rem; margin: 0 15px; transition: 0.3s; display: inline-block; }
.social-link:hover { color: #198754; transform: scale(1.15); }

/* --- WHATSAPP --- */
.whatsapp-btn {
    position: fixed; right: 25px; bottom: 25px;
    width: 70px; height: 70px;
    background: #25D366; border-radius: 50%; padding: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4); animation: pulse 2s infinite; z-index: 1000;
}
.whatsapp-btn img { width: 100%; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* =========================================================
   AJUSTES PARA CELULAR (MOBILE - MAX WIDTH 991px)
   ========================================================= */
@media (max-width: 991px) {

    /* --- 1. CABEÇALHO --- */
    .navbar {
        height: 70px !important; 
        padding: 0 5px !important; 
    }
    .navbar-brand {
        max-width: 85%;
        margin-right: 0;
    }
    .logo {
        height: 35px !important; 
        margin-right: 5px !important;
        width: auto;
    }
    .brand-text {
        font-size: 3.8vw !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        font-weight: 500 !important;
        color: #198754;
        text-overflow: ellipsis; overflow: hidden;
    }
    .navbar-toggler {
        padding: 4px; font-size: 0.8rem; border: none;
    }

    /* --- 2. MENU MOBILE CORRIGIDO (Fundo Branco Sólido) --- */
    .navbar-collapse {
        background-color: #ffffff; /* Fundo branco sólido */
        position: absolute; /* Sai do fluxo para não quebrar a barra */
        top: 70px; /* Começa logo abaixo da barra */
        left: 0;
        width: 100%;
        padding: 15px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); /* Sombra para destacar */
        border-top: 1px solid #f0f0f0;
        z-index: 9999;
    }

    /* Estilo dos links no menu mobile para ficar bonito */
    .navbar-nav .nav-link {
        color: #333 !important; /* Texto escuro */
        padding: 12px 15px; /* Mais espaço para o dedo */
        border-bottom: 1px solid #f5f5f5; /* Linha separadora */
        text-align: left;
        font-weight: 500;
    }
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none; /* Remove linha do último item */
    }
    
    /* --- 3. HERO --- */
    .hero {
        margin-top: 70px !important; 
        height: 60vh !important; 
        min-height: 350px;
    }
    .hero h1.display-4 { font-size: 2.2rem !important; }
    .hero p.lead { font-size: 1rem !important; }

    /* --- 4. PRODUTOS (ROLAGEM LATERAL) --- */
    #produtos .carousel-inner .row {
        display: flex !important;
        flex-wrap: nowrap !important; 
        overflow-x: auto !important; 
        scroll-behavior: smooth;
        padding-bottom: 20px; 
        margin-left: 0;
    }
    #produtos .col-6 {
        display: block !important;
        flex: 0 0 70% !important; 
        max-width: 70% !important;
        margin-right: 15px; 
    }
    .card-img-fixed {
        height: 180px; padding: 5px;
    }
    #produtos .carousel-inner .row::-webkit-scrollbar {
        height: 0px; background: transparent;
    }

    /* --- 5. CERTIFICAÇÕES (ROLAGEM LATERAL) --- */
    #certificacoes #pills-tab {
        display: flex !important;
        flex-wrap: nowrap !important; 
        overflow-x: auto !important; 
        justify-content: flex-start !important; 
        margin: 0 !important;
        padding-bottom: 10px;
        width: 100%;
    }
    #certificacoes .nav-item {
        display: block !important;
        flex: 0 0 40% !important; 
        max-width: 40% !important;
        width: 40% !important;
        margin-right: 15px; 
    }
    .cert-nav-item {
        min-height: 110px;
        padding: 10px;
        width: 100%;
    }
    .cert-thumb-img {
        max-height: 60px;
    }
    #certificacoes #pills-tab::-webkit-scrollbar {
        display: none;
    }
}