/* Раздел «В помощь мамочке» (mamochke-1, 10.11.2026): список книжек, страница книжки и файлы в кабинете.
   Решение Юлии 10.11: «там должно быть такое детское» — тёплый фон с пастельными пятнами, фото малышей с мамами,
   у каждой книжки свой цвет (--tone, --tone-soft из app/mamochke.py, как у обложки). Шапка и подвал — как на всём сайте. */

.mam-page {
  --mam-bg: #fff8f2;
  --mam-ink: #3a2e2c;
  --mam-cta: #b9472f;        /* кнопки «Купить», «Оплатить»: белый текст, контраст 5:1 */
  --mam-cta-hover: #9e3b26;
  background:
    radial-gradient(520px 420px at 94% 4%, rgba(255, 196, 170, .55), transparent 70%),
    radial-gradient(460px 380px at -4% 36%, rgba(187, 230, 214, .5), transparent 70%),
    radial-gradient(540px 440px at 104% 70%, rgba(214, 205, 245, .5), transparent 70%),
    radial-gradient(420px 360px at 10% 96%, rgba(255, 225, 160, .45), transparent 70%),
    var(--mam-bg);
  color: var(--mam-ink);
}
.mam-page h1, .mam-page h2 { text-transform: none; letter-spacing: -0.01em; font-weight: 700; color: var(--mam-ink); }
.mam-page .lead { color: #5a4a46; }
.mam-page .muted { color: #7a6a66; }
.mam-page .crumbs { margin-top: 0; padding-top: 22px; }

/* кнопки раздела: тёплые, «детские», без стального перелива */
.mam-page .btn:not(.btn--ghost):not(.btn--danger):not([disabled]) {
  background: var(--mam-cta); color: #fff; animation: none; box-shadow: 0 12px 26px -14px rgba(150, 50, 30, .65);
}
.mam-page .btn:not(.btn--ghost):not(.btn--danger):not([disabled]):hover { background: var(--mam-cta-hover); color: #fff; }

/* ── шапка раздела: текст и большое фото ── */
.mam-intro { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(18px, 4vw, 40px) 0 clamp(36px, 5vw, 60px); }
.mam-intro h1 { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 3.6rem); line-height: 1.05; margin-bottom: .45em; }
.mam-wave { white-space: nowrap; padding-bottom: .12em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M2 8c10-6 18-6 28 0s18 6 28 0 18-6 28 0 18 6 30 0' fill='none' stroke='%23F08A6C' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 100% .32em no-repeat; }
.mam-how { margin: 14px 0 0; color: #6a5955; max-width: var(--measure); }
.mam-intro__actions { margin: 26px 0 0; }
.mam-intro__photo { position: relative; margin: 0; isolation: isolate; }
.mam-intro__photo::before { content: ""; position: absolute; inset: 22px -16px -16px 22px; z-index: -1; border-radius: 44px; background: #ffd9c7; }
.mam-intro__photo img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 40px; box-shadow: 0 26px 50px -28px rgba(120, 60, 40, .55); }
.mam-doodle { position: absolute; z-index: 1; filter: drop-shadow(0 4px 6px rgba(120, 60, 40, .18)); }
.mam-doodle--star { width: 54px; left: -22px; top: 10%; fill: #ffc94d; transform: rotate(-12deg); }
.mam-doodle--heart { width: 44px; right: -14px; top: -14px; fill: #f2879a; transform: rotate(10deg); }
.mam-doodle--cloud { width: 78px; left: 12%; bottom: -26px; fill: #fff; filter: drop-shadow(0 6px 10px rgba(80, 110, 160, .25)); }

/* ── карточки книжек ── */
.mam-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 28px; margin: 8px 0 24px; scroll-margin-top: 24px; }
.mam-book { --tone: #e9967a; --tone-soft: #fdebdd; display: flex; flex-direction: column; background: var(--white); border-radius: 28px; overflow: hidden;
  box-shadow: 0 18px 40px -26px rgba(120, 70, 50, .5); border: 2px solid var(--tone-soft); transition: transform .25s ease, box-shadow .25s ease; }
.mam-book:hover { transform: translateY(-4px); box-shadow: 0 26px 48px -26px rgba(120, 70, 50, .6); }
.mam-book__cover { position: relative; display: block; background: var(--tone-soft); padding: 18px 18px 0; }
.mam-book__cover img { display: block; width: 100%; height: auto; border-radius: 14px 14px 0 0; box-shadow: 0 -2px 18px rgba(80, 50, 40, .12); }
.mam-book__blank { display: grid; place-items: center; aspect-ratio: 720 / 1018; padding: 24px; text-align: center; font-weight: 600; color: var(--ink-2); }
.mam-book__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; border-top: 4px solid var(--tone); }
.mam-book__title { font-size: 1.3rem; line-height: 1.25; margin: 0; text-wrap: balance; }
.mam-book__title a { color: var(--mam-ink, var(--ink)); text-decoration: none; }
.mam-book__title a:hover { text-decoration: underline; text-decoration-color: var(--tone); text-decoration-thickness: 2px; }
.mam-book__text { margin: 0; color: #5f504c; }
.mam-book__buy { margin: auto 0 0; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mam-book__price { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mam-ink, var(--ink)); }
.mam-page .mam-book__more { background: var(--tone-soft); border: 2px solid var(--tone); color: var(--mam-ink); }
.mam-page .mam-book__more:hover { background: var(--white); border-color: var(--tone); color: var(--mam-ink); }

/* комплект — широкая карточка над книжками, пока в ряду больше одной колонки */
@media (min-width: 700px) {
  .mam-book--wide { grid-column: 1 / -1; flex-direction: row; }
  .mam-book--wide .mam-book__cover { flex: 0 0 clamp(220px, 30%, 300px); padding: 18px; }
  .mam-book--wide .mam-book__cover img { border-radius: 14px; }
  .mam-book--wide .mam-book__body { justify-content: center; gap: 14px; padding: clamp(24px, 4vw, 44px); border-top: 0; border-left: 4px solid var(--tone); }
  .mam-book--wide .mam-book__title { font-size: 1.7rem; }
  .mam-book--wide .mam-book__text { max-width: var(--measure); font-size: 1.05rem; }
  .mam-book--wide .mam-book__buy { margin: 6px 0 0; justify-content: flex-start; gap: 20px; }
}

/* ── «Занимаемся вместе»: фото малышей с мамами ── */
.mam-together { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); }
.mam-together h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); margin-bottom: .25em; }
.mam-together__lead { margin: 0; color: #6a5955; }
.mam-together__list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.mam-together li { --tone: #e9967a; }
.mam-together figure { margin: 0; }
.mam-together img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 26px; border: 5px solid #fff;
  box-shadow: 0 16px 34px -22px rgba(120, 70, 50, .6); transform: rotate(-1.5deg); }
.mam-together li:nth-child(even) img { transform: rotate(1.5deg); }
.mam-together figcaption { margin-top: 14px; font-weight: 600; text-align: center; line-height: 1.3; text-wrap: balance; }
.mam-together figcaption::before { content: ""; display: inline-block; vertical-align: .08em; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--tone); }
.mam-together figcaption a { color: var(--mam-ink); text-decoration-color: var(--tone); text-decoration-thickness: 2px; }
@media (max-width: 900px) {
  /* на узком экране фото листаются пальцем внутри полосы, страница вбок не едет */
  .mam-together__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(190px, 44%); overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 6px 4px 14px; margin-inline: -4px; overscroll-behavior-x: contain; }
  .mam-together li { scroll-snap-align: start; }
}

/* кабинет: файлы купленной книжки или комплекта */
.mam-cab__title { margin-bottom: 6px; text-wrap: balance; }
.mam-cab__tariff { margin: 0 0 18px; }
.mam-files { list-style: none; padding: 0; margin: 24px 0 18px; display: grid; gap: 10px; max-width: 760px; }
.mam-files li { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-m); padding: 14px 18px; }
.mam-files__name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mam-cab__help { max-width: var(--measure); }

/* знак информационной продукции (436-ФЗ) */
.mam-age { display: inline-grid; place-items: center; min-width: 2.6em; height: 2.6em; padding: 0 .3em; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 700; font-size: .9rem; line-height: 1; }
.mam-book__age { margin: 0; }

/* ── страница книжки ── */
.mam-hero { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: 24px 0 8px; }
.mam-hero__cover { margin: 0; padding: 18px; border-radius: 32px; background: var(--tone-soft, #fdebdd); }
.mam-hero__cover img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 14px 34px rgba(80, 50, 40, .18); }
.mam-hero__info { min-width: 0; }
.mam-hero__info h1 { margin-top: 0; text-wrap: balance; }
.mam-hero__age { margin: 0 0 14px; }
.mam-page .facts li { border-color: var(--tone, #e9967a); background: rgba(255, 255, 255, .7); }

.mam-note { max-width: var(--measure); margin: 0 0 12px; }
.mam-bundle-note { margin: 18px 0 0; font-weight: 600; }
.mam-note.small { margin-bottom: 0; padding-bottom: 80px; }

@media (max-width: 760px) {
  .mam-intro { grid-template-columns: minmax(0, 1fr); }
  .mam-intro__photo { order: -1; max-width: 520px; margin-right: 16px; }
  .mam-intro__photo img { aspect-ratio: 4 / 3; border-radius: 32px; }
  .mam-doodle--star { left: -10px; width: 44px; }
  .mam-doodle--cloud { bottom: -20px; width: 64px; }
  .mam-hero { grid-template-columns: minmax(0, 1fr); }
  .mam-hero__cover { max-width: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .mam-book, .mam-book:hover { transition: none; transform: none; }
}
