/**
 * Blog article content blocks (TOC, tables, CTA, follow social).
 * Loaded on blog/search/advent routes — dev only hand-edited CSS (no npm).
 */

/* Full-bleed: break out of .Post_wrapper to viewport width */
.Post_post {
  overflow-x: hidden;
}

.Post_fullBleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  left: 0;
  right: 0;
  box-sizing: border-box;
}

/* --- Table of contents (wrap with class Post_toc; excluded from card preview via ArticleContent helper) --- */
.Post_text .Post_toc {
  margin: 0 0 38px;
  padding: 0;
}

.Post_text .Post_toc .Post_toc_title,
.Post_text .Post_toc h2,
.Post_text .Post_toc h3 {
  font-size: 24px;
  line-height: 1.3;
  color: #080b0b;
  font-weight: 700;
  margin: 0 0 16px;
}

.Post_text .Post_toc ul {
  margin: 0;
  padding-left: 0;
  list-style-type: none;
}

.Post_text .Post_toc li {
  margin-bottom: 10px;
}

/* TOC links: blue + underline (override .Post_text a teal) */
.Post_text .Post_toc a {
  color: #91D1C5;
}

.Post_text .Post_toc a:hover {
  color: #83C6B9;
}

/* Anchor targets: offset for fixed header (~100px) */
.Post_text h1[id],
.Post_text h2[id],
.Post_text h3[id],
.Post_text [id] {
  scroll-margin-top: 100px;
}

@media only screen and (max-width: 800px) {
  .Post_text h1[id],
  .Post_text h2[id],
  .Post_text h3[id],
  .Post_text [id] {
    scroll-margin-top: 72px;
  }
}

/* --- Tables: center block + respect CKEditor cell alignment --- */
.Post_text .Post_tableWrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5em 0;
  -webkit-overflow-scrolling: touch;
}

.Post_text table {
  border-collapse: collapse;
  max-width: 100%;
  border: 1px solid rgba(8, 11, 11, 0.15);
  background: #fff;
}

/* Center table as a block in the article column */
.Post_text table[align="center"],
.Post_text table.Post_table_center {
  margin-left: auto;
  margin-right: auto;
}

.Post_text table:not([width="100%"]):not([style*="width:100%"]) {
  margin-left: auto;
  margin-right: auto;
}

.Post_text th,
.Post_text td {
  border: 1px solid rgba(8, 11, 11, 0.12);
  padding: 12px 16px;
  vertical-align: middle;
}

.Post_text th {
  font-weight: 700;
  color: #080b0b;
  background: rgba(145, 209, 197, 0.15);
}

/* CKEditor figure wrapper around tables */
.Post_text figure.table {
  margin: 1.5em auto;
  max-width: 100%;
  text-align: center;
}

.Post_text figure.table table {
  margin-left: auto;
  margin-right: auto;
}

/* --- CTA: "Спробувати навчання з Монстрами" (wrap outer div with .Post_fullBleed for full window width) --- */
.Post_text .Post_fullBleed .Post_articleCta,
.Post_articleCta {
  width: 100%;
  box-sizing: border-box;
  margin: 48px 0;
  padding: 48px 24px;
  text-align: center;
  background: #e8f3f1;
  border-radius: 20px;
}

.Post_text .Post_fullBleed .Post_articleCta {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
}

.Post_articleCta_title {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
  color: #080b0b;
  text-transform: uppercase;
}

@media only screen and (max-width: 800px) {
  .Post_text .Post_fullBleed .Post_articleCta,
  .Post_articleCta {
    padding: 32px 16px;
  }

  .Post_articleCta_title {
    font-size: 18px;
  }
}

.Post_articleCta_btn {
  display: inline-block;
  min-width: 220px;
  padding: 16px 32px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  text-transform: uppercase;
  background: #71c4b4;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.Post_articleCta_btn:hover {
  background: #5eb5a5;
  color: #fff !important;
}

.Post_articleCta_btn:active {
  transform: translateY(1px);
}

/* --- Follow social: "Хочеш більше цікавинок" (Blade partial + .Post_fullBleed; edge-to-edge) --- */
.Post_fullBleed .Post_followSocial {
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 0;
}

.Post_followSocial {
  width: 100%;
  box-sizing: border-box;
  margin: 48px 0 0;
  padding: 40px 24px 48px;
  text-align: center;
  background: #e8f3f1;
  border-radius: 20px;
}

.Post_followSocial_title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #080b0b;
  text-transform: uppercase;
}

.Post_followSocial_sub {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.4;
  color: rgba(8, 11, 11, 0.7);
}

.Post_followSocial_icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.Post_followSocial_icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  padding: 14px;
}

.Post_followSocial_icons a.Post_followSocial_fb {
  background: #1877f2;
}

.Post_followSocial_icons a.Post_followSocial_ig {
  background: linear-gradient(135deg, #fa8f21, #e24964 55%, #aa3a8a);
}

.Post_followSocial_icons a.Post_followSocial_tg {
  background: #2aabee;
}

.Post_followSocial_icons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(8, 11, 11, 0.12);
}

.Post_followSocial_icons img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: none !important;
}

@media only screen and (max-width: 800px) {
  .Post_followSocial_title {
    font-size: 18px;
  }

  .Post_followSocial_sub {
    font-size: 15px;
  }

  .Post_followSocial_icons a {
    width: 56px;
    height: 56px;
  }

  .Post_fullBleed .Post_followSocial {
    padding: 32px 16px 40px;
  }
}
