/* ================================================================
   CONTACT SECTION — Premium Design
================================================================ */

/* === Section wrapper === */
.contact-form {
  padding: 7rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

/* Background glow accents */
.contact-form::before {
  content: '';
  position: absolute;
  top: -15%;
  right: -8%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 247, 255, 0.055) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.contact-form::after {
  content: '';
  position: absolute;
  bottom: -5%;
  left: -8%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 247, 255, 0.035) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Top section divider line */
.contact-top-divider {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.28), transparent);
}

/* ── Header ──────────────────────────────────────── */
.contact-header {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto 4.5rem;
  position: relative;
  z-index: 1;
}

.contact-header h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.contact-header-desc {
  font-size: 1rem;
  color: var(--color-light);
  opacity: 0.5;
  margin: 0;
}

/* ── Two-column body ─────────────────────────────── */
.contact-body {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.55fr;
  gap: 2.5rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* ================================================================
   LEFT: Contact Info Panel
================================================================ */
.contact-info {
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
}

/* Top accent bar */
.contact-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.55), transparent);
}

/* ── Availability badge ── */
.contact-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 230, 118, 0.07);
  border: 1px solid rgba(0, 230, 118, 0.22);
  border-radius: 100px;
  padding: 0.35rem 0.9rem 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #00e676;
  width: fit-content;
}

.contact-avail-dot {
  width: 7px;
  height: 7px;
  background: #00e676;
  border-radius: 50%;
  flex-shrink: 0;
  animation: badgePulse 2.4s ease-in-out infinite;
}

/* ── Info text block ── */
.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-info-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
  font-family: var(--font-heading);
}

.contact-info-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--color-light);
  opacity: 0.65;
  margin: 0;
}

/* ── Channels ── */
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.channels-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--color-light);
  opacity: 0.38;
  margin-bottom: 0.2rem;
  display: block;
  /* always span full width when channels is a grid */
  grid-column: 1 / -1;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.22s, background 0.22s, transform 0.22s;
  position: relative;
  overflow: hidden;
}

.contact-channel:hover {
  border-color: rgba(0, 247, 255, 0.22);
  background: rgba(0, 247, 255, 0.04);
  transform: translateX(4px);
}

.contact-channel-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 247, 255, 0.08);
  border: 1px solid rgba(0, 247, 255, 0.12);
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 0.22s, border-color 0.22s;
}

.contact-channel:hover .contact-channel-icon {
  background: rgba(0, 247, 255, 0.13);
  border-color: rgba(0, 247, 255, 0.2);
}

.contact-channel-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(155deg);
  opacity: 0.82;
}

.contact-channel > div {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
  flex: 1;
}

.contact-channel-lbl {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--color-light);
  opacity: 0.38;
}

.contact-channel-val {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Reply badge ── */
.contact-reply-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--color-light);
  opacity: 0.55;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.contact-reply-badge svg {
  color: var(--color-accent);
  opacity: 0.9;
  flex-shrink: 0;
}

/* ================================================================
   RIGHT: Form
================================================================ */
.contact-form-side {
  width: 100%;
}

.form-container {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.75rem 3rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

/* Focus-within top accent */
.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 247, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.form-container:focus-within {
  border-color: rgba(0, 247, 255, 0.14);
}

.form-container:focus-within::before {
  opacity: 1;
}

/* ── Form intro ── */
.form-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.form-intro-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.3rem;
  font-family: var(--font-heading);
}

.form-intro-sub {
  font-size: 0.83rem;
  color: var(--color-light);
  opacity: 0.48;
  margin: 0;
}

/* ── Field groups ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.4rem;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-light);
  opacity: 0.45;
  margin-bottom: 0.45rem;
  transition: opacity 0.22s, color 0.22s;
}

.form-group:focus-within label {
  opacity: 0.9;
  color: var(--color-accent);
}

/* ── Inputs & textarea ── */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.88rem 1.1rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.93rem;
  line-height: 1.5;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
  box-sizing: border-box;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(0, 247, 255, 0.16);
  background: rgba(0, 0, 0, 0.32);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(0, 247, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
}

.form-group input.error,
.form-group textarea.error {
  border-color: rgba(255, 80, 80, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 80, 80, 0.06);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-light);
  opacity: 0.2;
}

.form-group textarea {
  resize: vertical;
  min-height: 145px;
}

/* ── Inline errors ── */
.field-error {
  display: block;
  font-size: 0.72rem;
  color: #ff6b6b;
  margin-top: 0.35rem;
  min-height: 1em;
  line-height: 1.4;
}

/* ── Checkbox ── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.checkbox-group p {
  margin: 0;
  font-size: 0.79rem;
  color: var(--color-light);
  opacity: 0.48;
  line-height: 1.6;
}

.checkbox-group p a {
  color: var(--color-accent);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.checkbox-group p a:hover {
  opacity: 1;
}

/* ── Submit button ── */
.contact-submit {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #00f7ff 0%, #00c6d4 100%);
  color: #000;
  border: none;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

/* Shimmer overlay */
.contact-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.contact-submit:hover:not(:disabled)::before {
  left: 150%;
}

.contact-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 247, 255, 0.32);
}

.contact-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(0, 247, 255, 0.2);
}

.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.submit-loading {
  display: none;
  align-items: center;
  gap: 0.4rem;
}

.contact-submit.loading .submit-label  { display: none; }
.contact-submit.loading .submit-loading { display: flex; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin 0.8s linear infinite; }

/* ── Success state ── */
.contact-success {
  text-align: center;
  padding: 3.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.contact-success-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.1);
  border: 2px solid #00e676;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #00e676;
  margin-bottom: 0.6rem;
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes successPop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.contact-success h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
  font-family: var(--font-heading);
}

.contact-success p {
  font-size: 0.92rem;
  color: var(--color-light);
  opacity: 0.6;
  margin: 0;
  line-height: 1.65;
  max-width: 300px;
}

.contact-send-another {
  margin-top: 0.5rem;
  padding: 0.65rem 1.75rem;
  background: transparent;
  border: 1px solid rgba(0, 247, 255, 0.22);
  border-radius: 100px;
  color: var(--color-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.22s, color 0.22s, background 0.22s;
}

.contact-send-another:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 247, 255, 0.04);
}

/* ================================================================
   MOBILE RESPONSIVE
================================================================ */

/* ── Tablet: 2-col → 1-col ── */
@media (max-width: 960px) {
  .contact-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Channels 2-col on tablet */
  .contact-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

/* ── Mobile: form first, compact info ── */
@media (max-width: 768px) {
  .contact-form {
    padding: 4rem 1.25rem 3rem;
  }

  .contact-header {
    margin-bottom: 2.5rem;
  }

  .contact-header h2 {
    font-size: clamp(1.9rem, 7vw, 2.4rem);
  }

  /* Form comes first on mobile */
  .contact-form-side {
    order: -1;
  }

  .form-container {
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
  }

  /* form-intro is redundant on mobile — section header already has title + desc */
  .form-intro {
    display: none;
  }

  /* Info panel: compact flat card */
  .contact-info {
    padding: 1.5rem;
    border-radius: 16px;
    gap: 1.25rem;
  }

  /* Hide heading + body text — section header covers this */
  .contact-info-block {
    display: none;
  }

  /* Channels 2-col grid */
  .contact-channels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .contact-channel {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
  }

  .contact-channel-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .contact-channel-val {
    font-size: 0.78rem;
  }

  /* Stack name / email vertically */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Reply badge above the channels */
  .contact-reply-badge {
    padding-top: 0.5rem;
  }
}

/* ── Small phones ── */
@media (max-width: 480px) {
  .contact-form {
    padding: 3.5rem 1rem 2.5rem;
  }

  .form-container {
    padding: 1.5rem 1.25rem;
    border-radius: 14px;
  }

  .contact-info {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .contact-channel-val {
    font-size: 0.74rem;
  }

  /* Prevent iOS auto-zoom on focus */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
  }

  .contact-submit {
    border-radius: 10px;
  }
}

/* ── Extra small ── */
@media (max-width: 375px) {
  .contact-channels {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 3rem 0.75rem 2rem;
  }
}
