/* ================= Variables & Reset ================= */
:root {
    --primary-color: #F26522; /* Laranja principal da logo */
    --primary-hover: #D95319; 
    --secondary-color: #B21E27; /* Vermelho escuro da logo */
    --text-color: #555;
    --bg-light: #f4f7f6;
    --white: #fff;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ================= Utilitários ================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.bg-light { background-color: var(--bg-light); }
.padding-section { padding: 80px 0; }

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover { background-color: var(--primary-hover); }

/* ================= Layouts em Grid (Corrigidos para não esticar) ================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* ================= Cabeçalho & Navegação ================= */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 55px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.logo:hover img { transform: scale(1.05); }

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 1001; 
}

.nav-links { display: flex; gap: 20px; }
.nav-links a:hover { color: var(--primary-color); }

/* ================= Banner Slider (Home) ================= */
.slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.slide.active { opacity: 1; z-index: 2; }

.slide-media {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.slide-content h1 {
    font-size: 3.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    font-weight: bold;
}

.slide-content p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
}

/* ================= Seção Serviços ================= */
.tech-bg {
    background-color: var(--bg-light);
    background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary-color);
}

/* ================= Portfólio ================= */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border-bottom: 4px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-bottom: 4px solid var(--primary-color);
}

.portfolio-img-wrapper {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.portfolio-img-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s ease-in-out; 
}

.portfolio-img {
    min-width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img { transform: scale(1.08); }

.portfolio-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-content h3 {
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.portfolio-content p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 25px;
    flex-grow: 1; 
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    font-weight: bold;
    transition: var(--transition);
    text-align: center;
    margin-top: auto; 
    text-decoration: none;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ================= Filtros do Portfólio ================= */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 8px 22px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Classe essencial para o JavaScript ocultar os projetos não selecionados */
.portfolio-item.hide {
    display: none;
}

/* ================= Timeline (Renovada) ================= */
.timeline-container { position: relative; max-width: 900px; margin: 0 auto; padding: 20px 0; }
.timeline-container::after { content: ''; position: absolute; width: 4px; background-color: rgba(242, 101, 34, 0.2); top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 2px; }

.timeline-item { padding: 20px 40px; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-item::after { 
    content: ''; position: absolute; width: 24px; height: 24px; right: -12px; 
    background-color: var(--white); border: 4px solid var(--primary-color); 
    top: 35px; border-radius: 50%; z-index: 1; 
    box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.1);
    transition: all 0.4s ease;
}
.timeline-item:nth-child(even):after { left: -12px; }

.timeline-item:hover::after {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 8px rgba(242, 101, 34, 0.2);
}

.timeline-content { 
    padding: 30px; 
    background-color: var(--white); 
    border-radius: 12px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    position: relative;
    border-bottom: 4px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
    border-bottom: 4px solid var(--primary-color);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.timeline-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(242, 101, 34, 0.1);
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: all 0.4s ease;
}

.timeline-item:hover .timeline-header i {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
}

.timeline-header h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin: 0;
}

/* ================= Blog ================= */
.tag {
    display: inline-block;
    font-size: 0.8rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

/* Ajuste dos cards do blog para flutuarem com borda laranja */
.blog-card { 
    border-bottom: 4px solid transparent; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.blog-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); 
    border-bottom: 4px solid var(--primary-color); 
}

/* ================= Banners Internos (Blog / Post) ================= */
.page-banner {
    position: relative;
    width: 100%;
    height: 45vh; 
    min-height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.page-banner-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.page-banner-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 900px;
}

.page-banner-content h1 {
    font-size: 3.2rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    font-weight: bold;
}

.page-banner-content p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
    color: #e0e0e0;
}

/* ================= Conteúdo do Artigo (Post) ================= */
.post-content h2, .post-content h3 { 
    color: var(--secondary-color); 
    margin-top: 30px; 
    margin-bottom: 15px; 
}
.post-content p { margin-bottom: 20px; }
.post-content img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    margin: 20px 0; 
}
.post-content ul, .post-content ol { 
    margin-bottom: 20px; 
    padding-left: 20px; 
}
.post-content li { margin-bottom: 10px; }

/* ================= Formulário de Contato / Orçamento ================= */
.mb-3 { margin-bottom: 15px; }
.form-label { display: block; margin-bottom: 5px; font-weight: bold; color: var(--text-color); }
.form-control, .form-select { 
    transition: border-color 0.3s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* ================= Footer ================= */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3, .footer h4 { margin-bottom: 20px; color: var(--white); }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a:hover { color: var(--primary-color); }
.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* ================= Botão Flutuante do WhatsApp ================= */
.whatsapp-float {
    position: fixed;
    width: 60px; height: 60px;
    bottom: 30px; right: 30px;
    background-color: #25d366; 
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    color: var(--white);
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ================= Responsividade Mobile Global ================= */
@media screen and (max-width: 768px) {
    
    /* Menu Hamburguer */
    .mobile-menu-toggle { display: block; }

    .nav-links {
        display: none; 
        position: fixed;
        top: 70px; 
        left: 0; 
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        gap: 40px;
        transition: left 0.4s ease;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: bold;
    }

    /* Banner Mobile */
    .slider-container {
        height: 50vh !important;
        min-height: 350px;
    }
    
    .slide-content { padding: 0 15px; }
    .slide-content h1 { font-size: 1.6rem; margin-bottom: 15px; }
    .slide-content p { font-size: 0.95rem; margin-bottom: 25px; }
    
    .page-banner { height: 35vh; min-height: 250px; }
    .page-banner-content h1 { font-size: 2rem; }
    .page-banner-content p { font-size: 1rem; }

    .btn { padding: 10px 20px; font-size: 0.95rem; }
    
    /* Timeline Mobile */
    .timeline-container::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 20px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item::after { left: 19px; top: 35px; }
    .timeline-item:nth-child(even)::after { left: 19px; }

    /* WhatsApp Mobile */
    .whatsapp-float {
        width: 50px; height: 50px;
        bottom: 20px; right: 20px;
        font-size: 30px;
    }
}

/* ================= Carrossel de Clientes ================= */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    background: var(--white);
    display: flex;
}

/* O gradiente lateral cria um efeito de fade onde as logos somem */
.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--white) 0%, rgba(255,255,255,0) 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--white) 0%, rgba(255,255,255,0) 100%);
}

.carousel-track {
    display: flex;
    align-items: center;
    /* Ajuste o tempo (30s) para deixar mais rápido ou mais lento */
    animation: scroll-carousel 30s linear infinite;
    width: max-content;
}

/* Pausa a animação se o usuário colocar o mouse em cima */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

.carousel-slide {
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    height: 60px; /* Altura padrão para todas as logos */
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.4s ease;
    cursor: pointer;
}

.carousel-slide img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

@keyframes scroll-carousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media screen and (max-width: 768px) {
    .carousel-slide { padding: 0 20px; }
    .carousel-slide img { height: 45px; }
    .carousel-container::before, .carousel-container::after { width: 40px; }
}

/* ================= Nova seção de fundo cinza claro ================= */
.bg-dark-section {
    background-color: #f9f9f9; /* Tom de cinza bem claro e clean */
    border-top: 1px solid #eee;
}

/* ================= Carrossel de Clientes (Ajustado para Fundo Claro) ================= */
.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, #f9f9f9 0%, rgba(249, 249, 249, 0) 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, #f9f9f9 0%, rgba(249, 249, 249, 0) 100%);
}

.carousel-slide img.logo-img {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    /* Filtro: mantemos a cor original (ou levemente dessaturada) para um visual limpo no fundo claro */
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
    cursor: pointer;
}

.carousel-slide img.logo-img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}