/* ============================================================
   ERCS International — Contact page
   Used by: resources/views/contact.blade.php
   Location: public/css/contact.css
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --primary: #071e3d;
  --primary-dark: #04152c;
  --accent: #1455d9;
  --accent-light: #2d7ff9;
  --ivory: #faf8f2;
  --surface: #f7f9fc;
  --text: #101828;
  --text-soft: #344054;
  --muted: #667085;
  --border: #e7e9ee;
  --white: #ffffff;
  --bronze: #b9945a;
  --success: #16825d;
  --danger: #c23b3b;
  --shadow-sm: 0 8px 24px rgba(7,30,61,.06);
  --shadow-md: 0 20px 60px rgba(7,30,61,.10);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1240px;
  --header-height: 84px;
  --transition: 220ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- Headings (scoped to contact page sections only,
   so the layout header/footer are not affected) ---------- */
.page-hero h1,
.section-heading h2,
.contact-intro h2,
.form-heading h2,
.office-card h3 {
  margin-top: 0;
  color: var(--primary-dark);
  font-family: Manrope, Inter, sans-serif;
  line-height: 1.08;
  letter-spacing: -.035em;
}
.section-heading h2,
.contact-intro h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
.office-card h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }

/* ---------- Layout helpers ---------- */
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-surface { background: var(--surface); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); font-size: .78rem; line-height: 1;
  font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- Section heading ---------- */
.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading.center { text-align: center; margin-inline: auto; }
.section-heading.center .eyebrow { justify-content: center; }
.section-heading h2 { margin: 14px 0 18px; }
.section-heading p { color: var(--muted); font-size: 1.05rem; max-width: 680px; }
.section-heading.center p { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px; border: 1px solid transparent;
  border-radius: 11px; font-weight: 750; cursor: pointer;
  transition: var(--transition);
}
.btn-primary { background: var(--accent); color: var(--white); box-shadow: 0 12px 28px rgba(20,85,217,.18); }
.btn-primary:hover { transform: translateY(-2px); background: #0d48be; box-shadow: 0 18px 36px rgba(20,85,217,.24); }
.btn:disabled,
.btn[disabled] { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   1. Page hero
   ============================================================ */
.page-hero { position: relative; overflow: hidden; padding: 96px 0 82px; background: var(--ivory); }
.page-hero::after {
  content: ""; position: absolute; right: -90px; top: -190px;
  width: 460px; height: 460px;
  border: 1px solid rgba(20,85,217,.12); border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(20,85,217,.025);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .86rem; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.page-hero h1 { max-width: 980px; margin: 22px 0 18px; font-size: clamp(2.8rem, 6vw, 5rem); }
.page-hero p { max-width: 760px; color: var(--muted); font-size: 1.08rem; }

/* ============================================================
   2. Contact info + form
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: 56px;
  align-items: start;
}

/* ---- Left: info ---- */
.contact-info { display: grid; gap: 18px; }
.contact-intro h2 { margin: 14px 0 16px; }
.contact-intro p { color: var(--muted); }

.contact-details { display: grid; gap: 12px; }
.contact-detail {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface);
}
.contact-detail-icon {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 11px; color: var(--accent); background: #eef4ff;
}
.contact-detail-icon svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
}
.contact-detail strong { display: block; margin-bottom: 3px; color: var(--primary-dark); }
.contact-detail a,
.contact-detail p { margin: 0; color: var(--muted); font-size: .92rem; text-decoration: none; }
.contact-detail a:hover { color: var(--accent); }

.office-card {
  padding: 26px; border-radius: 16px; color: var(--white);
  background:
    radial-gradient(circle at 80% 10%, rgba(45,127,249,.25), transparent 26%),
    var(--primary-dark);
}
.office-card h3 { margin: 0 0 12px; color: var(--white); }
.office-card p { margin: 0; color: rgba(255,255,255,.72); }

/* ---- Right: form (compact) ---- */
.form-shell {
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--white); box-shadow: var(--shadow-sm);
}
.form-heading { margin-bottom: 14px; }
.form-heading h2 { margin: 8px 0 6px; font-size: clamp(1.25rem, 2vw, 1.5rem); }
.form-heading p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.form-field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--primary-dark); font-size: .8rem; font-weight: 750; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; min-width: 0; max-width: 100%;
  border: 1px solid var(--border); border-radius: 11px;
  background-color: var(--white); color: var(--text);
  font: inherit; outline: none;
  transition: var(--transition);
}
.form-field input,
.form-field select { min-height: 42px; padding: 0 12px; }
.form-field textarea { min-height: 72px; padding: 9px 12px; resize: vertical; }

/* Select: custom arrow + long option text ellipsis */
.form-field select {
  padding-right: 38px;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(20,85,217,.55);
  box-shadow: 0 0 0 4px rgba(20,85,217,.08);
}

/* Required star */
.form-required { color: var(--danger); margin-left: 2px; }

/* Invalid field (set by Blade @error and by main JS data-validate) */
.form-field [aria-invalid="true"] { border-color: var(--danger); }
.form-field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(194,59,59,.10); }

/* Field-level error text */
.form-error { margin: 0; color: var(--danger); font-size: .82rem; font-weight: 600; }

/* Error summary box (above the form) */
.form-alert {
  margin-bottom: 14px; padding: 12px 16px;
  border-radius: 12px; font-size: .9rem;
}
.form-alert--error {
  border: 1px solid rgba(194,59,59,.25);
  border-left: 4px solid var(--danger);
  background: #fdf3f3; color: #7a1f1f;
}
.form-alert strong { display: block; margin-bottom: 6px; }
.form-alert ul { margin: 0; padding-left: 20px; }
.form-alert li + li { margin-top: 3px; }

/* Cloudflare Turnstile widget */
.cf-turnstile { min-height: 0; margin-top: 2px; }

/* Actions */
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.form-status { min-height: 0; color: var(--muted); font-size: .85rem; }
.form-status.is-success { color: var(--success); font-weight: 700; }
.form-note { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }

/* ============================================================
   3. Map
   ============================================================ */
.contact-map {
  overflow: hidden;
  border: 1px solid var(--border); border-radius: 20px;
  background: linear-gradient(145deg, #eef4ff, #faf8f2);
  box-shadow: var(--shadow-sm);
}
.contact-map iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- Accessibility ---------- */
.contact-grid :focus-visible,
.page-hero :focus-visible { outline: 3px solid rgba(45,127,249,.35); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .form-field input, .form-field select, .form-field textarea { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 920px) {
  :root { --header-height: 74px; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .section { padding: 72px 0; }

  .page-hero { padding: 70px 0 58px; }
  .page-hero h1 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .section-heading h2,
  .contact-intro h2 { font-size: clamp(1.9rem, 9vw, 2.8rem); }

  .form-shell { padding: 20px 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-field.full { grid-column: auto; }

  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .btn { width: 100%; }

  .contact-map iframe { height: 320px; }
}


/* ---------- Left aur right ki height barabar (sirf desktop) ---------- */
@media (min-width: 961px) {
  .contact-grid { align-items: stretch; }

  .form-shell { display: flex; flex-direction: column; }
  .form-shell form { display: flex; flex-direction: column; flex: 1; }

  /* rows: name+email | phone | service | message (jagah bhare) | turnstile */
  .form-grid {
    flex: 1;
    grid-template-rows: repeat(3, auto) minmax(0, 1fr) auto;
  }

  .form-field--grow { grid-template-rows: auto minmax(0, 1fr); }
  .form-field--grow textarea { height: 100%; min-height: 100px; resize: none; }

  .form-actions { margin-top: 14px; }
}