/* ====================
   CONFIGURAÇÕES GLOBAIS E VARIÁVEIS
   ==================== */

:root {
    --primary-color: #005A9C; /* Azul (Engenharia, Confiança) */
    --secondary-color: #4CAF50; /* Verde (Sustentabilidade) */
    --dark-color: #222;
    --light-color: #f4f4f4;
    --white-color: #ffffff;
    --text-color: #555;
    --font-family: 'Poppins', sans-serif;
    --section-padding: 6rem 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 {
    color: var(--dark-color);
    font-weight: 600;
    line-height: 1.2;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-padding {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--light-color);
}

.text-center {
    text-align: center;
}

.subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

/* ====================
   BOTÕES
   ==================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #004a80;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-secondary:hover {
    background-color: #409143;
    transform: translateY(-2px);
}


/* ====================
   HEADER & NAVEGAÇÃO
   ==================== */

.header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    top: 0;
    left: 0;
    background-color: transparent;
    position: absolute;
    z-index: 1000; 
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px; 
    padding-top: 10px; 
}

.logo {
    margin-top: 0; 
    margin-bottom: 0; 
}

.logo img {
    width: 250px !important; 
    height: auto;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    font-weight: 600;
    color: #ffffff;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
}

/* ====================
   SEÇÃO 1: HERO
   ==================== */

.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('imagens/sao-paulo.jpg') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* ====================
   SEÇÃO 2: SOBRE NÓS
   ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ====================
   SEÇÃO 3: SERVIÇOS PRINCIPAIS
   ==================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--white-color);
    padding: 2.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* ====================
   SEÇÃO 4: DESTAQUES
   ==================== */

.featured-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.featured-item.reverse {
    grid-template-columns: 1fr 1fr;
}

/* Coloca a imagem à direita por padrão */
.featured-item .featured-image {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.featured-item .featured-text {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

/* Inverte para o item .reverse */
.featured-item.reverse .featured-image {
    grid-column: 1 / 2;
}

.featured-item.reverse .featured-text {
    grid-column: 2 / 3;
}


.featured-item:last-child {
    margin-bottom: 0;
}

.featured-image img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.featured-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ====================
   SEÇÃO 5: POR QUE ESCOLHER-NOS?
   ==================== */

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.why-us-item {
    text-align: center;
}

.why-us-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.why-us-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ====================
   SEÇÃO 6: CONTATO
   ==================== */
.contact-form {
    max-width: 3000px;
    align-content: center;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    font-family: var(--font-family);
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0,90,156,0.3);
}

.form-group textarea {
    resize: vertical;
}

#form-status {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ====================
   FOOTER
   ==================== */
.footer {
    background-color: var(--dark-color);
    color: #aaa;
    padding: 4rem 0 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #444;
}

.footer h3, .footer h4 {
    color: var(--white-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo p {
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #aaa;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white-color);
}

.footer-social a {
    color: #aaa;
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}

/* ====================
   ANIMAÇÕES (JavaScript)
   ==================== */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ====================
   RESPONSIVIDADE (MOBILE)
   ==================== */

@media (max-width: 768px) {
    h2.section-title {
        font-size: 2rem;
    }

    /* --- Navbar Mobile --- */
    .logo img {
        width: 200px !important; 
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        background-color: var(--white-color);
        position: absolute;
        top: 180px; 
        left: 0;
        width: 100%;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        color: var(--dark-color); 
    }

    .hamburger {
        display: block;
    }

    /* --- Hero --- */
    .hero-content {
        padding: 0 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }

    /* --- Seções --- */
    .about-grid {
        grid-template-columns: 1fr;
    }

    /* CORREÇÃO DEFINITIVA: Usando FLEXBOX e ORDER */
    .featured-item,
    .featured-item.reverse {
        display: flex; /* Mudar de grid para flex */
        flex-direction: column; /* Empilhar verticalmente */
    }

    .featured-item .featured-text,
    .featured-item.reverse .featured-text {
        order: 1; /* 1. O texto vem primeiro */
        text-align: center; /* Centraliza o texto como pedido */
    }
    
    .featured-item .featured-image,
    .featured-item.reverse .featured-image {
        order: 2; /* 2. A imagem vem depois */
        height: auto; 
        margin-top: 1.5rem; 
    }
    
    .featured-image img {
        height: auto; /* Garante que a imagem use sua altura natural */
        object-fit: unset; /* Reseta o 'cover' do desktop */
    }
    /* Fim da Correção */


    .services-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo p {
        margin: 0 auto 1rem auto;
    }
    
    .footer-logo img {
        margin: 0 auto 1rem; 
    }
    
    a.wp {
        width: 90%; 
        grid-template-columns: 45px 1fr; 
    }
}

/* Espaçamento do Hero apenas no Desktop */
@media (min-width: 769px) {
    .hero-content h1 {
        padding-top: 60px; /* Adiciona 60px de espaço acima do h1 */
    }
}


a.wp {
  font-family: Poppins;
  background: #ffffff;
  color: #25D366;
  display: inline-block;
  padding: 10px;
  border-radius: 25px;
  display: grid;
  grid-template-columns: 45px 150px;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px;
 
  text-decoration: none;
 
  cursor: pointer;
}

@media (max-width: 480px) {
    .services-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

.whatsapp-info,
.pulse {
    font-family: 'Poppins', sans-serif;
    display: inline-block;
    color: #fff;
    background: #1ab744;
    position: fixed;
    bottom: 50px;
    right: 50px;
    font-size: 45px;
    text-align: center;
    z-index: 99;
    border-radius: 90%;
    height: 70px;
    width: 70px;
    line-height: 70px;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    transition: all 0.2s
}

@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(.1);
        transform: scale(.1);
        opacity: 0
    }
    50% {
        opacity: .3
    }
    100% {
        -webkit-transform: scale(2);
        transform: scale(2);
        opacity: 0
    }
}

@keyframes pulse {
    0% {
        -webkit-transform: scale(.1);
        transform: scale(.1);
        opacity: 0
    }
    50% {
        opacity: .3
    }
    100% {
        -webkit-transform: scale(2);
        transform: scale(2);
        opacity: 0
    }
}

.pulse:nth-child(1) {
    -webkit-animation: pulse 2s infinite;
    animation: pulse 2s infinite
}

.pulse:nth-child(2) {
    -webkit-animation: pulse 2s infinite .3s;
    animation: pulse 2s infinite .3s
}

.pulse:nth-child(3) {
    -webkit-animation: pulse 2s infinite .6s;
    animation: pulse 2s infinite .6s
}

.fa {
    font: normal normal normal 14px/1 FontAwesome;
        font-size: 14px;
    font-size: inherit;
    text-rendering: auto;
    -moz-osx-font-smoothing: grayscale;
}

.fa-whatsapp::before {
    content: "\f234";
}

/* ====================
   ESTILOS DO BLOG (NOVOS)
   ==================== */

/* Header sólido para páginas internas */
.header-solid {
    position: relative; /* Faz o header ocupar espaço e empurrar o conteúdo */
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Hero da Página do Blog (blog.html) */
.hero-blog {
    min-height: 40vh; 
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('imagens/sao-paulo.jpg') no-repeat center center/cover; /* <-- MUDANÇA AQUI */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
}

.hero-blog h1 {
    font-size: 3rem;
    color: var(--white-color);
}

.hero-blog p {
    font-size: 1.2rem;
    color: var(--white-color);
    font-weight: 300;
}

/* Feed de Postagens (blog.html) */
.blog-feed .container {
    max-width: 800px; 
}

.blog-post-card {
    background: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    margin-bottom: 3rem;
    overflow: hidden; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-image img {
    width: 50%;
    height: auto;
    display: block;
}

.card-content {
    padding: 2rem;
}

.card-info {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}


/* ====================
   ESTILOS DA POSTAGEM (NOVOS)
   ==================== */

/* Hero da Postagem (postagem.html) */
.post-hero {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 4rem 0 4rem 0; /* Padding reduzido pois o header não é mais 'absolute' */
}

.post-hero .container {
    max-width: 800px;
}

.post-hero-category {
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
}

.post-hero-title {
    font-size: 2.8rem;
    color: var(--white-color);
    margin: 0.5rem 0;
}

.post-meta {
    font-size: 1rem;
    opacity: 0.8;
}

/* Conteúdo da Postagem (postagem.html) */
.post-content .container {
    max-width: 800px; 
}

.post-featured-image {
    margin-bottom: 2.5rem;
}

.post-featured-image img {
    border-radius: 10px;
}

.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-body h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin: 2.5rem 0 1.5rem 0;
}

.post-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-divider {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 3rem 0;
}

.back-link-container {
    text-align: center;
}

/* Ajustes mobile para o blog */
@media (max-width: 768px) {
    .hero-blog h1 {
        font-size: 2.5rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .post-hero {
        padding: 3rem 0; /* Padding mobile para o hero da postagem */
    }
    
    .post-hero-title {
        font-size: 2rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
}