/**
 * Alpha Delving — Contact Page Stylesheet (Token 11)
 * Lumina Light Design System: dual-column layout, high-conversion inquiry form,
 * interactive contact cards, accessible inputs, and Leaflet map integration.
 */

/* --------------------------------------------------------------------------
   1. CONTACT HERO BANNER
   -------------------------------------------------------------------------- */
.contact-hero {
  padding: 8rem 0 3.5rem 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-bottom: 1px solid var(--color-border-subtle);
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 160, 233, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.contact-hero-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.contact-hero-content .badge {
  margin-bottom: 1.25rem;
}

.contact-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--color-brand-navy);
  margin-bottom: 1.25rem;
}

.contact-hero-content p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-neutral-slate);
  margin-bottom: 2rem;
}

/* Trust SLA Guarantee Strip */
.contact-sla-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.sla-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-brand-navy);
  background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.sla-item svg {
  width: 16px;
  height: 16px;
  fill: var(--color-brand-cyan);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. DUAL-COLUMN CONTACT & FORM SECTION
   -------------------------------------------------------------------------- */
.contact-main-section {
  padding: 5rem 0 6rem 0;
  background: #FFFFFF;
}

.contact-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3.5rem;
  align-items: start;
}

/* --------------------------------------------------------------------------
   3. LEFT PANEL: DIRECT CONTACT CHANNELS
   -------------------------------------------------------------------------- */
.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-panel-intro {
  margin-bottom: 0.5rem;
}

.contact-panel-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-brand-navy);
  margin-bottom: 0.75rem;
}

.contact-panel-intro p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-neutral-slate);
}

/* Contact Cards Stack */
.contact-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-channel-card {
  background: #F8FAFC;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.contact-channel-card:hover {
  background: #FFFFFF;
  border-color: rgba(0, 160, 233, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(0, 160, 233, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
}

.channel-icon-well {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #E0F2FE;
  color: #0369A1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.channel-icon-well svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.contact-channel-card:hover .channel-icon-well {
  background: var(--color-brand-cyan);
  color: #FFFFFF;
}

.channel-details {
  flex-grow: 1;
}

.channel-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-brand-navy);
  margin-bottom: 0.25rem;
}

.channel-desc {
  font-size: 13px;
  color: var(--color-neutral-slate);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.channel-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.channel-links a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-brand-navy);
  text-decoration: none;
  transition: color var(--transition-fast);
  word-break: break-word;
  overflow-wrap: break-word;
}

.channel-links a:hover {
  color: var(--color-brand-cyan);
}

.channel-hours-text {
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

/* WhatsApp Direct CTA Button */
.whatsapp-direct-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: all var(--transition-fast);
}

.whatsapp-direct-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.whatsapp-direct-btn:hover {
  background: #10B981;
  color: #FFFFFF;
  border-color: #10B981;
}

/* Social Connect Stack */
.contact-social-wrap {
  padding-top: 0.5rem;
}

.contact-social-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-neutral-slate);
  margin-bottom: 0.75rem;
}

.contact-social-icons {
  display: flex;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   4. RIGHT PANEL: HIGH-CONVERSION INQUIRY FORM
   -------------------------------------------------------------------------- */
.contact-form-panel {
  background: #FFFFFF;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.contact-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-brand-cyan), #0284C7, #38BDF8);
}

.form-header {
  margin-bottom: 2rem;
}

.form-header h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--color-brand-navy);
  margin-bottom: 0.5rem;
}

.form-header p {
  font-size: 14px;
  color: var(--color-neutral-slate);
  line-height: 1.5;
}

/* Form Layout & Fields */
.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-brand-navy);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .required-star {
  color: #EF4444;
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-brand-navy);
  background: #F8FAFC;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-default);
  padding: 0.85rem 1.15rem;
  transition: all var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #94A3B8;
  font-size: 14px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: #FFFFFF;
  border-color: var(--color-brand-cyan);
  box-shadow: 0 0 0 3px rgba(0, 160, 233, 0.15);
}

/* Input validation error state */
.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: #EF4444;
  background: #FFF5F5;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error-msg {
  font-size: 12px;
  font-weight: 500;
  color: #DC2626;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .field-error-msg {
  display: block;
}

/* Native Form Select */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  padding-right: 2.75rem;
  cursor: pointer;
}

.form-select:hover {
  background-color: #FFFFFF;
  border-color: rgba(0, 160, 233, 0.4);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Cloudflare Turnstile Box */
.turnstile-box {
  margin: 0.25rem 0;
  min-height: 65px;
  display: flex;
  align-items: center;
}

/* Alert Notification Status Boxes */
.form-status-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-default);
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

.form-status-alert.success {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.form-status-alert.error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.form-status-alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* Submit Button & In-Flight Spinner */
.btn-block {
  width: 100%;
}

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* Form Privacy Microcopy */
.form-privacy-note {
  font-size: 12px;
  color: #94A3B8;
  text-align: center;
  line-height: 1.5;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   5. INTERACTIVE HEADQUARTERS MAP SECTION
   -------------------------------------------------------------------------- */
.contact-map-section {
  padding: 5rem 0 6rem 0;
  background: #F8FAFC;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.map-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem auto;
}

.map-section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-brand-navy);
  margin-bottom: 0.75rem;
}

.map-section-header p {
  font-size: 15px;
  color: var(--color-neutral-slate);
  line-height: 1.6;
}

.map-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.08);
  height: 480px;
}

#contactMap,
.contact-map-iframe {
  width: 100%;
  height: 100%;
  background: #E2E8F0;
  z-index: 1;
}

/* Map Location Overlay Badge */
.map-location-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  max-width: 320px;
}

.map-location-badge h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-brand-navy);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-location-badge h4 svg {
  width: 16px;
  height: 16px;
  fill: var(--color-brand-cyan);
}

.map-location-badge p {
  font-size: 12px;
  color: var(--color-neutral-slate);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.map-location-badge a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-brand-cyan);
  text-decoration: none;
}

.map-location-badge a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .contact-hero {
    padding: 6.5rem 0 3.5rem 0;
  }

  .contact-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .contact-grid-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-info-panel {
    order: 2;
  }

  .contact-form-panel {
    order: 1;
    padding: 2.25rem 2rem;
  }
}

@media (max-width: 767px) {
  .contact-hero {
    padding: 5.5rem 0 2rem 0;
  }

  .contact-hero h1 {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .contact-hero p {
    font-size: 14.5px;
    margin-bottom: 1.5rem;
  }

  .contact-sla-strip {
    gap: 0.5rem;
    padding-top: 1rem;
  }

  .sla-item {
    font-size: 11.5px;
    padding: 0.3rem 0.65rem;
  }

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

  .contact-form-panel {
    padding: 1.35rem 1.15rem;
    border-radius: var(--radius-xl);
  }

  .form-header {
    margin-bottom: 1.5rem;
  }

  .form-header h3 {
    font-size: 20px;
    margin-bottom: 0.35rem;
  }

  .form-header p {
    font-size: 13.5px;
  }

  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents iOS auto-zoom */
    padding: 0.75rem 1rem;
  }

  .contact-channel-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-xl);
    gap: 1rem;
  }

  .channel-icon-well {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .channel-title {
    font-size: 15px;
  }

  .channel-desc {
    font-size: 12.5px;
  }

  .whatsapp-direct-btn {
    padding: 0.85rem 1.25rem;
    font-size: 14px;
    justify-content: center;
  }

  .map-section {
    padding: 3rem 0;
  }

  .map-wrapper {
    height: 360px;
    border-radius: var(--radius-xl);
  }

  .map-location-badge {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    padding: 0.75rem 1rem;
    border-radius: 12px;
  }

  .map-location-badge h4 {
    font-size: 14px;
    margin-bottom: 0.2rem;
  }

  .map-location-badge p {
    font-size: 11.5px;
    margin-bottom: 0.4rem;
  }

  .map-location-badge a {
    font-size: 11.5px;
  }
}
