:root {
  --bert-gq-green: #E11D2E;
  --bert-gq-deep: #082B4D;
  --bert-gq-accent: #E11D2E;
  --bert-gq-text: #071B32;
  --bert-gq-muted: #5E6B63;
  --bert-gq-white: #ffffff;
  --bert-gq-soft: #F4F8F4;
  --bert-gq-border: rgba(0, 122, 61, 0.15);
}

.bert-gq-page-wrap {
  width: 100%;
  padding: clamp(56px, 8vw, 96px) 20px;
  background: #f6f9f5;
  box-sizing: border-box;
}

.bert-gq-page-panel,
.bert-gq-modal-card {
  font-family: Arial, Helvetica, sans-serif;
}

.bert-gq-page-panel {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  background: var(--bert-gq-white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

.bert-gq-copy {
  background: linear-gradient(135deg, var(--bert-gq-deep), var(--bert-gq-green));
  color: #fff;
  padding: clamp(34px, 5vw, 64px);
}

.bert-gq-eyebrow {
  margin: 0 0 14px;
  color: var(--bert-gq-accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 15px;
}

.bert-gq-copy h1,
.bert-gq-copy h2 {
  margin: 0 0 18px;
  color: #fff;
  font-weight: 700;
  line-height: 1.08;
  font-size: clamp(32px, 4vw, 54px);
}

.bert-gq-copy p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.65;
}

.bert-gq-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.bert-gq-points span {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #fff;
  font-weight: 600;
  line-height: 1.45;
}

.bert-gq-points span::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bert-gq-accent);
  color: var(--bert-gq-deep);
  font-size: 13px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.bert-gq-form-shell {
  background: #fff;
  padding: clamp(28px, 4vw, 52px);
  color: var(--bert-gq-text);
}

.bert-quote-form-cf7,
.bert-quote-form-cf7 * {
  box-sizing: border-box;
}

.bert-selected-quote {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--bert-gq-border);
  background: var(--bert-gq-soft);
  border-radius: 16px;
}

.bert-selected-quote span {
  display: block;
  margin-bottom: 5px;
  color: var(--bert-gq-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bert-selected-quote strong {
  display: block;
  color: var(--bert-gq-deep);
  font-size: 19px;
  line-height: 1.35;
}

.bert-quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bert-q-field,
.bert-quote-form-cf7 label {
  display: block;
  margin: 0;
  color: var(--bert-gq-text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.bert-q-field > span:first-child,
.bert-quote-form-cf7 label > span:first-child {
  display: block;
  margin-bottom: 8px;
}

.bert-span-2 {
  grid-column: 1 / -1;
}

.bert-quote-form-cf7 input[type="text"],
.bert-quote-form-cf7 input[type="email"],
.bert-quote-form-cf7 input[type="tel"],
.bert-quote-form-cf7 select,
.bert-quote-form-cf7 textarea {
  width: 100% !important;
  min-height: 52px;
  border: 1px solid rgba(0, 122, 61, 0.22) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--bert-gq-text) !important;
  padding: 13px 15px !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  outline: none !important;
}

.bert-quote-form-cf7 textarea {
  min-height: 128px;
  resize: vertical;
}

.bert-quote-form-cf7 input:focus,
.bert-quote-form-cf7 select:focus,
.bert-quote-form-cf7 textarea:focus {
  border-color: var(--bert-gq-green) !important;
  box-shadow: 0 0 0 3px rgba(31, 161, 46, 0.13) !important;
}

.bert-quote-actions {
  margin-top: 22px;
}

.bert-quote-form-cf7 .bert-quote-submit,
.bert-quote-form-cf7 input[type="submit"] {
  appearance: none;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--bert-gq-green) !important;
  color: #fff !important;
  padding: 15px 30px !important;
  min-height: 52px;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(225, 29, 46, 0.22) !important;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.bert-quote-form-cf7 .bert-quote-submit:hover,
.bert-quote-form-cf7 input[type="submit"]:hover {
  background: var(--bert-gq-deep) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(8, 43, 77, 0.24) !important;
}

.bert-quote-form-cf7 .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

.bert-quote-form-cf7 .wpcf7-response-output {
  margin: 20px 0 0 !important;
  padding: 12px 14px !important;
  border-radius: 12px;
  font-weight: 600;
}

.bert-gq-modal[hidden] {
  display: none !important;
}

.bert-gq-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.bert-gq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 39, 71, 0.72);
  backdrop-filter: blur(5px);
}

.bert-gq-modal-card {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(290px, 0.88fr) minmax(360px, 1.12fr);
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.bert-gq-modal-copy {
  min-height: 100%;
}

.bert-gq-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 27px;
  line-height: 38px;
  cursor: pointer;
  text-align: center;
}

.bert-gq-close:hover {
  background: #fff;
  color: var(--bert-gq-deep);
}

body.bert-gq-modal-open {
  overflow: hidden;
}

.bert-gq-warning {
  padding: 16px;
  border-radius: 12px;
  background: #fff3cd;
  color: #664d03;
}

@media (max-width: 860px) {
  .bert-gq-page-panel,
  .bert-gq-modal-card {
    grid-template-columns: 1fr;
  }
  .bert-gq-modal {
    align-items: flex-start;
    padding: 16px;
    overflow: auto;
  }
  .bert-gq-close {
    border-color: rgba(0,0,0,0.12);
    background: #fff;
    color: var(--bert-gq-deep);
  }
}

@media (max-width: 640px) {
  .bert-quote-grid {
    grid-template-columns: 1fr;
  }
  .bert-span-2 {
    grid-column: auto;
  }
  .bert-gq-copy,
  .bert-gq-form-shell {
    padding: 28px 20px;
  }
  .bert-gq-copy h1,
  .bert-gq-copy h2 {
    font-size: 30px;
  }
}


/* v1.2.0, quote modal eyebrow contrast fix. Targets the actual v11 class. */
.bert-gq-modal .bert-gq-modal-copy .bert-gq-eyebrow,
.bert-gq-modal .bert-gq-eyebrow,
.bert-gq-copy .bert-gq-eyebrow,
.bert-quote-modal .bert-quote-eyebrow,
.bert-quote-popup .bert-quote-eyebrow,
.bert-quote-modal__eyebrow,
.bert-quote-wrap .bert-quote-eyebrow {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  padding: 7px 16px !important;
  margin: 0 0 14px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #082B4D !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12) !important;
}

/* v1.2.1, compact quote modal polish: wider fields, no unnecessary modal scrolling on desktop. */
.bert-gq-modal {
  padding: 18px !important;
}

.bert-gq-modal-card {
  width: min(1180px, calc(100vw - 36px)) !important;
  max-height: min(90vh, 820px) !important;
  overflow: hidden !important;
  grid-template-columns: minmax(300px, 0.72fr) minmax(560px, 1.28fr) !important;
}

.bert-gq-modal-copy {
  padding: clamp(34px, 4vw, 54px) clamp(34px, 4vw, 52px) !important;
}

.bert-gq-modal-copy h2 {
  font-size: clamp(40px, 4vw, 56px) !important;
  line-height: 1.04 !important;
  margin-bottom: 18px !important;
  max-width: 360px !important;
}

.bert-gq-modal-copy p:not(.bert-gq-eyebrow) {
  max-width: 340px !important;
  font-size: 16px !important;
  line-height: 1.55 !important;
}

.bert-gq-modal-form {
  padding: clamp(24px, 3vw, 38px) clamp(32px, 4vw, 52px) !important;
  overflow: auto !important;
  max-height: min(90vh, 820px) !important;
}

.bert-gq-modal-form .bert-selected-quote {
  margin-bottom: 16px !important;
  padding: 14px 18px !important;
  border-radius: 14px !important;
}

.bert-gq-modal-form .bert-selected-quote span {
  margin-bottom: 4px !important;
  font-size: 12px !important;
}

.bert-gq-modal-form .bert-selected-quote strong {
  font-size: 18px !important;
  line-height: 1.25 !important;
}

.bert-gq-modal-form .bert-quote-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 16px !important;
}

/* Contact Form 7 may inject p/br/span wrappers. These rules keep the two-column grid working. */
.bert-gq-modal-form .bert-quote-grid > p,
.bert-gq-page-panel .bert-quote-grid > p {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bert-gq-modal-form .bert-quote-grid br,
.bert-gq-page-panel .bert-quote-grid br {
  display: none !important;
}

.bert-gq-modal-form .wpcf7-form-control-wrap,
.bert-gq-page-panel .wpcf7-form-control-wrap {
  display: block !important;
  width: 100% !important;
}

.bert-gq-modal-form .bert-q-field,
.bert-gq-modal-form .bert-quote-form-cf7 label {
  width: 100% !important;
  min-width: 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.bert-gq-modal-form .bert-q-field > span:first-child,
.bert-gq-modal-form .bert-quote-form-cf7 label > span:first-child {
  margin-bottom: 5px !important;
}

.bert-gq-modal-form .bert-span-2 {
  grid-column: 1 / -1 !important;
}

.bert-gq-modal-form .bert-quote-form-cf7 input[type="text"],
.bert-gq-modal-form .bert-quote-form-cf7 input[type="email"],
.bert-gq-modal-form .bert-quote-form-cf7 input[type="tel"],
.bert-gq-modal-form .bert-quote-form-cf7 select,
.bert-gq-modal-form .bert-quote-form-cf7 textarea {
  width: 100% !important;
  max-width: none !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 10px 14px !important;
  border-radius: 11px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.bert-gq-modal-form .bert-quote-form-cf7 textarea {
  min-height: 74px !important;
  max-height: 110px !important;
  resize: vertical !important;
}

.bert-gq-modal-form .bert-quote-actions {
  margin-top: 14px !important;
}

.bert-gq-modal-form .bert-quote-form-cf7 .bert-quote-submit,
.bert-gq-modal-form .bert-quote-form-cf7 input[type="submit"] {
  min-height: 44px !important;
  padding: 13px 26px !important;
  font-size: 14px !important;
}

.bert-gq-modal-form .wpcf7-response-output {
  margin-top: 12px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
}

@media (min-width: 861px) and (max-height: 780px) {
  .bert-gq-modal-card {
    max-height: calc(100vh - 28px) !important;
  }
  .bert-gq-modal-form {
    max-height: calc(100vh - 28px) !important;
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }
  .bert-gq-modal-copy h2 {
    font-size: clamp(36px, 3.4vw, 48px) !important;
  }
  .bert-gq-modal-copy p:not(.bert-gq-eyebrow) {
    font-size: 15px !important;
    line-height: 1.45 !important;
  }
  .bert-gq-modal-form .bert-quote-form-cf7 textarea {
    min-height: 62px !important;
    max-height: 82px !important;
  }
}

@media (max-width: 860px) {
  .bert-gq-modal-card {
    width: min(720px, calc(100vw - 24px)) !important;
    max-height: none !important;
    overflow: visible !important;
    grid-template-columns: 1fr !important;
  }
  .bert-gq-modal-form {
    max-height: none !important;
    overflow: visible !important;
  }
  .bert-gq-modal-form .bert-quote-grid {
    grid-template-columns: 1fr !important;
  }
  .bert-gq-modal-form .bert-span-2 {
    grid-column: auto !important;
  }
}


/* v1.2.2, official contact details in the left quote panel. */
.bert-gq-copy {
  display: flex !important;
  flex-direction: column !important;
}

.bert-gq-contact-card {
  margin-top: auto !important;
  padding-top: 34px !important;
  display: grid !important;
  gap: 8px !important;
  max-width: 360px !important;
}

.bert-gq-contact-kicker {
  display: inline-flex !important;
  width: fit-content !important;
  align-items: center !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.13) !important;
  color: #E11D2E !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

.bert-gq-contact-card a {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
}

.bert-gq-contact-card a:hover,
.bert-gq-contact-card a:focus {
  color: #E11D2E !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
}

@media (min-width: 861px) and (max-height: 780px) {
  .bert-gq-contact-card {
    padding-top: 22px !important;
    gap: 6px !important;
  }
  .bert-gq-contact-card a {
    font-size: 14px !important;
  }
}

@media (max-width: 860px) {
  .bert-gq-contact-card {
    margin-top: 22px !important;
    padding-top: 0 !important;
  }
}
