/* ==========================================================================
   Rocha Reis Advocacia — Redesign estrutural
   Paleta 100% preservada: maroon #810000 / #2a0000 / #6c0000, branco #fff,
   texto #232323. Nada de cor nova — só estrutura, espaçamento, tipografia
   e composição.
   ========================================================================== */

:root {
  --rr-maroon: #810000;
  --rr-maroon-dark: #2a0000;
  --rr-maroon-card: #6c0000;
  --rr-ink: #232323;
  --rr-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------
   Tipografia — escala editorial, mais peso nos títulos
   -------------------------------------------------------------------- */
.mbr-section-title {
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.mbr-text {
  line-height: 1.85;
}

h4.mbr-section-title,
h3.mbr-section-title {
  position: relative;
  padding-bottom: 1.1rem;
  margin-bottom: 1.4rem !important;
}

h4.mbr-section-title::after,
h3.mbr-section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 3px;
  background: var(--rr-maroon);
}

.align-center h4.mbr-section-title::after,
.align-center h3.mbr-section-title::after {
  left: 50%;
}

/* --------------------------------------------------------------------
   NAVBAR — transparente sobre o hero, sólida com blur ao rolar
   -------------------------------------------------------------------- */
.navbar-dropdown {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.35s var(--rr-ease), box-shadow 0.35s var(--rr-ease), border-color 0.35s ease, backdrop-filter 0.35s ease;
}

/* compensa a navbar fixa: empurra o conteúdo da primeira seção pra baixo,
   exceto no hero fullscreen que já ocupa a tela inteira */
body {
  padding-top: 0;
}

section.menu + section.header6:not(.mbr-fullscreen) {
  padding-top: 6rem;
}

.navbar .navbar-brand img {
  transition: transform 0.3s var(--rr-ease);
}

.navbar-nav .nav-link {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.35rem;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--rr-ease), opacity 0.25s ease;
}

.navbar-nav .nav-item:not(.dropdown) > .nav-link:hover::after {
  opacity: 0.85;
  transform: scaleX(1);
}

.navbar-buttons .btn {
  border-width: 2px !important;
}

/* --------------------------------------------------------------------
   BOTÕES — mais geométricos, com elevação e feedback de toque
   -------------------------------------------------------------------- */
.btn {
  border-radius: 3px !important;
  padding: 0.85rem 2rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.82rem !important;
  transition: transform 0.2s var(--rr-ease), box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.btn-primary,
.btn-danger {
  box-shadow: 0 10px 24px -8px rgba(129, 0, 0, 0.55) !important;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-white-outline:hover,
.btn-black-outline:hover {
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35);
}

.btn:active {
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------
   HERO (header6.mbr-fullscreen) — composição editorial assimétrica
   -------------------------------------------------------------------- */
.header6.mbr-fullscreen {
  display: flex;
  align-items: center;
}

.header6.mbr-fullscreen .mbr-overlay {
  background: linear-gradient(115deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(129, 0, 0, 0.35) 100%) !important;
}

.header6.mbr-fullscreen .container-fluid {
  width: 100%;
}

.header6.mbr-fullscreen .row.justify-content-center {
  justify-content: flex-start !important;
}

.header6.mbr-fullscreen .col-12.col-lg-10,
.header6.mbr-fullscreen .col-12.col-lg-9 {
  max-width: 780px;
  padding-left: clamp(1.5rem, 6vw, 6rem);
  text-align: left !important;
  border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.header6.mbr-fullscreen .align-center {
  text-align: left !important;
}

.header6.mbr-fullscreen h1 {
  font-size: clamp(2.3rem, 5vw, 4.2rem) !important;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.header6.mbr-fullscreen p.mbr-text {
  max-width: 46ch;
  font-size: 1.15rem;
  opacity: 0.92;
}

.header6.mbr-fullscreen .mbr-section-btn {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-start !important;
}

/* indicador decorativo de rolagem (puramente geométrico, via CSS) */
.header6.mbr-fullscreen::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  transform: translateX(-50%);
  pointer-events: none;
}

.header6.mbr-fullscreen::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2.85rem;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: rrScrollDot 1.8s ease-in-out infinite;
  z-index: 2;
}

@keyframes rrScrollDot {
  0%, 100% { transform: translate(-50%, 0); opacity: 1; }
  50% { transform: translate(-50%, 10px); opacity: 0.3; }
}

/* entrada suave do conteúdo do hero */
.header6.mbr-fullscreen h1,
.header6.mbr-fullscreen p.mbr-text,
.header6.mbr-fullscreen .mbr-section-btn {
  animation: rrRise 0.9s var(--rr-ease) both;
}
.header6.mbr-fullscreen p.mbr-text { animation-delay: 0.12s; }
.header6.mbr-fullscreen .mbr-section-btn { animation-delay: 0.24s; }

@keyframes rrRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------
   HEADER6 usado como faixa de CTA (não fullscreen) — efeito parallax
   -------------------------------------------------------------------- */
.header6:not(.mbr-fullscreen) {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

@media (min-width: 992px) {
  .header6:not(.mbr-fullscreen) {
    background-attachment: fixed;
  }
}

.header6:not(.mbr-fullscreen) .mbr-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(129, 0, 0, 0.55)) !important;
}

.header6:not(.mbr-fullscreen) h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem) !important;
}

.header6:not(.mbr-fullscreen) .mbr-section-btn {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------
   FEATURES18 (texto institucional longo) — layout editorial em colunas
   -------------------------------------------------------------------- */
.features18 {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.features18 .card-wrapper,
.features18 .card {
  position: relative;
  padding: clamp(1.8rem, 4vw, 3.2rem) clamp(1.8rem, 5vw, 3.6rem);
  border-left: 4px solid var(--rr-maroon);
  background: #fff;
}

.features18 .card-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

.features18 p.mbr-text {
  max-width: 62ch;
}

.features18 .mbr-section-btn {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------
   FEATURES3 — grade de áreas de atuação, cartões elevados
   -------------------------------------------------------------------- */
.features3 {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.features3 .mbr-section-head {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.features3 .row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.features3 .item {
  display: flex;
  margin-bottom: 2rem;
}

.features3 .item-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s var(--rr-ease), box-shadow 0.3s ease;
}

.features3 .item-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.22);
}

.features3 .item-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.features3 .item-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
}

.features3 .item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--rr-ease);
}

.features3 .item-wrapper:hover .item-img img {
  transform: scale(1.06);
}

.features3 .item-content {
  padding: 1.6rem 1.7rem 0.4rem;
  border-top: 3px solid var(--rr-maroon);
  flex: 1;
}

.features3 .item-title {
  font-size: 1.25rem;
}

.features3 .item-subtitle {
  color: var(--rr-maroon);
  opacity: 1;
}

.features3 .item-footer {
  padding: 1.2rem 1.7rem 1.7rem;
  margin-top: auto !important;
}

.features3 .item-footer .btn {
  width: 100%;
}

/* --------------------------------------------------------------------
   TEAM1 (cards com foto + nome sobreposto) — placa com scrim
   -------------------------------------------------------------------- */
.team1 .item-wrapper {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.35);
}

.team1 .image-wrap {
  position: relative;
}

.team1 .image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 78%, rgba(42, 0, 0, 0.9) 100%);
}

.team1 .image-wrap img {
  display: block;
  width: 100%;
}

.team1 .content-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.6rem 1.6rem 1.8rem;
  z-index: 2;
}

.team1 .content-wrap .mbr-section-title,
.team1 .content-wrap .mbr-role {
  color: #fff !important;
}

.team1 .content-wrap .mbr-role {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.15rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem !important;
}

.team1 .card-text {
  color: rgba(255, 255, 255, 0.9) !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--rr-ease), opacity 0.3s ease, margin 0.4s ease;
}

.team1 .item-wrapper:hover .card-text,
.team1 .item-wrapper:focus-within .card-text {
  max-height: 220px;
  opacity: 1;
  margin-top: 0.6rem;
}

.team1 .card-btn {
  margin-top: 0.9rem;
}

/* --------------------------------------------------------------------
   TEAM2 (foto ao lado do texto) — mais ar, régua decorativa
   -------------------------------------------------------------------- */
.team2 .item-wrapper {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.team2 .item:last-child .item-wrapper {
  border-bottom: none;
}

.team2 .image-wrapper img {
  border-radius: 6px;
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.3);
}

.team2 .card-box {
  position: relative;
  padding-left: 1.6rem;
}

.team2 .card-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 3px;
  background: var(--rr-maroon);
}

.team2 .card-subtitle {
  color: var(--rr-maroon);
}

/* --------------------------------------------------------------------
   CONTENT16 (FAQ) — acordeão plano, sem caixas
   -------------------------------------------------------------------- */
.content16 .accordion {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.content16 .card {
  border: none !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  margin-bottom: 0 !important;
  background: transparent;
}

.content16 .card-header {
  background: transparent;
  border: none;
  padding: 0;
}

.content16 .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0.2rem;
  transition: opacity 0.2s ease;
}

.content16 .panel-title:hover {
  opacity: 0.7;
}

.content16 .panel-title-edit {
  color: var(--rr-ink);
}

.content16 .sign {
  flex-shrink: 0;
  color: var(--rr-maroon);
  transition: transform 0.3s var(--rr-ease);
}

.content16 .panel-title[aria-expanded="true"] .sign {
  transform: rotate(180deg);
}

.content16 .panel-body {
  padding: 0 0.2rem 1.5rem;
}

/* --------------------------------------------------------------------
   FORM5 (formulário de contato) — cartão com régua e inputs modernos
   -------------------------------------------------------------------- */
.mbr-form {
  padding: clamp(1.8rem, 4vw, 3rem);
  background: #fff;
  border-top: 4px solid var(--rr-maroon);
  border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.2);
}

.mbr-form .form-control {
  border: none !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.15) !important;
  border-radius: 0 !important;
  padding: 0.9rem 0.2rem !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: border-color 0.25s ease;
}

.mbr-form .form-control:focus {
  border-bottom-color: var(--rr-maroon) !important;
  box-shadow: none !important;
}

.mbr-form .form-control::placeholder {
  color: rgba(35, 35, 35, 0.55);
}

.mbr-form button[type="submit"] {
  width: 100%;
}

/* --------------------------------------------------------------------
   CONTACTS2 (WhatsApp / telefone / e-mail / horário) — mosaico
   -------------------------------------------------------------------- */
.contacts2 {
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.contacts2 .row {
  display: flex;
  flex-wrap: wrap;
}

.contacts2 .card {
  display: flex;
}

.contacts2 .card-wrapper {
  width: 100%;
  transition: transform 0.3s var(--rr-ease), box-shadow 0.3s ease;
}

.contacts2 .card-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.4) !important;
}

.contacts2 .image-wrapper {
  padding-right: 0.4rem;
}

/* --------------------------------------------------------------------
   FOOTER7 — faixa sólida com régua superior
   -------------------------------------------------------------------- */
.footer7 {
  position: relative;
  padding: 2.2rem 0 !important;
  background: var(--rr-maroon-dark);
}

.footer7::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rr-maroon);
}

.footer7 .mbr-text {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------
   WHATSAPP FLUTUANTE — botão fixo, dispara click_whatsapp (delegação
   já existente em tracking.js, que escuta qualquer link para wa.me)
   -------------------------------------------------------------------- */
.rr-whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--rr-maroon);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 999;
  transition: transform 0.25s var(--rr-ease), box-shadow 0.25s ease, background-color 0.25s ease;
}

.rr-whatsapp-float:hover {
  background: var(--rr-maroon-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  color: #fff !important;
}

.rr-whatsapp-float::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(129, 0, 0, 0.35);
  animation: rrPulse 2.2s ease-out infinite;
}

@keyframes rrPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rr-whatsapp-float::before {
    animation: none;
    display: none;
  }
}

@media (max-width: 576px) {
  .rr-whatsapp-float {
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* --------------------------------------------------------------------
   Revelação suave ao rolar (aplicada via modern.js)
   -------------------------------------------------------------------- */
.rr-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--rr-ease), transform 0.7s var(--rr-ease);
}

.rr-reveal.rr-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .rr-reveal {
    opacity: 1;
    transform: none;
  }
}
