/**
 * Gutenberg Editor Styles — Smile Bydgoszcz
 * Zarejestrowany przez add_editor_style() — widoczny w edytorze bloków i na froncie.
 */

/* ── Kontener artykułu ── */
.wp-block-post-content,
.editor-styles-wrapper {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: #4a4540;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Akapity ── */
.wp-block-post-content p,
.editor-styles-wrapper p {
  margin-bottom: 1.5em;
  font-size: 17px;
  line-height: 1.8;
  color: #4a4540;
}

/* ── Nagłówki ── */
.wp-block-post-content h2,
.editor-styles-wrapper h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #0f0c0a;
  margin-top: 2.8em;
  margin-bottom: 0.5em;
}
.wp-block-post-content h2 em,
.editor-styles-wrapper h2 em {
  color: #d6006e;
  font-style: italic;
  font-weight: 700;
}

.wp-block-post-content h3,
.editor-styles-wrapper h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f0c0a;
  margin-top: 2em;
  margin-bottom: 0.4em;
  line-height: 1.3;
}

.wp-block-post-content h4,
.editor-styles-wrapper h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #0f0c0a;
  margin-top: 1.6em;
  margin-bottom: 0.3em;
}

/* Nagłówek bezpośrednio po akapicie — skrócony odstęp */
.wp-block-post-content p + h2,
.editor-styles-wrapper p + h2,
.wp-block-post-content p + h3,
.editor-styles-wrapper p + h3,
.wp-block-post-content p + h4,
.editor-styles-wrapper p + h4 {
  margin-top: 1.8em;
}

/* ── Listy ── */
.wp-block-post-content ul,
.editor-styles-wrapper ul {
  list-style-type: disc;
  margin-top: 0.5em;
  margin-bottom: 1.4em;
  padding-left: 1.6em;
  font-size: 17px;
  color: #4a4540;
  line-height: 1.8;
}

.wp-block-post-content ol,
.editor-styles-wrapper ol {
  list-style-type: decimal;
  margin-top: 0.5em;
  margin-bottom: 1.4em;
  padding-left: 1.6em;
  font-size: 17px;
  color: #4a4540;
  line-height: 1.8;
}

.wp-block-post-content li,
.editor-styles-wrapper li {
  margin-bottom: 0.5em;
  line-height: 1.7;
  padding-left: 0.3em;
}

/* Zagnieżdżone listy */
.wp-block-post-content li ul,
.wp-block-post-content li ol,
.editor-styles-wrapper li ul,
.editor-styles-wrapper li ol {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* ── Blockquote ── */
.wp-block-post-content blockquote,
.editor-styles-wrapper blockquote {
  border-left: 4px solid #d6006e;
  padding: 16px 24px;
  margin: 2em 0;
  background: #fce8f3;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: #4a4540;
  font-size: 18px;
  line-height: 1.7;
}
.wp-block-post-content blockquote p,
.editor-styles-wrapper blockquote p {
  margin: 0;
}
.wp-block-post-content blockquote cite,
.editor-styles-wrapper blockquote cite {
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  color: #9a9390;
  margin-top: 10px;
}

/* ── Pull-quote ── */
.wp-block-pullquote {
  border-top: 2px solid #d6006e;
  border-bottom: 2px solid #d6006e;
  padding: 32px 24px;
  margin: 2.5em 0;
  text-align: center;
}
.wp-block-pullquote p {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.5vw, 30px);
  font-style: italic;
  font-weight: 300;
  color: #d6006e;
  line-height: 1.3;
  margin: 0;
}
.wp-block-pullquote cite {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9390;
  margin-top: 14px;
  display: block;
  font-style: normal;
}

/* ── Tabele ── */
.wp-block-post-content table,
.editor-styles-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 14px;
  overflow-x: auto;
  display: block;
}
.wp-block-post-content th,
.editor-styles-wrapper th {
  background: #d6006e;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.wp-block-post-content td,
.editor-styles-wrapper td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  color: #4a4540;
}
.wp-block-post-content tr:nth-child(even) td,
.editor-styles-wrapper tr:nth-child(even) td {
  background: #faf9f7;
}

/* ── Separator ── */
.wp-block-separator {
  border: none;
  border-top: 2px solid rgba(0,0,0,0.08);
  margin: 2.5em 0;
}
.wp-block-separator.is-style-wide {
  border-top-color: #d6006e;
}

/* ── Obrazy ogólne ── */
.wp-block-post-content figure,
.editor-styles-wrapper figure {
  margin: 2.2em 0;
}
.wp-block-post-content img,
.editor-styles-wrapper img {
  border-radius: 14px;
  max-width: 100%;
  height: auto;
  display: block;
}
.wp-block-post-content figcaption,
.editor-styles-wrapper figcaption {
  font-size: 13px;
  color: #9a9390;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
  line-height: 1.5;
}

/* Wyrównanie do lewej */
.wp-block-image.alignleft,
.wp-block-post-content .alignleft {
  float: left;
  margin-top: 6px;
  margin-right: 28px;
  margin-bottom: 16px;
  margin-left: 0;
  max-width: 45%;
}

/* Wyrównanie do prawej */
.wp-block-image.alignright,
.wp-block-post-content .alignright {
  float: right;
  margin-top: 6px;
  margin-left: 28px;
  margin-bottom: 16px;
  margin-right: 0;
  max-width: 45%;
}

/* Pełna szerokość */
.wp-block-image.alignfull,
.wp-block-image.alignwide {
  margin-top: 2.4em;
  margin-bottom: 2.4em;
}
.wp-block-image.alignfull img,
.wp-block-image.alignwide img {
  margin-left: -24px;
  margin-right: -24px;
  max-width: calc(100% + 48px);
  width: calc(100% + 48px);
  border-radius: 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* ── Galeria ── */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 2em 0;
}
.wp-block-gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
}
.wp-block-gallery figure img {
  transition: transform 0.35s ease;
  border-radius: 0;
}
.wp-block-gallery figure:hover img {
  transform: scale(1.05);
}

/* ── Kolumny ── */
.wp-block-columns {
  display: flex;
  gap: 28px;
  margin: 2em 0;
  flex-wrap: wrap;
}
.wp-block-column {
  flex: 1;
  min-width: 240px;
}

/* ── Cover block ── */
.wp-block-cover {
  border-radius: 14px;
  overflow: hidden;
  margin: 2em 0;
}
.wp-block-cover__background {
  border-radius: 14px;
}

/* ── Przyciski ── */
.wp-block-buttons {
  margin: 2em 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wp-block-button__link {
  background: #d6006e;
  color: #fff;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 40px rgba(214,0,110,0.25);
  font-family: 'DM Sans', sans-serif;
}
.wp-block-button__link:hover {
  background: #c0003e;
  transform: scale(1.03) translateY(-2px);
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: #d6006e;
  border: 2px solid #d6006e;
  box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #d6006e;
  color: #fff;
}

/* ── Clearfix ── */
.clearfix::after,
.wp-block-post-content::after,
.editor-styles-wrapper::after {
  content: '';
  display: block;
  clear: both;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .wp-block-post-content,
  .editor-styles-wrapper {
    padding: 0 20px;
  }

  .wp-block-image.alignleft,
  .wp-block-image.alignright,
  .wp-block-post-content .alignleft,
  .wp-block-post-content .alignright {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.2em;
  }

  .wp-block-column {
    flex: 0 0 100%;
  }
}
