/* =========================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================= */
:root {
    --otheva-dark: #102e38;
    --otheva-light: #1c4b5b;
    --otheva-yellow: #fdd835;
    --otheva-blue: #004553;
    --text-gray: #555555;
    --light-bg: #f8f9fa;
    --white: #ffffff;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Helvetica, Arial, sans-serif; 
}

body {
    background-color: var(--light-bg);
    color: var(--text-gray);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; }
ul { list-style: none; }

/* =========================================
   2. CABEÇALHO (HEADER)
   ========================================= */
/* IMPORTANTE: Usamos 'body > header' para afetar SÓ o menu principal 
   e não estragar o cabeçalho de dentro dos artigos */
body > header {
    background: var(--otheva-dark);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo { 
    display: flex; 
    align-items: center; 
}

.logo img {
    height: 50px; 
    width: auto;
    display: block;
}

nav ul { display: flex; gap: 30px; }
nav a { color: var(--white); font-size: 14px; font-weight: 600; text-transform: uppercase; transition: color 0.3s; }
nav a:hover { color: var(--otheva-yellow); }

.btn-header { border: 2px solid var(--otheva-yellow); padding: 8px 20px; border-radius: 4px; color: var(--otheva-yellow); }
.btn-header:hover { background: var(--otheva-yellow); color: var(--otheva-dark); }

@media (max-width: 768px) {
    body > header { flex-direction: column; gap: 15px; padding: 15px; }
    nav ul { gap: 15px; flex-wrap: wrap; justify-content: center; }
}

/* =========================================
   3. HOME: BANNERS E PRODUTOS
   ========================================= */
.carousel-container { position: relative; width: 100%; height: 600px; overflow: hidden; background: var(--otheva-dark); }
.carousel-track { display: flex; height: 100%; width: 100%; transition: transform 0.8s ease-in-out; }
.carousel-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: flex-start; padding: 0 10%; background-size: cover; background-position: center; }
.slide-1 { background-image: linear-gradient(rgba(16, 46, 56, 0.6), rgba(16, 46, 56, 0.3)), url('https://i.postimg.cc/QCFzkVz0/produto.jpg'); }
.slide-2 { background-image: linear-gradient(rgba(16, 46, 56, 0.3), rgba(16, 46, 56, 0.3)), url('https://i.postimg.cc/02J3zMDC/catalogo.jpg'); }

.hero-content { max-width: 600px; color: white; text-align: left; z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; font-weight: 800; }
.tagline { color: var(--otheva-yellow); font-weight: bold; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 15px; display: block; letter-spacing: 1px; }
.btn-primary { background-color: var(--otheva-yellow); color: var(--otheva-dark); padding: 15px 40px; font-weight: 700; border-radius: 5px; display: inline-block; transition: transform 0.2s; border: none; }
.btn-primary:hover { transform: translateY(-3px); }

/* Ícones Features */
.features { background: var(--white); padding: 40px 5%; display: flex; justify-content: center; gap: 50px; margin-top: -60px; position: relative; z-index: 10; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); max-width: 1200px; margin-left: auto; margin-right: auto; flex-wrap: wrap; }
.feature-item { display: flex; align-items: center; gap: 15px; text-align: left; }
.feature-item i { font-size: 2.5rem; color: var(--otheva-yellow); }
.feature-text { display: flex; flex-direction: column; }
.feature-item strong { display: block; color: var(--otheva-dark); font-size: 1.1rem; }

/* Grid Produtos */
.otheva-secao-produtos { padding: 50px 20px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2.2rem; color: var(--otheva-dark); margin-bottom: 10px; }
.otheva-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.otheva-card { background-color: #fff; border: 1px solid #e0e0e0; border-radius: 5px; padding: 20px; text-align: center; transition: transform 0.3s; display: flex; flex-direction: column; justify-content: space-between; }
.otheva-card:hover { transform: scale(1.03); border-color: var(--otheva-dark); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.otheva-img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 15px; }
.otheva-nome-prod { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: #333; }
.otheva-preco { font-size: 18px; font-weight: bold; color: var(--otheva-dark); }
.otheva-btn { display: block; width: 100%; padding: 12px 0; background-color: var(--otheva-dark); color: #fff; text-transform: uppercase; border-radius: 4px; opacity: 0; transform: translateY(20px); transition: all 0.4s; cursor: pointer; }
.otheva-card:hover .otheva-btn { opacity: 1; transform: translateY(0); }

/* Galeria Instalações */
.otheva-gallery-section { padding: 60px 20px; background-color: #f8f9fa; position: relative; }
.otheva-gallery-container { max-width: 1200px; margin: 0 auto; position: relative; overflow: hidden; padding: 10px 0; }
.otheva-gallery-track { display: flex; gap: 20px; width: max-content; transition: transform 0.5s ease-in-out; }
.otheva-gallery-card { min-width: 350px; width: 350px; height: 400px; background: #fff; border-radius: 12px; position: relative; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-main-img { width: 100%; height: 100%; }
.gallery-main-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.otheva-gallery-card:hover .gallery-main-img img { transform: scale(1.05); }
.gallery-info { position: absolute; bottom: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(16, 46, 56, 0.9), transparent); color: white; }
.gallery-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: #102e38; color: #fdd835; width: 45px; height: 45px; border-radius: 50%; border: none; font-size: 20px; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; }
.gallery-prev { left: 10px; } .gallery-next { right: 10px; }

/* Comentários (Reviews) */
.otheva-reviews-section { padding: 60px 20px; background-color: #fff; }
.otheva-reviews-container { max-width: 1200px; margin: 0 auto; position: relative; overflow: hidden; padding: 20px 0; }
.otheva-reviews-track { display: flex; gap: 30px; transition: transform 0.5s ease-in-out; width: max-content; }
.otheva-review-card { background: #fff; border-radius: 10px; padding: 40px 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); min-width: 380px; width: 380px; border: 1px solid #eee; display: flex; flex-direction: column; justify-content: space-between; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: #102e38; color: #fdd835; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; border: none; }
.prev-btn { left: 0; } .next-btn { right: 0; }

/* Área do Instalador */
.cta-installer { background-color: var(--otheva-yellow); padding: 80px 20px; text-align: center; color: var(--otheva-dark); display: flex; flex-direction: column; gap: 30px; align-items: center; }
.cta-text h2 { font-size: 2.5rem; margin-bottom: 15px; }
.form-instalador { display: flex; gap: 15px; width: 100%; max-width: 900px; flex-wrap: wrap; justify-content: center; }
.input-otheva { padding: 15px 20px; border: none; border-radius: 5px; flex: 1; min-width: 250px; }
.btn-dark { background-color: var(--otheva-dark); color: white; padding: 15px 40px; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; }

/* =========================================
   4. PÁGINA DE TROCAS
   ========================================= */
.page-container { max-width: 800px; margin: 60px auto; padding: 0 20px; flex: 1; }
.page-title { text-align: center; margin-bottom: 50px; }
.form-troca { display: flex; flex-direction: column; gap: 25px; }
.form-row { display: flex; gap: 30px; }
.input-group { flex: 1; display: flex; flex-direction: column; }
.input-group.full-width { width: 100%; }
.input-group label { font-size: 0.9rem; color: #666; margin-bottom: 8px; font-weight: 600; }
.input-group input, .input-group select, .input-group textarea { padding: 10px 0; border: none; border-bottom: 1px solid #ccc; background: transparent; font-size: 1rem; color: #333; outline: none; border-radius: 0; }
.input-group input:focus { border-bottom-color: var(--otheva-dark); }
.btn-submit-troca { background: transparent; border: 2px solid var(--otheva-dark); color: var(--otheva-dark); padding: 15px; font-weight: bold; border-radius: 50px; cursor: pointer; width: 100%; transition: 0.3s; }
.btn-submit-troca:hover { background: var(--otheva-dark); color: white; }
.info-box { margin-top: 60px; background-color: #f4f4f4; padding: 40px; border-radius: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px; }

/* =========================================
   5. PÁGINA DO BLOG (ÍNDICE)
   ========================================= */
.blog-page-container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; flex: 1; }
.blog-header { text-align: center; margin-bottom: 60px; max-width: 800px; margin-left: auto; margin-right: auto; }
.blog-header h1 { font-size: 2.5rem; color: var(--otheva-dark); }
.blog-search-bar { display: flex; max-width: 500px; margin: 30px auto 0; border: 1px solid #ddd; border-radius: 50px; overflow: hidden; }
.blog-search-bar input { flex: 1; border: none; padding: 15px 25px; outline: none; }
.blog-search-bar button { background: white; border: none; padding: 0 25px; cursor: pointer; font-size: 1.2rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 60px; }
.otheva-card-artigo { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; transition: transform 0.3s; display: flex; flex-direction: column; }
.otheva-card-artigo:hover { transform: translateY(-10px); border-color: var(--otheva-yellow); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.otheva-img-artigo { width: 100%; height: 220px; object-fit: cover; }
.otheva-artigo-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.otheva-data { font-size: 12px; color: #999; font-weight: 700; margin-bottom: 10px; letter-spacing: 1px; }
.otheva-titulo-artigo { font-size: 1.2rem; color: var(--otheva-dark); margin-bottom: 15px; font-weight: 800; }
.otheva-resumo { font-size: 0.9rem; color: #555; margin-bottom: 20px; line-height: 1.5; }
.otheva-link-artigo { margin-top: auto; font-weight: 700; color: var(--otheva-blue); text-transform: uppercase; font-size: 13px; }
.blog-pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.blog-pagination a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; color: var(--otheva-dark); border-radius: 5px; font-weight: bold; }
.blog-pagination a.active { background: var(--otheva-dark); color: var(--otheva-yellow); }

/* =========================================
   6. PÁGINA DE ARTIGO INDIVIDUAL (SINGLE)
   ========================================= */
.single-article-container { max-width: 800px; margin: 40px auto; padding: 0 20px; font-family: 'Segoe UI', sans-serif; flex: 1; }
.back-link { display: inline-block; margin-bottom: 20px; color: #666; font-weight: 600; }
.back-link:hover { color: var(--otheva-dark); }
.post-header { margin-bottom: 30px; }
.post-category { display: inline-block; background: #eef2f5; color: var(--otheva-dark); padding: 5px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 800; margin-bottom: 15px; }
.post-header h1 { font-size: 2.5rem; color: var(--otheva-dark); line-height: 1.2; margin-bottom: 15px; background: transparent; box-shadow: none; position: static; display: block;}
.post-meta { color: #888; font-size: 0.9rem; display: flex; gap: 20px; }
.post-hero-image { width: 100%; height: 400px; object-fit: cover; border-radius: 10px; margin-bottom: 40px; }
.post-body { line-height: 1.8; color: #444; font-size: 1.05rem; }
.post-body h2 { color: var(--otheva-dark); margin-top: 40px; margin-bottom: 20px; font-size: 1.8rem; }
.post-body h3 { color: var(--otheva-blue); margin-top: 30px; margin-bottom: 15px; font-size: 1.4rem; }
.post-body p { margin-bottom: 20px; }
.post-body ul { list-style: disc; margin-left: 20px; margin-bottom: 20px; }
.post-body li { margin-bottom: 10px; }
.references-box { background-color: #f9f9f9; padding: 20px; border-left: 4px solid #ddd; margin-top: 50px; font-size: 0.85rem; color: #777; }


/* =========================================
   7. RODAPÉ (FOOTER)
   ========================================= */
footer { background-color: var(--otheva-dark); color: var(--white); padding: 40px 10% 0; text-align: center; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 40px; }
.footer-about, .footer-col { display: flex; flex-direction: column; align-items: center; }
.footer-title { font-size: 18px; font-weight: 700; color: var(--otheva-yellow); margin-bottom: 20px; text-transform: uppercase; }
.footer-about p { font-size: 14px; line-height: 1.6; color: #e0e0e0; margin: 0; max-width: 300px; }
.footer-separator-box, .contact-hours { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; margin-top: 20px; color: #ccc; font-size: 13px; width: 100%; max-width: 250px; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; font-size: 15px; }
.footer-links a { color: #e0e0e0; font-size: 14px; transition: color 0.3s; display: block; margin-bottom: 8px; }
.footer-links a:hover { color: var(--otheva-yellow); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 1200px; margin: 0 auto; color: #777; font-size: 13px; }
.footer-bottom span:first-child { text-align: left; }
.footer-bottom span:last-child { text-align: right; }
.footer-bottom-logo { height: 35px; width: auto; margin: 0 auto; opacity: 0.8; transition: opacity 0.3s; }
.footer-bottom-logo:hover { opacity: 1; }

/* RESPONSIVO GERAL */
@media (max-width: 900px) {
    .otheva-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { display: flex; flex-direction: column; gap: 15px; text-align: center; }
    .footer-bottom span:first-child, .footer-bottom span:last-child { text-align: center; }
}
@media (max-width: 600px) {
    .otheva-grid, .blog-grid { grid-template-columns: 1fr; }
    .hero-content h1, .post-header h1 { font-size: 2rem; }
    .form-row { flex-direction: column; }
}
/* =========================================
   RESPONSIVO BLOG E ARTIGOS
   ========================================= */
@media (max-width: 768px) {
    /* Lista de Artigos */
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-search-bar {
        width: 100%; /* Barra de busca ocupa largura total */
        padding: 0 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr; /* 1 artigo por linha */
        gap: 30px;
    }

    /* Página Interna do Artigo */
    .single-article-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .post-header h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .post-hero-image {
        height: 220px; /* Reduz altura da imagem principal */
    }

    .post-meta {
        flex-direction: column; /* Data e autor um embaixo do outro */
        gap: 5px;
    }

    /* Menu do topo (Header) */
    body > header {
        flex-direction: column;
        padding: 15px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}