/* ==========================================================================
   Special Offer page template — matches assets/images/mockup.jpeg
   ========================================================================== */

html:has(body.template-special-offer),
body.template-special-offer {
  margin: 0;
  min-height: 100%;
  background-color: #030303 !important;
  background-image: url("../images/carbon-bg-tile.jpg") !important;
  background-repeat: repeat !important;
  background-size: 160px 160px !important;
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
}

/* Fallback without :has() */
html.so-carbon-bg {
  background-color: #030303 !important;
  background-image: url("../images/carbon-bg-tile.jpg") !important;
  background-repeat: repeat !important;
  background-size: 160px 160px !important;
}

.template-special-offer .so-page {
  --so-red: #e10600;
  --so-red-dark: #b80500;
  --so-border: rgba(255, 255, 255, 0.18);
  --so-muted: rgba(255, 255, 255, 0.62);
  --so-input-bg: rgba(12, 12, 12, 0.88);
  --so-display: "Saira Condensed", "Arial Narrow", Impact, sans-serif;
  background: transparent;
  min-height: auto;
  display: block;
}

.template-special-offer .so-container {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ---- Header (logo only) ---- */
.template-special-offer .so-header {
  padding: 1rem 0 0.25rem;
}

.template-special-offer .so-header-inner {
  display: flex;
  align-items: center;
}

.template-special-offer .so-logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(320px, 78vw);
  object-fit: contain;
}

/* ---- Main grid ---- */
.template-special-offer .so-main {
  flex: initial;
  padding: 0.5rem 0 0.5rem;
}

.template-special-offer .so-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem 3rem;
  align-items: start;
}

/* ---- Contact column ---- */
.template-special-offer .so-contact-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.template-special-offer .so-accent-bar {
  width: 6px;
  height: 1.85rem;
  background: var(--so-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.template-special-offer .so-title {
  margin: 0;
  font-family: var(--so-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
}

.template-special-offer .so-lead {
  margin: 0 0 1.35rem;
  color: var(--so-muted);
  font-size: 0.98rem;
  max-width: 28rem;
}

/* Form — Quform styled to match mockup */
.template-special-offer .so-form-wrap {
  margin-bottom: 0.85rem;
  width: 100%;
  max-width: 100%;
}

.template-special-offer .so-form-wrap .quform,
.template-special-offer .so-form-wrap .quform-form,
.template-special-offer .so-form-wrap .quform-form-inner,
.template-special-offer .so-form-wrap .quform-elements,
.template-special-offer .so-form-wrap .quform-element-page,
.template-special-offer .so-form-wrap .quform-child-elements {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  box-sizing: border-box !important;
}

.template-special-offer .so-form-wrap .quform-child-elements {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Quform clearfix ::before/::after become fake flex/grid items — kill them */
.template-special-offer .so-form-wrap .quform-child-elements:before,
.template-special-offer .so-form-wrap .quform-child-elements:after,
.template-special-offer .so-form-wrap .quform-cf:before,
.template-special-offer .so-form-wrap .quform-cf:after {
  content: none !important;
  display: none !important;
}

.template-special-offer .so-form-wrap .quform-element {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* JS-wrapped First + Last name row */
.template-special-offer .so-form-wrap .so-name-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 0.75rem;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  clear: both !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.template-special-offer .so-form-wrap .so-name-row > .quform-element {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  display: block !important;
}

/* CSS-only fallback (before JS runs): float First + Last side by side */
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_3,
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_4 {
  float: left !important;
  clear: none !important;
  width: calc(50% - 0.375rem) !important;
  max-width: calc(50% - 0.375rem) !important;
  margin: 0 0 0.75rem !important;
}

.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_3 {
  margin-right: 0.75rem !important;
}

.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_5,
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_6,
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_7,
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_2,
.template-special-offer .so-form-wrap .quform-child-elements > .quform-element-submit {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

.template-special-offer .so-form-wrap .quform-spacer {
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide visible labels — mockup uses placeholders inside fields */
.template-special-offer .so-form-wrap .quform-label {
  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;
}

.template-special-offer .so-form-wrap .quform-inner,
.template-special-offer .so-form-wrap .quform-input {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.template-special-offer .so-form-wrap .quform-field,
.template-special-offer .so-form-wrap input.quform-field-text,
.template-special-offer .so-form-wrap input.quform-field-email,
.template-special-offer .so-form-wrap textarea.quform-field-textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  background: #141414 !important;
  background-color: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 4px !important;
  color: #fff !important;
  padding: 0 1rem !important;
  margin: 0 !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
}

.template-special-offer .so-form-wrap textarea.quform-field-textarea {
  height: 70px !important;
  min-height: 70px !important;
  max-height: none !important;
  padding: 0.65rem 1rem !important;
  resize: vertical !important;
}

.template-special-offer .so-form-wrap .quform-field::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1 !important;
}

.template-special-offer .so-form-wrap .quform-field:focus {
  border-color: #e10600 !important;
  background: #101010 !important;
}

/* Submit button — full width red */
.template-special-offer .so-form-wrap .quform-element-submit,
.template-special-offer .so-form-wrap .quform-button-submit,
.template-special-offer .so-form-wrap .quform-button-submit-default {
  width: 100% !important;
  display: block !important;
  float: none !important;
  text-align: center !important;
}

.template-special-offer .so-form-wrap button.quform-submit,
.template-special-offer .so-form-wrap .quform-submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 54px !important;
  height: auto !important;
  margin: 0.15rem 0 0 !important;
  padding: 0.95rem 1.25rem !important;
  background: #e10600 !important;
  background-color: #e10600 !important;
  background-image: none !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-family: "Saira Condensed", "Arial Narrow", Impact, sans-serif !important;
  font-style: italic !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.template-special-offer .so-form-wrap button.quform-submit:hover,
.template-special-offer .so-form-wrap .quform-submit:hover {
  background: #b80500 !important;
  background-color: #b80500 !important;
  transform: translateY(-1px);
}

.template-special-offer .so-form-wrap .quform-button-text,
.template-special-offer .so-form-wrap .quform-button-submit-text {
  color: #fff !important;
  font: inherit !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
}

.template-special-offer .so-form-wrap .quform-loading {
  color: #fff;
}

.template-special-offer .so-form-wrap .quform-error-message,
.template-special-offer .so-form-wrap .quform-errors-list,
.template-special-offer .so-form-wrap .quform-error {
  color: #ff8a80 !important;
  font-size: 0.85rem !important;
}

.template-special-offer .so-form-wrap .quform-success-message {
  color: #fff !important;
  background: rgba(225, 6, 0, 0.2) !important;
  border: 1px solid #e10600 !important;
  padding: 0.85rem 1rem !important;
  border-radius: 4px !important;
}

/* Hide honeypot */
.template-special-offer .so-form-wrap .quform-element-tree {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Fallback native form (if Quform off) */
.template-special-offer .so-form-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.template-special-offer .so-form-row--2 {
  grid-template-columns: 1fr 1fr;
}

.template-special-offer .so-field {
  display: block;
  margin-bottom: 0.75rem;
}

.template-special-offer .so-form-row .so-field {
  margin-bottom: 0;
}

.template-special-offer .so-form input,
.template-special-offer .so-form textarea {
  width: 100%;
  height: 52px;
  background: #141414 !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 4px !important;
  color: #fff !important;
  padding: 0 1rem !important;
  font-size: 0.95rem !important;
  outline: none;
  box-shadow: none !important;
  box-sizing: border-box;
}

.template-special-offer .so-form textarea {
  height: auto;
  min-height: 70px;
  padding: 0.65rem 1rem !important;
  resize: vertical;
}

.template-special-offer .so-form input::placeholder,
.template-special-offer .so-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.template-special-offer .so-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 0.15rem;
  padding: 0.95rem 1.25rem !important;
  background: #e10600 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-family: "Saira Condensed", "Arial Narrow", Impact, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.template-special-offer .so-form-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 575.98px) {
  .template-special-offer .so-form-wrap .so-name-row {
    flex-direction: column !important;
  }

  .template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_3,
  .template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_4 {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
  }
}

.template-special-offer .so-response-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.75rem 0 1.1rem;
  color: var(--so-muted);
  font-size: 0.88rem;
}

.template-special-offer .so-response-note .bi {
  color: #fff;
}

/* Feature row */
.template-special-offer .so-features {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.template-special-offer .so-feature {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 1rem 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.template-special-offer .so-feature:first-child {
  padding-left: 0;
}

.template-special-offer .so-feature:last-child {
  border-right: 0;
  padding-right: 0;
}

.template-special-offer .so-feature-icon {
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.template-special-offer .so-feature strong {
  display: block;
  font-family: var(--so-display);
  font-style: italic;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.15rem;
}

.template-special-offer .so-feature span {
  display: block;
  color: var(--so-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

/* ---- Offer image column ---- */
.template-special-offer .so-offer-figure {
  margin: 0;
}

.template-special-offer .so-offer-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 520px;
  margin-left: auto;
  object-fit: contain;
}

/* ---- Footer ---- */
.template-special-offer .so-footer {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.85rem 0 1rem;
}

.template-special-offer .so-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
}

.template-special-offer .so-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
}

.template-special-offer .so-footer-link:hover {
  color: #fff;
}

.template-special-offer .so-footer-sep {
  color: rgba(255, 255, 255, 0.35);
}

/* Hide default WP admin-bar overlap extras if needed */
.template-special-offer.admin-bar .so-header {
  padding-top: calc(1.25rem + 0px);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .template-special-offer .so-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .template-special-offer .so-offer {
    order: -1;
  }

  .template-special-offer .so-offer-figure img {
    margin-inline: auto;
    max-width: 420px;
  }
}

@media (max-width: 575.98px) {
  .template-special-offer .so-form-wrap .so-name-row {
    flex-direction: column !important;
  }

  .template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_3,
  .template-special-offer .so-form-wrap .quform-child-elements > .quform-element-1_4 {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
  }

  .template-special-offer .so-features {
    grid-template-columns: 1fr;
  }

  .template-special-offer .so-feature {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.9rem 0;
  }

  .template-special-offer .so-feature:last-child {
    border-bottom: 0;
  }

  .template-special-offer .so-logo img {
    height: 42px;
  }
}
