.apx-reading-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  pointer-events: none;
}

/* Author profile and WordPress comments below every article. */
.apx-post-footer {
  display: grid;
  gap: 34px;
  padding-bottom: 76px;
}

.apx-author-box {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid #ded3e0;
  border-radius: 18px;
  background: linear-gradient(135deg, #fbf8fc, #f3edf6);
  box-shadow: 0 16px 38px rgba(74, 9, 52, .08);
}

.apx-author-box__avatar img {
  display: block;
  width: 112px;
  height: 112px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(47, 67, 93, .16);
}

.apx-author-box__content > span,
.apx-comments__header span {
  color: #85245f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.apx-author-box h2 {
  margin: 5px 0 8px;
  color: #2f435d;
  font-size: 25px;
  line-height: 1.25;
}

.apx-author-box p { margin: 0 0 10px; color: #627283; }
.apx-author-box a { color: #721244; font-size: 13px; font-weight: 900; }
.apx-author-box a:hover { color: #a33178; }

.apx-comments {
  padding: 34px;
  border: 1px solid #dfe5e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(47, 67, 93, .08);
}

.apx-comments__header {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e4e8eb;
}

.apx-comments__header h2 { margin: 5px 0 0; color: #2f435d; font-size: 30px; line-height: 1.2; }
.apx-comments__header p { max-width: 520px; margin: 0; color: #627283; font-size: 13px; }
.apx-comment-list { margin: 0 0 32px; padding: 0; list-style: none; }
.apx-comment-list .children { margin: 18px 0 0 42px; padding: 0; list-style: none; }
.apx-comment-list .comment-body {
  position: relative;
  margin-bottom: 18px;
  padding: 22px 22px 22px 96px;
  border: 1px solid #e1e6e9;
  border-radius: 14px;
  background: #f8fafb;
}
.apx-comment-list .comment-author .avatar { position: absolute; top: 22px; left: 20px; border-radius: 50%; }
.apx-comment-list .comment-author .fn { color: #2f435d; font-weight: 900; }
.apx-comment-list .comment-author .says { display: none; }
.apx-comment-list .comment-metadata { margin-top: 2px; color: #82909c; font-size: 11px; }
.apx-comment-list .comment-content { margin-top: 12px; color: #344657; }
.apx-comment-list .comment-content p:last-child { margin-bottom: 0; }
.apx-comment-list .reply { margin-top: 12px; }
.apx-comment-list .reply a { color: #85245f; font-size: 12px; font-weight: 900; }
.apx-comment-list .bypostauthor > .comment-body { border-color: #caa9c2; background: #fbf7fa; }

.apx-comment-form-wrap { padding: 26px; border-radius: 14px; background: linear-gradient(135deg, #f7f2f7, #eef3f6); }
.apx-comment-form-wrap .comment-reply-title { margin: 0 0 8px; color: #2f435d; font-size: 24px; }
.apx-comment-note,.apx-comment-form-wrap .logged-in-as { color: #6c7b88; font-size: 12px; }
.apx-comment-form-wrap form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.apx-comment-form-wrap form > p { margin: 0; }
.apx-comment-form-wrap .comment-form-comment,
.apx-comment-form-wrap .comment-form-cookies-consent,
.apx-comment-form-wrap .form-submit,
.apx-comment-form-wrap .logged-in-as,
.apx-comment-form-wrap .apx-comment-note { grid-column: 1 / -1; }
.apx-comment-form-wrap label { display: block; margin-bottom: 6px; color: #405368; font-size: 12px; font-weight: 800; }
.apx-comment-form-wrap input:not([type="checkbox"]),
.apx-comment-form-wrap textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd8de;
  border-radius: 8px;
  color: #182534;
  background: #fff;
  outline: 0;
}
.apx-comment-form-wrap textarea { min-height: 150px; resize: vertical; }
.apx-comment-form-wrap input:focus,
.apx-comment-form-wrap textarea:focus { border-color: #85245f; box-shadow: 0 0 0 3px rgba(133, 36, 95, .12); }
.apx-comment-form-wrap .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.apx-comment-submit {
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #4a0934, #85245f);
  font-weight: 900;
  cursor: pointer;
}
.apx-comment-submit:hover { background: linear-gradient(135deg, #601044, #a33178); }
.apx-comments__closed { margin: 0; padding: 16px; border-radius: 9px; color: #627283; background: #f3f5f6; }

@media (max-width: 700px) {
  .apx-post-footer { gap: 24px; padding-bottom: 52px; }
  .apx-author-box { grid-template-columns: 72px minmax(0, 1fr); gap: 17px; padding: 21px; }
  .apx-author-box__avatar img { width: 72px; height: 72px; }
  .apx-author-box h2 { font-size: 21px; }
  .apx-comments { padding: 21px; }
  .apx-comments__header { display: grid; gap: 10px; }
  .apx-comments__header h2 { font-size: 25px; }
  .apx-comment-list .comment-body { padding: 18px; }
  .apx-comment-list .comment-author .avatar { position: static; float: left; width: 42px; height: 42px; margin: 0 12px 8px 0; }
  .apx-comment-list .children { margin-left: 16px; }
  .apx-comment-form-wrap { padding: 18px; }
  .apx-comment-form-wrap form { grid-template-columns: 1fr; }
  .apx-comment-form-wrap form > p { grid-column: 1; }
}

.apx-reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #d26e4b;
  transition: width .12s linear;
}

.apx-single__hero {
  display: grid;
  align-items: center;
}

.apx-single__hero.has-featured-image {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: clamp(42px, 6vw, 96px);
}

.apx-single__intro { min-width: 0; }

/* Featured image is part of the article hero, without a branded background frame. */
.apx-single__featured {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(280px, 29vw, 430px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  isolation: isolate;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 55px rgba(9,24,39,.24);
}

.apx-single__featured::before,
.apx-single__featured::after { display: none; }

.apx-single .apx-single__featured > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 15px;
  background: #fff;
  box-shadow: none;
  mix-blend-mode: normal;
  filter: none;
}

.apx-single .apx-single__featured > img.is-apx-portrait {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 12px;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center;
}

.apx-single__meta {
  flex-wrap: wrap;
  align-items: center;
}

.apx-single__meta > * {
  display: inline-flex;
  align-items: center;
}

.apx-single__meta > * + *::before {
  content: "•";
  margin-right: 14px;
  color: rgba(255,255,255,.38);
}

.apx-toc {
  margin-bottom: 20px;
  padding: 24px 22px;
  border: 1px solid #eaddea;
  border-top: 3px solid #721244;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbf7fb 100%);
  box-shadow: 0 12px 30px rgba(74, 9, 52, .09);
}

.apx-toc > span {
  display: block;
  margin-bottom: 13px;
  color: #2f435d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.apx-toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.apx-toc li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.apx-toc li::before {
  content: "";
  position: absolute;
  top: .62em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8f2b68;
}

.apx-toc li.is-child { padding-left: 15px; }
.apx-toc a,
.apx-single__aside .apx-toc a,
.apx-single__aside .apx-toc a:visited {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 9px;
  color: rgba(255, 255, 255, .82);
  background: linear-gradient(135deg, #4a0934 0%, #681044 52%, #85245f 100%);
  box-shadow: 0 6px 16px rgba(74, 9, 52, .13);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.apx-toc a:hover,
.apx-single__aside .apx-toc a:hover {
  color: #fff;
  background: linear-gradient(135deg, #691047 0%, #8a1f62 52%, #a63b7f 100%);
  box-shadow: 0 9px 22px rgba(114, 18, 68, .28), 0 0 0 1px rgba(255, 255, 255, .12) inset;
  transform: translateX(4px);
}

.apx-toc a:focus-visible,
.apx-single__aside .apx-toc a:focus-visible {
  color: #fff;
  outline: 3px solid rgba(166, 59, 127, .30);
  outline-offset: 2px;
}

/* A softer service card keeps the sidebar useful without competing with the article. */
.apx-single__aside {
  display: grid;
  gap: 18px;
}

.apx-single__aside > div {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 24px;
  color: #526779;
  border: 1px solid #dce7ed;
  border-radius: 16px;
  background: linear-gradient(145deg, #f5f9fb, #edf4f7);
  box-shadow: 0 14px 34px rgba(47, 67, 93, .08);
}

.apx-single__aside > div::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #d26e4b 0 28%, #7fa0b5 28% 100%);
}

.apx-single__aside > div > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d26e4b;
  font-size: 11px;
  letter-spacing: .09em;
}

.apx-single__aside > div > span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #53a875;
  box-shadow: 0 0 0 4px rgba(83,168,117,.12);
}

.apx-single__aside > div h2 {
  margin: 13px 0 9px;
  color: #2f435d;
  font-size: 23px;
  letter-spacing: -.025em;
}

.apx-single__aside > div p {
  margin: 0 0 20px;
  color: #65798a;
  font-size: 14px;
  line-height: 1.65;
}

.apx-single__aside > div a {
  margin-top: 9px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #fff;
  background: #d26e4b;
  box-shadow: 0 7px 18px rgba(210,110,75,.18);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.apx-single__aside > div a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(47,67,93,.16);
}

.apx-single__aside > div .apx-single__zalo {
  color: #315d7a;
  border-color: #c8dce7;
  background: #e8f3f8;
  box-shadow: none;
}

.apx-single__aside > div .apx-single__facebook {
  color: #365f91;
  border-color: #d4e0ee;
  background: #eef4fb;
  box-shadow: none;
}

.apx-single__aside > div .apx-single__zalo:hover,
.apx-single__aside > div .apx-single__facebook:hover { color: #2f435d; }

.apx-prose .apx-lead {
  padding: 20px 24px;
  border-left: 4px solid #d26e4b;
  color: #3e5265;
  background: #f7f3f1;
  font-size: 19px;
}

.apx-prose blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 4px solid #d26e4b;
  background: #fff5f0;
}

.apx-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.apx-prose th,
.apx-prose td {
  padding: 12px 14px;
  border: 1px solid #dfe5e9;
  text-align: left;
}

.apx-prose th { color: #fff; background: #446084; }
.apx-prose figcaption { color: #71808c; font-size: 13px; text-align: center; }
.apx-prose figure { margin-block: 30px; }
.apx-prose figure img,
.apx-prose > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 620px;
  margin-inline: auto;
  object-fit: contain;
}

@media (max-width: 900px) {
  .apx-single__hero.has-featured-image { grid-template-columns: 1fr; gap: 34px; }
  .apx-single__featured { height: clamp(280px, 58vw, 440px); }
  .apx-toc { position: static; }
}

@media (max-width: 620px) {
  .apx-single__featured {
    width: 100%;
    height: 230px;
    margin: 0;
    padding: 0;
    border-radius: 14px;
  }
  .apx-single .apx-single__featured > img { border-radius: 8px; }
  .apx-single__meta { gap: 6px 12px; }
  .apx-single__meta > * + *::before { display: none; }
  .apx-prose table { display: block; overflow-x: auto; }
}
