/* =============================================
   CodeToFun — Contact Us
   Blends with home.css / about.css brand
   ============================================= */

.contact-page {
  background: #fff;
  color: #1e293b;
}

.contact-main {
  padding-bottom: 0;
}

/* Hero */
.contact-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(37, 99, 235, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(14, 165, 233, 0.1), transparent 50%),
    linear-gradient(180deg, #eff6ff 0%, #f8fafc 55%, #fff 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 2.5rem 0 3rem;
}

@media (min-width: 768px) {
  .contact-hero {
    padding: 3.5rem 0 4rem;
  }
}

.contact-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.contact-breadcrumb a {
  color: #2563eb;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-breadcrumb a:hover {
  color: #1d4ed8;
}

.contact-breadcrumb svg {
  width: 14px;
  height: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

.contact-breadcrumb-current {
  color: #475569;
}

.contact-hero-inner {
  max-width: 40rem;
}

.contact-hero-inner .badge {
  margin-bottom: 1rem;
}

.contact-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.contact-title-accent {
  color: #2563eb;
}

.contact-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 0;
}

/* Layout */
.contact-section {
  padding: 3.5rem 0 4.5rem;
}

@media (min-width: 768px) {
  .contact-section {
    padding: 4.5rem 0 5.5rem;
  }
}

.contact-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

/* Info cards */
.contact-info-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.25rem 1.35rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-info-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.contact-info-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  flex-shrink: 0;
}

.contact-info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.contact-info-card p {
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.contact-info-card a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2563eb;
  word-break: break-word;
}

.contact-info-card a:hover {
  color: #1d4ed8;
}

.contact-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.contact-social-row a {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #475569;
  transition: background 0.2s, color 0.2s;
}

.contact-social-row a:hover {
  background: #eff6ff;
  color: #2563eb;
}

.contact-note {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 0.875rem;
  padding: 1.25rem 1.35rem;
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.6;
}

.contact-note strong {
  color: #0f172a;
}

/* Form card */
.contact-form-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.05);
}

@media (min-width: 640px) {
  .contact-form-card {
    padding: 2rem;
  }
}

.contact-form-card h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.contact-form-card > p {
  font-size: 0.9375rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.contact-form {
  display: grid;
  gap: 1.125rem;
}

.contact-form-row {
  display: grid;
  gap: 1.125rem;
}

@media (min-width: 640px) {
  .contact-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.contact-field label .req {
  color: #ef4444;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.7rem 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.contact-field textarea {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.55;
}

.contact-field input:hover,
.contact-field select:hover,
.contact-field textarea:hover {
  border-color: #cbd5e1;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.contact-field input.is-invalid,
.contact-field select.is-invalid,
.contact-field textarea.is-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.contact-field-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
}

.contact-form-actions .btn {
  min-width: 9rem;
}

.contact-form-privacy {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.contact-form-privacy a {
  color: #2563eb;
  font-weight: 500;
}

.contact-form-privacy a:hover {
  color: #1d4ed8;
}

.contact-form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.contact-form-status.is-visible {
  display: block;
}

.contact-form-status.is-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.contact-form-status.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Topics */
.contact-topics {
  padding: 4rem 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.contact-topics-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.contact-topics-header .badge {
  margin-bottom: 0.75rem;
}

.contact-topics-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.contact-topics-header p {
  font-size: 1.0625rem;
  color: #475569;
  line-height: 1.7;
}

.contact-topic-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .contact-topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-topic-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-topic {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.35rem;
  height: 100%;
}

.contact-topic h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.contact-topic p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
}

/* FAQ strip */
.contact-faq {
  padding: 4rem 0;
}

.contact-faq-header {
  max-width: 36rem;
  margin-bottom: 2rem;
}

.contact-faq-header .badge {
  margin-bottom: 0.75rem;
}

.contact-faq-header h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.contact-faq-header p {
  font-size: 1.0625rem;
  color: #475569;
  line-height: 1.7;
}

.contact-faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

.contact-faq-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.contact-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-faq-item summary::-webkit-details-marker {
  display: none;
}

.contact-faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 500;
  color: #2563eb;
  line-height: 1;
}

.contact-faq-item[open] summary::after {
  content: "−";
}

.contact-faq-item p {
  padding: 0 1.25rem 1.15rem;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* CTA */
.contact-cta {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #0ea5e9 100%);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.contact-cta h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.contact-cta p {
  font-size: 1.0625rem;
  opacity: 0.92;
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.contact-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.contact-cta .btn-primary {
  background: #fff;
  color: #1d4ed8;
}

.contact-cta .btn-primary:hover {
  background: #f8fafc;
  color: #1e3a8a;
}

.contact-cta .btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.938rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.5rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.contact-cta .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}
