:root {
  --primary: #6b9eff;
  --primary-dark: #5a8ae6;
  --navy: #1e3a8a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --success-green: #28a745;
  --cta-blue: #0066cc;
  /* Used for SMS number to match pricing blue tone */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background: url('/peninsula/static/bg-peninsula.webp') center/cover no-repeat fixed;
  opacity: 0.28;
  z-index: -2;
  pointer-events: none;
}

header,
main,
footer,
.pricing-card,
.form-section,
.service-info,
.thank-you-container {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.14);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ────────────────────────────────────────────────
   HEADER
   ──────────────────────────────────────────────── */
header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 6px 0;
  min-height: 54px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.logo img.header-logo {
  max-height: 42px;
  width: auto;
}

.phone-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(30, 58, 138, 0.07);
  transition: all 0.2s ease;
}

.phone-link:hover,
.phone-link:focus {
  background: rgba(107, 158, 255, 0.16);
  color: var(--primary);
}

.social-links-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.social-icon-header {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transition: transform 0.2s ease;
  filter: brightness(0) saturate(100%) invert(14%) sepia(84%) saturate(747%) hue-rotate(208deg) brightness(94%) contrast(92%);
}

.social-icon-header:hover {
  transform: scale(1.15);
}

/* ────────────────────────────────────────────────
   MAIN CONTENT & HEADINGS
   ──────────────────────────────────────────────── */
main {
  padding: 32px 0 64px;
}

h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--gray-800);
}

.subtitle {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 1.6rem;
  max-width: 520px;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

.service-info {
  background: rgba(107, 158, 255, 0.09);
  border-radius: 10px;
  padding: 14px;
  margin: 24px 0;
  font-size: 0.96rem;
  line-height: 1.45;
  border-left: 4px solid var(--primary);
}

/* ────────────────────────────────────────────────
   PRICING GRID & CARDS
   ──────────────────────────────────────────────── */
.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 32px 0;
  justify-content: center;
}

.pricing-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  flex: 1 1 210px;
  max-width: 260px;
  min-width: 210px;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.09);
  border-color: var(--primary);
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 10px 0 6px;
}

.item-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--gray-800);
}

/* ────────────────────────────────────────────────
   SMS / TEXT-TO-SIGNUP BLOCK (shared for city pages)
   ──────────────────────────────────────────────── */
.sms-section {
  text-align: center;
  padding: 2.8rem 1.5rem 3.5rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
  max-width: 680px;
  margin: 2.5rem auto 3.8rem;
}

.sms-number {
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--cta-blue);
  letter-spacing: 1.2px;
  margin: 1.6rem 0 1.2rem;
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border: 3px solid var(--cta-blue);
  border-radius: 16px;
  background: rgba(0, 102, 204, 0.05);
  transition: all 0.22s ease;
  text-decoration: none;
}

.sms-number:hover,
.sms-number:active {
  background: rgba(0, 102, 204, 0.14);
  transform: scale(1.035);
  box-shadow: 0 10px 28px rgba(0, 102, 204, 0.18);
}

.sms-instruction {
  font-size: 1.4rem;
  line-height: 1.45;
  color: #222;
  margin-bottom: 1.6rem;
}

.fallback {
  margin-top: 2.2rem;
  font-size: 1.1rem;
  color: #555;
}

/* ────────────────────────────────────────────────
   FINAL CTA – fine-tuned spacing
   ──────────────────────────────────────────────── */
.final-cta {
  text-align: center;
  padding: 2rem 1rem 3rem;
  margin: 4rem auto 4rem;
  max-width: 680px;
}

.final-cta h2 {
  font-size: 1.85rem;
  margin-bottom: 2rem;
  /* ← Reduced: less space between heading and button */
}

.final-cta .submit-btn {
  display: inline-block;
  padding: 14px 40px;
  font-size: 1.18rem;
  margin: 0 0 2.8rem 0;
  /* only bottom margin – no top needed here */
  min-width: 220px;
  /* prevents button from being too narrow */
}

.final-cta .small {
  font-size: 1rem;
  color: var(--gray-600);
  max-width: 480px;
  margin: 0 auto;
  padding-top: 1.2rem;
  /* ← key fix: forces space above the small text */
  line-height: 1.6;
  /* better readability & prevents tight overlap */
}

/* ────────────────────────────────────────────────
   FORM SECTION (for signup page)
   ──────────────────────────────────────────────── */
.form-section {
  background: white;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  max-width: 620px;
  margin: 40px auto 0;
}

.form-section h2 {
  font-size: 1.55rem;
  margin-bottom: 20px;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--gray-600);
  font-size: 0.94rem;
}

input,
select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2.5px rgba(107, 158, 255, 0.18);
}

.referral-other {
  margin-top: 10px;
}

.referral-other label {
  font-size: 0.92rem;
  margin-bottom: 5px;
}

.submit-btn {
  grid-column: 1 / -1;
  background: var(--primary);
  color: white;
  border: none;
  padding: 13px;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 12px;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

.error {
  color: #dc2626;
  font-size: 0.88rem;
  margin-top: 6px;
  grid-column: 1 / -1;
  text-align: center;
}

.hint {
  font-size: 0.78rem;
  color: #6b7280;
  display: block;
  margin-top: 4px;
}

/* ────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 40px 0 24px;
  color: var(--gray-600);
  font-size: 0.88rem;
  border-top: 1px solid var(--gray-200);
}

/* Compact version of SMS block – smaller overall size */
.sms-section.compact-sms {
  padding: 1.4rem 1rem 1.8rem;
  max-width: 480px;
  margin: 1.5rem auto 2.2rem;
}

.sms-section.compact-sms .sms-number {
  font-size: 2.1rem;
  padding: 0.6rem 1.2rem;
}

.sms-section.compact-sms h2 {
  font-size: 1.55rem;
  /* smaller heading */
  margin-bottom: 1.1rem;
}

.sms-section.compact-sms .sms-instruction {
  font-size: 1.15rem;
  /* smaller instruction text */
  margin-bottom: 1.2rem;
  line-height: 1.4;
}


.sms-section.compact-sms .fallback {
  font-size: 0.95rem;
  /* smaller fallback text */
  margin-top: 1.4rem;
}

/* Mobile – keep it compact but readable */
@media (max-width: 764px) {
  .sms-section.compact-sms {
    padding: 1.5rem 1rem 2rem;
    margin: 1.5rem auto 2.5rem;
    max-width: 90%;
  }

  .sms-section.compact-sms h2 {
    font-size: 1.4rem;
  }

  .sms-section.compact-sms .sms-instruction {
    font-size: 1.05rem;
  }

  .sms-section.compact-sms .sms-number {
    font-size: 2.2rem;
    padding: 0.6rem 1.2rem;
  }

  .sms-section.compact-sms .fallback {
    font-size: 0.9rem;
  }
}

/* ────────────────────────────────────────────────
   MOBILE STYLES (≤ 764px)
   ──────────────────────────────────────────────── */
@media (max-width: 764px) {
  .container {
    padding: 0 12px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  header {
    padding: 8px 0;
  }

  .header-content {
    gap: 12px;
    padding: 6px 0;
  }

  .left-group {
    gap: 12px;
  }

  .phone-link {
    font-size: 0.98rem;
    padding: 4px 8px;
  }

  .social-links-header {
    gap: 8px;
  }

  .social-icon-header {
    width: 22px;
    height: 22px;
  }

  .logo img.header-logo {
    max-height: 38px;
  }

  .pricing-grid {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin: 24px 0;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .pricing-grid::-webkit-scrollbar {
    height: 1.5px;
  }

  .pricing-grid::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
  }

  .pricing-card {
    flex: 0 0 220px;
    max-width: 220px;
    min-width: 200px;
    padding: 16px 12px;
  }

  .pricing-card p {
    font-size: 0.78rem;
    margin-top: 4px;
  }

  .price {
    font-size: 1.4rem;
    margin: 8px 0 4px;
  }

  .item-name {
    font-size: .95rem;
    margin-bottom: 8px;
  }

  /* SMS section mobile */
  .sms-section {
    padding: 2rem 1.2rem 2.8rem;
    margin: 2rem auto 3rem;
  }

  .sms-number {
    font-size: 2.8rem;
    padding: 0.8rem 1.5rem;
  }

  /* Mobile version – ensure no overlap on small screens */
  @media (max-width: 764px) {
    .final-cta {
      padding: 1.8rem 1rem 3rem;
      margin: 3rem auto 3.5rem;
    }

    .final-cta h2 {
      font-size: 1.6rem;
      margin-bottom: 1.8rem;
    }

    .final-cta .submit-btn {
      padding: 12px 32px;
      font-size: 1.05rem;
      margin: 0 0 2.4rem 0;
    }

    .final-cta .small {
      font-size: 0.94rem;
      padding-top: 1.4rem;
      /* slightly more on mobile for safety */
    }
  }
}