/* 2P Energia Solar — Hero de campanha "Aniversário 2P · 7 anos" (home, outubro/2026)
   Banner: texto + CTA à esquerda, embaixador no centro exato, oferta à direita.
   No celular e no tablet em pé vira um banner vertical compacto: título, selo,
   oferta, validade, CTA e a foto fechando — centralizado e sem corte.
   Prefixo cmp-. Tokens de marca e botões vêm de main.css.
   Artes em /assets/images/campanha-7anos/.
   Para encerrar a campanha: restaurar o hero institucional (git), remover este
   CSS, o link no index.html e a pasta de imagens. */

.cmp-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink) url('/assets/images/campanha-7anos/bg-desktop.webp') center / cover no-repeat;
  color: #FFFFFF;
}
/* Véu escuro: mantém o fundo de fábrica discreto atrás do conteúdo */
.cmp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.82) 0%, rgba(10, 16, 28, 0.58) 34%, rgba(10, 16, 28, 0.74) 100%),
    radial-gradient(1100px 520px at 50% 58%, rgba(240, 104, 32, 0.16), transparent 72%);
}

.cmp-hero__inner {
  position: relative;
  max-width: 1320px;
  min-height: 640px;
  margin: 0 auto;
  padding: 104px 32px 0;
  display: grid;
  /* a coluna do meio é o espaço reservado para a foto, posicionada no centro exato */
  grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 430px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 24px;
  align-items: center;
}

/* ----------------------------- Coluna 1 ----------------------------- */
.cmp-hero__copy { grid-column: 1; grid-row: 1; align-self: end; padding-bottom: 14px; }
.cmp-hero__title {
  margin: 0;
  max-width: 440px;
  font-family: var(--font-title);
  font-size: clamp(26px, 2.5vw, 40px);
  line-height: 1.14;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-wrap: balance;
}
.cmp-hero__actions {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  padding-bottom: 60px;
}
.cmp-hero__actions .btn-primary { box-shadow: 0 16px 40px rgba(240, 104, 32, 0.38); }
.cmp-hero__actions .btn-ghost { border-color: rgba(255, 255, 255, 0.22); }

/* --------------- Coluna 2 — embaixador, no centro exato -------------- */
.cmp-hero__media {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: -moz-fit-content;
  width: fit-content;
  max-width: 44%;
  z-index: 1;
}
.cmp-hero__media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(600px, 74vh);
  height: auto;
  filter: drop-shadow(0 34px 64px rgba(0, 0, 0, 0.55));
}
.cmp-name {
  position: absolute;
  right: -8px;
  bottom: 26px;
  margin: 0;
  padding: 9px 16px;
  white-space: nowrap;
  background: rgba(12, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
}
.cmp-name strong { display: block; font-family: var(--font-title); font-size: 14.5px; font-weight: 700; color: #FFFFFF; }
.cmp-name span { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-soft); }

/* ------------------------- Coluna 3 — oferta ------------------------ */
.cmp-offer {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 14px;
  text-align: right;
}
.cmp-offer img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)); }
.cmp-offer__selo { max-width: 440px; }
.cmp-offer__texto { max-width: 400px; }
.cmp-offer__valid {
  margin: 8px 0 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}
.cmp-offer__valid strong { color: #FFFFFF; font-weight: 800; }
.cmp-offer__valid::after {
  content: '';
  display: block;
  width: 260px;
  max-width: 100%;
  height: 2px;
  margin: 12px 0 0 auto;
  background: linear-gradient(270deg, var(--orange), rgba(240, 104, 32, 0));
}

/* ============================== RESPONSIVO ============================== */
/* Notebooks menores: mesma composição, peças menores */
@media (max-width: 1200px) {
  .cmp-hero__inner { min-height: 580px; padding-left: 24px; padding-right: 24px; }
  .cmp-hero__media img { max-height: 520px; }
  .cmp-offer__selo { max-width: 360px; }
  .cmp-offer__texto { max-width: 330px; }
  .cmp-offer__valid { font-size: 14.5px; }
  .cmp-offer__valid::after { width: 200px; }
}
@media (max-width: 1000px) {
  .cmp-hero__inner {
    min-height: 520px;
    padding-top: 96px;
    grid-template-columns: minmax(0, 1fr) clamp(230px, 26vw, 300px) minmax(0, 1fr);
    column-gap: 16px;
  }
  .cmp-hero__title { font-size: clamp(21px, 2.9vw, 29px); max-width: 300px; }
  .cmp-hero__media img { max-height: 420px; }
  .cmp-hero__actions { padding-top: 18px; padding-bottom: 40px; gap: 10px; }
  .cmp-hero__actions .btn-primary,
  .cmp-hero__actions .btn-ghost { padding: 13px 18px; font-size: 14px; }
  .cmp-offer { gap: 12px; }
  .cmp-offer__selo { max-width: 290px; }
  .cmp-offer__texto { max-width: 265px; }
  .cmp-offer__valid { font-size: 13px; }
  .cmp-offer__valid::after { width: 150px; margin-top: 10px; }
  .cmp-name { padding: 7px 12px; }
  .cmp-name strong { font-size: 13px; }
  .cmp-name span { font-size: 9.5px; }
}

/* -------------- Celular e tablet em pé: banner vertical -------------- */
@media (max-width: 860px) {
  .cmp-hero {
    background-image: url('/assets/images/campanha-7anos/bg-mobile.webp');
    background-position: center top;
  }
  .cmp-hero::before {
    background:
      linear-gradient(180deg, rgba(10, 16, 28, 0.9) 0%, rgba(10, 16, 28, 0.7) 40%, rgba(10, 16, 28, 0.88) 100%),
      radial-gradient(620px 340px at 50% 34%, rgba(240, 104, 32, 0.22), transparent 72%);
  }
  .cmp-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 92px 20px 0;
    text-align: center;
  }
  /* Ordem do banner vertical: título, oferta, botões e a foto fechando.
     align-self: center anula o alinhamento do grid do desktop */
  .cmp-hero__copy,
  .cmp-offer,
  .cmp-hero__actions,
  .cmp-hero__media { align-self: center; justify-self: center; }
  .cmp-hero__copy { order: 1; padding: 0; }
  .cmp-offer { order: 2; }
  .cmp-hero__actions { order: 3; }
  .cmp-hero__media { order: 4; }
  .cmp-hero__title {
    max-width: 460px;
    font-size: clamp(23px, 5.6vw, 32px);
    line-height: 1.16;
    text-align: center;
  }

  .cmp-offer {
    width: 100%;
    align-items: center;
    text-align: center;
    padding: 20px 0 0;
    gap: 12px;
  }
  /* sem max-width aqui: cada arte tem o seu limite logo abaixo */
  .cmp-offer img { width: auto; }
  .cmp-offer__selo { max-width: min(330px, 84%); }
  .cmp-offer__texto { max-width: min(310px, 82%); }
  .cmp-offer__valid { margin: 4px 0 0; font-size: 13.5px; }
  .cmp-offer__valid::after {
    width: 180px;
    margin: 10px auto 0;
    background: linear-gradient(90deg, rgba(240, 104, 32, 0), var(--orange), rgba(240, 104, 32, 0));
  }

  .cmp-hero__actions {
    width: 100%;
    max-width: 420px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 22px 0 0;
  }
  .cmp-hero__actions .btn-primary { width: 100%; text-align: center; padding: 15px 20px; font-size: 15px; }
  /* O secundário vira link discreto: economiza altura e destaca o CTA principal */
  .cmp-hero__actions .btn-ghost {
    width: 100%;
    border: 0;
    background: none;
    padding: 6px 0 0;
    font-size: 14.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  .cmp-hero__actions .btn-ghost:hover { background: none; color: #FFFFFF; }

  /* A foto fecha o banner, inteira e encostada na base */
  .cmp-hero__media {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    max-width: 100%;
    margin-top: 16px;
  }
  .cmp-hero__media img { max-height: 330px; }
  /* encostada na borda esquerda da foto, livre do produto que ele segura */
  .cmp-name { right: auto; left: -6px; transform: none; bottom: 14px; }
}

@media (max-width: 480px) {
  .cmp-hero__inner { padding-top: 88px; padding-left: 18px; padding-right: 18px; }
  .cmp-offer { padding-top: 16px; gap: 10px; }
  .cmp-offer__selo { max-width: min(278px, 86%); }
  .cmp-offer__texto { max-width: min(268px, 84%); }
  .cmp-hero__actions { padding-top: 18px; }
  .cmp-hero__media { margin-top: 10px; }
  .cmp-hero__media img { max-height: 285px; }
  .cmp-name { bottom: 10px; padding: 7px 12px; }
  .cmp-name strong { font-size: 12.5px; }
  .cmp-name span { font-size: 9.5px; }
}
