/*
  =====================================================================
  CONTACT PAGE STYLESHEET
  ---------------------------------------------------------------------
  Purpose:
  - Defines contact.html-specific presentation.
  - Covers hero, two-column contact layout, form states, success state,
    map strip, and responsive adjustments.
  - Form behavior/validation is handled in inline JS inside contact.html.
  =====================================================================
*/

/* Reusable eyebrow style for section intros on this page. */
.section-eyebrow {
  font-size: 16px;
  font-weight: 600;
  color: #4eb3f6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── HERO ───────────────────────────────────────────────── */
/* Contact hero introducing communication intent. */
.contact-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 120px 8% 80px;
  position: relative;
  overflow: hidden;
}

/* Decorative radial accent layer for hero depth. */
.contact-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(78, 179, 246, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Foreground content wrapper above decorative layer. */
.contact-hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

/* Hero eyebrow typography. */
.contact-hero-eyebrow {
  font-size: 16px;
  font-weight: 600;
  color: #4eb3f6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Hero title style with fluid responsive sizing. */
.contact-hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  color: white;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* Emphasis style inside hero title. */
.contact-hero-title em {
  font-style: italic;
  color: #4eb3f6;
}

/* Hero supporting paragraph style. */
.contact-hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  max-width: 500px;
}

/* ── MAIN SPLIT LAYOUT ──────────────────────────────────── */
/* Page body background and vertical spacing around main content. */
.contact-main {
  background: #f7f9fc;
  padding: 0 8% 100px;
}

/* Two-column layout: info panel (left) + form card (right). */
.contact-main-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
  padding-top: 80px;
}

/* ── LEFT INFO PANEL ────────────────────────────────────── */
/* Sticky contact details panel for desktop usability. */
.contact-info {
  position: sticky;
  top: 110px;
}

/* Left panel title style. */
.contact-info-title {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* Highlight style inside left panel title. */
.contact-info-title em {
  font-style: italic;
  color: #4eb3f6;
}

/* Supporting text below left panel heading. */
.contact-info-sub {
  font-size: 15px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Vertical stack for address/phone/email/hours rows. */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 40px;
}

/* Individual info row containing icon and text stack. */
.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Icon chip for each info row. */
.contact-info-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4eb3f6;
  box-shadow: 0 4px 16px rgba(78, 179, 246, 0.15);
}

/* Icon sizing normalization. */
.contact-info-icon svg {
  width: 20px;
  height: 20px;
}

/* Text container in each info row. */
.contact-info-item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

/* Row label styling (Address, Phone, Email, etc.). */
.contact-info-item strong {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Row value/link styling. */
.contact-info-item span,
.contact-info-item a {
  font-size: 14px;
  color: #444;
  text-decoration: none;
  line-height: 1.5;
}

/* Hover accent for interactive links in info panel. */
.contact-info-item a:hover {
  color: #4eb3f6;
}

/* Optional social row beneath contact details. */
.contact-social {
  display: flex;
  gap: 12px;
}

/* Shared circular social button in contact panel. */
.contact-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.25s,
    opacity 0.25s;
}

/* Social icon size normalization. */
.contact-social-btn svg {
  width: 18px;
  height: 18px;
}
/* Hover lift for social icons. */
.contact-social-btn:hover {
  transform: translateY(-3px);
  opacity: 0.85;
}
/* LinkedIn brand button style. */
.contact-linkedin {
  background: #0a66c2;
  color: white;
}
/* Instagram brand gradient button style. */
.contact-instagram {
  background: radial-gradient(
    circle at 30% 110%,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: white;
}

/* ── FORM CARD ──────────────────────────────────────────── */
/* Primary form container card. */
.contact-form-wrap {
  background: white;
  border-radius: 20px;
  padding: 52px 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.07);
}

/* Header area above form fields. */
.contact-form-header {
  margin-bottom: 36px;
}

/* Form title style. */
.contact-form-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.35;
  margin-top: 8px;
}

/* Main form stack spacing. */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Two-column field rows for desktop layout. */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* Individual field group wrapper. */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Utility to span a field group full row width. */
.form-group--full {
  grid-column: 1 / -1;
}

/* Field label style. */
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  letter-spacing: 0.02em;
}

/* Required indicator star. */
.required {
  color: #ff4646;
  margin-left: 2px;
}

/* Base styling for all text/select/textarea controls. */
.form-group input,
.form-group select,
.form-group textarea {
  padding: 13px 16px;
  border: 1.5px solid #e2eaf2;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  color: #333;
  background: #fafcff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

/* Placeholder color style. */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0b8c8;
}

/* Custom select arrow treatment for subject dropdown. */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234EB3F6' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}

/* Focus state improves visibility and keyboard accessibility cues. */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4eb3f6;
  box-shadow: 0 0 0 3px rgba(78, 179, 246, 0.12);
  background: white;
}

/* Error state applied by JS validation (class: is-invalid). */
.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border-color: #ff4646;
  box-shadow: 0 0 0 3px rgba(255, 70, 70, 0.1);
}

/* Hidden by default; shown by JS when corresponding field is invalid. */
.field-error {
  display: none;
  font-size: 12px;
  color: #ff4646;
  font-weight: 500;
}

/* Form bottom row with note and submit button. */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

/* Small helper text for required field note. */
.form-note {
  font-size: 12px;
  color: #aaa;
}

/* Submit button */
/* Primary submit action button with loading-state support. */
.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #4eb3f6;
  color: white;
  border: 2px solid #4eb3f6;
  padding: 14px 36px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

/* Primary button hover treatment. */
.contact-submit:hover {
  background: #ff4646;
  border-color: #ff4646;
}

/* Secondary/ghost button variant used in success state reset action. */
.contact-submit--ghost {
  background: transparent;
  color: #4eb3f6;
  border-color: #4eb3f6;
  margin-top: 20px;
}

/* Ghost button hover treatment. */
.contact-submit--ghost:hover {
  background: #ff4646;
  color: white;
}

/* Loading spinner */
/* Inline spinner shown while async submit is in progress. */
.btn-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Dim submit label while loading is active. */
.contact-submit.is-loading .btn-text {
  opacity: 0.7;
}
/* Reveal spinner while loading is active. */
.contact-submit.is-loading .btn-loader {
  display: block;
}

/* Spinner keyframe animation. */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── SUCCESS STATE ──────────────────────────────────────── */
/* Hidden success panel shown after successful form submission. */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px 20px;
}

/* Display rule for success panel when hidden attribute is removed. */
.form-success:not([hidden]) {
  display: flex;
}

/* Success icon wrapper. */
.success-icon {
  width: 72px;
  height: 72px;
  background: #eaf5fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4eb3f6;
  margin-bottom: 24px;
}

/* Success icon size normalization. */
.success-icon svg {
  width: 34px;
  height: 34px;
}

/* Success heading typography. */
.form-success h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 10px;
}

/* Success paragraph typography. */
.form-success p {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  max-width: 380px;
}

/* ── MAP ─────────────────────────────────────────────────── */
/* Full-width embedded map strip beneath contact section. */
.contact-map {
  line-height: 0;
  overflow: hidden;
  border-top: 1px solid #e8eef4;
}

/* Map frame sizing and visual filter treatment. */
.contact-map iframe {
  display: block;
  width: 100%;
  height: 420px;
  filter: grayscale(20%);
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
/* Tablet/laptop breakpoint: collapse split layout to single column. */
@media (max-width: 1024px) {
  .contact-main-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-info {
    position: static;
  }
}

/* Small-tablet/phone breakpoint: tighter form paddings and single-column fields. */
@media (max-width: 680px) {
  .contact-form-wrap {
    padding: 36px 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .form-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-submit {
    width: 100%;
    justify-content: center;
  }
}

/* Narrow-phone breakpoint: reduce side padding in hero and main blocks. */
@media (max-width: 480px) {
  .contact-main {
    padding: 0 5% 80px;
  }
  .contact-hero {
    padding: 100px 5% 60px;
  }
}

/* Animated entrance for conditional "Other subject" field row. */
#other-subject-group {
  animation: fadeSlideIn 0.2s ease;
}

/* Keyframe used by conditional subject field reveal. */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/*
  Optional custom phone input composite styles.
  Retained for compatibility if a split code+number input variant is enabled.
*/
.phone-input-wrap {
  display: flex;
  gap: 0;
  border: 1.5px solid #e2eaf2;
  border-radius: 8px;
  overflow: hidden;
  background: #fafcff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

/* Focus state for composite phone wrapper. */
.phone-input-wrap:focus-within {
  border-color: #4eb3f6;
  box-shadow: 0 0 0 3px rgba(78, 179, 246, 0.12);
  background: white;
}

/* Country code select segment in composite phone control. */
.phone-code-select {
  /* override shared form-group styles for this select */
  border: none !important;
  border-right: 1.5px solid #e2eaf2 !important;
  border-radius: 0 !important;
  background-color: #f0f6fd !important;
  box-shadow: none !important;
  padding: 13px 10px 13px 12px !important;
  font-size: 13px !important;
  font-weight: 600;
  color: #1a1a2e;
  min-width: 100px;
  flex-shrink: 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234EB3F6' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 14px !important;
}

/* Remove native focus ring artifacts; wrapper handles focus styling. */
.phone-code-select:focus {
  outline: none;
  border-color: #e2eaf2 !important;
  box-shadow: none !important;
}

/* Number input segment in composite phone control. */
.phone-number-input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  flex: 1;
  min-width: 0;
}

/* Preserve transparent/unstyled look while focused. */
.phone-number-input:focus {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
