/* СпросиСексолога — дизайн-система
   Палитра: тёплый крем + винный + роза + золото. Интимно, но не пошло. */

:root {
  --bg: #FBF7F4;
  --bg-alt: #F5EBE7;
  --surface: #FFFFFF;
  --ink: #33202C;
  --ink-soft: #5C4453;
  --muted: #97798A;
  --wine: #7B2A4D;
  --wine-dark: #5C1E3A;
  --rose: #C94F7C;
  --rose-soft: #E8A7BF;
  --blush: #F4DEE8;
  --gold: #C9A227;
  --dark: #2B141F;
  --dark-2: #47203A;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(60, 20, 40, .07);
  --shadow-lg: 0 12px 34px rgba(60, 20, 40, .14);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--rose); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--wine); color: #fff;
  padding: 8px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-align: center;
  font-family: var(--font-body); font-weight: 600; font-size: 16px;
  padding: 12px 26px; border-radius: 999px; transition: all .18s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--wine), var(--rose));
  color: #fff; box-shadow: 0 6px 18px rgba(123, 42, 77, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(123, 42, 77, .4); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--wine);
  box-shadow: inset 0 0 0 2px var(--wine);
}
.btn-ghost:hover { background: var(--blush); color: var(--wine-dark); }
.btn-light { background: #fff; color: var(--wine); box-shadow: var(--shadow); }
.btn-light:hover { background: var(--blush); color: var(--wine-dark); }
.btn-danger { background: #fff; color: #A6273B; box-shadow: inset 0 0 0 2px #E5B7BE; }
.btn-danger:hover { background: #FBEDEF; }
.btn-lg { padding: 15px 34px; font-size: 17px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- шапка ---------- */
.site-header {
  background: rgba(251, 247, 244, .92); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--blush);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 24px; }
.logo img { height: 44px; width: auto; }

.main-nav { position: relative; }
.nav-list { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-list > li > a, .nav-cats-label {
  color: var(--ink-soft); font-weight: 600; font-size: 15px; cursor: pointer;
}
.nav-list > li > a:hover { color: var(--wine); }
.nav-list > li > a.btn-primary, .nav-list > li > a.btn-primary:hover { color: #fff; }
.nav-cats { position: relative; }
.nav-drop {
  position: absolute; top: calc(100% + 10px); left: -12px; min-width: 240px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  list-style: none; padding: 10px 0; display: none; z-index: 60;
}
.nav-cats:hover .nav-drop, .nav-cats:focus-within .nav-drop { display: block; }
.nav-drop a { display: block; padding: 8px 18px; font-size: 15px; color: var(--ink-soft); }
.nav-drop a:hover { background: var(--blush); color: var(--wine-dark); }
.nav-toggle, .nav-toggle-cb { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 60%, #5C2247 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 84px 20px 72px; max-width: 820px; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rose-soft); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; margin-bottom: 18px; }
.hero-sub { font-size: 19px; color: #E9D3DE; max-width: 560px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-trust { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; color: #C9A8B9; font-size: 14px; }
.hero-trust strong { color: #fff; }
.hero-glow {
  position: absolute; right: -180px; top: -120px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(201, 79, 124, .45), transparent 65%);
  z-index: 1;
}

/* ---------- компактный hero + лента ---------- */
.hero-compact .hero-inner {
  padding: 34px 20px 32px; max-width: 1120px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.hero-compact h1 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 6px; }
.hero-compact .hero-sub { font-size: 15.5px; margin-bottom: 0; max-width: none; }
.hero-compact .hero-actions { margin-bottom: 0; }
.btn-outline-light { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.feed-section { padding: 34px 0 56px; }
.feed-wrap { max-width: 780px; }
.feed-item {
  background: var(--surface); border: 1px solid var(--blush); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 22px;
}
.fi-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.fi-meta { font-size: 13px; color: var(--muted); }
.fi-title { font-size: 22px; margin-bottom: 10px; }
.fi-title a { color: var(--ink); }
.fi-title a:hover { color: var(--wine); }
.fi-q { color: var(--ink-soft); font-size: 15.5px; border-left: 3px solid var(--blush); padding-left: 14px; margin-bottom: 16px; }
.fi-q p { margin-bottom: 8px; }
.fi-q p:last-child { margin-bottom: 0; }
.fi-a {
  background: linear-gradient(180deg, #FDF3F7, #fff 120px);
  border: 1px solid var(--rose-soft); border-left: 4px solid var(--wine);
  border-radius: var(--radius-sm); padding: 18px 20px 12px;
}
.fi-a-text { margin-top: 12px; }
.fi-a-text p { margin-bottom: 10px; font-size: 15.5px; }
.fi-a-text.clamped {
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.fi-toggle {
  background: none; border: 0; color: var(--wine); font-weight: 700;
  font-family: var(--font-body); font-size: 14.5px; cursor: pointer; padding: 10px 0 4px;
}
.fi-toggle:hover { color: var(--rose); }
.fi-foot { margin-top: 12px; font-size: 13.5px; }
.feed-loading { text-align: center; color: var(--muted); padding: 22px; font-size: 14.5px; }

/* ---------- секции ---------- */
.section { padding: 62px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.link-more { font-weight: 600; }

/* ---------- карточки категорий ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--blush); border-radius: var(--radius);
  padding: 24px; color: var(--ink); box-shadow: var(--shadow); transition: all .18s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--rose-soft); color: var(--ink); }
.cat-card h3 { font-size: 20px; color: var(--wine); }
.cat-card p { font-size: 14px; color: var(--ink-soft); flex: 1; }
.cat-count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- карточки вопросов ---------- */
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.q-card {
  background: var(--surface); border: 1px solid var(--blush); border-radius: var(--radius);
  padding: 24px; color: var(--ink); box-shadow: var(--shadow); transition: all .18s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.q-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--rose-soft); color: var(--ink); }
.q-card h3 { font-size: 19px; }
.q-card:hover h3 { color: var(--wine); }
.q-card p { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.q-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.chip {
  align-self: flex-start; background: var(--blush); color: var(--wine-dark);
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
  letter-spacing: .02em;
}

/* ---------- split (как это работает + сайдбар) ---------- */
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; }
.steps { list-style: none; counter-reset: step; margin-bottom: 28px; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 22px 58px; font-size: 16px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(120deg, var(--wine), var(--rose)); color: #fff;
  font-family: var(--font-display); font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.pop-list { list-style: none; }
.pop-list li { border-bottom: 1px solid var(--blush); }
.pop-list a { display: block; padding: 11px 0; font-size: 15px; color: var(--ink-soft); font-weight: 500; }
.pop-list a:hover { color: var(--wine); }

/* ---------- SEO-блок ---------- */
.seo-block { background: var(--bg-alt); }
.seo-block h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 14px; }
.seo-block p { max-width: 820px; color: var(--ink-soft); margin-bottom: 12px; font-size: 15.5px; }

/* ---------- CTA-полоса ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--wine-dark), var(--wine) 55%, var(--rose));
  color: #fff; padding: 52px 0;
}
.cta-inner { text-align: center; max-width: 620px; }
.cta-inner h2 { font-size: 30px; margin-bottom: 10px; }
.cta-inner p { color: #F1D6E2; margin-bottom: 22px; }

/* ---------- страницы списков ---------- */
.page-head { background: var(--bg-alt); padding: 34px 0 30px; border-bottom: 1px solid var(--blush); }
.page-head h1 { font-size: clamp(26px, 4vw, 40px); }
.page-lead { color: var(--ink-soft); max-width: 700px; margin-top: 10px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs span { margin: 0 4px; color: var(--rose-soft); }
.pagination { display: flex; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.pagination a, .page-cur {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 600; font-size: 15px; padding: 0 8px;
}
.pagination a { background: #fff; box-shadow: var(--shadow); color: var(--ink-soft); }
.pagination a:hover { color: var(--wine); }
.page-cur { background: var(--wine); color: #fff; }
.empty-note { color: var(--ink-soft); font-size: 17px; }

/* ---------- страница вопроса ---------- */
.question-page { padding: 34px 0 62px; }
.question-page h1 { font-size: clamp(24px, 3.6vw, 36px); margin-bottom: 26px; max-width: 760px; }
.qa-layout { display: grid; grid-template-columns: 1fr 320px; gap: 44px; align-items: start; }
.preview-note { background: #FFF3CD; color: #7A5C00; padding: 8px 16px; border-radius: var(--radius-sm); display: inline-block; margin-bottom: 14px; font-size: 14px; }

.q-block {
  background: var(--surface); border: 1px solid var(--blush);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px;
}
.q-block-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--blush); color: var(--wine); font-weight: 700; font-size: 19px;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
}
.q-author { display: block; font-weight: 700; font-size: 15px; }
.q-date { display: block; font-size: 13px; color: var(--muted); }
.q-body p, .a-body p { margin-bottom: 12px; font-size: 16px; }
.q-body p:last-child, .a-body p:last-child { margin-bottom: 0; }

.a-block {
  background: linear-gradient(180deg, #FDF3F7, #fff 140px);
  border: 1px solid var(--rose-soft); border-left: 5px solid var(--wine);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 26px;
}
.a-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.a-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, var(--wine), var(--rose)); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 999px;
}
.a-badge::before { content: "♥"; font-size: 12px; }
.a-disclaimer { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--rose-soft); font-size: 13px; color: var(--muted); }

.ad-slot {
  position: relative; background: var(--dark); color: #fff; border-radius: var(--radius);
  padding: 26px; margin-bottom: 26px; overflow: hidden;
}
.ad-slot::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201, 79, 124, .5), transparent 70%);
}
.ad-mark { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #B08BA0; }
.ad-slot h3 { font-size: 20px; margin: 8px 0 6px; position: relative; z-index: 1; }
.ad-slot p { color: #DDC2D2; font-size: 14.5px; margin-bottom: 14px; position: relative; z-index: 1; }
.ad-slot .btn { position: relative; z-index: 1; }

.cta-inline {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--bg-alt); border-radius: var(--radius); padding: 22px 26px;
}
.cta-inline p { font-weight: 600; }

.qa-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 92px; }
.side-box { background: var(--surface); border: 1px solid var(--blush); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.side-box h2 { font-size: 19px; margin-bottom: 12px; }
.side-box-accent { background: linear-gradient(135deg, var(--wine-dark), var(--wine)); color: #fff; border: 0; }
.side-box-accent h2 { color: #fff; }
.side-box-accent p { color: #EBCFDD; font-size: 14.5px; margin-bottom: 14px; }

/* ---------- форма вопроса ---------- */
.form-wrap { max-width: 760px; }
.ask-form { background: var(--surface); border: 1px solid var(--blush); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 20px; flex: 1; }
.field-row { display: flex; gap: 18px; flex-wrap: wrap; }
.field-label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 7px; }
.field-label em { color: var(--rose); font-style: normal; }
.field-hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid #E5CFDB; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink); background: #FFFDFE;
  transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 3px rgba(201, 79, 124, .12); }
textarea { resize: vertical; }
.hp-field { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.form-foot { margin-top: 8px; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; max-width: 460px; }
.alert { border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 24px; font-size: 15px; }
.alert-ok { background: #EAF7EE; border: 1px solid #BCE3C8; color: #1E6B38; }
.alert-err { background: #FBEDEF; border: 1px solid #E5B7BE; color: #A6273B; }

/* ---------- текстовые страницы ---------- */
.text-page { max-width: 760px; }
.text-page h2 { font-size: 22px; margin: 26px 0 10px; }
.text-page p, .text-page li { color: var(--ink-soft); font-size: 16px; margin-bottom: 10px; }
.text-page ul { padding-left: 22px; }

/* ---------- 404 ---------- */
.err-page { text-align: center; padding: 90px 0; }
.err-code { font-family: var(--font-display); font-size: 90px; color: var(--rose-soft); font-weight: 700; line-height: 1; }
.err-page h1 { margin: 10px 0 8px; }
.err-page p { color: var(--ink-soft); margin-bottom: 24px; }
.err-page .hero-actions { justify-content: center; }

/* ---------- подвал ---------- */
.site-footer { background: var(--dark); color: #C6A8B8; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 36px; padding: 52px 20px 36px;
}
.footer-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.footer-tagline { font-size: 14px; margin-bottom: 14px; }
.badge-18 {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--rose);
  color: var(--rose-soft); font-weight: 800; font-size: 13px;
}
.footer-col h3 { color: #fff; font-size: 15px; font-family: var(--font-body); font-weight: 700; margin-bottom: 12px; letter-spacing: .04em; text-transform: uppercase; }
.footer-col ul { list-style: none; }
.footer-col a { color: #C6A8B8; font-size: 14.5px; display: block; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-note p { font-size: 13px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(201, 79, 124, .25); padding-top: 18px; padding-bottom: 22px; font-size: 13px; }

/* ---------- админка ---------- */
.admin-body { background: #F6F2F4; }
.admin-header { background: var(--dark); color: #fff; }
.admin-logo { color: #fff; font-weight: 800; font-size: 17px; }
.admin-logo span { color: var(--rose-soft); }
.admin-nav { display: flex; gap: 20px; }
.admin-nav a { color: #D9BCCB; font-size: 14.5px; font-weight: 600; }
.admin-nav a:hover { color: #fff; }
.admin-main { padding: 34px 20px 70px; }
.admin-main h1 { margin-bottom: 20px; }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tabs a {
  padding: 9px 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow);
  color: var(--ink-soft); font-weight: 600; font-size: 14.5px;
}
.admin-tabs a.active { background: var(--wine); color: #fff; }
.tab-count { opacity: .7; margin-left: 4px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 16px; border-bottom: 2px solid var(--bg-alt); }
.admin-table td { padding: 13px 16px; border-bottom: 1px solid var(--bg-alt); font-size: 15px; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.nowrap { white-space: nowrap; }
.admin-form { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); max-width: 860px; }
.admin-meta { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.seo-details { margin-bottom: 20px; border: 1px dashed #E5CFDB; border-radius: var(--radius-sm); padding: 14px 18px; }
.seo-details summary { cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-soft); margin-bottom: 8px; }
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 44px 40px; width: 100%; max-width: 400px; text-align: center;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.login-card h1 { font-size: 20px; }
.login-card input, .login-card .btn { width: 100%; }

/* ---------- адаптив ---------- */
@media (max-width: 920px) {
  .split, .qa-layout { grid-template-columns: 1fr; }
  .qa-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 24px; height: 2.5px; background: var(--wine); border-radius: 2px; transition: all .2s; }
  .nav-list {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch; gap: 0; min-width: 240px; padding: 10px 0; z-index: 70;
  }
  .nav-toggle-cb:checked ~ .nav-list { display: flex; }
  .nav-list > li > a, .nav-cats-label { display: block; padding: 10px 20px; }
  .nav-drop { position: static; display: block; box-shadow: none; padding: 0 0 6px; }
  .nav-drop a { padding: 7px 34px; font-size: 14px; }
  .nav-cta { padding: 10px 20px; }
  .hero-inner { padding: 56px 20px 48px; }
  .section { padding: 44px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .field-row { flex-direction: column; gap: 0; }
  .admin-table { display: block; overflow-x: auto; }
}
