/* ============================================================
   BRAINESTAR CAMPINAS — LP Styles
   Faithfully replicates the layout of brainestar.com.br/unidades/campinas/
   Font: Roboto | Colors: white bg, dark (#32373c) buttons, grad accent
   ============================================================ */

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
address { font-style: normal; }

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --color-dark:    #32373c;
  --color-grad:    linear-gradient(135deg, rgb(6,147,227) 0%, rgb(155,81,224) 100%);
  --color-cyan:    #0693e3;
  --color-purple:  #9b51e0;
  --color-text:    #333333;
  --color-text-2:  #555555;
  --color-white:   #ffffff;
  --color-border:  #e8e8e8;
  --color-light-bg:#f7f7f7;

  --max-w:         1200px;
  --max-w-narrow:  820px;
  --section-py:    80px;
  --section-px:    24px;
  --radius:        4px;
}

/* ── SELECTION ───────────────────────────────────────────── */
::selection { background: rgba(6,147,227,.18); }

/* ── CONTAINER ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px);
}
.container--narrow {
  max-width: var(--max-w-narrow);
}

/* ── HEADING VARIANTS ────────────────────────────────────── */
.heading--blue { color: var(--color-cyan) !important; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .18s;
  white-space: nowrap;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--dark {
  background: var(--color-dark);
  color: #fff;
}

.btn--purple {
  background: #6c0fc5;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 14px 28px;
  border-radius: 4px;
  gap: 10px;
}
.btn--purple:hover { background: #7d1ad6; opacity: 1; }

.btn--icon { gap: 10px; }

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  box-shadow: none;
  transition: background .3s ease, box-shadow .3s ease;
}
.header.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
/* Nav links white when transparent (over hero) */
.header:not(.scrolled) .header__nav-link,
.header:not(.scrolled) .header__logo { filter: brightness(0) invert(1); }
.header:not(.scrolled) .header__hamburger span { background: #fff; }

.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.header__logo img { height: 44px; width: auto; }

.header__nav {
  margin-left: auto;
}
.header__nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}
.header__nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: color .18s;
  position: relative;
}
.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-grad);
  transition: width .22s;
}
.header__nav-link:hover { color: var(--color-cyan); }
.header__nav-link:hover::after,
.header__nav-link[aria-current="true"]::after { width: 100%; }

.header__cta {
  display: inline-flex;
  align-items: center;
  background: var(--color-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  transition: opacity .2s;
  flex-shrink: 0;
}
.header__cta:hover { opacity: .85; }

/* ── HAMBURGER ───────────────────────────────────────────── */
.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 4px;
  margin-left: auto;
}
.header__hamburger span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform .28s, opacity .2s;
}
.header__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__hamburger.open span:nth-child(2) { opacity: 0; }
.header__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE MENU ─────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 999;
  padding: 24px var(--section-px) 32px;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: transform .25s, opacity .25s, visibility .25s;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-menu nav ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-menu nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  transition: color .18s;
}
.mobile-menu nav a:hover { color: var(--color-cyan); }
.mobile-menu__cta {
  display: inline-flex;
  background: var(--color-dark);
  color: #fff !important;
  font-size: 14px !important;
  padding: 12px 24px;
  border-radius: var(--radius);
  margin-top: 4px;
}

/* ── SECTIONS BASE ───────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
}
.section--white { background: #fff; }

/* Headings inside sections */
.section h2 {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 20px;
}
.section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.section p { color: var(--color-text-2); margin-bottom: 12px; }
.section p:last-child { margin-bottom: 0; }

.section__heading-center {
  text-align: center;
  margin-bottom: 16px;
}
.section__sub-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
  color: var(--color-text-2);
}

/* ── TWO-COLUMN LAYOUT ───────────────────────────────────── */
.cols {
  display: grid;
  align-items: center;
  gap: 60px;
}
.cols--2 { grid-template-columns: 1fr 1fr; }
.cols--valign-stretch { align-items: stretch; }

.col--img img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Mapeamento & Tratamento column text vertically centered */
.col--mapeamento-text,
.col--tratamento-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.col--mapeamento-text h2,
.col--tratamento-text h2 { margin-bottom: 8px; }

/* Saúde column text */
.col--saude-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.col--saude-text h2 { margin-bottom: 20px; }
.col--saude-text .btn { margin-top: 24px; align-self: flex-start; }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.42);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px var(--section-px) 80px;
  width: 100%;
}

.hero__sub {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,.9);
  margin-bottom: 14px;
  letter-spacing: .01em;
}

.hero__title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 36px;
  letter-spacing: -.01em;
}

/* ── SOBRE – CONHEÇA A BRAINESTAR ────────────────────────── */
/* First real section needs top padding to clear the fixed header on mobile */
#sobre { scroll-margin-top: 72px; }

/* Inherits .cols--2: left=text, right=img */
#sobre .col:first-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
#sobre .col:first-child h2 { margin-bottom: 8px; }

/* ── MAPEAMENTO & TRATAMENTO (narrow, left-aligned) ─────── */
#sobre ~ .section .container--narrow h2 { margin-bottom: 16px; }

/* ── PROCESSO – COMO FUNCIONA ────────────────────────────── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: box-shadow .22s, transform .22s;
}
.process-step:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  transform: translateY(-4px);
}

.process-step__icon {
  margin: 0 0 16px;
  line-height: 0;
}
.process-step__icon img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.process-step__content h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.process-step__content p {
  font-size: 13px;
  color: var(--color-text-2);
  line-height: 1.6;
}

/* ── ÁREAS DE ATUAÇÃO ────────────────────────────────────── */
.section--areas {
  background: #1b0f42;
}
.section--areas .section__heading-center {
  color: #fff;
}
.section--areas .section__sub-center {
  color: rgba(255,255,255,.75);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.area-card {
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  transition: background .22s, border-color .22s;
  cursor: default;
}
.area-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.8);
}
.area-card h2 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── SAÚDE E BEM-ESTAR (2-col) ───────────────────────────── */
/* layout handled by .col--saude-text above */

/* ── FULL-BG SECTIONS (Mapeamento, Tratamento) ───────────── */
/* Image covers the entire section, text overlaid on top */
.section--bg-full {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.section__bg-img {
  position: absolute;
  inset: 0;
}
.section__bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.section--bg-full .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Text block: left-aligned (Mapeamento) or right-aligned (Tratamento) */
.section__text-overlay {
  max-width: 48%;
  padding: 80px 0;
}
.section__text-overlay--left  { margin-right: auto; }
.section__text-overlay--right { margin-left: auto; }

.section__text-overlay--white h2 { color: #fff !important; }
.section__text-overlay--white p  { color: rgba(255,255,255,.88) !important; }

.section__text-overlay h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 20px;
}
.section__text-overlay p {
  color: var(--color-text-2);
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.7;
}

/* ── SEU CÉREBRO CUIDADO – EQUIPE ────────────────────────── */
.section--equipe {
  padding: 0;
  background: #c07840;
}
.section--equipe .container { padding: 0; max-width: 100%; }
.section--equipe .cols { gap: 0; grid-template-columns: 1fr 1fr; align-items: stretch; }

/* Text columns internal padding */
.col--mapeamento-text,
.col--tratamento-text,
.col--saude-text {
  padding: 72px 80px;
}

/* Photo column: image fills full height */
.col--equipe-photo {
  overflow: hidden;
  min-height: 480px;
}
.col--equipe-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 0;
}

/* Legacy col--bg (kept for compatibility) */
.col--bg {
  min-height: 480px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.col--text-equipe {
  padding: 60px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: transparent;
}
.col--text-equipe h2 {
  color: #fff;
  margin-bottom: 8px;
}
.col--text-equipe p { color: rgba(255,255,255,.88); }
.col--text-equipe .btn { margin-top: 12px; align-self: flex-start; }

/* ── DESCUBRA COMO POTENCIALIZAR ────────────────────────── */
.col--cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding-right: 32px;
}
.col--cta h2 { margin-bottom: 0; }

/* ── LOCALIZAÇÃO ─────────────────────────────────────────── */
#localizacao h2 { margin-bottom: 32px; }

.map-wrapper {
  overflow: hidden;
}
.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--color-dark);
  color: #fff;
  padding: 60px 0 0;
  text-align: center;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px) 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer__logo-wrap img {
  margin: 0 auto;
  max-width: 120px;
  height: auto;
}

.footer__title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.footer__address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  max-width: 480px;
  text-align: left;
}
.footer__address svg {
  flex-shrink: 0;
  margin-top: 3px;
  fill: rgba(255,255,255,.6);
}

.footer__social { margin-top: 8px; }
.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: background .2s;
}
.footer__social-link:hover { background: rgba(255,255,255,.22); }

.footer__bottom {
  background: rgba(0,0,0,.2);
  padding: 16px var(--section-px);
  text-align: center;
}
.footer__bottom p {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin: 0;
}

/* ── VIDEO LIGHTBOX ──────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.lightbox__close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s;
}
.lightbox__close:hover { opacity: .7; }

.lightbox__video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.lightbox__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── REVEAL ANIMATIONS (subtle) ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── FOCUS ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 3px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .areas-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  :root { --section-py: 56px; }

  .header__nav, .header__cta { display: none; }
  .header__hamburger { display: flex; }

  .hero {
    min-height: 420px;
  }

  /* All two-column sections stack */
  .cols--2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Full-bg sections: text takes full width on mobile */
  .section__text-overlay { max-width: 100%; padding: 48px 0; }

  /* Equipe stacks */
  .section--equipe .cols { grid-template-columns: 1fr; }
  .col--equipe-photo { min-height: 300px; }
  .col--text-equipe { padding: 40px 32px; }

  /* Saúde stacks */
  .section--saude .cols { grid-template-columns: 1fr; gap: 32px; }
  .col--mapeamento-text,
  .col--tratamento-text,
  .col--saude-text { padding: 48px 32px; }

  .col--cta { padding-right: 0; }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 600px) {
  :root { --section-py: 44px; }

  .hero { min-height: 360px; }
  .hero__title { font-size: 32px; }

  .process-steps {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .col--equipe-photo { min-height: 260px; }
  .col--text-equipe { padding: 32px var(--section-px); }
  .col--saude-text { padding: 40px var(--section-px); }
  .col--saude-text .btn { align-self: center; }
  .section__text-overlay { padding: 40px 0; }

  .footer__address { text-align: center; flex-direction: column; align-items: center; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  .header, .lightbox { display: none; }
  body { background: #fff; color: #000; }
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── WHATSAPP FAB ─────────────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
