/* ==========================================================================
   Transformare Bambini — Redesign Geral
   Camada de estilos exclusiva (prefixo "tb-") carregada por último,
   para refrescar o layout inteiro sem exigir a remoção do CSS antigo.
   ========================================================================== */

:root {
  --tb-primary: #1b1668;
  --tb-primary-light: #352d99;
  --tb-accent: #ff8a3d;
  --tb-accent-dark: #e86f1f;
  --tb-bg-soft: #f5f6fb;
  --tb-text: #2b2b38;
  --tb-text-light: #6b6b7b;
  --tb-white: #ffffff;
  --tb-radius-lg: 24px;
  --tb-radius-md: 16px;
  --tb-radius-sm: 10px;
  --tb-shadow-sm: 0 4px 14px rgba(27, 22, 104, 0.08);
  --tb-shadow-md: 0 12px 32px rgba(27, 22, 104, 0.14);
  --tb-shadow-lg: 0 20px 48px rgba(27, 22, 104, 0.18);
  --tb-gap: clamp(1rem, 2vw, 2rem);
  --tb-section-pad: clamp(3rem, 6vw, 6rem);
}

/* --------------------------------------------------------------------
   Base / Tipografia
   -------------------------------------------------------------------- */
body {
  font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif !important;
  color: var(--tb-text) !important;
  background-color: var(--tb-white) !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 700 !important;
  color: var(--tb-primary) !important;
  letter-spacing: -0.01em;
}

hr {
  border: none !important;
  border-top: 3px solid var(--tb-accent) !important;
  width: 72px !important;
  margin: 0.75rem auto 1.5rem !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------
   Botão flutuante do WhatsApp
   -------------------------------------------------------------------- */
.btn-flutuante-whatsapp {
  position: fixed !important;
  bottom: 24px;
  right: 24px;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  box-shadow: var(--tb-shadow-lg) !important;
  z-index: 999;
  transition: transform 0.25s ease;
}

.btn-flutuante-whatsapp:hover {
  transform: scale(1.08);
}

/* --------------------------------------------------------------------
   Seção 1 — Hero (Matrículas Abertas)
   -------------------------------------------------------------------- */
.parte1 {
  /* background: linear-gradient(135deg, var(--tb-primary) 0%, var(--tb-primary-light) 100%) !important; */
  background: #fff;
  padding: var(--tb-section-pad) 1rem !important;
  color: #352d99;
  position: relative;
  overflow: hidden;
}

/* .parte1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
} */

.parte1 h1 {
  color: #352d99 !important;
  font-size: clamp(1.9rem, 4vw, 3rem) !important;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.parte1 h2 {
  color: #352d99 !important;
  font-weight: 400 !important;
  font-size: clamp(1rem, 2vw, 1.4rem) !important;
  margin-bottom: 2rem;
}

.btn-whatsapp {
  background: var(--tb-accent) !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 0 !important;
  box-shadow: var(--tb-shadow-md) !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-whatsapp:hover {
  background: var(--tb-accent-dark) !important;
  transform: translateY(-2px);
}

.btn-whatsapp .link-whatsapp {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  color: var(--tb-white) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  padding: 0.9rem 1.8rem !important;
}

/* --------------------------------------------------------------------
   Seção 2 — Sobre Nós
   -------------------------------------------------------------------- */
.parte2 {
  padding: var(--tb-section-pad) 1rem !important;
  background-color: var(--tb-white) !important;
}

.parte2 h3 {
  font-size: clamp(1.4rem, 3vw, 2rem) !important;
}

.parte2 p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--tb-text-light) !important;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* --------------------------------------------------------------------
   Seção 3 — Segmentos
   -------------------------------------------------------------------- */
.parte3 {
  padding: 0 1rem var(--tb-section-pad) !important;
  background-color: var(--tb-bg-soft) !important;
}

.parte3 h3 {
  margin-bottom: 2rem !important;
}

.segmento {
  position: relative;
  overflow: hidden;
  border-radius: var(--tb-radius-md);
  margin: 0 8px 16px;
  box-shadow: var(--tb-shadow-sm);
}

.segmento .image {
  display: block;
  transition: transform 0.5s ease;
  filter: saturate(1.05);
}

.segmento:hover .image {
  transform: scale(1.07);
}

.segmento .overlay {
  position: absolute !important;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(0deg, rgba(27, 22, 104, 0.85) 0%, rgba(27, 22, 104, 0) 55%) !important;
  padding-bottom: 1.5rem;
}

.segmento .segmen.text {
  color: var(--tb-white) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
}

/* --------------------------------------------------------------------
   Seção 4 — Contato / Formulário
   -------------------------------------------------------------------- */
.parte4 {
  background-color: var(--tb-white) !important;
  padding: var(--tb-section-pad) 1rem !important;
}

.parte4 h3 {
  margin-bottom: 1.25rem !important;
}

.parte4 p {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--tb-text) !important;
  font-size: 1rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.parte4 iframe[src*="google.com/maps"] {
  box-shadow: var(--tb-shadow-md) !important;
}

.fundo-form {
  background-color: var(--tb-bg-soft) !important;
  border-radius: var(--tb-radius-lg) !important;
  box-shadow: var(--tb-shadow-md) !important;
}

.btn-voltar {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  color: var(--tb-primary) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.btn-voltar:hover {
  color: var(--tb-accent-dark) !important;
}

/* ==========================================================================
   GALERIA DE FOTOS — LAYOUT MOSAIC
   Classes exclusivas: tb-gallery, tb-gallery__*, tb-mosaic, tb-mosaic__*
   ========================================================================== */

.tb-gallery {
  padding: var(--tb-section-pad) 1rem !important;
  background-color: var(--tb-bg-soft) !important;
}

.tb-gallery__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.tb-gallery__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tb-accent-dark);
  background: rgba(255, 138, 61, 0.12);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.tb-gallery__title {
  font-size: clamp(1.5rem, 3vw, 2.1rem) !important;
  color: var(--tb-primary) !important;
  margin-bottom: 0.5rem !important;
}

.tb-gallery__subtitle {
  color: var(--tb-text-light);
  font-size: 1rem;
  line-height: 1.6;
}

/* Grid mosaico: 4 colunas, altura de linha fixa, itens ocupando
   diferentes quantidades de colunas/linhas para criar o efeito mosaico. */
.tb-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.tb-mosaic__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--tb-radius-sm);
  box-shadow: var(--tb-shadow-sm);
  grid-column: span 1;
  grid-row: span 1;
}

/* padrão de mosaico — repete a cada 8 itens */
.tb-mosaic__item:nth-child(8n + 1) {
  grid-column: span 2;
  grid-row: span 2;
}

.tb-mosaic__item:nth-child(8n + 4) {
  grid-row: span 2;
}

.tb-mosaic__item:nth-child(8n + 6) {
  grid-column: span 2;
}

.tb-mosaic__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.tb-mosaic__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(27, 22, 104, 0.55) 0%, rgba(27, 22, 104, 0) 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tb-mosaic__icon {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: var(--tb-white);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 2;
}

.tb-mosaic__item:hover .tb-mosaic__img {
  transform: scale(1.1);
}

.tb-mosaic__item:hover::after,
.tb-mosaic__item:hover .tb-mosaic__icon {
  opacity: 1;
  transform: translateY(0);
}

/* Responsivo: reduz para 2 colunas no tablet e 1 no celular,
   simplificando o padrão de mosaico para manter a legibilidade. */
@media (max-width: 900px) {
  .tb-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }

  .tb-mosaic__item:nth-child(8n + 6) {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .tb-mosaic {
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 200px;
    gap: 10px;
  }

  .tb-mosaic__item,
  .tb-mosaic__item:nth-child(8n + 1),
  .tb-mosaic__item:nth-child(8n + 4),
  .tb-mosaic__item:nth-child(8n + 6) {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* --------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------- */
footer {
  padding: 1rem 0 !important;
}

footer h2 {
  color: var(--tb-white) !important;
}

footer .icon {
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

footer .icon:hover {
  transform: translateY(-4px);
  opacity: 1;
}

footer .linkrodape {
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer p a {
  text-decoration: underline;
}