.ms-contact-page .ct-container {
  max-width: 1120px;
}

.ms-contact-page main .entry-content,
.ms-contact-page .entry-content {
  max-width: 1040px;
  margin: 28px auto 0;
  padding: 0 12px 8px;
}

/* Global polish for plain content variant */
.ms-contact-page .entry-content > * {
  max-width: 100%;
}

/* Hero */
.ms-contact-page .entry-content > h1:first-of-type,
.ms-contact-page .entry-content h1:first-of-type {
  margin: 0 0 14px;
  padding: 28px 30px 16px;
  border-radius: 18px;
  background: linear-gradient(120deg, #eef3ff 0%, #e9f3f8 55%, #eef8ef 100%);
  border: 1px solid #d8e2f3;
  color: #0f172a;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.ms-contact-page .entry-content > h1:first-of-type + p,
.ms-contact-page .entry-content h1:first-of-type + p {
  margin: -10px 0 12px;
  padding: 0 30px 18px;
  border: 1px solid #d8e2f3;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(120deg, #eef3ff 0%, #e9f3f8 55%, #eef8ef 100%);
  color: #475569;
  font-size: clamp(17px, 1.6vw, 28px);
  line-height: 1.4;
  font-weight: 500;
}

.ms-contact-page .entry-content > p {
  color: #475569;
}

/* Intro */
.ms-contact-page .entry-content > p:nth-of-type(2),
.ms-contact-page .entry-content p:nth-of-type(2) {
  text-align: center;
  margin: 20px 0 16px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

/* FAQ cards */
.ms-contact-page .entry-content > details,
.ms-contact-page .entry-content details {
  margin: 0 0 12px;
  border: 1px solid #d8dee8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.03);
}

.ms-contact-page .entry-content > details > summary,
.ms-contact-page .entry-content details > summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 44px 17px 18px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 800;
  position: relative;
}

.ms-contact-page .entry-content > details > summary::-webkit-details-marker,
.ms-contact-page .entry-content details > summary::-webkit-details-marker {
  display: none;
}

.ms-contact-page .entry-content > details > summary::after,
.ms-contact-page .entry-content details > summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 24px;
  font-weight: 700;
}

.ms-contact-page .entry-content > details[open] > summary::after,
.ms-contact-page .entry-content details[open] > summary::after {
  content: "−";
}

.ms-contact-page .entry-content > details > *:not(summary),
.ms-contact-page .entry-content details > *:not(summary) {
  padding: 2px 18px 16px;
  color: #475569;
}

/* 3-up on desktop */
@media (min-width: 940px) {
  .ms-contact-page .entry-content > details,
  .ms-contact-page .entry-content details {
    width: calc(33.333% - 10px);
    display: inline-block;
    vertical-align: top;
    margin-right: 14px;
  }

  .ms-contact-page .entry-content > details:nth-of-type(3n),
  .ms-contact-page .entry-content details:nth-of-type(3n) {
    margin-right: 0;
  }
}

/* Fluent Forms wrapper card */
.ms-contact-page .entry-content .fluentform,
.ms-contact-page .entry-content [class*="fluentform_wrapper"],
.ms-contact-page .entry-content .ff-default,
.ms-contact-page .entry-content form[id*="fluentform"],
.ms-contact-page .entry-content form[class*="fluentform"] {
  margin-top: 16px;
  padding: 22px 18px 18px;
  border: 1px solid #d8dee8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.05);
}

/* Form heading */
.ms-contact-page .entry-content > h2 {
  margin: 20px 0 10px;
  color: #0f172a;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.ms-contact-page .fluentform .ff-el-input--label label,
.ms-contact-page .fluentform .ff-el-input--label,
.ms-contact-page [class*="fluentform_wrapper"] .ff-el-input--label label,
.ms-contact-page [class*="fluentform_wrapper"] .ff-el-input--label {
  color: #334155;
  font-weight: 700;
}

.ms-contact-page .fluentform input[type="text"],
.ms-contact-page .fluentform input[type="email"],
.ms-contact-page .fluentform input[type="tel"],
.ms-contact-page .fluentform input[type="url"],
.ms-contact-page .fluentform textarea,
.ms-contact-page .fluentform select,
.ms-contact-page [class*="fluentform_wrapper"] input[type="text"],
.ms-contact-page [class*="fluentform_wrapper"] input[type="email"],
.ms-contact-page [class*="fluentform_wrapper"] input[type="tel"],
.ms-contact-page [class*="fluentform_wrapper"] input[type="url"],
.ms-contact-page [class*="fluentform_wrapper"] textarea,
.ms-contact-page [class*="fluentform_wrapper"] select {
  border: 1px solid #d1d9e6;
  border-radius: 10px;
  min-height: 46px;
  padding: 11px 14px;
  font-size: 16px;
  background: #fff;
}

.ms-contact-page .fluentform textarea {
  min-height: 180px;
}

.ms-contact-page .fluentform input:focus,
.ms-contact-page .fluentform textarea:focus,
.ms-contact-page .fluentform select:focus,
.ms-contact-page [class*="fluentform_wrapper"] input:focus,
.ms-contact-page [class*="fluentform_wrapper"] textarea:focus,
.ms-contact-page [class*="fluentform_wrapper"] select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ms-contact-page .fluentform .ff-btn-submit,
.ms-contact-page .fluentform button[type="submit"] {
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.ms-contact-page .fluentform .ff-btn-submit:hover,
.ms-contact-page .fluentform button[type="submit"]:hover,
.ms-contact-page [class*="fluentform_wrapper"] .ff-btn-submit:hover,
.ms-contact-page [class*="fluentform_wrapper"] button[type="submit"]:hover {
  background: #1d4ed8;
}

/* Mobile tune */
@media (max-width: 939px) {
  .ms-contact-page .entry-content {
    margin-top: 18px;
    padding: 0 10px;
  }

  .ms-contact-page .entry-content > h1:first-of-type,
  .ms-contact-page .entry-content h1:first-of-type {
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.05;
    padding: 22px 18px 14px;
    border-radius: 14px;
    margin-bottom: 10px;
  }

  .ms-contact-page .entry-content > h1:first-of-type + p,
  .ms-contact-page .entry-content h1:first-of-type + p {
    padding: 0 18px 14px;
    font-size: 22px;
    line-height: 1.28;
    margin-top: -8px;
  }

  .ms-contact-page .entry-content > p:nth-of-type(2),
  .ms-contact-page .entry-content p:nth-of-type(2) {
    margin-top: 14px;
    font-size: 17px;
  }

  .ms-contact-page .entry-content > details > summary,
  .ms-contact-page .entry-content details > summary {
    font-size: 18px;
    padding: 14px 42px 14px 14px;
  }

  .ms-contact-page .entry-content > h2 {
    font-size: 38px;
    margin-top: 14px;
  }

  .ms-contact-page .entry-content .fluentform {
    border-radius: 14px;
    padding: 16px 12px 14px;
  }
}
