/* Reset default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  :root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(17, 24, 39, 0.14);
    --shadow: 0 18px 55px rgba(17, 24, 39, 0.10);
    --shadow-sm: 0 8px 25px rgba(17, 24, 39, 0.10);
    --brand: #C8102E;
    --radius: 14px;
    --funnel-header-h: 120px;
  }

  html {
    scroll-padding-top: calc(var(--funnel-header-h) + 12px);
  }
  
  /* Body styles */
  body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    background:
      radial-gradient(900px 420px at 15% 0%, rgba(200, 16, 46, 0.12), transparent 55%),
      radial-gradient(800px 420px at 85% 5%, rgba(17, 24, 39, 0.08), transparent 60%),
      var(--bg);
    color: var(--text);
    line-height: 1.4;
  }
  
  /* Header styles - center logo */
  .header {
    width: 100%;
    height: 120px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    backdrop-filter: blur(10px);
    overflow: hidden;
  }

  @media (max-width: 560px) {
    :root {
      --funnel-header-h: 100px;
    }
    .header {
      height: 100px;
      align-items: stretch;
      padding: 0 10px;
    }
    .logo {
      width: auto;
      height: 100%;
      max-height: 100px;
      max-width: min(96vw, 520px);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .logo-image {
      height: 100%;
      width: auto;
      max-height: 100%;
      max-width: 100%;
      object-fit: contain;
      display: block;
    }

    .question-container {
      margin-top: 150px;
    }
  }
  
  /* Footer styles */
  .footer {
    background-color: transparent;
    color: var(--muted);
    padding: 10px 0;
    text-align: center;
    font-size: 0.9em;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    width: 100%;
    height: 100px; /* Standard height similar to header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px; /* Space between button and text */
    margin-top: 100px; /* Space between the body content and footer */
  }
  
  .footer p {
    margin: 0;
  }
  
  .footer a {
    color: var(--brand);
    text-decoration: none;
    margin: 0 20px;
  }
  
  .footer a:hover {
    text-decoration: underline;
  }
  
  /* Container for urgent button below the form */
  .urgent-button-container {
    text-align: center;
    margin-top: 40px; /* 40px space above the button */
  }
  
  /* Urgent call button below the form */
  .urgent-call-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    color: #C8102E;
    border: 1px solid #C8102E;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    width: 200px; /* Fixed width for button */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-align: center;
  }
  
  /* Hover effect */
  .urgent-call-button:hover {
    background-color: #C8102E;
    color: white;
    transform: scale(1.05);
  }
  
  .logo {
    max-width: 120px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-image {
    max-width: 100%;
    max-height: 100%;
  }
  
  /* Main content container */
  .question-container {
    margin-top: 190px;
    margin-bottom: 20px;
    text-align: center;
    padding: 0 10px;
    max-width: 90%;
  }

  #main-header,
  #question-header {
    scroll-margin-top: calc(var(--funnel-header-h) + 12px);
  }

  .funnel-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    color: rgba(17, 24, 39, 0.70);
    font-weight: 600;
    font-size: 0.95em;
  }

  .funnel-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
  }

  .zip-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.28);
  }

  .zip-status-dot.is-loading {
    background: rgba(200, 16, 46, 0.55);
    animation: pulse 1.1s ease-in-out infinite;
  }

  .zip-status-dot.is-ok {
    background: rgba(16, 185, 129, 0.75);
  }

  .zip-status-dot.is-bad {
    background: rgba(239, 68, 68, 0.75);
  }

  @keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
  }
  
  #progress-container {
    width: 100%;
    background-color: rgba(17, 24, 39, 0.06);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 20px; /* Add gap between progress bar and form */
  }
  
  #progress-bar {
    height: 10px;
    background-color: var(--brand); /* Red from the logo */
    width: 0;
    transition: width 0.4s ease;
  }
  
  .form-container {
    background-color: var(--surface);
    padding: 40px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(17, 24, 39, 0.06);
    width: 90%;
    max-width: 500px;
    text-align: left;
    margin: 0 auto; /* Center the container */
  }
  
  h1 {
    font-size: 1.5em;
  }
  
  /* Main header style */
  #main-header {
    color: var(--text);
    font-size: 1.85em; /* Make the main header bigger */
  }
  
  #question-header {
    color: var(--text);
  }
  
  /* Opt-in text styles */
  .opt-in-text {
    font-size: 0.8em; /* Smaller font size */
    color: var(--muted); /* Lighter gray color for subtlety */
    margin-top: 10px;
    line-height: 1.4; /* Improved readability */
    text-align: left;
  }
  
  /* Step styles */
  .step {
    display: none;
    opacity: 0;
    transform: translateY(6px);
  }
  
  .step.active {
    display: block;
    animation: stepIn 220ms ease-out forwards;
  }

  @keyframes stepIn {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Radio and checkbox groups */
  .radio-group,
  .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .radio-group label,
  .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.10);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.07);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  }

  .radio-group label:hover,
  .checkbox-group label:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.10);
  }

  .radio-group label.is-selected,
  .checkbox-group label.is-selected {
    border-color: rgba(200, 16, 46, 0.35);
    box-shadow: 0 18px 38px rgba(200, 16, 46, 0.12);
    background: rgba(200, 16, 46, 0.06);
  }
  
  input[type="radio"],
  input[type="checkbox"] {
    accent-color: var(--brand); /* Red from the logo */
  }
  
  /* Input group (for text inputs) */
  .input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .input-group label {
    flex-basis: 100%;
    margin-bottom: 10px;
    display: block; /* Display labels as block to stack them */
  }
  
  .input-group input[type="text"],
  input[type="email"],
  input[type="tel"],
  select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
  }

  .input-group input[type="text"]:focus,
  input[type="email"]:focus,
  input[type="tel"]:focus,
  select:focus,
  textarea:focus {
    outline: none;
    border-color: rgba(200, 16, 46, 0.55);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
    background: #fff;
  }
  
  /* Textarea styles */
  textarea {
    width: 100%; /* Adjust width as needed */
    height: 150px; /* Adjust height as needed */
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-sizing: border-box;
    resize: vertical;
    margin: 0 auto; /* Center textareas */
    background: rgba(255, 255, 255, 0.85);
  }
  
  textarea::placeholder {
    color: #999;
  }
  
  /* Button group */
  .button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
  }
  
  button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  button:active {
    transform: translateY(1px);
  }

  button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
  }

  .funnel-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.08);
    color: rgba(127, 29, 29, 0.95);
    font-weight: 650;
    display: none;
    scroll-margin-top: calc(var(--funnel-header-h) + 12px);
  }

  .funnel-error.is-visible {
    display: block;
  }
  
  #prev-button {
    background-color: white;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }
  
  #prev-button:hover {
    background-color: var(--brand); /* Red from the logo */
    color: white;
  }
  
  #next-button {
    background-color: var(--brand); /* Red from the logo */
    color: white;
  }
  
  #next-button:hover {
    background-color: white;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }
  
  .submit-button {
    background-color: var(--brand); /* Red from the logo */
    color: white;
    width: 100%;
    margin-top: 20px;
    display: none; /* Initially hidden */
  }
  
  .submit-button:hover {
    background-color: transparent;
    color: var(--brand); /* Red from the logo */
    border: 1px solid var(--brand);
  }

  @media (max-width: 520px) {
    .form-container {
      padding: 28px 18px;
      border-radius: 12px;
    }
    .footer a {
      margin: 0 10px;
    }
  }
  
  .thank-you-container {
    background-color: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    text-align: center;
    margin-top: 150px;
  }
  