/* ===========================
   CONTACT PAGE — STABLE CSS (final)
   Scopes only to Contact page sections
   =========================== */

/* Box sizing scope */
/* .page-header,
.contact-section { box-sizing: border-box; }
.page-header *,
.contact-section * { box-sizing: inherit; } */

/* Containers */
/* .page-header > .container,
.contact-section > .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
} */

/* Header (hero) */
/* .page-header { padding: 2.25rem 0 0.5rem; } */
.page-header h2 {
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.2rem);
  margin: 0 0 0.6rem;
  text-align: center;
  line-height: 1.2;
}
.page-header p {
  max-width: 720px;
  margin: 0 auto 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

/* Optional hero card */
.page-header .hero-card {
  background: linear-gradient(135deg, #21c8b8, #1a6edc);
  color: #fff;
  padding: 1.6rem 1.2rem;
  border-radius: 0 0 18px 18px;
  text-align: center;
}
.page-header .hero-card a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Section layout */
.contact-section { padding: 2.5rem 0 4.75rem; }
.contact-section .grid-2 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: start;
}
.contact-form-container { grid-column: span 7; }
.contact-info           { grid-column: span 5; }

/* Cards */
.contact-form,
.contact-info {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16,24,40,.06);
  padding: 1.5rem;
}
@media (min-width: 1280px) {
  .contact-form,
  .contact-info { padding: 1.75rem; }
}

/* Form fields */
.contact-form .form-group { margin-bottom: 1.05rem; }

.contact-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.96rem;
  color: #243447;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.70rem 0.9rem;
  border: 1px solid #d6dbe3;
  border-radius: 10px;
  font-size: 16px;           /* prevent iOS zoom */
  line-height: 1.45;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #9aa6b2; }

/* Autofill */
.contact-form input:-webkit-autofill,
.contact-form textarea:-webkit-autofill,
.contact-form select:-webkit-autofill {
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #111;
  transition: background-color 5000s ease-in-out 0s;
}

/* Focus */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #1a6edc;
  box-shadow: 0 0 0 3px rgba(26,110,220,.15);
  background: #fff;
}
@supports selector(:focus-visible) {
  .contact-form input:focus,
  .contact-form textarea:focus,
  .contact-form select:focus { box-shadow: none; }
  .contact-form input:focus-visible,
  .contact-form textarea:focus-visible,
  .contact-form select:focus-visible {
    outline: none;
    border-color: #1a6edc;
    box-shadow: 0 0 0 3px rgba(26,110,220,.22);
  }
}

.contact-form select[multiple] { min-height: 8.5rem; }
.contact-form textarea { min-height: 140px; resize: vertical; }

/* Native validation hint */
.contact-form :is(input, textarea, select):user-invalid { border-color: #e46a5b; }
.contact-form :is(input, textarea, select):user-valid   { border-color: #77c08a; }

/* ===========================
   Checkbox tiles (robust, no JS required)
   =========================== */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-top: 0.35rem;
}

.checkbox-item {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.9rem 0.75rem 2.9rem; /* room for custom control */
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.checkbox-item:hover { border-color: #cbd5e1; box-shadow: 0 1px 6px rgba(0,0,0,.06); }

/* Native checkbox covers tile (accessible + whole-tile click) */
.checkbox-item input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;            /* visually hidden, still focusable/clickable */
  cursor: pointer;
}

/* Label text + custom control */
.checkbox-item span { font-size: 0.98rem; line-height: 1.4; }
.checkbox-item span::before,
.checkbox-item span::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Outer ring */
.checkbox-item span::before {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 0 #1a6edc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

/* Inner dot */
.checkbox-item span::after {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  left: 1.3rem;
  background: transparent;
  transition: background .2s ease;
}

/* Keyboard focus */
.checkbox-item input[type="checkbox"]:focus-visible + span::before {
  outline: 3px solid rgba(26,110,220,.25);
  outline-offset: 2px;
}

/* Checked visuals (works everywhere) */
.checkbox-item input[type="checkbox"]:checked + span {
  font-weight: 700;
  color: #0f3e86;
}
.checkbox-item input[type="checkbox"]:checked + span::before {
  border-color: #1a6edc;
  background: #e8f2ff;
  box-shadow: inset 0 0 0 12px #1a6edc;
}
.checkbox-item input[type="checkbox"]:checked + span::after {
  background: #fff;
}

/* Nice-to-have highlight in browsers with :has() */
.checkbox-item:has(input[type="checkbox"]:checked) {
  background: #f3f8ff;
  border-color: #1a6edc;
  box-shadow: 0 2px 10px rgba(26,110,220,.12);
}

/* Buttons */
.form-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.btn-primary,
.btn-secondary {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.72rem 1.4rem;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s ease, filter .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: #1a6edc; color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary {
  background: #f4f6f8;
  color: #1a6edc;
  border: 1px solid #1a6edc;
}
.btn-secondary:hover { background: #1a6edc; color: #fff; }
.btn-secondary:focus-visible,
.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26,110,220,.22);
}

/* Contact info block */
.contact-info h3 {
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
  color: #1a6edc;
  text-align: center;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.info-item:hover {
  transform: translateY(-2px);
  border-color: #d7dde5;
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}
.info-icon { font-size: 1.4rem; color: #1a6edc; line-height: 1; flex-shrink: 0; }
.info-item strong { color: #222; font-weight: 600; }
.info-item a {
  color: #1a6edc;
  text-decoration: none;
  word-break: break-word;
}
.info-item a:hover { color: #1251a6; }

/* Inline confirmation block (used by JS) */
.form-confirmation {
  background-color: #2ecc71;
  color: #fff;
  padding: 10px 15px;
  margin-top: 1rem;
  border-radius: 6px;
  font-size: 1rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-secondary,
  .info-item,
  .checkbox-item,
  .contact-form :is(input, textarea, select) { transition: none !important; }
}

/* Responsive */
@media (max-width: 992px) {
  .contact-section { padding: 2.25rem 0 4.5rem; }
}
@media (max-width: 768px) {
  .contact-section .grid-2 {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .contact-form-container,
  .contact-info { grid-column: 1 / -1; }
  .contact-form,
  .contact-info {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
  .form-actions { width: 100%; }
  .btn-primary,
  .btn-secondary { width: 100%; }
}
@media (max-width: 600px) {
  .checkbox-group { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .contact-form,
  .contact-info { max-width: 100%; }
}




/* A11y helpers — drop in your global CSS (or contact.css) */

/* Properly hide elements visually but keep them for screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;   /* prevent line breaks */
  border: 0;
}

/* Make skip link visible only when focused */
.skip-link {
  position: absolute;
  left: -9999px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px; top: 16px;
  width: auto; height: auto;
  padding: .6rem .9rem;
  background: #1a6edc; color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  z-index: 1000;
}

/* Ensure [hidden] truly hides even if a reset set it to display:block */
[hidden] { display: none !important; }
