/* =====================================================================
   "Задать вопрос" — panel + text column + Contact Form 7 skin
   Loaded only on pages using the [glav_ask_form] shortcode.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap&subset=cyrillic,cyrillic-ext,latin');

.askband {
  --c-bg:        #08080a;
  --c-text:      #f3f1ee;
  --c-muted:     #938e84;
  --c-red:       #ff3a26;
  --c-red-warm:  #ef4a2b;
  --grad-gold:   linear-gradient(180deg, #f7dda8 0%, #e2a459 42%, #c4762f 100%);
  --c-gold:      #e2a459;
  --c-panel:      rgba(255, 255, 255, 0.025);
  --c-panel-line: rgba(255, 255, 255, 0.09);
  --c-field:      rgba(255, 255, 255, 0.035);
  --c-field-line: rgba(255, 255, 255, 0.14);
  --pad-x: clamp(1.25rem, 5vw, 5.5rem);
  --ff: 'Montserrat', 'Segoe UI', system-ui, sans-serif;

  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 7vw, 6rem) 0;
  background: var(--c-bg);
  font-family: var(--ff);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
}
.askband *, .askband *::before, .askband *::after { box-sizing: border-box; }

/* Defensive reset: some themes apply global borders/margins/button
   skins to plain <p>, <label>, <button>, <input type=submit> tags.
   Strip those inside our section so only our own rules below apply. */
.askband p,
.askband label,
.askband ul,
.askband li {
  margin: 0;
  padding: 0;
  border: none;
  list-style: none;
  background: none;
}
.askband button,
.askband input[type="submit"],
.askband input[type="button"] {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
}

.askband__inner {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* =====================================================================
   Panel
   ===================================================================== */
.askband__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  padding: clamp(2rem, 3.4vw, 3.4rem);
  border: 1px solid var(--c-panel-line);
  border-radius: 1.1rem;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 58, 38, 0.09) 0%, transparent 55%),
    var(--c-panel);
  overflow: hidden;
}
.askband__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(2rem, 3.4vw, 3.4rem);
  right: clamp(2rem, 3.4vw, 3.4rem);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
    rgba(255, 58, 38, 0) 0%,
    rgba(255, 58, 38, 0.85) 16%,
    #ff7a52 50%,
    rgba(255, 58, 38, 0.85) 84%,
    rgba(255, 58, 38, 0) 100%);
  box-shadow: 0 0 16px 1px rgba(255, 74, 42, 0.45);
}

/* =====================================================================
   Left column: copy
   ===================================================================== */
.askband__text {
  position: relative;
  padding-left: clamp(1rem, 1.6vw, 1.6rem);
}
.askband__text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(var(--c-red) 0%, rgba(255, 58, 38, 0.16) 58%, transparent 100%);
}
.askband__text::after {
  content: "";
  position: absolute;
  left: -3px;
  top: -0.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-red);
  box-shadow: 0 0 10px 2px rgba(255, 58, 38, 0.7);
}
.askband__eyebrow {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.askband__title {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 1rem + 1.7vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-text);
}
.askband__desc {
  margin: 0;
  max-width: 30rem;
  font-size: 0.94rem;
  line-height: 1.7;
  color: rgba(243, 241, 238, 0.72);
}

/* =====================================================================
   Right column: Contact Form 7
   ===================================================================== */
.askform-cf7 form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.askform-cf7 .askform__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 0;
}
.askform-cf7 .askform__field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
}
.askform-cf7 .askform__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.askform-cf7 .askform__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--c-field-line);
  border-radius: 0.6rem;
  background: var(--c-field);
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.askform-cf7 .askform__input--area { min-height: 4.5rem; resize: vertical; }
.askform-cf7 .askform__input::placeholder { color: rgba(243, 241, 238, 0.34); opacity: 1; }
.askform-cf7 .askform__input:hover { border-color: rgba(255, 255, 255, 0.22); }
.askform-cf7 .askform__input:focus {
  outline: none;
  border-color: var(--c-red-warm);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(255, 58, 38, 0.14);
}
.askform-cf7 .wpcf7-form-control-wrap { display: block; }

.askform-cf7 .askform__consent {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: rgba(243, 241, 238, 0.55);
}
.askform-cf7 .wpcf7-list-item { margin: 0; }
.askform-cf7 .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.askform-cf7 input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.18em;
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--c-red-warm);
}

.askform-cf7 .askform__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem 0.9rem 1.35rem;
  border: 1px solid rgba(255, 58, 38, 0.55);
  border-radius: 0.6rem;
  background: transparent;
  color: var(--c-text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.askform-cf7 .askform__submit:hover {
  border-color: var(--c-red);
  background: rgba(255, 58, 38, 0.07);
}
.askform-cf7 .askform__submit::after {
  content: "→";
  color: var(--c-red);
  font-size: 1rem;
  line-height: 1;
}
.askform-cf7 .wpcf7-spinner { margin-left: 0.6rem; }

.askform-cf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.4rem;
  color: #ff8a7a;
  font-size: 0.75rem;
}
.askform-cf7 .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--c-field-line);
  color: var(--c-text);
  font-size: 0.85rem;
}
.askform-cf7 form.sent .wpcf7-response-output {
  border-color: rgba(90, 200, 130, 0.5);
  color: #8be3a8;
}
.askform-cf7 form.failed .wpcf7-response-output,
.askform-cf7 form.aborted .wpcf7-response-output {
  border-color: rgba(255, 58, 38, 0.5);
  color: #ff8a7a;
}

/* =====================================================================
   Mobile
   ===================================================================== */
@media (max-width: 55.99rem) {
  .askband__panel {
    grid-template-columns: 1fr;
    padding: clamp(1.6rem, 6vw, 2.2rem);
    gap: 2rem;
  }
  .askband__desc { max-width: none; }
  .askform-cf7 .askform__row { grid-template-columns: 1fr; }
  .askform-cf7 .askform__submit { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .askband * { transition: none !important; }
}
