/*
 * ═══════════════════════════════════════════════════════════
 *  MEGAHPROJ — HERO SECTIONS
 *  Bloco 1.5 — heroes.css
 *  Padrão visual: 2 colunas (texto | imagem) em todas as páginas
 * ═══════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────
   FADE-IN HERO — Animação de entrada lenta para
   títulos, subtítulos e textos das seções hero
───────────────────────────────────────────── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Classe base da animação — aplicada aos elementos da hero */
.hero-text .hero-headline,
.hero-text .hero-tagline,
.hero-text .hero-body,
.hero-text .hero-ctas,
.hero-text .expertise-title,
.hero-text .expertise-body,
.hero-text .social-bar {
  opacity: 0;
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ── Delays escalonados — efeito cascata ── */
.hero-text .hero-headline     { animation-delay: 0.15s; }
.hero-text .hero-tagline      { animation-delay: 0.40s; }
.hero-text .hero-body         { animation-delay: 0.60s; }
.hero-text .hero-ctas         { animation-delay: 0.80s; }
.hero-text .expertise-title   { animation-delay: 0.90s; }
.hero-text .expertise-body    { animation-delay: 1.10s; }
.hero-text .social-bar        { animation-delay: 1.30s; }

/* Acessibilidade — respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  .hero-text .hero-headline,
  .hero-text .hero-tagline,
  .hero-text .hero-body,
  .hero-text .hero-ctas,
  .hero-text .expertise-title,
  .hero-text .expertise-body,
  .hero-text .social-bar {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ─────────────────────────────────────────────
   HERO BASE — padrão compartilhado entre todas as páginas
   Layout: coluna esquerda (branca, texto) + coluna direita (imagem)
───────────────────────────────────────────── */
.page-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 50/50 base */
  min-height: 480px;
  background-color: var(--megah-white);
  overflow: hidden;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px 60px max(24px, calc((100vw - var(--container-width)) / 2 + 24px));
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

/* Coluna de imagem (direita) */
.hero-image {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Headline padrão — título principal da hero: Montserrat 900 (Black) conforme Brand Manual */
.hero-headline {
  font-family: var(--font);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
  line-height: 1.2;
  color: var(--megah-black);
  text-align: right;
  margin-bottom: 10px;
}

/* Subtítulo / tagline abaixo do headline principal */
.hero-tagline {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  color: var(--megah-black);
  text-align: right;
  margin-bottom: 20px;
}

/* Corpo de texto — Montserrat 400 (Regular) conforme Brand Manual */
.hero-body {
  font-size: 0.9rem;
  font-weight: 400;
  /* Regular — Brand Manual: texto de leitura usa Montserrat 400 */
  color: var(--megah-black);
  text-align: right;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
  margin-left: auto;
}

/* CTAs (botões) */
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-bottom: 28px;
}

/* ─────────────────────────────────────────────
   BARRA SOCIAL — "Confira nossas redes sociais"
   Padrão em: Home, Produtos, Serviços
───────────────────────────────────────────── */
.social-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Centraliza todo o conteúdo internamente */
  gap: 50px;
  /* Espaço entre o texto e o grupo de ícones */
  background-color: var(--megah-yellow);
  border-radius: 12px;
  padding: 10px 24px;
  width: 100%;
  max-width: 460px;
  margin-top: 14px;
  flex-wrap: wrap; /* Garante que elementos filhos (texto/ícones) não ultrapassem o limite de tela */
  box-sizing: border-box;
}

.social-bar__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--megah-black);
  flex-shrink: 0;
  line-height: 1.3;
}

.social-bar__icons {
  display: flex;
  align-items: center;
  gap: 30px;
  /* Espaçamento de exatamente 10px entre os ícones */
}

.social-bar__icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--megah-black);
  font-size: 1.5rem;
  transition: transform var(--ease), color var(--ease);
}

.social-bar__icons a:hover {
  transform: scale(1.25);
  color: var(--megah-burgundy);
}

/* ─────────────────────────────────────────────
   HERO — HOME (index.html)
   2 seções verticais na coluna esquerda:
   1. Headline + subtítulo + CTAs
   2. "Expertise" + texto + barra social
───────────────────────────────────────────── */
.hero-home {
  grid-template-columns: 55% 45%;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 35%, rgba(255, 255, 255, 0) 75%),
    url('../assets/images/hero-home.jpg');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  min-height: 940px;
  /* Alinhado ao min-height do WP */
}

.hero-home .hero-text {
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
  gap: 0;
}

/* Bloco superior */
.hero-home__upper {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--megah-burgundy);
  /* Linha divisória em bordô */
  margin-bottom: 36px;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-home__upper .hero-headline {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
  text-align: left;
  margin-bottom: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero-home__upper .hero-body {
  text-align: left;
  margin: 0 0 24px 0;
  font-size: 0.92rem;
  font-weight: 400;
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-home__upper .hero-ctas {
  justify-content: flex-start;
  /* CTAs alinhados à esquerda */
  gap: 14px;
}

/* Bloco inferior — Expertise */
.hero-home__lower {
  max-width: 100%;
  box-sizing: border-box;
}

.hero-home__lower .expertise-title {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 900;
  color: var(--megah-black);
  text-align: left;
  margin-bottom: 14px;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-home__lower .expertise-body {
  text-align: left;
  margin: 0 0 24px;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--megah-black);
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ─────────────────────────────────────────────
   HERO — QUEM SOMOS (quem-somos.html)
   Texto à esquerda (maior), imagem à direita
   Sem barra social nesta página
───────────────────────────────────────────── */
.hero-about {
  grid-template-columns: 58% 42%;
  min-height: 420px;
}

.hero-about .hero-text {
  padding: 50px 56px 50px 0;
}

.hero-about .hero-headline {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
  text-align: right;
  margin-bottom: 24px;
}

.hero-about .hero-body {
  text-align: right;
  margin: 0 0 20px auto;
  font-size: 0.88rem;
}

.hero-about .hero-ctas {
  justify-content: flex-end;
  margin-top: 8px;
}

/* Imagem Quem Somos — fotografia real, cor natural */
.hero-about .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  /* afastamento de 45px das bordas */
  background: var(--megah-white);
}

.hero-about .hero-image img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  /* mantém proporção inteira (1:1) sem corte */
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ─────────────────────────────────────────────
   HERO — PRODUTOS (produtos.html)
─────────────────────────────────────────────── */
.hero-products {
  grid-template-columns: 58% 42%;
}

.hero-products .hero-text {
  padding: 50px 48px 50px 0;
}

.hero-products .hero-headline {
  text-align: right;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
}

.hero-products .hero-tagline {
  text-align: right;
  font-weight: 600;
  color: var(--megah-black);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.hero-products .hero-body {
  text-align: right;
  margin: 0 0 24px auto;
}

.hero-products .social-bar {
  align-self: flex-end;
  /* Alinha a barra de redes sociais à direita */
}

/* Imagem Produtos — padrão visual Quem Somos */
.hero-products .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  /* afastamento de 45px das bordas (direita e topo) */
  background: var(--megah-white);
}

.hero-products .hero-image img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ─────────────────────────────────────────────
   HERO — SERVIÇOS (servicos.html)
─────────────────────────────────────────────── */
.hero-services {
  grid-template-columns: 58% 42%;
}

.hero-services .hero-text {
  padding: 50px 48px 50px 0;
}

.hero-services .hero-headline {
  text-align: right;
}

.hero-services .hero-tagline {
  text-align: right;
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.hero-services .hero-body {
  text-align: right;
  margin: 0 0 24px auto;
}

.hero-services .social-bar {
  align-self: flex-end;
  /* Alinha a barra de redes sociais à direita */
}

/* Imagem Serviços — padrão visual Quem Somos */
.hero-services .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  /* afastamento de 45px das bordas (direita e topo) */
  background: var(--megah-white);
}

.hero-services .hero-image img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ─────────────────────────────────────────────
   HERO — DOWNLOADS (downloads.html)
   ───────────────────────────────────────────── */
.hero-downloads {
  grid-template-columns: 58% 42%;
}

.hero-downloads .hero-text {
  padding: 50px 48px 50px 0;
}

.hero-downloads .hero-headline {
  text-align: right;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
}

.hero-downloads .hero-tagline {
  text-align: right;
  font-weight: 600;
  color: var(--megah-black);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.hero-downloads .hero-body {
  text-align: right;
  margin: 0 0 24px auto;
}

.hero-downloads .social-bar {
  align-self: flex-end;
  /* Alinha a barra de redes sociais à direita */
}

/* Imagem Downloads — padrão visual Quem Somos */
.hero-downloads .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  /* afastamento de 45px das bordas (direita e topo) */
  background: var(--megah-white);
}

.hero-downloads .hero-image img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ─────────────────────────────────────────────
   HERO — CONTATO (contato.html)
   ───────────────────────────────────────────── */
.hero-contact {
  grid-template-columns: 58% 42%;
}

.hero-contact .hero-text {
  padding: 50px 48px 50px 0;
}

.hero-contact .hero-headline {
  text-align: right;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900;
  /* Black — Brand Manual: títulos principais */
}

.hero-contact .hero-tagline {
  text-align: right;
  font-weight: 600;
  color: var(--megah-black);
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.hero-contact .hero-body {
  text-align: right;
  margin: 0 0 24px auto;
}

.hero-contact .social-bar {
  align-self: flex-end;
  /* Alinha a barra de redes sociais à direita */
}

/* Imagem Contato — padrão visual Quem Somos */
.hero-contact .hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  /* afastamento de 45px das bordas (direita e topo) */
  background: var(--megah-white);
}

.hero-contact .hero-image img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  box-shadow: var(--shadow-lg);
  display: block;
}

/* ─────────────────────────────────────────────
   RESPONSIVE — Heroes
───────────────────────────────────────────── */
@media (max-width: 992px) {

  .page-hero,
  .hero-home,
  .hero-about,
  .hero-products,
  .hero-services,
  .hero-downloads,
  .hero-contact {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-home {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%),
      url('../assets/images/hero-home.jpg');
    background-size: cover;
    background-position: center;
  }

  /* Imagem vai para cima no mobile */
  .hero-image {
    order: -1;
    min-height: 260px;
    padding: 0 !important;
  }

  .hero-text {
    padding: 40px 24px !important;
  }

  .hero-headline,
  .hero-tagline,
  .hero-body,
  .hero-home__upper .hero-headline,
  .hero-home__lower .expertise-title {
    text-align: left !important;
  }

  .hero-body,
  .hero-home__upper .hero-body {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .hero-ctas,
  .hero-home__upper .hero-ctas {
    justify-content: flex-start !important;
  }

  .hero-about .hero-image {
    align-items: flex-start;
  }

  .hero-about .hero-image img {
    height: 260px;
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  .hero-text {
    padding: 32px 20px !important;
  }

  .hero-image {
    min-height: 220px;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 10px;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .social-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
}