/* =========================================================
   pages/home.css — index.html (hero, new-navbar, sobre, serviços)
   ========================================================= */

/* ===== Hero (fica fixo e as seções seguintes sobem por cima) ===== */
.hero {
  position: sticky;
  top: 0%;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  min-height: 440px;
  padding: calc(var(--barra) + 2rem) 1rem 2rem;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: var(--navy)
    url("https://www.pensar360.com.br/wp-content/uploads/2024/11/DJI_0019-scaled.jpg")
    center / cover;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: scale(0.8);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.hero ~ section {
  position: relative;
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo {
    opacity: 1;
    animation: none;
  }
  .hero-video {
    display: none;
  }
}
@media (max-height: 480px) {
  .hero {
    position: relative;
    top: 0;
  }
}

/* ===== Sobre (texto + mockups de tablet e celular) ===== */
.sobre {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: 3% 4%;
  background: #fff;
}
.sobre h2 {
  margin-bottom: 1.5rem;
  font: 800 clamp(1.9rem, 4vw, 2.4rem) / 1.1 var(--f-title);
  text-transform: uppercase;
}
.sobre p {
  font-size: 1.2rem;
  color: #3b4752;
}

/* ===== Serviços ===== */
.servicos {
  display: flex;
  flex-direction: column;
  gap: 50px;
  padding: 5%;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(5, 14, 26, 0.8), rgba(5, 14, 26, 0.9)),
    url("https://www.pensar360.com.br/wp-content/uploads/2024/11/DJI_0154-scaled.jpg");
  background-size: cover;
  background-position: center;
}
.servicos-topo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 42px;
}
.icon-boxes {
  display: flex;
  gap: 5%;
}
.icon-box {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 2rem 1.25rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.icon-box i {
  font-size: 2.6rem;
}
.icon-box h3 {
  font: 800 18px/1 var(--f-title);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #14202e;
}
.icon-box p {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ===== Chamada para vídeos (home) ===== */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 8% 5%;
  text-align: center;
  background: var(--navy)
    url("https://www.pensar360.com.br/wp-content/uploads/2024/11/DJI_0067-scaled.jpg")
    center / cover;
}
.cta-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(5, 14, 26, 0.55), rgba(5, 14, 26, 0.78));
}
.cta .titulo,
.cta .texto {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

/* ===== new-navbar (barra que sobe sobre o hero e depois gruda no topo) ===== */
.new-navbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%; /* logo abaixo da barra */
  height: 15px;
  background: linear-gradient(rgba(0, 0, 0, 0.2), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.new-navbar.sticky-ativo::after {
  opacity: 1;
}

.new-navbar {
  z-index: 5;
  position: relative;
  height: var(--barra);
  inset: 0;
  border-top: 3px solid transparent;
  background:
    linear-gradient(rgb(204, 204, 204), rgb(255 255 255)) padding-box,
    border-box;
  background-repeat: no-repeat;
  background-position: left top;
  /* estado inicial: fundo normal, borda com largura 0 */
  background-size:
    100% 100%,
    0% 100%;
  transition: background-size 0.8s ease;
}
.new-navbar.sticky-ativo {
  position: sticky;
  top: 0;
}

.sub-navbar {
  display: flex;
  align-items: center;
  margin-top: -3px;
  height: calc(var(--barra) - 1vh);
  width: 27%;
  border-radius: 0 0 3rem 0;
  background: transparent;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

/* ===== Serviços: cards ===== */
.servicos {
  align-items: center;
}
.servicos-topo {
  width: 100%;
}
/* (hover dos cards: classe .card-grad em main.css) */

/* ===== Responsivo ===== */
@media (max-width: 1024px) {
  .icon-boxes {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }
  .icon-box {
    flex: 0 0 45%;
  }
}
@media (max-width: 767px) {
  .hero {
    min-height: 440px;
  }
  .icon-box {
    flex-basis: 100%;
  }
  .sobre {
    padding: 80px 5%;
  }
  .servicos {
    gap: 48px;
  }
}

/* ===== Hero: chamadas principais sobre o vídeo ===== */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(3, 20, 39, 0.55),
    rgba(3, 20, 39, 0.3) 45%,
    rgba(3, 20, 39, 0.72)
  );
  pointer-events: none;
}
.hero-video {
  z-index: 0;
}
.hero-conteudo {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  max-width: 860px;
}
.hero-conteudo .eyebrow {
  margin: 0;
}
.hero-conteudo h1 {
  font: 800 clamp(2rem, 5.2vw, 3.5rem) / 1.08 var(--f-title);
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.hero-texto {
  max-width: 640px;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.hero-acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-height: 600px) {
  .hero {
    height: auto;
    min-height: 100vh;
  }
}

/* ===== Sobre: mockups de tablet e celular ===== */
.mockups {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
  padding-bottom: 3rem;
}
.mock-tablet,
.mock-celular {
  background: linear-gradient(145deg, #1f2d3a, #0a1118);
  box-shadow:
    0 30px 60px rgba(20, 32, 46, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.mock-tablet {
  width: min(100%, 520px);
  aspect-ratio: 4 / 3;
  padding: 14px;
  border-radius: 26px;
  transform: rotate(-3deg);
}
.mock-tela {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}
.mock-tela img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mock-tela::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.2),
    transparent 40%
  );
  pointer-events: none;
}
.mock-celular {
  position: absolute;
  right: 2%;
  bottom: 0;
  width: min(34%, 190px);
  aspect-ratio: 9 / 18.5;
  padding: 8px;
  border-radius: 30px;
  transform: rotate(4deg);
  animation: flutuar 6s ease-in-out infinite;
}
.mock-celular .mock-tela {
  border-radius: 22px;
}
.mock-notch {
  position: absolute;
  top: 13px;
  left: 50%;
  z-index: 2;
  width: 34%;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: #05090e;
}
@keyframes flutuar {
  0%,
  100% {
    transform: translateY(0) rotate(4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

/* ===== Serviços: títulos e cards sobre a imagem de fundo ===== */
.servicos .titulo {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.servicos .icon-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-borda, rgba(255, 255, 255, 0.2));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.servicos .icon-box h3 {
  color: #fff;
}
.servicos .icon-box p {
  color: rgba(255, 255, 255, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .cta-video {
    display: none;
  }
}
@media (max-width: 900px) {
  .sobre {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mockups {
    min-height: 340px;
  }
}

/* ===== Serviços: cada card com uma cor, na sequência vermelho, laranja, amarelo, verde ===== */
.icon-box.cor-vermelho {
  --card-bg: linear-gradient(135deg, #e53935, #a61c1a);
  --card-barra: linear-gradient(90deg, #ff8a80, #e53935);
  --card-icone: linear-gradient(135deg, #ff8a80, #e53935);
  --card-borda: rgba(255, 138, 128, 0.5);
}
.icon-box.cor-laranja {
  --card-bg: linear-gradient(135deg, #fb8c00, #c25e00);
  --card-barra: linear-gradient(90deg, #ffb74d, #fb8c00);
  --card-icone: linear-gradient(135deg, #ffb74d, #fb8c00);
  --card-borda: rgba(255, 183, 77, 0.5);
}
.icon-box.cor-amarelo {
  --card-bg: linear-gradient(135deg, #fdd835, #d4a500);
  --card-barra: linear-gradient(90deg, #fff176, #fdd835);
  --card-icone: linear-gradient(135deg, #fff176, #fdd835);
  --card-borda: rgba(255, 241, 118, 0.55);
  --card-texto: #14202e; /* texto escuro sobre o amarelo */
  --card-sombra: none;
}
.icon-box.cor-verde {
  --card-bg: linear-gradient(135deg, #43a047, #2e7d32);
  --card-barra: linear-gradient(90deg, #81c784, #43a047);
  --card-icone: linear-gradient(135deg, #81c784, #43a047);
  --card-borda: rgba(129, 199, 132, 0.5);
}
