/* =========================================================
   João Tavares — página inicial
   Medidas tiradas do layout em 1920px de largura
   ========================================================= */

/* ---------- Cabeçalho ---------- */
.header-inner {
  /* logo começa 572px à esquerda do centro; idiomas terminam 712px à direita */
  padding-left: max(16px, calc(50% - 572px));
  padding-right: max(16px, calc(50% - 712px));
}
.logo { margin-top: 10px; }
.lang { margin-top: 23px; }
@media (min-width: 768px) {
  .logo { margin-top: 16px; }
  .lang { margin-top: 33px; }
}
.lang-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; font-weight: 400;
}
.lang-btn.is-active { font-weight: 700; }
.lang-btn:hover { color: #98602B; }
.lang-btn:focus-visible { outline: 2px solid #98602B; outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { flex: 1 0 auto; min-height: 795px; } /* cresce até encostar no rodapé */
.hero-bg { background: url("../img/hero-joao-tavares.png") center / cover no-repeat; }

.hero-inner { max-width: 1028px; }
.hero-title  { position: absolute; left: 0; top: 288px; }
.hero-address { position: absolute; left: 9px; top: 566px; }
.hero-social { position: absolute; left: 679px; top: 528px; }

.channels-label { position: relative; top: 4px; }

/* Ícones das redes */
.hero-social a {
  display: grid; place-items: center; color: #fff;
  transition: opacity .2s ease, transform .2s ease;
}
.hero-social a:hover { opacity: .8; transform: translateY(-1px); }
.hero-social a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.social-be {
  width: 30px; height: 30px; margin-left: 1px;
  border: 2px solid #fff; border-radius: 4px;
  font-size: 14px;
}
.social-yt {
  width: 28px; height: 22px; margin-left: 36px;
  border: 1.5px solid #fff; border-radius: 5px;
  font-size: 16px;
}
.social-yt .bi::before { transform: translateX(1px); display: inline-block; }
.social-ig { width: 28px; height: 28px; margin-left: 37px; }
.social-mail { width: 28px; height: 28px; margin-left: 37px; font-size: 27px; line-height: 1; }

/* ---------- Telas menores ---------- */
/* Tablet e mobile: PT · logo · EN no topo, título em cima,
   canais + endereço embaixo, tudo centralizado */
@media (max-width: 1100px) {
  .header-inner {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    column-gap: 22px; height: 96px; padding: 0 16px;
  }
  .logo, .lang { margin-top: 0; }
  .logo { grid-column: 2; }
  .lang { display: contents; }
  .lang-btn[data-lang="pt"] { grid-column: 1; grid-row: 1; justify-self: end; }
  .lang-btn[data-lang="en"] { grid-column: 3; grid-row: 1; justify-self: start; }

  .hero { min-height: 0; }
  .hero-bg { background-position: 52% center; }
  .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(0,0,0,.5) 100%); }
  .hero-inner {
    display: flex; flex-direction: column; align-items: center; gap: 22px;
    /* imagem ocupa toda a tela entre o cabeçalho e o rodapé */
    min-height: max(560px, calc(100dvh - 96px - 72px)); max-width: none;
    padding: 36px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
    text-align: center;
  }
  .hero-title, .hero-address, .hero-social { position: static; }
  .hero-title { order: 1; }
  .hero-social { order: 2; margin-top: auto; flex-wrap: wrap; justify-content: center; row-gap: 14px; }
  .hero-address { order: 3; }
  .hero-social > span { width: 100%; }
  .channels-label { top: 0; }
  .social-be { margin-left: 0; }
  .social-yt, .social-ig, .social-mail { margin-left: 40px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 24px; line-height: 26px; }
  .hero-address { font-size: 14px; line-height: 21px; }
  .social-yt, .social-ig, .social-mail { margin-left: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-social a { transition: none; }
}
