/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --navy-900: #071a35;
  --navy-800: #0b2545;
  --navy-700: #123a6b;
  --blue-600: #1e5f9e;
  --blue-500: #2b7fd1;
  --blue-100: #e6f0fb;
  --blue-50: #f3f8fd;
  --white: #ffffff;
  --gray-100: #f4f6f9;
  --gray-200: #e3e8ef;
  --gray-500: #6b7787;
  --gray-700: #3c4656;
  --success: #1f8a4c;
  --text-strong: #14181d;
  --text-body: #262d38;

  --font-base: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(7, 26, 53, 0.08);
  --shadow-md: 0 8px 24px rgba(7, 26, 53, 0.12);
  --shadow-lg: 0 20px 48px rgba(7, 26, 53, 0.18);

  --container-width: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 106.25%; }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.2; margin: 0 0 0.6em; font-weight: 800; }
h1 { font-size: clamp(2rem, 1.6rem + 1.8vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.375rem); }
h4 { font-size: clamp(1.05rem, 1rem + 0.2vw, 1.125rem); }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 4.5rem 0; }
section.is-compact { padding: 2.5rem 0; }
.section-header { max-width: 680px; margin: 0 0 2.5rem; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  color: var(--blue-600);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.6em;
}
.bg-navy { background: var(--navy-800); color: var(--blue-100); }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-light { background: var(--blue-50); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--navy-800); color: var(--white); }
.btn--primary:hover { background: var(--navy-700); }
.btn--cta { background: var(--blue-500); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--cta:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn--outline { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn--outline:hover { background: var(--navy-800); color: var(--white); }
.btn--outline-light { border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--navy-800); }
.btn--block { width: 100%; }
.btn--whatsapp { background: #25D366; color: #fff; }
.btn--whatsapp:hover { background: #1ebc59; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.brand__logo { height: 44px; width: auto; max-width: 100%; flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-800); border-radius: 2px; }

.site-nav { display: flex; align-items: center; gap: 2rem; flex-shrink: 0; }
.site-nav__list { display: flex; align-items: center; gap: 1.7rem; }
.site-nav__list > li > a,
.dropdown-toggle {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-800);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.4em 0;
}
.site-nav__list a.is-active { color: var(--blue-600); }
.site-nav__list a:hover, .dropdown-toggle:hover { color: var(--blue-600); }

.has-dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
@media (min-width: 961px) {
  .has-dropdown:hover .dropdown-menu,
  .has-dropdown.is-open .dropdown-menu {
    transform: translateX(-50%) translateY(0);
  }
}
.dropdown-menu li a {
  display: block;
  padding: 0.65em 0.9em;
  border-radius: var(--radius-sm);
  color: var(--navy-800);
  font-weight: 500;
  font-size: 0.92rem;
}
.dropdown-menu li a:hover { background: var(--blue-50); color: var(--blue-600); }

@media (min-width: 961px) {
  .has-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 14px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800) 60%, var(--blue-600));
  color: var(--white);
  padding: 5rem 0;
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 0.5em; }
.hero p.lead { font-size: 1.15rem; color: var(--blue-100); max-width: 46ch; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.hero__stat strong { display: block; font-size: 1.8rem; color: var(--white); }
.hero__stat span { color: var(--blue-100); font-size: 0.85rem; }

/* ==========================================================================
   Trust badges
   ========================================================================== */
.trust-bar { display: flex; flex-wrap: wrap; gap: 2.2rem; align-items: center; justify-content: center; padding: 2rem 0; }
.trust-bar__item { display: flex; align-items: center; gap: 0.6rem; color: var(--navy-800); font-weight: 600; font-size: 0.92rem; }
.trust-bar__item svg { flex-shrink: 0; color: var(--blue-600); }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--blue-100);
  color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.card__partner-logo { display: block; height: 40px; max-width: 140px; width: auto; object-fit: contain; margin-bottom: 1.1rem; }
.card--service { padding: 0; overflow: hidden; }
.card--service .card__image { height: 160px; overflow: hidden; background: var(--gray-100); }
.card--service .card__image img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.card--service .card__body { padding: 1.4rem 1.6rem 1.6rem; }
.card--service .card__body p { margin-bottom: 0; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5em; }
.card p { color: var(--gray-500); font-size: 0.98rem; margin-bottom: 0; }

.grid { display: grid; gap: 1.6rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   Carousel (Serviços)
   ========================================================================== */
.carousel { position: relative; }
.carousel__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.carousel__track::-webkit-scrollbar { height: 6px; }
.carousel__track::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }
.carousel__slide {
  flex: 0 0 300px;
  scroll-snap-align: start;
}
.carousel__controls { display: flex; gap: 0.75rem; justify-content: flex-end; margin-bottom: 1.2rem; }
.carousel__btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-800);
}
.carousel__btn:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

/* ==========================================================================
   Carousel (Parceiros — rodapé)
   ========================================================================== */
.site-footer__partners-carousel {
  background: rgba(255, 255, 255, 0.04);
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.partners-carousel .carousel__slide { flex: 0 0 150px; }
.partners-carousel .carousel__controls { margin-bottom: 0.8rem; }
.partner-logo { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.partner-logo img {
  height: 40px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
  background: var(--white);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
}
.partner-logo span { font-size: 0.75rem; color: var(--blue-100); opacity: 0.75; letter-spacing: 0.04em; }
.partner-logo--text-only { justify-content: center; min-height: 56px; }
.partner-logo--text-only span { font-size: 1rem; font-weight: 700; color: var(--white); opacity: 1; }

/* ==========================================================================
   Sections: CTA banners, split content
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.cta-banner {
  background: var(--blue-600);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2, .cta-banner p { color: var(--white); }
.cta-banner p { margin-bottom: 0; opacity: 0.9; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.4rem; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; color: var(--text-strong); font-size: 0.92rem; }
.form-field small { color: var(--gray-500); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.75em 0.9em;
  background: var(--white);
  color: var(--gray-700);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}
.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.form-card h3 {
  font-size: 1.05rem;
  padding-top: 1.8rem;
  margin-top: 0.6rem;
  border-top: 1px solid var(--gray-200);
}
.form-card h3:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.imovel-extra {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-top: 1.2rem;
  background: var(--gray-100);
}
.imovel-extra__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.form-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.form-divider { display: flex; align-items: center; gap: 1rem; color: var(--gray-500); margin: 1.6rem 0; font-size: 0.85rem; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--gray-200); }
.form-note { font-size: 0.85rem; color: var(--gray-500); }

/* ==========================================================================
   Calculadora IP
   ========================================================================== */
.calc-steps { display: flex; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.calc-step-indicator {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-weight: 600;
  font-size: 0.88rem;
}
.calc-step-indicator.is-active { background: var(--navy-800); color: var(--white); }
.calc-panel { display: none; }
.calc-panel.is-active { display: block; }
.calc-toggle-group { display: flex; gap: 0.75rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.calc-toggle {
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  padding: 0.7em 1.2em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--navy-800);
}
.calc-toggle.is-selected { border-color: var(--blue-500); background: var(--blue-50); color: var(--blue-600); }
.calc-result {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  margin-top: 2rem;
}
.calc-result__value { font-size: 2.4rem; font-weight: 800; color: var(--white); }
.calc-result__label { color: var(--blue-100); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; }
.calc-result__breakdown { margin-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 1.2rem; font-size: 0.9rem; color: var(--blue-100); }
.disclaimer-box {
  background: var(--blue-50);
  border-left: 4px solid var(--blue-500);
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--gray-700);
  margin: 1.5rem 0;
}
.formula-box {
  background: var(--blue-600);
  color: var(--white);
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.formula-box small { display: block; margin-top: 0.5rem; font-weight: 500; opacity: 0.9; font-size: 0.8rem; }
.calc-result__formula {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   News / Legislação cards
   ========================================================================== */
.tag {
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag--noticia { background: var(--blue-100); color: var(--blue-600); }
.tag--comunicado { background: #fdeecb; color: #96650a; }
.tag--aviso { background: #fbe1e1; color: #a3312f; }
.news-card__date { font-size: 0.82rem; color: var(--gray-500); margin: 0.6em 0; }
.legis-card { display: flex; gap: 1.2rem; align-items: flex-start; }
.legis-card__num { font-weight: 800; color: var(--blue-600); min-width: 90px; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-item__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--text-strong);
  font-size: 1.05rem;
}
.faq-item__icon { transition: transform 0.2s ease; flex-shrink: 0; color: var(--blue-600); }
.faq-item.is-open .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--gray-500);
}
.faq-item.is-open .faq-item__answer { max-height: 400px; }
.faq-item__answer-inner { padding-bottom: 1.4rem; }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-info-card {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}
.contact-info-card h3 { color: var(--white); }
.contact-info-row { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.2rem; color: var(--blue-100); }
.contact-info-row svg { flex-shrink: 0; margin-top: 3px; }
.map-placeholder {
  background: var(--gray-100);
  border: 1px dashed var(--gray-500);
  border-radius: var(--radius-md);
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

/* ==========================================================================
   WhatsApp floating button
   ========================================================================== */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #25D366;
  color: var(--white);
  padding: 0.85em 1.1em;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.whatsapp-fab:hover { transform: translateY(-2px); }
.whatsapp-fab__label { font-weight: 700; font-size: 0.9rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--navy-900); color: var(--blue-100); padding-top: 4rem; }
.site-footer h3 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.site-footer__logo { height: 36px; margin-bottom: 1rem; }
.site-footer__col ul li { margin-bottom: 0.7em; }
.site-footer__col a { color: var(--blue-100); }
.site-footer__col a:hover { color: var(--white); }
.site-footer__registo { font-size: 0.85rem; opacity: 0.8; }
.site-footer__social { display: flex; gap: 0.7rem; margin-top: 1rem; }
.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--blue-100);
  transition: background 0.15s ease, color 0.15s ease;
}
.site-footer__social a:hover { background: var(--blue-500); color: var(--white); }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.6rem 0; }
.site-footer__bottom .container { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer__bottom p { margin: 0; font-size: 0.82rem; opacity: 0.75; }
.site-footer__disclaimer { max-width: 620px; }

/* ==========================================================================
   Page header (inner pages)
   ========================================================================== */
.page-header {
  background: var(--navy-800);
  color: var(--white);
  padding: 3.5rem 0;
  text-align: center;
}
.page-header h1 { color: var(--white); margin-bottom: 0.4em; }
.page-header p { color: var(--blue-100); max-width: 60ch; margin: 0 auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 78px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    gap: 1.2rem;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; }
  .site-nav__list { flex-direction: column; align-items: flex-start; gap: 0.3rem; width: 100%; }
  .site-nav__list > li { width: 100%; }
  .dropdown-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; display: none; padding-left: 1rem; }
  .has-dropdown.is-open .dropdown-menu { display: block; }
  .site-nav__cta { text-align: center; }

  .hero__grid, .split { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
  .whatsapp-fab__label { display: none; }
}

@media (max-width: 480px) {
  .brand__logo { height: 36px; }
  .site-header__inner { height: 66px; }
  .site-nav { top: 66px; max-height: calc(100vh - 66px); }
}
