/* All of US – treść z bloków (podstrony, wpisy) oraz ten sam wygląd w edytorze WordPressa.
   :is(.aou-prose, .editor-styles-wrapper) = na stronie i w edytorze. */

:is(.aou-prose, .editor-styles-wrapper) {
  --aou-ink: #2A1027;
  --aou-ink-2: #3D1838;
  --aou-text: #4A3A47;
  --aou-muted: #6B4A63;
  --aou-plum: #4A1942;
  --aou-pink: #E94487;
  --aou-pink-strong: #D6337A;
  --aou-pink-dark: #C2246A;
  --aou-pink-deep: #A61E5C;
  --aou-pink-soft: #FDE3EE;
  --aou-orange: #FBA869;
  --aou-cream: #FDF5E6;
}

/* ---------- Edytor: tło i czcionka jak na stronie ---------- */
.editor-styles-wrapper {
  font-family: "AOU Montserrat", "Montserrat", system-ui, sans-serif;
  color: var(--aou-ink);
  background: #FFF7F0;
}

/* ---------- Rytm i szerokość treści (strona) ---------- */
.aou-prose { font-size: 17px; line-height: 1.7; color: var(--aou-ink-2); }
.aou .aou-prose > * { margin-top: 0; margin-bottom: 0; }
.aou .aou-prose > * + * { margin-top: 20px; }
.aou .aou-prose > :is(h2, .wp-block-heading:is(h2)) { margin-top: 72px; }
.aou .aou-prose > :is(.wp-block-group, .wp-block-columns, .wp-block-image, .wp-block-embed, .wp-block-gallery, .wp-block-table) { margin-top: 40px; }
.aou .aou-prose > :first-child { margin-top: 0 !important; }
.aou .aou-prose > :is(p, ul, ol, h2, h3, h4, blockquote, .wp-block-details, .wp-block-buttons) { max-width: 820px; }
.aou .aou-prose--narrow > * { max-width: none !important; }
.aou .aou-prose > .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }

/* ---------- Typografia ---------- */
:is(.aou-prose, .editor-styles-wrapper) :is(h1, h2, h3, h4) { font-family: inherit; color: var(--aou-ink); text-transform: none; letter-spacing: normal; }
:is(.aou-prose, .editor-styles-wrapper) h1 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; font-weight: 800; font-style: italic; letter-spacing: -.01em; }
:is(.aou-prose, .editor-styles-wrapper) h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; font-weight: 800; font-style: italic; }
:is(.aou-prose, .editor-styles-wrapper) h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
:is(.aou-prose, .editor-styles-wrapper) h4 { font-size: 17px; line-height: 1.4; font-weight: 700; }
:is(.aou-prose, .editor-styles-wrapper) p { font-size: 17px; line-height: 1.7; }
:is(.aou-prose, .editor-styles-wrapper) strong { color: var(--aou-ink); font-weight: 700; }
:is(.aou-prose, .editor-styles-wrapper) a:not(.wp-block-button__link) { color: var(--aou-pink-dark); text-decoration: underline; text-underline-offset: 3px; }
:is(.aou-prose, .editor-styles-wrapper) a:not(.wp-block-button__link):hover { color: var(--aou-pink-deep); }
:is(.aou-prose, .editor-styles-wrapper) ul { list-style: disc; padding-left: 1.4em; }
:is(.aou-prose, .editor-styles-wrapper) ol { list-style: decimal; padding-left: 1.4em; }
:is(.aou-prose, .editor-styles-wrapper) li { margin: 0; padding: 0; }
:is(.aou-prose, .editor-styles-wrapper) li + li { margin-top: 8px; }
:is(.aou-prose, .editor-styles-wrapper) li::marker { color: var(--aou-pink); }
:is(.aou-prose, .editor-styles-wrapper) blockquote { margin-left: 0; margin-right: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--aou-pink); font-style: italic; }
:is(.aou-prose, .editor-styles-wrapper) hr { border: 0; height: 2px; background: #F3DCE6; margin: 48px 0; }
:is(.aou-prose, .editor-styles-wrapper) figcaption { font-size: 14px; color: var(--aou-muted); margin-top: 8px; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-image img { border-radius: 16px; }
:is(.aou-prose, .editor-styles-wrapper) table { border-collapse: collapse; width: 100%; background: #fff; border-radius: 16px; overflow: hidden; font-size: 15px; }
:is(.aou-prose, .editor-styles-wrapper) th, :is(.aou-prose, .editor-styles-wrapper) td { padding: 12px 14px; border-bottom: 1px solid #F3DCE6; text-align: left; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-embed iframe { border-radius: 16px; }

/* ---------- Kolumny ---------- */
:is(.aou-prose, .editor-styles-wrapper) .wp-block-columns { gap: 24px; margin-bottom: 0; }
.aou-prose .wp-block-column > * { margin-top: 0; margin-bottom: 0; }
.aou-prose .wp-block-column > * + * { margin-top: 16px; }
.aou-prose .wp-block-column > :is(h2, h3) + * { margin-top: 14px; }

/* ---------- Grupy: karta / ramka / baner ---------- */
:is(.aou-prose, .editor-styles-wrapper) .wp-block-group:is(.is-style-aou-card, .is-style-aou-callout, .is-style-aou-hero) { box-sizing: border-box; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card { background: #fff; border-radius: 22px; padding: 26px; box-shadow: 0 1px 2px rgba(74,25,66,.05); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-callout { background: linear-gradient(135deg, #FDE3EE 0%, #FFE9D9 100%); border-radius: 24px; padding: clamp(24px, 4vw, 44px); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero {
  position: relative; overflow: hidden; border-radius: 28px;
  background: linear-gradient(115deg, #2E1030 0%, #5C1A55 48%, #B0237F 100%);
  padding: clamp(32px, 6vw, 72px) clamp(22px, 5vw, 64px);
  color: var(--aou-cream);
}
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero::before {
  content: ""; position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  width: clamp(220px, 34vw, 440px); aspect-ratio: 801 / 756;
  background: url("img/logo-mono.png") center / contain no-repeat; opacity: .2; pointer-events: none;
}
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero > * { position: relative; z-index: 1; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero :is(h1, h2, h3, h4, strong) { color: var(--aou-cream); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero p { color: rgba(253,245,230,.9); max-width: 680px; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero :is(h1, h2) { max-width: 820px; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero a:not(.wp-block-button__link) { color: var(--aou-orange); }

/* Odstępy wewnątrz grup (z kontenerem wewnętrznym i bez) */
.aou-prose :is(.is-style-aou-card, .is-style-aou-callout, .is-style-aou-hero, .is-style-aou-card > .wp-block-group__inner-container, .is-style-aou-callout > .wp-block-group__inner-container, .is-style-aou-hero > .wp-block-group__inner-container) > * { margin-top: 0; margin-bottom: 0; }
.aou-prose :is(.is-style-aou-card, .is-style-aou-card > .wp-block-group__inner-container) > * + * { margin-top: 10px; }
.aou-prose :is(.is-style-aou-callout, .is-style-aou-callout > .wp-block-group__inner-container) > * + * { margin-top: 14px; }
.aou-prose :is(.is-style-aou-hero, .is-style-aou-hero > .wp-block-group__inner-container) > * + * { margin-top: 18px; }
.aou-prose :is(.is-style-aou-hero, .is-style-aou-hero > .wp-block-group__inner-container) > .wp-block-buttons { margin-top: 28px; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card :is(h2, h3) { margin-top: 0; }

/* ---------- Akapity ---------- */
:is(.aou-prose, .editor-styles-wrapper) p.is-style-aou-lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.6; }
:is(.aou-prose, .editor-styles-wrapper) p.is-style-aou-tag {
  width: fit-content; padding: 8px 14px; border-radius: 999px;
  background: var(--aou-pink-soft); color: var(--aou-pink-deep);
  font-size: 13px; line-height: 1.3; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero p.is-style-aou-tag { background: rgba(253,245,230,.14); color: var(--aou-cream); }
:is(.aou-prose, .editor-styles-wrapper) p.is-style-aou-badge {
  width: fit-content; min-width: 58px; padding: 8px 16px; box-sizing: border-box; text-align: center;
  background: linear-gradient(180deg, var(--aou-pink) 0%, var(--aou-orange) 100%);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  color: #fff; font-size: 18px; line-height: 1.3; font-weight: 800; font-style: italic;
}
:is(.aou-prose, .editor-styles-wrapper) p.is-style-aou-stat { font-size: clamp(36px, 4vw, 46px); line-height: 1; font-weight: 800; font-style: italic; color: var(--aou-pink-strong); }
.aou-prose .is-style-aou-card > p.is-style-aou-stat + p, .aou-prose .is-style-aou-card > .wp-block-group__inner-container > p.is-style-aou-stat + p { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--aou-plum); }
:is(.aou-prose, .editor-styles-wrapper) p.is-style-aou-note { font-size: 13px; line-height: 1.5; color: var(--aou-muted); }

/* ---------- Przyciski ---------- */
:is(.aou-prose, .editor-styles-wrapper) .wp-block-buttons { gap: 12px; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  background: var(--aou-pink-dark); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
:is(.aou-prose, .editor-styles-wrapper) .wp-block-button__link:hover { background: var(--aou-pink-deep); color: #fff; transform: translateY(-1px); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-outline .wp-block-button__link { background: transparent; color: var(--aou-pink-dark); border-color: var(--aou-pink-dark); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-outline .wp-block-button__link:hover { background: var(--aou-pink-soft); color: var(--aou-pink-deep); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-orange .wp-block-button__link { background: var(--aou-orange); color: #2E1030; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-orange .wp-block-button__link:hover { background: #FDBB88; color: #2E1030; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-light .wp-block-button__link { background: transparent; color: var(--aou-cream); border-color: rgba(253,245,230,.6); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-light .wp-block-button__link:hover { background: rgba(253,245,230,.12); border-color: var(--aou-cream); color: var(--aou-cream); }

/* ---------- Lista ze znacznikami ---------- */
:is(.aou-prose, .editor-styles-wrapper) ul.is-style-aou-checks { list-style: none; padding-left: 0; }
:is(.aou-prose, .editor-styles-wrapper) ul.is-style-aou-checks > li { position: relative; padding-left: 36px; }
:is(.aou-prose, .editor-styles-wrapper) ul.is-style-aou-checks > li + li { margin-top: 14px; }
:is(.aou-prose, .editor-styles-wrapper) ul.is-style-aou-checks > li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 20px; height: 12px;
  background: linear-gradient(180deg, var(--aou-pink) 0%, var(--aou-orange) 100%);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

/* ---------- Obraz ---------- */
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-rounded img { border-radius: 24px; }

/* ---------- Pytania i odpowiedzi ---------- */
:is(.aou-prose, .editor-styles-wrapper) .wp-block-details { background: #fff; border-radius: 16px; padding: 16px 22px; }
.aou .aou-prose > .wp-block-details + .wp-block-details { margin-top: 12px; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-details summary { font-weight: 700; color: var(--aou-ink); cursor: pointer; min-height: 28px; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-details[open] summary { margin-bottom: 10px; }
:is(.aou-prose, .editor-styles-wrapper) .wp-block-details summary::marker { color: var(--aou-pink); }

@media (max-width: 600px) {
  .aou .aou-prose > :is(h2, .wp-block-heading:is(h2)) { margin-top: 56px; }
  :is(.aou-prose, .editor-styles-wrapper) .is-style-aou-hero { border-radius: 22px; }
  :is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card { padding: 22px; }
}

/* Karty w kolumnach – równa wysokość, gdy karta jest jedyna w kolumnie */
.aou-prose .wp-block-columns:not(.are-vertically-aligned-center) > .wp-block-column > .is-style-aou-card:only-child { height: 100%; }

/* Edytor: bloki w kartach i banerach wyrównane do lewej, jak na stronie */
.editor-styles-wrapper :is(.is-style-aou-hero, .is-style-aou-card, .is-style-aou-callout) .wp-block:not(.wp-block-button) { margin-left: 0 !important; margin-right: 0 !important; }
.editor-styles-wrapper .is-style-aou-hero .wp-block-buttons { margin-top: 28px; }

/* „Zobacz więcej” – blok Szczegóły wewnątrz karty: rozwija resztę tekstu */
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details { background: transparent; border-radius: 0; padding: 0; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--aou-pink-dark); font-size: 15px; font-weight: 700; cursor: pointer; margin: 0;
}
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details > summary::-webkit-details-marker { display: none; }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
:is(.aou-prose, .editor-styles-wrapper) .is-style-aou-card .wp-block-details > summary:hover { color: var(--aou-pink-deep); }
.aou-prose .is-style-aou-card .wp-block-details[open] > summary { font-size: 0; }
.aou-prose .is-style-aou-card .wp-block-details[open] > summary::before { content: "Zwiń"; font-size: 15px; }
.aou-prose .is-style-aou-card .wp-block-details > :not(summary) { margin-top: 0; margin-bottom: 10px; }
/* Karta z rozwijanym tekstem nie rozciąga się do wysokości sąsiednich kart */
.aou-prose .wp-block-columns > .wp-block-column > .is-style-aou-card:only-child:has(.wp-block-details) { height: auto; }
.aou-prose .wp-block-columns:has(.is-style-aou-card .wp-block-details) { align-items: flex-start; }
