/* ==========================================================================
   FMS Advocacia — Homepage Institucional
   institutional.css — Design tokens + componentes (padrão LP)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens (mesma paleta das LPs)
   -------------------------------------------------------------------------- */
:root {
  --fmb-gold:        #C9A961;
  --fmb-gold-dark:   #8B7239;
  --fmb-gold-light:  #E8D49A;
  --fmb-dark:        #1A2B45;
  --fmb-footer-bg:   #0E1F35;
  --fmb-bg:          #F5F7FB;
  --fmb-text:        #283541;
  --fmb-muted:       #6B7A8C;
  --fmb-card-dark:   #1E3857;
  --fmb-border:      #D8DCE8;
  --fmb-accent-bg:   #EEF2F9;

  --fmb-font-heading: 'Playfair Display', Georgia, serif;
  --fmb-font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fmb-section-py:        5rem;
  --fmb-section-py-mobile: 3rem;

  --fmb-radius:    0.75rem;
  --fmb-radius-lg: 1.25rem;

  --fmb-shadow:    0 4px 24px rgba(26, 43, 69, 0.10);
  --fmb-shadow-lg: 0 8px 40px rgba(26, 43, 69, 0.18);
  --fmb-transition: 0.25s ease;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--fmb-font-body);
  color: var(--fmb-text);
  background: #fff;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

h1, h2, h3, h4, h5, h6 { font-family: var(--fmb-font-heading); color: var(--fmb-dark); }

a { color: var(--fmb-gold-dark); text-decoration: none; transition: color var(--fmb-transition); }
a:hover, a:focus { color: var(--fmb-gold); }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--fmb-dark); color: #fff;
  padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Navbar (padrão LP - dark transparent + scrolled state)
   -------------------------------------------------------------------------- */
#mainNav {
  background: rgba(26, 43, 69, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  transition: box-shadow var(--fmb-transition), background var(--fmb-transition);
  border-bottom: 1px solid rgba(201, 169, 97, 0.15);
}
#mainNav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  background: rgba(14, 31, 53, 0.98);
}
#mainNav .navbar-brand img { height: 40px; width: auto; display: block; }
#mainNav .nav-link {
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 0.925rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.875rem !important;
  transition: color var(--fmb-transition);
}
#mainNav .nav-link:hover, #mainNav .nav-link:focus { color: var(--fmb-gold) !important; }
#mainNav .navbar-toggler {
  border-color: rgba(201, 169, 97, 0.4);
  color: var(--fmb-gold);
}
#mainNav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28201, 169, 97, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------------------------------------------------
   Botões / Badges
   -------------------------------------------------------------------------- */
.btn-fmb-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--fmb-gold) 0%, #b8923f 100%);
  color: #fff !important;
  padding: 0.85rem 2rem;
  border-radius: var(--fmb-radius);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--fmb-transition);
  box-shadow: 0 4px 16px rgba(201, 169, 97, 0.30);
}
.btn-fmb-primary:hover, .btn-fmb-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 97, 0.45);
  color: #fff !important;
}

.btn-fmb-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: #fff !important;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 0.75rem 1.85rem;
  border-radius: var(--fmb-radius);
  font-weight: 700;
  text-decoration: none;
  transition: all var(--fmb-transition);
}
.btn-fmb-secondary:hover, .btn-fmb-secondary:focus {
  background: rgba(255,255,255,0.1);
  border-color: var(--fmb-gold);
  color: #fff !important;
}

.fmb-badge-gold {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(201, 169, 97, 0.18);
  color: var(--fmb-gold-light);
  border: 1px solid rgba(201, 169, 97, 0.45);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.fmb-badge-gold-dark {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(201, 169, 97, 0.18);
  color: var(--fmb-gold-dark);
  border: 1px solid rgba(201, 169, 97, 0.45);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.fmb-section { padding: var(--fmb-section-py) 0; }
.fmb-section-light { background: var(--fmb-bg); }
.fmb-section-dark  {
  background: linear-gradient(135deg, var(--fmb-dark) 0%, var(--fmb-footer-bg) 100%);
  color: rgba(255,255,255,0.92);
}
.fmb-section-dark h2,
.fmb-section-dark h3 { color: #fff; }

.fmb-section-title {
  font-family: var(--fmb-font-heading);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.fmb-section-subtitle {
  font-size: 1.05rem;
  color: var(--fmb-muted);
  max-width: 720px;
  line-height: 1.7;
}
.fmb-section-subtitle-strong {
  font-family: var(--fmb-font-heading);
  color: var(--fmb-dark);
  font-weight: 700;
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--fmb-gold-dark);
  margin-bottom: 0.5rem;
}
.text-fmb-gold { color: var(--fmb-gold) !important; }

@media (max-width: 767px) {
  .fmb-section { padding: var(--fmb-section-py-mobile) 0; }
}

/* --------------------------------------------------------------------------
   Hero (padrão LP - background image + overlay + gold accents)
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--fmb-dark);
  overflow: hidden;
  padding: 7rem 0 5rem;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.22;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(14, 31, 53, 0.92) 0%,
    rgba(26, 43, 69, 0.78) 60%,
    rgba(14, 31, 53, 0.55) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

#hero h1.hero-title,
#hero h1 {
  color: #fff;
  font-family: var(--fmb-font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.18;
  margin-bottom: 1.25rem;
}

#hero h1 em {
  font-style: normal;
  color: var(--fmb-gold);
  font-weight: 700;
  font-size: 0.62em;
  display: block;
  margin-top: 0.4rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.125rem;
  max-width: 560px;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}
.hero-lead strong { color: var(--fmb-gold-light); font-weight: 700; }

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 0.35rem 1rem 0.35rem 0.6rem;
}

.hero-bullets li i {
  color: var(--fmb-gold);
  font-size: 1rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Hero image frame (rotated, padrão LP) */
.hero-photo-frame {
  position: relative;
  display: inline-block;
}

.hero-photo-frame img {
  border-radius: var(--fmb-radius-lg);
  transform: rotate(-2deg);
  border: 4px solid var(--fmb-gold);
  box-shadow: var(--fmb-shadow-lg);
  max-height: 520px;
  width: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(201, 169, 97, 0.3);
  border-radius: calc(var(--fmb-radius-lg) + 4px);
  transform: rotate(-2deg);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Sobre (padrão LP - foto + texto lado a lado)
   -------------------------------------------------------------------------- */
.about-photo-frame {
  position: relative;
  display: inline-block;
}
.about-photo-frame img {
  border-radius: var(--fmb-radius-lg);
  border: 3px solid var(--fmb-gold);
  box-shadow: var(--fmb-shadow-lg);
  width: 100%;
  max-width: 400px;
  height: auto;
  object-fit: cover;
  object-position: top;
  display: block;
}

.about-credentials {
  list-style: none;
  padding: 0;
  margin: 0;
}
.about-credentials li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.45rem 0;
  color: var(--fmb-text);
  font-weight: 500;
}
.about-credentials i {
  color: var(--fmb-gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Áreas (cards destaque + mini-cards)
   -------------------------------------------------------------------------- */
.area-card {
  background: #fff;
  border: 1.5px solid var(--fmb-border);
  border-radius: var(--fmb-radius);
  padding: 1.75rem;
  height: 100%;
  display: flex; flex-direction: column;
  box-shadow: var(--fmb-shadow);
  transition: transform var(--fmb-transition), box-shadow var(--fmb-transition), border-color var(--fmb-transition);
}
.area-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fmb-shadow-lg);
  border-color: var(--fmb-gold);
}
.area-card--highlight { background: linear-gradient(180deg, #fff 0%, #FAFBFE 100%); }

.area-icon {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fmb-gold) 0%, #b8923f 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.35);
}

.btn-fmb-area-link {
  display: inline-flex; align-items: center;
  color: var(--fmb-gold-dark) !important;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
  font-size: 0.95rem;
}
.btn-fmb-area-link:hover, .btn-fmb-area-link:focus {
  color: var(--fmb-dark) !important;
}

/* mini-cards (família + imobiliário) */
.area-mini-card {
  background: #fff;
  border: 1.5px solid var(--fmb-border);
  border-radius: var(--fmb-radius);
  padding: 1.25rem;
  height: 100%;
  transition: border-color var(--fmb-transition), box-shadow var(--fmb-transition), transform var(--fmb-transition);
}
.area-mini-card:hover {
  border-color: var(--fmb-gold-light);
  box-shadow: var(--fmb-shadow);
}

/* mini-card clicável (família — link pra LP de divórcio) */
.area-mini-card--link {
  color: inherit !important;
  text-decoration: none !important;
  cursor: pointer;
}
.area-mini-card--link:hover,
.area-mini-card--link:focus {
  transform: translateY(-2px);
  border-color: var(--fmb-gold);
  box-shadow: var(--fmb-shadow);
  color: inherit !important;
}
.area-mini-card--link h4 { color: var(--fmb-dark); }
.mini-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(201, 169, 97, 0.15);
  color: var(--fmb-gold-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  margin-bottom: 0.65rem;
}
.area-mini-card h4 {
  color: var(--fmb-dark);
  font-family: var(--fmb-font-body);
  font-weight: 700;
  font-size: 0.98rem;
}

/* --------------------------------------------------------------------------
   Como atende (step cards)
   -------------------------------------------------------------------------- */
.step-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--fmb-radius);
  padding: 2rem;
  height: 100%;
  text-align: center;
  transition: all var(--fmb-transition);
}
.step-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--fmb-gold);
}
.step-icon {
  font-size: 2.4rem;
  color: var(--fmb-gold);
}
.step-card h3 { color: #fff; }
.step-card p { color: rgba(255,255,255,0.78); }

/* --------------------------------------------------------------------------
   Footer (padrão LP)
   -------------------------------------------------------------------------- */
#footer {
  background: var(--fmb-footer-bg);
  color: rgba(255,255,255,0.78);
  padding: 4rem 0 2rem;
}
#footer h2.footer-heading {
  color: #fff;
  font-family: var(--fmb-font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer-contact-item {
  display: flex; gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  align-items: flex-start;
}
.footer-contact-item i {
  color: var(--fmb-gold);
  margin-top: 0.25rem;
  flex-shrink: 0;
}
.footer-contact-item a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.footer-contact-item a:hover, .footer-contact-item a:focus { color: var(--fmb-gold); }

.footer-social-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--fmb-transition);
}
.footer-social-link i {
  color: var(--fmb-gold);
  font-size: 1.1rem;
}
.footer-social-link:hover, .footer-social-link:focus { color: var(--fmb-gold); }

.footer-divider {
  border-color: rgba(255,255,255,0.12);
  margin: 2.5rem 0 1.5rem;
}
.footer-disclaimer {
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  line-height: 1.55;
  text-decoration: none;
}
.footer-disclaimer:hover, .footer-disclaimer:focus { color: var(--fmb-gold); }

/* --------------------------------------------------------------------------
   Modal de captura de lead (igual LPs)
   -------------------------------------------------------------------------- */
.lead-modal {
  border: none;
  border-radius: var(--fmb-radius-lg);
  box-shadow: var(--fmb-shadow-lg);
  border-top: 5px solid var(--fmb-gold);
}
.lead-modal .modal-title {
  font-family: var(--fmb-font-heading);
  color: var(--fmb-dark);
  font-weight: 700;
}
.lead-modal .modal-body { padding: 1rem 1.5rem 1.75rem; }
.lead-modal .form-label { color: var(--fmb-dark); font-size: .9rem; }
.lead-modal .form-control:focus {
  border-color: var(--fmb-gold);
  box-shadow: 0 0 0 .2rem rgba(201, 169, 97, .25);
}
.lead-modal .btn-fmb-primary { padding: .8rem 1rem; font-size: 1.05rem; }
.lead-modal a { color: var(--fmb-gold-dark); }

/* --------------------------------------------------------------------------
   Foco visível + Reduce motion (WCAG 2.1 AA)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--fmb-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Responsividade (mobile-first fixes)
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  :root {
    --fmb-section-py: var(--fmb-section-py-mobile);
  }

  #hero {
    min-height: auto;
    padding: 6rem 0 3rem;
  }

  #hero h1 {
    font-size: 1.85rem;
    line-height: 1.2;
  }
  #hero h1 em { font-size: 0.7em; }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-bullets {
    gap: 0.5rem;
  }
  .hero-bullets li {
    font-size: 0.85rem;
    padding: 0.3rem 0.85rem 0.3rem 0.55rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-fmb-primary,
  .btn-fmb-secondary {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1.25rem;
  }

  .hero-photo-frame {
    margin-top: 2rem;
  }

  .hero-photo-frame img {
    max-height: 380px;
  }

  /* Navbar: hamburger menu open should have dark bg */
  #mainNav .navbar-collapse {
    background: rgba(14, 31, 53, 0.98);
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: var(--fmb-radius);
  }

  #mainNav .nav-item.ms-lg-3 {
    margin-top: 0.5rem;
  }

  /* Footer: tighter spacing on mobile */
  #footer .row {
    gap: 2rem 0 !important;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  #hero {
    padding: 5rem 0 3rem;
    min-height: auto;
  }

  .hero-photo-frame {
    margin-top: 2rem;
  }

  #mainNav .navbar-collapse {
    background: rgba(14, 31, 53, 0.98);
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: var(--fmb-radius);
  }
}

@media (max-width: 991.98px) {
  /* Mobile/Tablet: hide navbar CTA inside collapsed menu (already a wa.me link in hero) */
  #mainNav .nav-cta-mobile { display: none; }

  /* Title in mobile/tablet shouldn't have hero photo cropping */
  .hero-photo-frame img {
    max-height: 420px;
  }
}

@media (min-width: 992px) {
  #hero {
    min-height: 100vh;
  }

  .hero-photo-frame img {
    max-height: 520px;
  }
}
