/* Reset, Variáveis e Estilos Base */
:root {
    --primary-color: #4a7c59;
    --primary-dark-color: #2c5530;
    --accent-color: #25D366;
    --accent-hover-color: #128C7E;

    --text-light: #666;
    --text-on-dark-bg: #ccc;
    --text-on-primary-bg: #fff;

    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --white: #fff;
    --white-t-95: rgba(255, 255, 255, 0.95);
    --black-t-40: rgba(0, 0, 0, 0.4);

    --font-primary: 'Poppins', sans-serif;
    --header-height: 92px; /* Aprox. 60px logo + 2rem padding */

    --border-radius: 15px;
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Reset & Base */
*,::before,::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }
    *,::before,::after {
        animation-duration: .01ms!important;
        animation-iteration-count: 1!important;
        transition-duration: .01ms!important;
        scroll-behavior: auto!important
    }
}

/* Responsividade: manter o logo-text menor em telas pequenas */
@media (max-width: 640px) {
    /* Aumenta o tamanho do texto do logo em mobile para melhor visibilidade */
    .logo .logo-text {
        height: 48px;
    }
    .logo .logo-emblem {
        height: 64px;
    }

    /* Leve aumento de tipografia para melhor leitura em telas pequenas */
    body {
        font-size: 1.05rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Ajustes adicionais para header mobile */
    .logo {
        left: 50%;
        top: 50%; /* centraliza verticalmente dentro do header */
        transform: translate(-50%, -50%); /* centralização X e Y */
    }

    /* esconder nav e usar botão mobile */
    .header .container > .nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 1000;
    padding: 1rem 0;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background: var(--white-t-95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* necessário para posicionamento absoluto do logo */
    min-height: 130px; /* aumentado para criar mais espaçamento superior */
}

.logo {
    display: flex;
    flex-direction: column; /* empilha emblema acima do texto */
    align-items: center;
    gap: 0.35rem; /* Espaço entre o emblema e o texto */
    position: absolute;
    left: 50%;
    top: 50%; /* centraliza verticalmente dentro do header */
    transform: translate(-50%, -50%); /* centralização X e Y */
}

.logo .logo-emblem {
    height: 84px; /* emblema aumentado para destaque no desktop */
    width: auto;
    transition: filter 0.4s ease, transform 0.2s ease;
    filter: brightness(0) invert(1) drop-shadow(1px 1px 2px rgba(0,0,0,0.6));
}

.logo .logo-text {
    height: 72px; /* texto aumentado no desktop */
    width: auto;
    transition: filter 0.4s ease, transform 0.2s ease;
    filter: brightness(0) invert(1) drop-shadow(1px 1px 2px rgba(0,0,0,0.6));
}

.header.scrolled .logo .logo-emblem,
.header.scrolled .logo .logo-text {
    filter: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

/* Espaçamento para que o nav não fique coberto pelo logo central */
.header .container > .nav {
    padding-left: 2rem;
    padding-right: 3.5rem;
}

.nav a {
    font-family: var(--font-primary);
    font-weight: 500;
    text-decoration: none;
    color: var(--text-on-primary-bg);
    transition: color 0.4s ease, text-shadow 0.4s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
}

.nav a:hover, .nav a:focus-visible {
    color: #ddd; /* Cor de hover mais clara para o estado transparente */
}

.header.scrolled .nav a {
    color: var(--text-light);
    text-shadow: none;
}

.header.scrolled .nav a:hover,
.header.scrolled .nav a:focus-visible {
    color: var(--primary-color);
    text-decoration: underline;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    z-index: 1030;
    cursor: pointer;
}

/* Garantir que o botão do menu móvel fique acima do logo quando visível */
.mobile-menu-toggle {
    position: relative;
    z-index: 2000;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    margin: 3px 0;
    background: var(--white);
    transition: .3s ease-in-out;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

.header.scrolled .mobile-menu-toggle span {
    background: var(--text-dark);
    filter: none;
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.header.scrolled .mobile-menu-toggle:focus-visible {
    outline-color: var(--accent-color);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh; /* Fallback */
    min-height: 100dvh; /* Dynamic viewport height */
    display: flex;
    place-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero-background img,
.hero-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--black-t-40);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    /* A largura e o padding agora são controlados pelo .container interno,
       evitando regras duplicadas e simplificando o layout. */
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.cta-button:hover, .cta-button:focus-visible {
    background: var(--accent-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.cta-button i {
    font-size: 1.2em;
    line-height: 1;
}

/* Sections */
.section-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-dark-color);
}

.section-intro {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Solutions Section */
.solutions {
    padding: 5rem 0;
    background: var(--bg-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 350px));
    justify-content: center;
    gap: 2rem;
    margin-block-start: 3rem;
    container-type: inline-size
}

.benefit-card {
    background: var(--text-on-dark);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: .3s;
    container-type: inline-size
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.benefit-icon {
    width: 80px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), #6b8e23);
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 2rem;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Specialties Section */
.specialties {
    padding: 5rem 0;
}

.specialties-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}


.specialty-card {
    flex: 1 1 350px; /* Permite que o card cresça e encolha, com base de 350px */
    max-width: 400px; /* Evita que os cards fiquem excessivamente largos em telas de tablet */
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.specialty-image {
    height: 200px;
    overflow: hidden;
}

.specialty-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.specialty-card:hover .specialty-image img {
    transform: scale(1.05);
}

.specialty-content {
    padding: 1.5rem;
}

.specialty-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.specialty-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Consultoria Section */
.consultoria-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

.consultoria-text h2 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark-color);
}

.consultoria-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-block-end: 2rem;
    line-height: 1.6;
}

.consultoria-list {
    list-style: none;
}

.consultoria-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-block-end: 1rem;
    color: var(--text-dark);
}

.consultoria-list i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.consultoria-text .cta-button {
    margin-block-start: 1.5rem;
}

.consultoria-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.1);
}

.consultoria-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Faixa Imagine seu espaço ideal */
.imagine-banner {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.imagine-bg-video,
.imagine-bg-image {
    position: absolute;
    inset: 0;
    object-fit: cover;
    z-index: 1;
    filter: brightness(.45) saturate(1.1) contrast(1.08);
    transition: transform 1.5s ease-out;
}

.imagine-banner.active .imagine-bg-image {
    transform: scale(1.1);
}

.imagine-banner-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding-block: 3rem;
    padding-inline: 1.5rem;
    width: min(100%, 900px);
    margin-inline: auto;
}

.imagine-banner-content h2 {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 2.3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
}

.imagine-banner-content p {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 1.25rem;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.35);
    max-width: 700px;
    margin: 0 auto;
}

.imagine-banner-content .cta-button {
    margin-top: 2rem;
}

/* Final CTA Section */
.final-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark-color), var(--primary-color));
    color: var(--white);
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.final-cta .cta-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 700px;
    margin: 0 auto;
}

.final-cta .cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.final-cta .cta-box .cta-subtext {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

/*
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 105px;
    width: auto;
}
*/

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--text-dark);
    color: #999;
}

/* =============================================== */
/* Responsive Design (Consolidado e Organizado) */
/* =============================================== */

/* Tablet - 992px e abaixo */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .consultoria-content {
        gap: 2rem;
    }
}

/* Mobile - 768px e abaixo */
@media (max-width: 768px) {
    /* Header & Nav */
    /* Seção de Especialidades no mobile: */
    .specialties .container {
        padding: 0 15px; /* Reduz o padding do container para os cards terem mais espaço */
    }

    .header .container {
        position: relative; /* Para o z-index do toggle funcionar corretamente */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh; /* Usa a altura total da tela */
        background: var(--white-t-95);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center; /* Centraliza os itens verticalmente */
        align-items: center;
        gap: 1.5rem; /* Espaçamento entre os links */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: 1020;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav a {
        color: var(--text-dark); /* Cor do texto no menu aberto */
        text-shadow: none;
        font-size: 1.5rem; /* Tamanho maior para melhor toque */
        font-weight: 500;
        padding: 0.5rem 1rem;
        transition: color 0.3s ease;
    }
    .nav a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        /* position: absolute; garante que o botão role junto com o header,
           em vez de ficar fixo na tela. */
        position: absolute;
        right: 20px;
    }

    /* Ajustes para o logo em pontos de quebra menores - mantêm tamanhos legíveis */
    .logo .logo-emblem {
        height: 64px;
    }

    .logo .logo-text {
        height: 48px;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    /* Botão CTA Geral */
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    /* Títulos de Seção */
    .section-title {
        font-size: 2rem;
    }

    /* Grids */
    /* Ajustes específicos para a Seção de Soluções no mobile */
    .solutions .container {
        padding: 0 15px; /* Reduz o padding horizontal para dar mais largura aos cards */
    }
    .benefits-grid {
        gap: 1.5rem;
    }
    .benefit-card {
        max-width: none; /* Permite que os cards ocupem toda a largura disponível no mobile */
    }
    .specialty-card {
        max-width: none; /* Permite que os cards de especialidade também ocupem toda a largura */
    }
    
    .consultoria-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .consultoria-list {
        display: inline-block; /* Para centralizar o bloco da lista */
        text-align: left; /* Para alinhar o texto dos itens à esquerda */
    }

    /* Banner "Imagine" */
    .imagine-banner {
        min-height: 350px;
    }
    .imagine-banner-content {
        padding: 0 1.5rem; 
    }
    .imagine-banner-content h2 {
        font-size: 1.8rem;
    }
    .imagine-banner-content p {
        font-size: 1.1rem;
    }

    /* CTA Final */
    .final-cta h2 {
        font-size: 2rem;
    }
    .final-cta .cta-box h3 {
        font-size: 1.5rem;
    }
    .final-cta .cta-box {
        padding: 1.5rem;
    }

    /* Botão Flutuante WhatsApp */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float i {
        font-size: 1.6rem;
    }
}

/* Mobile Pequeno - 480px e abaixo */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.25;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    /* Ajustes específicos para a Seção de Soluções em mobile muito pequeno */
    .solutions .container {
        padding: 0 10px; /* Ainda menos padding para telas muito pequenas */
    }
    .specialties .container {
        padding: 0 10px; /* E também para a seção de especialidades */
    }
    .imagine-banner-content h2 {
        font-size: 1.5rem;
    }
    .imagine-banner-content p {
        font-size: 1rem;
    }
}

/* ===== Media focus & subtle transitions to keep attention on CTA and copy ===== */
.hero-background {
  /* manter position:absolute para preencher a seção .hero */
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.hero-background::before {
  content: "";
  position: absolute;
  inset: 0;
  /* overlay entre o fundo e o conteúdo, por isso z-index: -1 (acima do vídeo, abaixo do conteúdo) */
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
  transition: opacity .6s ease;
  z-index: -1;
}
.hero-background video,
.hero-background .imagine-bg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.95);
  transition: transform .6s ease, opacity .6s ease, filter .6s ease;
  transform-origin: center;
  /* garantir que o media fique abaixo do overlay */
  z-index: -2;
}

/* Fade-in helper for media to avoid sudden attention-shifts */
.media-fade-in {
  opacity: 0;
  transform: translateY(8px) scale(1.02);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease;
  will-change: opacity, transform;
}
.media-fade-in.in-view {
  opacity: 1;
  transform: none;
}

/* Garante que o CTA e conteúdo fiquem acima do overlay/media */
.hero-content,
.imagine-banner-content {
  position: relative;
  z-index: 2;
}

/* Dim imagens decorativas levemente */
.imagine-bg-image {
  filter: brightness(0.85) saturate(0.95);
}

/* Subtle CTA emphasis (não intrusivo) */
.cta-button {
  position: relative;
  z-index: 3;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cta-button:focus,
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Preferência de redução de movimento */
@media (prefers-reduced-motion: reduce) {
  .media-fade-in,
  .hero-background video,
  .imagine-bg-image,
  .cta-button {
    transition: none !important;
    transform: none !important;
  }
}

/* Optimized Animations */
@media(prefers-reduced-motion:no-preference) {
    .animated-item,
    .benefit-card,
    .specialty-card {
        opacity: 0;
        transform: translateY(30px);
        transition: .4s cubic-bezier(.4,0,.2,1);
        will-change: transform,opacity
    }

    .animated-item.visible,
    .benefit-card.visible,
    .specialty-card.visible {
        opacity: 1;
        transform: translateY(0)
    }

    .mobile-menu-toggle.active span {
        transition: .3s cubic-bezier(.4,0,.2,1);
        will-change: transform,opacity
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg)
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg)
    }
}

/* Keyframe animation for the pulse effect */
@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    }
    10% {
        transform: scale(1.1);
        filter: drop-shadow(0 6px 20px rgba(37, 211, 102, 0.4));
    }
    20% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    z-index: 1010;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.4s ease, visibility 0.4s ease;
    animation: pulse 5s infinite ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.whatsapp-float i {
    font-size: 2rem;
}

.whatsapp-float:hover, .whatsapp-float:focus-visible {
    animation: none; /* Stop the animation on hover/focus */
    background-color: var(--accent-hover-color);
    transform: scale(1.1);
}

/* Estado visível controlado por JS */
.whatsapp-float.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
