/* ==============================================
   Lead Capture Overrides — Modal, Form, Badges
   ============================================== */

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}

/* Lead Modal */
.lead-modal {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.lead-modal h2 {
  margin-bottom: 0.25rem;
  font-size: 1.5rem;
}
.lead-modal .modal-subtitle {
  color: #6c757d;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.modal-close:hover {
  color: #333;
}

/* Form Groups */
.lead-modal .form-group {
  margin-bottom: 1rem;
}
.lead-modal .form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #394458;
}
.lead-modal .form-group input,
.lead-modal .form-group select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.15s;
}
.lead-modal .form-group input:focus,
.lead-modal .form-group select:focus {
  outline: none;
  border-color: #f96b29;
  box-shadow: 0 0 0 3px rgba(249, 107, 41, 0.15);
}

/* Form Row — two columns */
.lead-modal .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .lead-modal .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* Disclaimer */
.form-disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Success State */
.form-success {
  text-align: center;
  padding: 2rem 1rem;
}
.form-success .success-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 0.5rem;
}
.form-success h3 {
  margin-bottom: 0.5rem;
}
.form-success p {
  color: #6c757d;
}

/* Trustpilot Badge */
.trustpilot-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tp-star {
  color: #00b67a;
  font-size: 1.3rem;
}
.tp-text {
  font-size: 0.9rem;
  color: #394458;
}
.tp-stars {
  display: flex;
  gap: 2px;
}
.tp-box {
  background: #00b67a;
  color: #fff;
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

/* ================================================
   Hero Section — Full Takeover
   Kill the old two-column curved layout entirely.
   Image becomes background, form is the star.
   ================================================ */

/* Nuke the old curved decorative elements */
.ui-v2 .hero-section-alternative::after,
.ui-v2 .hero-section-alternative .hero-section-before-element {
  display: none !important;
}

/* Hero becomes a full-width image-background section */
.ui-v2 .hero-section-alternative {
  background-color: #394458 !important;
  background-image: url('heroimage.jpg');
  background-size: cover;
  background-position: center;
  height: auto !important;
  min-height: auto !important;
  border-bottom: none !important;
  position: relative;
  margin-top: 56px;
}

/* Dark overlay so text is readable over the image */
.ui-v2 .hero-section-alternative > .container {
  position: relative;
  z-index: 2;
}

/* Dark overlay — repurpose ::before as a tint layer */
.ui-v2 .hero-section-alternative::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(30, 40, 55, 0.72) !important;
  border-radius: 0 !important;
  z-index: 1 !important;
}

/* Hide the old <img> tag — image is now the CSS background */
.ui-v2 .hero-section-alternative .hero-section-image {
  display: none !important;
}

/* Header takes full width, centered */
.ui-v2 .hero-section-alternative .hero-section-header {
  max-width: 580px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 2rem 0 2.5rem !important;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* --- Mobile text --- */
.ui-v2 .hero-section-alternative .hero-heading {
  font-size: 1.4rem !important;
  line-height: 1.25;
  color: #fff !important;
}

.ui-v2 .hero-section-alternative .hero-heading .text-primary {
  color: #ff8c52 !important;
}

.ui-v2 .hero-section-alternative .hero-subheading {
  font-size: 0.9rem !important;
  color: rgba(255,255,255,0.85) !important;
  margin-bottom: 0 !important;
}

.ui-v2 .hero-section-alternative a {
  color: #ff8c52 !important;
}

/* --- Tablet (768px+) --- */
@media (min-width: 768px) {
  .ui-v2 .hero-section-alternative .hero-section-header {
    max-width: 560px !important;
    padding: 3.5rem 0 4rem !important;
  }

  .ui-v2 .hero-section-alternative .hero-heading {
    font-size: 2rem !important;
  }

  .ui-v2 .hero-section-alternative .hero-subheading {
    font-size: 1.1rem !important;
  }
}

/* --- Desktop (992px+) --- */
@media (min-width: 992px) {
  .ui-v2 .hero-section-alternative .hero-section-header {
    max-width: 620px !important;
    padding: 4rem 0 4.5rem !important;
  }

  .ui-v2 .hero-section-alternative .hero-heading {
    font-size: 2.25rem !important;
  }

  .ui-v2 .hero-section-alternative .hero-subheading {
    font-size: 1.15rem !important;
  }
}

/* --- Wide (1200px+) --- */
@media (min-width: 1200px) {
  .ui-v2 .hero-section-alternative .hero-section-header {
    max-width: 640px !important;
  }
}

/* ================================================
   Hero Inline Offer Form — CONVERSION MACHINE
   ================================================ */

/* Form card — white card pops against dark hero bg */
.hero-offer-form {
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  margin-top: 1rem;
}

.hero-form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #394458;
  margin-bottom: 2px;
}

.hero-form-subtitle {
  font-size: 0.8rem;
  color: #808da2;
  margin-bottom: 12px;
}

.hero-offer-form .form-control,
.hero-offer-form .form-select {
  border: 1.5px solid #ecf2f4;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  background: #fff;
}

.hero-offer-form .form-control:focus,
.hero-offer-form .form-select:focus {
  border-color: #f96b29;
  box-shadow: 0 0 0 3px rgba(249, 107, 41, 0.12);
}

.hero-offer-form .form-label {
  color: #394458;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
  font-size: 0.75rem;
}

.hero-offer-form .mb-3 {
  margin-bottom: 0.6rem !important;
}

.hero-offer-form .row.g-3 {
  --bs-gutter-y: 0.6rem;
}

.hero-offer-form .btn-primary {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.hero-offer-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 107, 41, 0.3);
}

.hero-form-trust {
  font-size: 0.72rem;
}

/* Tablet+ */
@media (min-width: 768px) {
  .hero-offer-form {
    padding: 28px;
    margin-top: 1.5rem;
  }

  .hero-form-title { font-size: 1.25rem; }
  .hero-form-subtitle { font-size: 0.85rem; margin-bottom: 16px; }

  .hero-offer-form .form-control,
  .hero-offer-form .form-select {
    padding: 10px 14px;
    font-size: 0.95rem;
  }

  .hero-offer-form .form-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .hero-offer-form .mb-3 {
    margin-bottom: 1rem !important;
  }
}

@media (min-width: 992px) {
  .hero-offer-form { padding: 32px; }
}

/* ================================================
   Google Places Autocomplete Dropdown
   ================================================ */
.pac-container {
  z-index: 10000 !important;
  border-radius: 8px;
  border: 1px solid #ecf2f4;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  font-family: 'Mukta', Arial, sans-serif;
  margin-top: 4px;
}

.pac-item {
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  border-top: 1px solid #f5f5f5;
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover,
.pac-item-selected {
  background: #fff4ed;
}

.pac-icon {
  margin-right: 8px;
}

.pac-item-query {
  font-weight: 700;
  color: #394458;
}

/* ================================================
   Desktop Polish
   ================================================ */

/* Clean section spacing on desktop */
@media (min-width: 992px) {
  .reasons-for-instant-offer h2,
  .get-cash-for-my-house h2,
  .fast-and-easy h2,
  .frequently-asked-questions h2,
  section.py-5 > .container-md > h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  /* Reasons cards — tighter grid */
  .reasons-for-instant-offer .card {
    height: 100%;
  }

  /* Testimonial cards balanced */
  .testimonials .card {
    height: 100%;
  }

  /* CTA sections — more punch */
  .fast-and-easy h2 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  .fast-and-easy .lead {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ================================================
   Mobile Lead Gen Polish
   ================================================ */
@media (max-width: 767.98px) {
  /* Kill top padding on body — navbar is fixed, hero should start tight */
  .ui-v2 .hero-section-alternative {
    margin-top: 52px;
    border-bottom: none !important;
  }

  /* Tighter section spacing — don't waste scroll depth */
  section.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .reasons-for-instant-offer,
  .fast-and-easy,
  .frequently-asked-questions {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  /* Section headings tighter */
  .reasons-for-instant-offer h2,
  .fast-and-easy h2,
  .frequently-asked-questions h2,
  section.py-5 > .container-md > h2 {
    font-size: 1.35rem;
  }

  .reasons-for-instant-offer .lead,
  .fast-and-easy .lead,
  section.py-5 > .container-md > p.lead {
    font-size: 0.95rem;
  }

  /* Cards tighter */
  .reasons-for-instant-offer .card,
  .testimonials .card {
    margin-bottom: 0.5rem;
  }

  /* All CTA buttons full width on mobile */
  .reasons-for-instant-offer .btn-primary,
  .fast-and-easy .btn-primary {
    width: 100%;
  }

  /* Testimonial tabs — smaller */
  .nav-pills .nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  /* FAQ questions tighter */
  .frequently-asked-questions .question {
    font-size: 0.9rem;
  }

  /* Footer cleanup */
  .footer-nav .nav-link {
    font-size: 0.85rem !important;
    padding: 0.4rem 0 !important;
  }

  .footer-nav-secondary {
    font-size: 0.8rem;
  }

  .footer-nav-secondary .icon svg {
    width: 14px;
    height: 14px;
  }
}
