/* Contact page — screenshot-matched compact composition */
.contact-page {
  --contact-content: 790px;
  --contact-ink: #101f29;
  --contact-green: #08ba53;
  --contact-soft: #eef9f3;
  color: var(--contact-ink);
}

.contact-page .contact-hero {
  min-height: 340px;
  background:
    linear-gradient(90deg, rgba(7,25,36,.96) 0%, rgba(7,31,43,.83) 52%, rgba(4,25,37,.78) 100%),
    url("../images/con-hero.png") center 48% / cover no-repeat;
}

.contact-reference {
  padding: 72px 0 62px;
  background: #fff;
}

.contact-reference-layout {
  width: min(calc(100% - 48px), var(--contact-content));
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(260px, .92fr);
  gap: 18px;
  align-items: stretch;
}

.contact-reference-card,
.contact-reference-details {
  min-height: 444px;
  border: 1px solid #dbe5df;
  border-radius: 5px;
}

.contact-reference-card {
  padding: 30px 30px 27px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(8,29,40,.035);
}

.contact-reference-card .about-chip {
  margin-bottom: 14px;
  padding: 5px 14px;
  font-size: .56rem;
}

.contact-reference-card h2 {
  font-size: clamp(2.1rem, 2.8vw, 3.18rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
}

.contact-reference-intro {
  max-width: 455px;
  margin: 17px 0 21px;
  color: #68748a;
  font-size: .63rem;
  line-height: 1.72;
}

.contact-reference-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 15px;
  row-gap: 11px;
}

.contact-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.contact-field-full { grid-column: 1 / -1; }

.contact-field label {
  color: #384455;
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.2;
}

.contact-field label span { color: #ef425d; }

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid #ccd6d2;
  border-radius: 0;
  outline: 0;
  color: var(--contact-ink);
  background: #fff;
  transition: border-color .3s ease, box-shadow .35s ease, transform .45s var(--ease-premium);
}

.contact-field input {
  min-height: 31px;
  padding: 7px 10px;
  font-size: .57rem;
}

.contact-field textarea {
  min-height: 63px;
  padding: 9px 10px;
  resize: vertical;
  font-size: .57rem;
  line-height: 1.55;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder { color: #b8bec5; }

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: rgba(8,186,83,.75);
  box-shadow: 0 0 0 3px rgba(8,186,83,.08);
  transform: translateY(-1px);
}

.contact-captcha-field { gap: 4px; }
.contact-captcha-code {
  width: fit-content;
  min-width: 36px;
  height: 13px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  color: #536069;
  background:
    repeating-linear-gradient(-24deg, transparent 0 3px, rgba(16,31,41,.08) 3px 4px),
    #fafcfb;
  font-family: Georgia, serif;
  font-size: .48rem;
  font-style: italic;
  letter-spacing: .12em;
  transform: rotate(-2deg);
}

.contact-submit-row { margin-top: 2px; }
.contact-submit-row .button {
  min-height: 31px;
  width: fit-content;
  padding-inline: 20px;
  border-radius: 2px;
  font-size: .52rem;
}

.contact-reference-form .form-message {
  grid-column: 1 / -1;
  min-height: 0;
  color: #087a3a;
  font-size: .56rem;
  line-height: 1.45;
}
.contact-reference-form .form-message:empty { display: none; }

.contact-reference-details {
  padding: 24px 38px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  background: var(--contact-soft);
  box-shadow: 0 16px 42px rgba(8,29,40,.03);
}

.contact-reference-detail {
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  position: relative;
  text-align: center;
}

.contact-reference-detail + .contact-reference-detail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: rgba(16,31,41,.13);
}

.contact-reference-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--contact-green);
  background: #d8f4e4;
  transition: transform .65s var(--ease-premium), color .35s ease, background .35s ease, box-shadow .45s ease;
}

.contact-reference-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-reference-detail h3 {
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: -.035em;
}

.contact-reference-detail p {
  max-width: 210px;
  margin-top: 7px;
  color: #647087;
  font-size: .57rem;
  line-height: 1.65;
}

.contact-reference-detail a { transition: color .3s ease; }
.contact-reference-detail a:hover { color: var(--contact-green); }

.contact-map {
  height: 220px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(230,242,235,.65), rgba(236,248,242,.45)),
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(92,143,119,.09) 36px),
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(92,143,119,.09) 55px),
    #edf5f0;
}

.contact-map::before {
  content: "Hyderabad, India";
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  padding: 7px 12px;
  color: #667268;
  background: rgba(255,255,255,.92);
  box-shadow: 0 4px 14px rgba(8,29,40,.09);
  font-size: .58rem;
  font-weight: 700;
  pointer-events: none;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  filter: saturate(.82) contrast(.96) brightness(1.04);
}

.contact-footer { margin-top: 0; }
.contact-page .about-footer-main { padding-top: 48px; }
.contact-page .about-footer-lower { min-height: 68px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (hover:hover) and (pointer:fine) {
  .contact-reference-card,
  .contact-reference-details {
    transition: transform .65s var(--ease-premium), box-shadow .5s ease, border-color .4s ease;
  }
  .contact-reference-card:hover,
  .contact-reference-details:hover {
    transform: translateY(-5px);
    border-color: rgba(8,186,83,.28);
    box-shadow: 0 24px 54px rgba(8,29,40,.075);
  }
  .contact-reference-detail:hover .contact-reference-icon {
    color: #fff;
    background: var(--contact-green);
    box-shadow: 0 12px 26px rgba(8,186,83,.24);
    transform: translateY(-4px) rotate(-4deg) scale(1.04);
  }
}

@media (max-width: 900px) {
  .contact-reference-layout {
    grid-template-columns: 1fr;
    width: min(calc(100% - 40px), 650px);
  }
  .contact-reference-details {
    min-height: auto;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    padding: 28px 16px;
  }
  .contact-reference-detail { min-height: 160px; padding: 10px 20px; }
  .contact-reference-detail + .contact-reference-detail::before {
    left: 0;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
  }
}

@media (max-width: 700px) {
  .contact-reference { padding: 66px 0 54px; }
  .contact-reference-layout { width: min(calc(100% - 32px), 520px); }
  .contact-reference-card { padding: 26px 22px 24px; }
  .contact-reference-form { grid-template-columns: 1fr; }
  .contact-field-full { grid-column: 1; }
  .contact-reference-details { grid-template-columns: 1fr; padding: 12px 28px; }
  .contact-reference-detail { min-height: 150px; }
  .contact-reference-detail + .contact-reference-detail::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .contact-map { height: 260px; }
}

@media (max-width: 420px) {
  .contact-reference-card h2 { font-size: 2rem; }
  .contact-reference-card { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page *, .contact-page *::before, .contact-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Desktop screenshot calibration */
@media (min-width: 901px) {
  .contact-page { --header-height: 70px; }
  .contact-page .contact-hero { min-height: 200px; }
  .contact-page .contact-hero .about-hero-inner {
    width: min(calc(100% - 48px), var(--contact-content));
    padding-top: 58px;
  }
  .contact-page .contact-hero h1 { font-size: 3rem; }
  .contact-page .contact-reference { padding: 54px 0 53px; }
  .contact-page .contact-reference-layout {
    width: min(calc(100% - 48px), var(--contact-content));
  }
  .contact-page .contact-reference-card,
  .contact-page .contact-reference-details { min-height: 360px; }
  .contact-page .contact-reference-card { padding: 22px 22px 19px; }
  .contact-page .contact-reference-card .about-chip { margin-bottom: 10px; }
  .contact-page .contact-reference-card h2 { font-size: 2.18rem; }
  .contact-page .contact-reference-intro { margin: 11px 0 13px; }
  .contact-page .contact-reference-form { row-gap: 7px; column-gap: 13px; }
  .contact-page .contact-field { gap: 4px; }
  .contact-page .contact-field input { min-height: 28px; padding: 6px 9px; }
  .contact-page .contact-field textarea { min-height: 52px; padding: 7px 9px; }
  .contact-page .contact-submit-row .button { min-height: 27px; padding-inline: 17px; }
  .contact-page .contact-reference-details { padding: 17px 32px; }
  .contact-page .contact-reference-icon { width: 40px; height: 40px; margin-bottom: 7px; }
  .contact-page .contact-reference-icon svg { width: 21px; height: 21px; }
  .contact-page .contact-reference-detail p { margin-top: 4px; }
  .contact-page .contact-map { height: 180px; }
}

@media (min-width: 901px) {
  .contact-page .contact-reference-card { padding: 19px 20px 17px; }
  .contact-page .contact-field { gap: 2px; }
  .contact-page .contact-field label { font-size: .49rem; line-height: 1; }
  .contact-page .contact-reference-form { row-gap: 4px; }
  .contact-page .contact-field input { min-height: 24px; height: 24px; padding: 4px 8px; font-size: .52rem; }
  .contact-page .contact-field textarea { min-height: 40px; height: 40px; padding: 6px 8px; font-size: .52rem; }
  .contact-page .contact-captcha-code { height: 10px; font-size: .43rem; }
  .contact-page .contact-submit-row .button { min-height: 24px; padding-inline: 15px; font-size: .47rem; }
}

@media (min-width: 901px) {
  .contact-page { --contact-content: 600px; }
  .contact-page .header-inner {
    width: min(calc(100% - 40px), 1680px);
  }
  .contact-page .contact-reference-layout {
    grid-template-columns: minmax(0, 1.42fr) minmax(210px, 1fr);
    gap: 12px;
  }
  .contact-page .about-footer .container {
    width: min(calc(100% - 48px), var(--contact-content));
  }
  .contact-page .about-footer-main { gap: 42px; }
}
