/* ==========================================================================
   /tools/imya-po-otchestvu — подбор имени по отчеству
   Наследует hero/FAQ/share базу из maternity-bag.css. Стеклянный стиль.
   ========================================================================== */
@import url("/assets/css/maternity-bag.css");
@import url("/assets/css/partners.css");

:root {
  --io-gold: #bda000;
  --io-pink: #f7cbca;
  --io-ink: #2b2326;
  --io-border: #ecd9d8;
}

/* ---------- Page & Hero ---------- */
.io-page {
  background:
    radial-gradient(ellipse 52% 42% at 8% 6%, rgba(247, 203, 202, 0.30), transparent 60%),
    radial-gradient(ellipse 48% 44% at 94% 20%, rgba(189, 160, 0, 0.10), transparent 62%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(247, 203, 202, 0.16), transparent 65%),
    #fdf7f6 !important;
}
.io-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(247, 230, 229, 0.55) 100%),
    url("/assets/images/imya-po-otchestvu-hero-bg.webp") center / cover no-repeat,
    linear-gradient(180deg, #ffffff 0%, #f7e6e5 100%) !important;
  border-bottom-color: #efd6d5 !important;
}
.io-hero .mb-hero-title span::after {
  background: linear-gradient(90deg, rgba(247, 203, 202, 0.7), rgba(189, 160, 0, 0.35));
}

/* ---------- Стеклянные плашки ---------- */
.io-form-section { margin-bottom: 0 !important; }
.io-form-card,
.io-offer,
.io-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.80) 0%, rgba(253, 240, 240, 0.55) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 26px rgba(150, 90, 90, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.io-form-card {
  border-radius: 20px;
  padding: 28px 32px;
  margin: 0 0 12px;
}

.io-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.io-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.io-field label {
  font-family: "Montserrat", sans-serif;
  font-size: 14px; font-weight: 600; color: var(--io-ink);
}
.io-field input[type="text"],
.io-field select {
  width: 100%;
  padding: 12px 14px;
  font-family: "Nunito", sans-serif;
  font-size: 16px; color: var(--io-ink);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(253, 240, 240, 0.6));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(150, 90, 90, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.io-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23988' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 38px; cursor: pointer;
}
.io-field input[type="text"]:focus,
.io-field select:focus {
  outline: none; border-color: var(--io-gold);
  box-shadow: 0 0 0 3px rgba(189, 160, 0, 0.15);
}
.io-field-hint { font-size: 12.5px; color: #a58f8e; line-height: 1.4; }

/* Переключатель пола */
.io-gender {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(150, 90, 90, 0.06);
}
.io-gender-btn {
  flex: 1; padding: 9px 8px;
  font-family: "Montserrat", sans-serif; font-size: 14px; font-weight: 600;
  color: #8c7a7a; background: transparent; border: none; border-radius: 9px;
  cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.io-gender-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--io-gold), #9c8500);
  box-shadow: 0 3px 10px rgba(189, 160, 0, 0.28);
}

.io-calc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 28px;
  font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #d76f6d, #c2504e);
  border: none; border-radius: 14px; cursor: pointer;
  transition: transform .12s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(194, 80, 78, 0.28);
}
.io-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(194, 80, 78, 0.34); }
.io-calc-btn:active { transform: translateY(0); }
.io-error { margin: 12px 0 0; color: #c2504e; font-size: 14px; font-weight: 600; }
.io-share { margin: 0 0 24px; }

/* ---------- Результаты ---------- */
.io-results { margin-bottom: 8px; }
.io-results-title {
  font-family: "Montserrat", sans-serif;
  font-size: 22px; font-weight: 800; color: var(--main-bg-color);
  margin: 0 0 16px !important; letter-spacing: -.01em;
}

/* Персональный оффер */
.io-offer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  margin: 0 0 20px;
  text-decoration: none;
  color: var(--io-ink);
  transition: transform .12s, box-shadow .2s;
}
.io-offer:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(150, 90, 90, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.75); }
.io-offer-ic { font-size: 26px; }
.io-offer-lead { display: block; font-family: "Montserrat", sans-serif; font-size: 16px; font-weight: 800; }
.io-offer-desc { display: block; font-size: 13.5px; color: #7d6b6b; margin-top: 2px; }
.io-offer-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 14px; white-space: nowrap;
  color: #fff; padding: 10px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--io-gold), #9c8500);
  box-shadow: 0 4px 12px rgba(189, 160, 0, 0.3);
}
.io-offer-mark {
  grid-column: 1 / -1;
  font-size: 10.5px; color: #a89a9a; line-height: 1.4;
}

/* Сетка имён */
.io-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.io-card {
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 3px solid var(--tier, #ddd);
}
.io-card--great { --tier: #5aa469; }
.io-card--good  { --tier: var(--io-gold); }
.io-card--ok    { --tier: #e08a3c; }
.io-card--bad   { --tier: #d0736f; }
.io-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.io-card-name {
  font-family: "Montserrat", sans-serif; font-size: 19px; font-weight: 700; color: var(--io-ink);
}
.io-score {
  font-family: "Montserrat", sans-serif; font-size: 13px; font-weight: 800;
  color: #fff; min-width: 30px; text-align: center;
  padding: 3px 8px; border-radius: 999px; background: var(--tier, #bbb);
}
.io-card-full { font-family: "Nunito", sans-serif; font-size: 14px; font-weight: 600; color: #7a6a6a; }
.io-card-meaning { font-size: 12.5px; color: #a08e8e; line-height: 1.4; }
.io-empty { color: #8c7a7a; font-size: 15px; padding: 20px 0; }

.io-more-btn {
  display: block; margin: 20px auto 0;
  padding: 11px 26px;
  font-family: "Montserrat", sans-serif; font-size: 15px; font-weight: 700;
  color: var(--io-ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(150, 90, 90, 0.08);
  transition: background .15s, transform .12s;
}
.io-more-btn:hover { background: #fff; transform: translateY(-1px); }

/* ---------- Кастомный стеклянный селект ---------- */
.io-select { position: relative; }
.io-select-native { display: none !important; }
.io-select-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px;
  font-family: "Nunito", sans-serif; font-size: 16px; color: var(--io-ink);
  text-align: left; cursor: pointer;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(253, 240, 240, 0.6));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(150, 90, 90, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color .15s, box-shadow .15s;
}
.io-select-trigger:hover { border-color: rgba(189, 160, 0, 0.5); }
.io-select.is-open .io-select-trigger {
  border-color: var(--io-gold);
  box-shadow: 0 0 0 3px rgba(189, 160, 0, 0.15);
}
.io-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.io-select-chev { display: inline-flex; color: #a58f8e; transition: transform .2s, color .2s; flex-shrink: 0; }
.io-select-chev svg { width: 16px; height: 16px; }
.io-select.is-open .io-select-chev { transform: rotate(180deg); color: var(--io-gold); }
.io-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  display: none; flex-direction: column; gap: 2px; padding: 6px;
  background: linear-gradient(150deg, #ffffff 0%, #fdf3f2 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(224, 200, 200, 0.7);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(120, 70, 70, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.io-select.is-open .io-select-menu { display: flex; animation: io-pop .16s ease; }
@keyframes io-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.io-select-option {
  text-align: left; padding: 10px 12px; border: none; background: transparent;
  font-family: "Nunito", sans-serif; font-size: 15px; color: var(--io-ink);
  border-radius: 9px; cursor: pointer; transition: background .12s;
}
.io-select-option:hover { background: rgba(189, 160, 0, 0.12); }
.io-select-option.is-selected {
  background: linear-gradient(135deg, rgba(189, 160, 0, 0.22), rgba(189, 160, 0, 0.10));
  font-weight: 700; color: #8a7600;
}

/* ---------- Нумерованные списки в SEO-тексте (база стилизует только ul) ---------- */
.io-seo ol {
  list-style: none;
  counter-reset: io-step;
  padding: 0;
  margin: 0 0 16px !important;
}
.io-seo ol li {
  position: relative;
  counter-increment: io-step;
  padding: 8px 0 8px 40px;
  font-size: 15px; line-height: 1.6;
  color: var(--dark-text-color);
  border-bottom: 1px dashed #f0e3e2;
}
.io-seo ol li:last-child { border-bottom: none; }
.io-seo ol li::before {
  content: counter(io-step);
  position: absolute; left: 0; top: 7px;
  width: 25px; height: 25px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e0be6a, var(--io-gold));
  color: #fff; border-radius: 50%;
  font-family: "Montserrat", sans-serif; font-size: 12px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(189, 160, 0, 0.25);
}
.io-seo ol li strong { color: var(--main-bg-color); font-weight: 700; }

/* ---------- Ссылки в FAQ (блок вне .io-seo) ---------- */
.io-page .faq-answer a {
  color: var(--io-gold);
  text-decoration: underline;
  text-decoration-color: rgba(189, 160, 0, 0.4);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.io-page .faq-answer a:hover { color: #8a7600; text-decoration-color: var(--io-gold); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .io-form-card { padding: 22px 18px; }
  .io-form-grid { grid-template-columns: 1fr; gap: 16px; }
  .io-offer { grid-template-columns: auto 1fr; }
  .io-offer-go { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 520px) {
  .io-grid { grid-template-columns: 1fr 1fr; }
  .io-card-name { font-size: 17px; }
  .io-results-title { font-size: 19px; }
}
@media (max-width: 380px) {
  .io-grid { grid-template-columns: 1fr; }
}
