/* ================================================================
   ImóveisFabriciano – style.css
   Custom styles para a landing page de captação de leads
   Bootstrap 5.3.8 base
================================================================ */

/* ---------------------------------------------------------------
   1. Variáveis de Design
--------------------------------------------------------------- */
:root {
  --primary:       #1a56db;
  --primary-dark:  #1240a8;
  --primary-soft:  #eef3fd;
  --secondary:     #0e2a5c;
  --accent:        #f9c32a;
  --text-main:     #1e293b;
  --text-muted:    #64748b;
  --bg-light:      #f8fafc;
  --white:         #ffffff;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.08);
  --shadow-md:     0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:     0 16px 48px rgba(0,0,0,.14);
  --radius-sm:     0.5rem;
  --radius-md:     1rem;
  --radius-lg:     1.5rem;
  --transition:    0.25s ease;
}

/* ---------------------------------------------------------------
   2. Reset & Base
--------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Utilitário de espaçamento vertical */
.py-6 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* Z-index helper */
.z-1 { z-index: 1; }

/* ---------------------------------------------------------------
   3. Tipografia
--------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.section-tag {
  display: inline-block;
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.section-tag--alt {
  background-color: rgba(26, 86, 219, 0.12);
  color: var(--primary-dark);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------------
   4. Navbar
--------------------------------------------------------------- */
#mainNavbar {
  background-color: rgba(10, 36, 80, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.85rem 0;
  transition: background-color var(--transition), box-shadow var(--transition);
}

#mainNavbar.scrolled {
  background-color: rgba(10, 36, 80, 0.99);
  box-shadow: var(--shadow-md);
}

#mainNavbar .navbar-brand {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

#mainNavbar .nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
  color: var(--accent) !important;
  background-color: rgba(255, 255, 255, 0.06);
}

/* ---------------------------------------------------------------
   5. Hero Section
--------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  background-image: url('../img/fabriciano-01.jpeg');
  background-size: cover;
  background-position: center 30%;
  background-attachment: fixed;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 36, 80, 0.88) 0%,
    rgba(26, 86, 219, 0.72) 60%,
    rgba(10, 36, 80, 0.80) 100%
  );
}

.hero-stat {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

/* ---------------------------------------------------------------
   6. Seção "Como Funciona" – Steps
--------------------------------------------------------------- */
.step-card {
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}

.step-card.step-highlight {
  background: var(--primary-soft);
  border: 2px solid var(--primary) !important;
}

.step-number {
  width: 52px;
  height: 52px;
  background-color: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.step-number--active {
  background-color: var(--primary);
  color: var(--white);
}

.step-icon {
  font-size: 2.5rem;
  color: var(--primary);
}

.step-icon--active {
  color: var(--primary);
}

/* ---------------------------------------------------------------
   7. Seções Comprar / Vender
--------------------------------------------------------------- */
.bg-primary-soft {
  background-color: var(--primary-soft);
}

.img-frame {
  position: relative;
}

.img-frame::after {
  content: '';
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: -1.25rem;
  bottom: -1.25rem;
  border: 3px solid var(--primary);
  border-radius: 1rem;
  z-index: -1;
  opacity: 0.35;
}

.hover-zoom {
  transition: transform 0.45s ease;
}
.img-frame:hover .hover-zoom {
  transform: scale(1.03);
}

.feature-list li {
  padding: 0.35rem 0;
  font-size: 1rem;
  color: var(--text-main);
}

/* ---------------------------------------------------------------
   8. Seção Tipos de Imóvel
--------------------------------------------------------------- */
.tipo-card {
  background: var(--white);
  border: 1.5px solid #e2e8f0;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: default;
}

.tipo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tipo-icon {
  font-size: 2.25rem;
  color: var(--primary);
  display: block;
}

/* ---------------------------------------------------------------
   9. Seção Benefícios (fundo azul)
--------------------------------------------------------------- */
.benefit-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
  transition: background-color var(--transition), transform var(--transition);
}

.benefit-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-4px);
}

/* ---------------------------------------------------------------
   10. Seção Prova de Confiança
--------------------------------------------------------------- */
.trust-card {
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}

.trust-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md) !important;
}

.trust-icon {
  width: 64px;
  height: 64px;
  background-color: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

/* Contadores */
.counter-box {
  background: var(--white);
  border: 1.5px solid #e2e8f0;
  transition: border-color var(--transition);
}
.counter-box:hover {
  border-color: var(--primary);
}

.counter-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------
   11. Banner CTA Intermediário
--------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 60%),
    radial-gradient(circle at 80% 50%, rgba(255,255,255,0.04) 0%, transparent 60%);
}

/* ---------------------------------------------------------------
   12. Formulário de Leads
--------------------------------------------------------------- */
.form-control,
.form-select {
  border: 1.5px solid #d1dce8;
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(26, 86, 219, 0.18);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: #198754;
}

.form-label {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

/* Caixa LGPD */
.lgpd-box {
  background-color: #f0f5ff;
  border: 1.5px solid #c7d9ff;
}

.lgpd-box .form-check-input {
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.lgpd-box .form-check-label {
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   13. Rodapé
--------------------------------------------------------------- */
.footer-main {
  background-color: var(--secondary);
  color: rgba(255, 255, 255, 0.75);
}

.footer-text {
  color: rgba(255, 255, 255, 0.60);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-heading {
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.60);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.10);
  margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------
   15. Utilitários de animação e hover
--------------------------------------------------------------- */
.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md) !important;
}

/* Animações de entrada (aplicadas via JS com IntersectionObserver) */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up.delay-1 { transition-delay: 0.1s; }
.fade-in-up.delay-2 { transition-delay: 0.2s; }
.fade-in-up.delay-3 { transition-delay: 0.3s; }
.fade-in-up.delay-4 { transition-delay: 0.4s; }
.fade-in-up.delay-5 { transition-delay: 0.5s; }

/* ---------------------------------------------------------------
   16. Overrides Bootstrap específicos
--------------------------------------------------------------- */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-warning {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #1a1a1a;
}
.btn-warning:hover {
  background-color: #e6b220;
  border-color: #e6b220;
  color: #1a1a1a;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Alert de sucesso do formulário */
#formSuccess {
  border-left: 4px solid #198754;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------
   17. Responsividade
--------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-section {
    background-attachment: scroll; /* evita bugs em iOS */
  }
  .cta-banner {
    background-attachment: scroll;
  }
  .py-6 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: 1.75rem;
  }
  .hero-section {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 3rem;
  }
  .img-frame::after {
    display: none; /* ornamento decorativo oculto em mobile */
  }
  .counter-value {
    font-size: 2rem;
  }
}

@media (max-width: 575.98px) {
  .hero-stat {
    padding: 0.5rem !important;
  }
  .hero-stat .fs-4 {
    font-size: 1.1rem !important;
  }
}
