/* =========================================
   General Layout & Typography
   ========================================= */
html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #222;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
  background-color: #610000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 2px solid #fff;
}

header img {
  height: 60px;
  margin-right: 10px;
}

/* =========================================
   Links (Global)
   ========================================= */
a:link:not(.cta-button) {
  color: #610000;
  text-decoration: none;
}

a:visited:not(.cta-button) {
  color: #8B1A1A;
}

a:hover:not(.cta-button) {
  color: #610000;
  text-decoration: underline;
}

a:active:not(.cta-button) {
  color: #660000;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  background: url('hero.png') center/cover no-repeat;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 2rem;
  background-color: rgba(0,0,0,0.6);
}

/* =========================================
   Container & Headings
   ========================================= */
.container {
  max-width: 900px;
  margin: auto;
  padding: 2rem;
}

h2 {
  color: #610000;
  font-size: 1.75rem;
  margin-top: 2rem;
}

/* =========================================
   Buttons (CTA)
   ========================================= */
.cta-button {
  display: inline-block;
  background-color: #610000;
  color: #fff;
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #8b1a1a;
}

/* =========================================
   Lists & Requirements
   ========================================= */
.requirements ul {
  list-style-type: '✓ ';
  padding-left: 1.5rem;
}

/* =========================================
   Testimonials
   ========================================= */
.testimonial {
  background-color: #f8f8f8;
  padding: 1rem;
  margin-top: 1rem;
  border-left: 4px solid #610000;
  font-style: italic;
}

/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: #eee;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.logos img {
  height: 60px;
}

/* =========================================
   Form Grid System
   ========================================= */
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* Mobile overflow fix applied */
  gap: 1rem;
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-grid > * {
  box-sizing: border-box;
  min-width: 0; /* Mobile overflow fix applied */
  max-width: 100%;
}

.form-grid h3 {
  grid-column: 1 / -1;
  color: #610000;
  margin-top: 0;
  text-align: center;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  font-size: 0.95rem;
}

.form-grid input,
.form-grid select {
  margin-top: 0.4rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
}

.form-grid .g-recaptcha {
  margin: 1rem auto;
  max-width: 100%;
}

.form-grid button {
  margin-top: 1rem;
}

/* Form Radio/Centered Questions */
.centered-question {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1rem;
}

.centered-question p {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.centered-question .options {
  display: flex; /* Changed from inline-flex for mobile wrap support */
  justify-content: center;
  gap: 1rem; /* Adjusted gap for mobile wrap */
  flex-wrap: wrap; /* Added wrap */
}

.centered-question .options label {
  display: inline-flex;
  align-items: center;
  font-weight: normal;
}

.centered-question .options input[type="radio"] {
  margin-right: 5px;
}

.form-grid .radio-label {
  display: flex;
  flex-direction: column;
  font-weight: bold;
  font-size: 0.95rem;
}

.form-grid .radio-label p {
  margin: 0 0 0.4rem 0;
  text-align: left;
}

.form-grid .radio-label .options {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 0.4rem;
}

.form-grid .radio-label .options label {
  display: inline-flex;
  align-items: center;
  font-weight: normal;
}

.form-grid .radio-label .options input[type="radio"] {
  margin-right: 5px;
}

/* =========================================
   Extracted Inline Styles (New Utility Classes)
   ========================================= */

/* Spacing & Typography Utilities */
.list-checked-cozy {
  margin: 0 0 1rem 1rem;
  line-height: 1.6;
}

.note-text {
  margin-top: 0.5rem;
}

.h2-tight-bottom {
  margin-bottom: 1rem;
}

/* Call to Action Area */
.cta-container {
  text-align: center;
  margin-top: 2rem;
}

/* Override default cta-button margin in this specific container */
.cta-container .cta-button {
  margin: 0.5rem;
}

/* Requirements Section Layout */
.requirements-flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.requirements-text-col {
  flex: 1;
  min-width: 250px;
}

.requirements-highlight-list {
  font-size: 1.2rem;
  line-height: 1.6;
  font-weight: bold;
  margin-top: 0;
}

.requirements-img-col {
  flex-shrink: 0;
}

.requirements-img {
  border-radius: 8px;
  border: 3px solid #610000;
  max-width: 100%; /* Ensure responsiveness */
  height: auto;
}

/* Discover Section */
.discover-heading {
  margin-top: 0;
  font-size: 2rem;
  text-align: center;
}

.discover-subheading {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Form Wrapper Area */
.form-wrapper-gray {
  background-color: #CEC7C7;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.form-contact-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem auto;
  color: #444;
}

/* Form Specific Elements */
.sn-resident-container {
  display: flex;
  flex-direction: column;
}

.sn-resident-label {
  font-weight: bold;
}

.sn-resident-options {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.4rem;
}

.full-width-grid-item {
  grid-column: 1 / -1;
}

.parent-heading {
  color: #610000;
  margin-top: 2rem;
  text-align: center;
}

.form-submit-container {
  grid-column: 1 / -1;
  text-align: center;
}

/* =========================================
   Media Queries
   ========================================= */
/* reCAPTCHA scaling on narrow phones */
@media (max-width: 380px) {
  .g-recaptcha {
    transform: scale(0.88);
    transform-origin: 50% 0;
  }
}

/* Tablet and smaller */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .container {
    padding: 1.25rem;
  }
  
  .requirements-flex-container {
      flex-direction: column;
  }
  
  .requirements-img-col {
      width: 100%;
      text-align: center;
  }
}