/* ============================================================
   TRBJ Transportes — estilos
   Paleta inspirada no padrão Alfa Transportes (base clara +
   acentos), adaptada para transporte: navy + amarelo + vermelho.
   ============================================================ */

:root {
  /* Paleta da marca TRBJ (extraída da identidade visual) */
  --navy: #33455a;        /* azul-ardósia principal (logo/cartão) */
  --navy-2: #26374a;
  --navy-deep: #1b2836;   /* fundo escuro do hero */
  --ink: #223140;
  --gray: #5f6b78;
  --slate: #7e879b;
  --line: #e6e5df;
  --bg: #ffffff;
  --bg-alt: #f4f1ea;      /* areia clara (tom quente da marca) */
  --yellow: #ed9a63;      /* laranja-salmão da marca (acento principal) */
  --orange-2: #e07c3c;    /* laranja mais forte */
  --red: #e07c3c;         /* acento secundário (era vermelho) */
  --white: #ffffff;

  --wrap: 1160px;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(11, 37, 69, .10);
  --shadow-sm: 0 4px 18px rgba(11, 37, 69, .08);

  --f-head: "Barlow Condensed", "Inter", sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }

h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.05; letter-spacing: .01em; }

.eyebrow {
  font-family: var(--f-head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--red);
  font-size: .82rem;
  margin-bottom: 10px;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: var(--navy); text-transform: uppercase; }
.section-sub { color: var(--gray); margin-top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-body); font-weight: 700; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-primary { background: var(--yellow); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--orange-2); }
.btn-navy { background: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.section .btn-ghost, .cta .btn-ghost { color: var(--navy); border-color: var(--navy); }
.section .btn-ghost:hover { background: rgba(11,37,69,.06); }

/* ---------- Header / Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }

.brand { display: flex; align-items: center; line-height: 1; text-decoration: none; }
.brand-logo { height: 50px; width: auto; display: block; }
.brand-mark { font-family: var(--f-head); font-weight: 800; font-size: 1.7rem; color: var(--navy); letter-spacing: .02em; }
.brand-mark-accent { color: var(--red); }
.brand-sub { font-family: var(--f-head); font-weight: 600; font-size: .68rem; letter-spacing: .38em; color: var(--gray); margin-top: 2px; }

.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0; background: var(--yellow); transition: width .2s ease; border-radius: 2px; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.ico { flex: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--navy); border-radius: 2px; transition: .25s; }

.mobile-menu {
  position: fixed; inset: 74px 0 auto 0; z-index: 49;
  background: var(--white); border-bottom: 1px solid var(--line);
  display: none; flex-direction: column; padding: 16px 20px 24px; gap: 6px;
  box-shadow: var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.mobile-menu a.btn { justify-content: center; border-bottom: 0; margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(88vh, 760px);
  display: flex; align-items: center;
  color: var(--white);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: #0f1822 url('../assets/trbj-background.webp?v=3') center 58% / cover no-repeat;
}
/* Vídeo de fundo do topo (definido pelo painel via site-media.js) */
.hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Véu escuro sobre a foto para o globo e o texto se destacarem */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(12,20,30,.72), rgba(12,20,30,.52) 45%, rgba(12,20,30,.8)),
    radial-gradient(60% 60% at 52% 44%, rgba(12,20,30,.1), rgba(12,20,30,.55));
}
/* Globo (three.js) acima do véu, atrás do texto */
.hero-globe { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-globe canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-inner { position: relative; z-index: 4; max-width: 780px; padding: 60px 0; }
.hero-inner .hero-title, .hero-inner .hero-lead, .hero-inner .hero-kicker { text-shadow: 0 2px 24px rgba(11,18,26,.55); }
.hero-kicker { font-family: var(--f-head); letter-spacing: .28em; font-weight: 700; color: var(--yellow); margin-bottom: 16px; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); text-transform: uppercase; }
.hero-title span { color: var(--yellow); }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.9); margin: 22px 0 32px; max-width: 395px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Jornada (steps) ---------- */
.steps { margin-top: -56px; position: relative; z-index: 5; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--white); border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow); border-top: 4px solid var(--yellow);
}
.step-num { font-family: var(--f-head); font-weight: 800; font-size: 2.4rem; color: var(--line); display: block; line-height: 1; }
.step h3 { font-size: 1.4rem; color: var(--navy); margin: 8px 0 8px; text-transform: uppercase; }
.step p { color: var(--gray); font-size: .96rem; }

/* ---------- Quem somos ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; align-items: center; }
.about-media {
  border-radius: var(--radius); min-height: 380px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  position: relative; overflow: hidden;
}
.about-media::after {
  content: "TRBJ"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-head); font-weight: 800; font-size: 4rem; color: rgba(255,255,255,.14); letter-spacing: .1em;
}
/* Quando o painel define uma foto, mostra a imagem e esconde o watermark */
.about-media.has-media { background-size: cover; background-position: center; }
.about-media.has-media::after { display: none; }
.about-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--navy); text-transform: uppercase; margin-bottom: 16px; }
.about-text > p { color: var(--gray); margin-bottom: 22px; }
.about-list { list-style: none; display: grid; gap: 12px; }
.about-list li { padding-left: 30px; position: relative; color: var(--ink); }
.about-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,204,41,.25);
}

/* ---------- Serviços ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-ico {
  width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); margin-bottom: 18px;
}
.service-card h3 { font-size: 1.45rem; color: var(--navy); text-transform: uppercase; margin-bottom: 8px; }
.service-card p { color: var(--gray); font-size: .96rem; }

/* ---------- Números ---------- */
.stats { background: var(--navy); color: var(--white); }
.stats .section-head h2 { color: var(--white); }
.stats .eyebrow { color: var(--yellow); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 20px; border-radius: var(--radius); background: rgba(255,255,255,.05); }
.stat-num { font-family: var(--f-head); font-weight: 800; font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--yellow); display: block; line-height: 1; }
.stat-label { display: block; margin-top: 10px; font-weight: 600; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.stats-note { text-align: center; margin-top: 26px; color: rgba(255,255,255,.5); font-size: .82rem; }

/* ---------- Cobertura ---------- */
.coverage-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 52px; align-items: center; }
.coverage-text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--navy); text-transform: uppercase; margin-bottom: 16px; }
.coverage-text > p { color: var(--gray); margin-bottom: 20px; }
.coverage-list { list-style: none; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 26px; }
.coverage-list li {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font-weight: 600; color: var(--navy);
}
.coverage-media { display: grid; place-items: center; }
.coverage-map {
  width: 100%; max-width: 460px; height: 340px; border: 0; border-radius: 24px;
  box-shadow: var(--shadow);
}

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, var(--yellow), var(--orange-2)); }
.cta-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--navy); text-transform: uppercase; }
.cta-inner p { color: var(--navy); font-size: 1.1rem; margin: 14px 0 28px; font-weight: 500; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .btn-primary { background: var(--navy); color: var(--white); }
.cta .btn-primary:hover { background: var(--navy-2); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.75); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 44px; align-items: start; }
.footer-logo-link { display: inline-block; }
.footer-logo { display: block; width: 200px; height: auto; margin-top: -19px; }
.footer-brand .brand-mark { color: var(--white); }
.footer-brand .brand-sub { color: rgba(255,255,255,.5); }
.footer-legal { margin-top: 16px; font-size: .9rem; line-height: 1.7; }
.footer-col h4 { font-family: var(--f-head); color: var(--white); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; font-size: 1.05rem; }
.footer-col a { display: block; color: rgba(255,255,255,.7); text-decoration: none; padding: 6px 0; font-size: .93rem; }
.footer-col a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ---------- GSAP: estado inicial (evita flash antes do JS) ---------- */
.js .gsap-bloco { opacity: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .steps-grid, .services-grid, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .coverage-grid { grid-template-columns: 1fr; }
  .about-media { min-height: 260px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .steps { margin-top: -40px; }
  .steps-grid, .services-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 auto; justify-content: center; }
  /* Mobile: hero mais baixo e conteúdo mais compacto */
  .hero { min-height: min(68vh, 520px); }
  .hero-inner { padding: 88px 20px; }
  /* Mobile: desloca a imagem/vídeo de fundo do topo para a direita */
  .hero-bg { background-position: 60% -84px; }
  .hero-bg video { object-position: 60% -84px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .gsap-bloco { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Home — Missão, Visão e Valores (mesmo padrão da pág. Quem Somos)
   ============================================================ */
.mvv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mvv-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mvv-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.mvv-ico {
  width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); margin-bottom: 18px;
}
.mvv-card h3 { font-size: 1.45rem; color: var(--navy); text-transform: uppercase; margin-bottom: 8px; }
.mvv-card p { color: var(--gray); font-size: .96rem; line-height: 1.65; }
/* Cards do topo que sobrepõem o hero: flutuam com sombra */
.steps .diff-item { box-shadow: var(--shadow); }

/* ============================================================
   Home — Diferenciais (mesmo padrão da pág. Quem Somos)
   ============================================================ */
.diff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.diff-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.diff-item:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.diff-ico {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(51,69,90,.08); color: var(--navy); margin: 0 auto 18px;
}
.diff-item h3 { font-size: 1.25rem; color: var(--navy); text-transform: uppercase; margin-bottom: 8px; }
.diff-item p { color: var(--gray); font-size: .94rem; line-height: 1.65; }

/* ============================================================
   Home — Serviços (fundo azul escuro, inspirado nos diferenciais)
   ============================================================ */
.svc-dark { background: var(--navy); color: var(--white); }
.svc-dark .section-head h2 { color: var(--white); }
.svc-dark .eyebrow { color: var(--yellow); }
.svc-dark .section-sub { color: rgba(255,255,255,.7); }

.svc-frente { margin-top: 46px; }
.svc-frente:first-of-type { margin-top: 0; }
.svc-frente-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 26px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.svc-frente-ico {
  width: 54px; height: 54px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--yellow); color: var(--navy-deep);
}
.svc-frente-head h3 {
  font-size: clamp(1.35rem, 3vw, 1.9rem); color: var(--white);
  text-transform: uppercase; letter-spacing: .01em;
}

.svc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.svc-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius); padding: 28px 24px; text-align: center;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.svc-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.09); border-color: rgba(237,154,99,.5); }
.svc-card-ico {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center;
  background: rgba(237,154,99,.16); color: var(--yellow);
}
.svc-card h4 {
  font-family: var(--f-head); font-size: 1.16rem; color: var(--white);
  text-transform: uppercase; letter-spacing: .02em; margin-bottom: 8px; line-height: 1.15;
}
.svc-card p { color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.6; }

@media (max-width: 900px) {
  .mvv-grid, .diff-grid, .svc-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mvv-grid, .diff-grid, .svc-cards { grid-template-columns: 1fr; }
  .svc-frente-head h3 { font-size: 1.3rem; }
}

/* ============ CARROSSEL "QUEM SOMOS" ============ */
.qs-carousel { margin-top: 8px; }

/* palco: viewport recuado + setas nas margens livres das laterais */
.qs-stage { position: relative; padding: 0 80px; }
.qs-viewport { overflow: hidden; }
.qs-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4, .1, .2, 1);
  will-change: transform;
}
.qs-slide { flex: 0 0 100%; min-width: 0; }
/* menos espaço entre a foto e o texto do slide */
.qs-slide .about-grid { gap: 30px; }
/* cada slide reusa o layout foto + texto da seção "Quem somos" */
.qs-slide .about-text .eyebrow {
  color: var(--red); font-size: .82rem; line-height: 1.4;
  margin: 0 0 10px; white-space: normal;
}
.qs-slide .about-text p:not(.eyebrow) {
  color: var(--gray); font-size: 1.02rem; line-height: 1.75; margin: 0;
  white-space: pre-line; /* respeita as quebras de linha vindas do CMS */
  text-align: justify;
}
.qs-slide .about-text p:not(.eyebrow) strong { color: var(--ink); }
/* afasta o texto da seta direita (mais respiro no layout de 2 colunas) */
@media (min-width: 901px) {
  .qs-slide .about-text { padding-right: 44px; }
}

/* setas nas laterais dos slides (verticalmente centradas na foto) */
.qs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--white);
  border: 0; cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .2s ease, transform .2s ease;
}
.qs-arrow.qs-prev { left: 4px; }
.qs-arrow.qs-next { right: 4px; }
.qs-arrow:hover { background: var(--yellow); }
.qs-arrow:active { transform: translateY(-50%) scale(.94); }
.qs-arrow:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

/* bolinhas centralizadas abaixo */
.qs-controls { display: flex; justify-content: center; margin-top: 26px; }
.qs-dots { display: flex; align-items: center; gap: 9px; }
.qs-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line); border: 0; padding: 0; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.qs-dot:hover { background: var(--slate); }
.qs-dot.is-active { background: var(--yellow); transform: scale(1.25); }

/* telas menores: reduz a margem lateral e o tamanho das setas */
@media (max-width: 900px) {
  .qs-stage { padding: 0 46px; }
  .qs-arrow { width: 40px; height: 40px; }
  .qs-arrow.qs-prev { left: 2px; }
  .qs-arrow.qs-next { right: 2px; }
}
@media (max-width: 480px) {
  .qs-stage { padding: 0 40px; }
  .qs-arrow { width: 36px; height: 36px; }
}

/* mobile: setas descem para a linha das bolinhas, uma de cada lado */
@media (max-width: 560px) {
  .qs-carousel { position: relative; }
  .qs-stage { position: static; padding: 0; }
  .qs-arrow {
    top: auto; bottom: 0; transform: none;
    width: 38px; height: 38px;
  }
  .qs-arrow.qs-prev { left: 50%; right: auto; margin-left: -92px; }
  .qs-arrow.qs-next { right: 50%; left: auto; margin-right: -92px; }
  .qs-arrow:active { transform: scale(.94); }
  .qs-controls { margin-top: 22px; min-height: 38px; align-items: center; }
}
