/* =========================================================
   Admin Blog Review
   ========================================================= */

.adminblog-shell {
  display: grid;
  gap: 18px;
}

.adminblog-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28,39,60,0.06);
  padding: 20px;
}

.adminblog-card h1 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.adminblog-sub {
  margin: 0;
  color: #667587;
}

.adminblog-alert {
  padding: 14px 16px;
  border-radius: 12px;
  background: #eefaf2;
  border: 1px solid #cfe8d7;
  color: #1d6b3d;
}

.adminblog-list {
  display: grid;
  gap: 16px;
}

.adminblog-item {
  border: 1px solid #e8edf3;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.adminblog-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.adminblog-title {
  margin: 0 0 6px;
  color: #1d2a39;
  font-size: 20px;
}

.adminblog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6c7b8c;
  font-size: 13px;
}

.adminblog-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-draft { background: #f4f7fb; color: #415264; }
.status-pending { background: #fff6e8; color: #8b5a16; }
.status-published { background: #eef8f2; color: #18794e; }
.status-rejected { background: #fff2f2; color: #9b2f2f; }

.mode-review_all { background: #eef5ff; color: #23528d; }
.mode-trusted { background: #eef8f2; color: #18794e; }
.mode-blocked { background: #fff2f2; color: #9b2f2f; }

.adminblog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.blog-btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.18s ease;
  cursor: pointer;
  font-size: 13px;
}

.blog-btn-primary { background: #1f7ae0; color: #fff; }
.blog-btn-primary:hover { background: #1869c3; }

.blog-btn-soft { background: #f4f7fb; color: #314154; }
.blog-btn-soft:hover { background: #eaf0f7; }

.blog-btn-danger { background: #b93d3d; color: #fff; }
.blog-btn-danger:hover { background: #9f3434; }

.reject-box {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.reject-box textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
}

.adminblog-rejection {
  margin-top: 8px;
  color: #8d3333;
}

/* --------BLOG CREATION-------- */

.blog-create-shell {
  display: grid;
  gap: 18px;
}

.blog-create-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(76, 194, 138, .16), transparent 30%),
    linear-gradient(135deg, #223f5f 0%, #2a4f76 50%, #1f3652 100%);
  color: #fff;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(34, 63, 95, .18);
}

.blog-create-hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.1;
}

.blog-create-hero p {
  margin: 0;
  max-width: 820px;
  color: rgba(255, 255, 255, .92);
}

.blog-create-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
  padding: 22px;
}

.blog-create-card h2 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-create-sub {
  margin: 0;
  color: #667587;
  line-height: 1.6;
}

.blog-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.blog-alert-error {
  background: #fff2f2;
  border: 1px solid #f0c8c8;
  color: #9b2f2f;
}

.blog-alert-success {
  background: #eefaf2;
  border: 1px solid #cfe8d7;
  color: #1d6b3d;
}

.blog-alert-info {
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #23528d;
}

.blog-form {
  display: grid;
  gap: 16px;
}

.blog-field {
  display: grid;
  gap: 8px;
}

.blog-field label {
  font-weight: 700;
  color: #2a3848;
  font-size: 14px;
}

.blog-field input,
.blog-field select,
.blog-field textarea {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.blog-field input:focus,
.blog-field select:focus,
.blog-field textarea:focus {
  border-color: #9fc2f2;
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.10);
}

.blog-field textarea {
  min-height: 170px;
  resize: vertical;
}

.blog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 700;
  transition: .18s ease;
  cursor: pointer;
}

.blog-btn-primary {
  background: #1f7ae0;
  color: #fff;
}

.blog-btn-primary:hover {
  background: #1869c3;
}

.blog-btn-soft {
  background: #f4f7fb;
  color: #314154;
}

.blog-btn-soft:hover {
  background: #eaf0f7;
}

.blog-mode-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
}

.blog-upload-note {
  font-size: 13px;
  color: #667587;
}

@media (max-width: 700px) {
  .blog-create-hero h1 {
    font-size: 1.65rem;
  }
}

/* ----------BLOG EDIT ----------*/

.blog-edit-shell {
  display: grid;
  gap: 18px;
}

.blog-edit-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(76, 194, 138, .16), transparent 30%),
    linear-gradient(135deg, #223f5f 0%, #2a4f76 50%, #1f3652 100%);
  color: #fff;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(34, 63, 95, .18);
}

.blog-edit-hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.1;
}

.blog-edit-hero p {
  margin: 0;
  max-width: 820px;
  color: rgba(255, 255, 255, .92);
}

.blog-edit-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
  padding: 22px;
}

.blog-edit-card h2 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-edit-sub {
  margin: 0;
  color: #667587;
  line-height: 1.6;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-top: 10px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
}

.blog-current-image {
  display: grid;
  gap: 8px;
}

.blog-current-image img {
  max-width: 220px;
  border-radius: 14px;
  border: 1px solid #e8edf3;
}

@media (max-width: 700px) {
  .blog-edit-hero h1 {
    font-size: 1.65rem;
  }
}

/* --------BLOG POSTS ------- */

.blog-post-shell {
  display: grid;
  gap: 18px;
}

.blog-post-card,
.blog-related-card,
.blog-post-not-found {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
}

.blog-post-card {
  overflow: hidden;
}

.blog-post-hero {
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: #eef4f9;
}

.blog-post-body {
  padding: 26px;
}

.blog-post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #1f7ae0;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.blog-post-back:hover {
  text-decoration: underline;
}

.blog-post-category {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef8f2;
  color: #18794e;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.blog-post-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.12;
  color: #1d2a39;
}

.blog-post-excerpt {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.7;
  color: #566678;
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6f7d8d;
  font-size: 13px;
  margin-bottom: 24px;
}

.blog-post-content {
  display: grid;
  gap: 16px;
}

.blog-post-content p {
  margin: 0;
  color: #2d3a49;
  line-height: 1.85;
  font-size: 16px;
  white-space: pre-line;
}

.blog-related-card {
  padding: 20px;
}

.blog-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.blog-related-head h3 {
  margin: 0;
  color: #1d2a39;
  font-size: 20px;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.blog-related-item {
  border: 1px solid #e7edf4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-related-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(28, 39, 60, 0.08);
}

.blog-related-thumb {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: #eef4f9;
}

.blog-related-copy {
  padding: 14px;
}

.blog-related-copy span {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #18794e;
  background: #eef8f2;
  border-radius: 999px;
  padding: 7px 10px;
  margin-bottom: 8px;
}

.blog-related-copy h4 {
  margin: 0 0 6px;
  color: #1d2a39;
  font-size: 16px;
  line-height: 1.35;
}

.blog-related-copy p {
  margin: 0;
  color: #6b7785;
  font-size: 13px;
  line-height: 1.6;
}

.blog-post-not-found {
  padding: 28px;
  text-align: center;
}

.blog-post-not-found h2 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-post-not-found p {
  margin: 0 0 16px;
  color: #647487;
}

@media (max-width: 980px) {
  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-title {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .blog-post-hero {
    min-height: 220px;
  }

  .blog-post-body {
    padding: 20px;
  }

  .blog-post-title {
    font-size: 24px;
  }

  .blog-post-content p {
    font-size: 15px;
  }
}

/* ------ MAIN BLOG HUB ------ */

.blog-shell {
  display: grid;
  gap: 18px;
}

.blog-hero,
.blog-filter-bar,
.blog-grid-wrap,
.blog-empty,
.blog-pager-wrap {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
}

.blog-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at top right, rgba(76, 194, 138, .16), transparent 30%), linear-gradient(135deg, #223f5f 0%, #2a4f76 50%, #1f3652 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 63, 95, .18);
  border: 0;
}

.blog-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 320px;
}

.blog-hero-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .14);
}

.blog-hero-copy h1,
.blog-hero-copy h2 {
  margin: 0;
  color: #fff;
  line-height: 1.15;
}

.blog-hero-copy h1 {
  font-size: 30px;
}

.blog-hero-copy h2 {
  font-size: 28px;
}

.blog-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: 15px;
  line-height: 1.65;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .84);
}

.blog-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #314154;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.18s ease;
}

.blog-chip:hover,
.blog-chip.is-active {
  background: #eaf3ff;
  border-color: #cfe0ff;
  color: #184a8b;
}

.blog-hero-actions,
.blog-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-filter-bar .blog-btn-soft,
.blog-grid-wrap .blog-btn-soft,
.blog-pager-wrap .blog-btn-soft,
.blog-empty .blog-btn-soft {
  background: #f4f7fb;
  color: #314154;
  border: 0;
}

.blog-filter-bar .blog-btn-soft:hover,
.blog-grid-wrap .blog-btn-soft:hover,
.blog-pager-wrap .blog-btn-soft:hover,
.blog-empty .blog-btn-soft:hover {
  background: #eaf0f7;
}

.blog-hero-image {
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, .06);
  position: relative;
}

.blog-hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 54, 82, 0) 0%, rgba(31, 54, 82, .18) 100%);
}

.blog-filter-bar {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: radial-gradient(circle at top right, rgba(76, 194, 138, .16), transparent 30%), linear-gradient(135deg, #223f5f 0%, #2a4f76 50%, #1f3652 100%);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(34, 63, 95, .18);
}

.blog-filter-bar::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.blog-filter-top,
.blog-search-form,
.blog-category-row {
  position: relative;
  z-index: 1;
}

.blog-filter-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.blog-filter-title {
  margin: 0;
  font-size: 18px;
  color: #fff;
}

.blog-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.blog-search-form input[type="text"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, .94);
  color: #223f5f;
}

.blog-search-form input[type="text"]:focus {
  border-color: #9fd8be;
  box-shadow: 0 0 0 3px rgba(76, 194, 138, .18);
}

.blog-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.blog-filter-bar .blog-btn-primary {
  background: #4cc28a;
  color: #123326;
}

.blog-filter-bar .blog-btn-primary:hover {
  background: #3fb178;
}

.blog-filter-bar .blog-btn-soft {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
}

.blog-filter-bar .blog-btn-soft:hover {
  background: rgba(255, 255, 255, .22);
}

.blog-filter-bar .blog-chip {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
}

.blog-filter-bar .blog-chip:hover,
.blog-filter-bar .blog-chip.is-active {
  background: #4cc28a;
  border-color: #4cc28a;
  color: #123326;
}

.blog-grid-wrap {
  padding: 18px;
}

.blog-grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.blog-grid-head h3 {
  margin: 0;
  font-size: 20px;
  color: #1d2a39;
}

.blog-grid-head p {
  margin: 0;
  color: #6b7785;
  font-size: 14px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.blog-card {
  border: 1px solid #e7edf4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(28, 39, 60, 0.08);
}

.blog-card-image {
  display: block;
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: #eef4f9;
  text-decoration: none;
}

.blog-card-image.is-empty,
.blog-hero-image.is-empty {
  background-image: none !important;
  background: linear-gradient(135deg, #dde8f0 0%, #edf3f7 100%);
}

.blog-card-body {
  padding: 16px;
}

.blog-card-category {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #18794e;
  background: #eef8f2;
  border-radius: 999px;
  padding: 7px 10px;
}

.blog-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.blog-card-title a {
  color: #1d2a39;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: #1f7ae0;
}

.blog-card-excerpt {
  margin: 0 0 12px;
  color: #59697c;
  font-size: 14px;
  line-height: 1.6;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #718092;
}

.blog-empty {
  padding: 28px;
  text-align: center;
}

.blog-empty h3 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-empty p {
  margin: 0;
  color: #637285;
}

.blog-pager-wrap {
  padding: 16px;
}

.blog-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-page-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  background: #f4f7fb;
  color: #314154;
}

.blog-page-link:hover {
  background: #eaf0f7;
}

.blog-page-link.is-active {
  background: #1f7ae0;
  color: #fff;
}

@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .blog-hero-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero-image {
    min-height: 220px;
    order: -1;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-search-form {
    grid-template-columns: 1fr;
  }

  .blog-hero-copy {
    padding: 20px;
  }

  .blog-hero-copy h1,
  .blog-hero-copy h2 {
    font-size: 24px;
  }
}

/* ------ MY BLOG POSTS ------*/

.myposts-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.myposts-hero,
.myposts-card,
.myposts-stat {
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
}

.myposts-hero {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: radial-gradient(circle at top right, rgba(76, 194, 138, .16), transparent 30%), linear-gradient(135deg, #223f5f 0%, #2a4f76 50%, #1f3652 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(34, 63, 95, .18);
  min-width: 0;
}

.myposts-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.myposts-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.myposts-head h1 {
  margin: 0;
  color: #fff;
  word-break: break-word;
}

.myposts-sub {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .90);
  word-break: break-word;
}

.myposts-card {
  background: #fff;
  border: 1px solid #e8edf3;
  padding: 20px;
  min-width: 0;
}

.myposts-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.myposts-stat {
  background: #fff;
  border: 1px solid #e8edf3;
  padding: 16px;
  min-width: 0;
}

.myposts-stat strong {
  display: block;
  font-size: 24px;
  color: #1d2a39;
  margin-bottom: 6px;
}

.myposts-stat span {
  color: #667587;
  font-size: 14px;
}

.myposts-table-wrap {
  overflow: hidden;
  max-width: 100%;
}

.myposts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.myposts-table th,
.myposts-table td {
  word-break: break-word;
}

.myposts-table th:nth-child(1),
.myposts-table td:nth-child(1) {
  width: 72px;
}

.myposts-table th:nth-child(2),
.myposts-table td:nth-child(2) {
  width: 30%;
}

.myposts-table th:nth-child(3),
.myposts-table td:nth-child(3) {
  width: 12%;
}

.myposts-table th:nth-child(4),
.myposts-table td:nth-child(4) {
  width: 12%;
}

.myposts-table th:nth-child(5),
.myposts-table td:nth-child(5) {
  width: 16%;
}

.myposts-table th:nth-child(6),
.myposts-table td:nth-child(6) {
  width: 16%;
}

.myposts-table th:nth-child(7),
.myposts-table td:nth-child(7) {
  width: 14%;
}

.myposts-table th,
.myposts-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid #e8edf3;
  vertical-align: top;
  font-size: 14px;
}

.myposts-table th {
  color: #5f6f82;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.myposts-thumb {
  width: 90px;
  min-width: 90px;
}

.myposts-thumb-box {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #eef4f9;
  background-size: cover;
  background-position: center;
  border: 1px solid #e2eaf2;
  flex-shrink: 0;
}

.myposts-thumb-box.is-empty {
  background: linear-gradient(135deg, #dde8f0 0%, #edf3f7 100%);
}

.myposts-title {
  font-weight: 700;
  color: #1d2a39;
  margin-bottom: 4px;
  word-break: break-word;
}

.myposts-submeta {
  color: #6c7b8c;
  font-size: 13px;
  word-break: break-word;
}

.featured-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #18794e;
  background: #eef8f2;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-draft {
  background: #f4f7fb;
  color: #415264;
}

.status-pending {
  background: #fff6e8;
  color: #8b5a16;
}

.status-published {
  background: #eef8f2;
  color: #18794e;
}

.status-rejected {
  background: #fff2f2;
  color: #9b2f2f;
}

.myposts-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-box {
  text-align: center;
  padding: 30px 20px;
}

.empty-box h3 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.empty-box p {
  margin: 0 0 14px;
  color: #667587;
}

.rejection-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff6f6;
  border: 1px solid #f1d6d6;
  color: #8d3333;
  font-size: 13px;
  word-break: break-word;
}

.debug-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6f6;
  border: 1px solid #f1d6d6;
  color: #8d3333;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .myposts-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .myposts-hero,
  .myposts-card {
    padding: 16px;
  }

  .myposts-head {
    align-items: flex-start;
  }

  .myposts-head .blog-btn {
    width: 100%;
  }

  .myposts-table {
    min-width: 720px;
  }
}

@media (max-width: 560px) {
  .myposts-stats {
    grid-template-columns: 1fr;
  }

  .myposts-head h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  .myposts-sub {
    font-size: 14px;
    line-height: 1.55;
  }

  .myposts-table {
    min-width: 0;
    width: 100%;
  }

  .myposts-table thead {
    display: none;
  }

  .myposts-table,
  .myposts-table tbody,
  .myposts-table tr,
  .myposts-table td {
    display: block;
    width: 100%;
  }

  .myposts-table tr {
    border: 1px solid #e8edf3;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
  }

  .myposts-table td {
    border: 0;
    padding: 8px 0;
    font-size: 13px;
  }

  .myposts-thumb {
    width: 100%;
    min-width: 0;
  }

  .myposts-thumb-box {
    width: 64px;
    height: 64px;
  }

  .myposts-actions {
    margin-top: 6px;
  }

  .blog-btn {
    padding: 9px 12px;
    font-size: 12px;
  }
}

/* =========================================================
   Blog Interactions: Reactions + Comments + Media
   ========================================================= */

.blog-post-hero.is-empty{
    display:none;
}

.blog-interactions-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
  padding: 22px;
  display: grid;
  gap: 18px;
}

.blog-interactions-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.blog-interactions-head h3 {
  margin: 0 0 4px;
  color: #1d2a39;
  font-size: 22px;
}

.blog-interactions-head p {
  margin: 0;
  color: #667587;
  font-size: 14px;
}

.blog-reaction-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blog-reaction-row form {
  margin: 0;
}

.blog-reaction-btn {
  appearance: none;
  border: 1px solid #e4ebf3;
  background: #f8fafc;
  color: #314154;
  border-radius: 999px;
  padding: 9px 12px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
  font-weight: 800;
}

.blog-reaction-btn span {
  font-size: 18px;
  line-height: 1;
}

.blog-reaction-btn strong {
  font-size: 13px;
}

.blog-reaction-btn:hover,
.blog-reaction-btn.is-active {
  background: #eaf3ff;
  border-color: #bcd8ff;
  color: #184a8b;
  transform: translateY(-1px);
}

.blog-comment-form {
  background: #f8fafc;
  border: 1px solid #e7edf4;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.blog-comment-form label {
  color: #2a3848;
  font-weight: 800;
  font-size: 14px;
}

.blog-comment-form textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.blog-comment-form textarea:focus {
  border-color: #9fc2f2;
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.10);
}

.blog-comment-upload {
  display: grid;
  gap: 6px;
}

.blog-comment-upload input[type="file"] {
  width: 100%;
  border: 1px dashed #c9d5e3;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.blog-comment-upload small {
  color: #718092;
  font-size: 12px;
}

.blog-comments-list {
  display: grid;
  gap: 14px;
}

.blog-comments-list h4 {
  margin: 0;
  color: #1d2a39;
  font-size: 18px;
}

.blog-no-comments {
  border: 1px dashed #d8e0ea;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: #667587;
  background: #fbfdff;
}

.blog-no-comments p {
  margin: 0;
}

.blog-comment-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e7edf4;
  border-radius: 16px;
  background: #fff;
}

.blog-comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #223f5f, #4cc28a);
  color: #fff;
  font-weight: 900;
}

.blog-comment-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.blog-comment-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.blog-comment-top strong {
  color: #1d2a39;
}

.blog-comment-top span {
  color: #7a8796;
  font-size: 12px;
}

.blog-comment-main p {
  margin: 0;
  color: #2d3a49;
  line-height: 1.65;
  font-size: 14px;
  word-break: break-word;
}

.blog-comment-media {
  width: 100%;
  max-width: 620px;
  max-height: 420px;
  border-radius: 16px;
  border: 1px solid #e7edf4;
  object-fit: contain;
  background: #eef4f9;
}

@media (max-width: 640px) {
  .blog-interactions-card {
    padding: 16px;
  }

  .blog-reaction-row {
    gap: 8px;
  }

  .blog-reaction-btn {
    padding: 8px 10px;
  }

  .blog-comment-item {
    grid-template-columns: 38px 1fr;
    padding: 12px;
  }

  .blog-comment-avatar {
    width: 38px;
    height: 38px;
  }
}

/* =========================================================
   Premium Blog / Vlog Builder
   ========================================================= */

.premium-blog-builder {
  min-width: 0;
}

.blog-premium-form {
  display: block;
}

.blog-builder-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.blog-builder-panel {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 14px;
}

.blog-builder-canvas {
  min-width: 0;
}

.blog-block-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.blog-block-buttons .blog-btn {
  width: 100%;
}

.sticky-builder-actions {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(28, 39, 60, 0.06);
  padding: 14px;
}

.blog-builder-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.blog-blocks {
  display: grid;
  gap: 14px;
}

.blog-layout-block {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fbfdff;
  overflow: hidden;
}

.blog-layout-block-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid #e4ebf3;
}

.blog-layout-block-top strong {
  color: #1d2a39;
  font-size: 14px;
}

.blog-layout-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-layout-actions button {
  border: 0;
  background: #fff;
  color: #314154;
  border-radius: 10px;
  padding: 7px 9px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid #dfe7f0;
}

.blog-layout-actions button:hover {
  background: #eaf3ff;
  color: #184a8b;
}

.blog-layout-block-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.block-input,
.block-file {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.block-input:focus {
  border-color: #9fc2f2;
  box-shadow: 0 0 0 3px rgba(31, 122, 224, 0.10);
}

textarea.block-input {
  resize: vertical;
  min-height: 130px;
}

.quote-input {
  font-style: italic;
  background: #fffdf6;
}

.builder-divider-preview {
  padding: 16px 0;
}

.builder-divider-preview span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4cc28a, transparent);
}

.blog-empty-builder {
  border: 1px dashed #cfd9e5;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: #fbfdff;
}

.blog-empty-builder h3 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-empty-builder p {
  margin: 0;
  color: #667587;
}

@media (max-width: 980px) {
  .blog-builder-grid {
    grid-template-columns: 1fr;
  }

  .blog-builder-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .blog-block-buttons {
    grid-template-columns: 1fr;
  }

  .blog-layout-block-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-layout-actions {
    width: 100%;
  }
}

.existing-block-media {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #fff;
}

.existing-block-media img,
.existing-block-media video {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  background: #eef4f9;
}

.existing-block-media small {
  color: #667587;
  font-size: 12px;
}

/* =========================================================
   Full Screen Blog Studio
   ========================================================= */

.blog-studio-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #eef4f9;
  overflow: hidden;
}

.blog-studio-form {
  height: 100vh;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  overflow: hidden;
}

.blog-studio-sidebar {
  background: #10263d;
  color: #fff;
  padding: 18px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  box-shadow: 10px 0 30px rgba(16, 38, 61, 0.18);
}

.blog-studio-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}

.blog-studio-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #4cc28a;
  color: #10263d;
  font-size: 22px;
}

.blog-studio-brand strong,
.blog-studio-brand span {
  display: block;
}

.blog-studio-brand span {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
}

.blog-studio-panel,
.blog-studio-actions {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.blog-studio-panel h3 {
  margin: 0;
  color: #fff;
  font-size: 15px;
}

.blog-studio-sidebar .blog-field label {
  color: rgba(255,255,255,0.9);
}

.blog-studio-sidebar .blog-field input,
.blog-studio-sidebar .blog-field select,
.blog-studio-sidebar .blog-field textarea {
  background: rgba(255,255,255,0.95);
}

.blog-studio-sidebar .blog-upload-note {
  color: rgba(255,255,255,0.68);
}

.blog-studio-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.blog-studio-tools button {
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 13px;
  padding: 10px 8px;
  font-weight: 800;
  cursor: pointer;
}

.blog-studio-tools button:hover {
  background: #4cc28a;
  color: #10263d;
}

.blog-studio-actions .blog-btn {
  width: 100%;
}

.blog-studio-main {
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
}

.blog-studio-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.blog-studio-topbar h1 {
  margin: 0 0 4px;
  color: #1d2a39;
  font-size: 30px;
}

.blog-studio-topbar p {
  margin: 0;
  color: #667587;
}

.blog-studio-status {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dfe7f0;
  color: #314154;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(28,39,60,0.06);
}

.blog-studio-canvas {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(28,39,60,0.08);
  padding: 24px;
}

.blog-studio-canvas-head {
  margin-bottom: 18px;
}

.blog-studio-canvas-head h2 {
  margin: 0 0 5px;
  color: #1d2a39;
}

.blog-studio-canvas-head p {
  margin: 0;
  color: #667587;
}

.blog-studio-blocks {
  display: grid;
  gap: 16px;
}

.blog-studio-block {
  border: 1px solid #e4ebf3;
  border-radius: 18px;
  background: #fbfdff;
  overflow: hidden;
  cursor: grab;
}

.blog-studio-block.is-dragging {
  opacity: 0.5;
}

.blog-studio-block-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid #e4ebf3;
}

.blog-studio-block-top strong {
  color: #1d2a39;
  margin-right: auto;
}

.blog-studio-block-top button {
  border: 0;
  background: #fff2f2;
  color: #9b2f2f;
  border-radius: 10px;
  padding: 7px 9px;
  font-weight: 800;
  cursor: pointer;
}

.studio-drag-handle {
  color: #728197;
  font-weight: 900;
}

.blog-studio-block-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.studio-block-input,
.studio-block-file {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.studio-block-input:focus {
  border-color: #9fc2f2;
  box-shadow: 0 0 0 3px rgba(31,122,224,0.1);
}

.studio-heading-input {
  font-size: 26px;
  font-weight: 900;
}

.studio-quote-input {
  font-style: italic;
  background: #fffdf6;
}

.studio-media-drop {
  display: grid;
  gap: 8px;
  border: 1px dashed #c9d5e3;
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
}

.studio-media-drop strong {
  color: #1d2a39;
}

.studio-media-drop span {
  color: #667587;
  font-size: 13px;
}

.studio-divider-preview {
  padding: 18px 0;
}

.studio-divider-preview span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4cc28a, transparent);
}

.blog-studio-empty {
  border: 1px dashed #cfd9e5;
  border-radius: 18px;
  padding: 34px;
  text-align: center;
  background: #fbfdff;
}

.blog-studio-empty h3 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-studio-empty p {
  margin: 0;
  color: #667587;
}

@media (max-width: 900px) {
  .blog-studio-form {
    grid-template-columns: 1fr;
  }

  .blog-studio-sidebar {
    position: relative;
    max-height: 46vh;
  }

  .blog-studio-main {
    height: 54vh;
    padding: 16px;
  }
}

/* Studio must sit above member header/footer */
.blog-studio-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
}

.blog-studio-form {
  position: relative !important;
  z-index: 2147483001 !important;
}

/* Hide normal member furniture while studio is open */
body.blog-studio-mode .member-header,
body.blog-studio-mode .members-header,
body.blog-studio-mode .topbar,
body.blog-studio-mode .site-footer,
body.blog-studio-mode footer {
  display: none !important;
}

body.blog-studio-mode {
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

body.blog-studio-mode .page-shell,
body.blog-studio-mode .main-shell,
body.blog-studio-mode .member-layout,
body.blog-studio-mode .main-content,
body.blog-studio-mode .content-area,
body.blog-studio-mode .app-shell {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  display: block !important;
}

body.blog-studio-mode .blog-studio-page {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  transform: none !important;
}

body.blog-studio-mode .sidebar,
body.blog-studio-mode .members-sidebar,
body.blog-studio-mode aside.sidebar,
body.blog-studio-mode .member-sidebar {
  display: none !important;
}

body.blog-studio-mode .main-content,
body.blog-studio-mode .members-main,
body.blog-studio-mode .content-wrap {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

body.blog-studio-mode .blog-studio-page {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  min-height: calc(100vh - 115px) !important;
  z-index: 1 !important;
}

body.blog-studio-mode .blog-studio-form {
  min-height: calc(100vh - 115px) !important;
}

body.blog-studio-clean {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #eef4f9 !important;
}

body.blog-studio-clean .blog-studio-page {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1 !important;
}

.blog-studio-main {
  padding-bottom: 80px !important;
}

.blog-studio-canvas {
  margin-bottom: 80px !important;
}

.studio-media-drop input[type="file"],
.blog-studio-sidebar input[type="file"] {
  display: none;
}

.studio-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: #4cc28a;
  color: #10263d;
  font-weight: 900;
  cursor: pointer;
  border: 0;
}

.studio-file-name {
  font-size: 12px;
  color: #667587;
}

.blog-live-preview {
  margin-top: 24px;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e8edf3;
  box-shadow: 0 14px 32px rgba(28,39,60,.08);
}

.blog-live-preview h2 {
  margin: 0 0 8px;
  color: #1d2a39;
}

.blog-live-preview .preview-excerpt {
  color: #667587;
  margin-bottom: 22px;
}

.preview-block {
  margin: 18px 0;
}

.preview-block img,
.preview-block video {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
  background: #eef4f9;
}

/* Studio fit + responsive polish */
.blog-studio-clean * {
  box-sizing: border-box;
}

.blog-studio-form {
  grid-template-columns: 300px minmax(0, 1fr) !important;
}

.blog-studio-sidebar {
  width: 300px !important;
  min-width: 300px !important;
}

.blog-studio-main {
  min-width: 0 !important;
  padding: 20px 28px 90px !important;
}

.blog-studio-canvas,
.blog-live-preview {
  width: 100% !important;
  max-width: 980px !important;
}

.blog-studio-block,
.blog-studio-block-body,
.blog-studio-block-top {
  min-width: 0 !important;
}

.studio-block-input,
.studio-block-file,
.blog-studio-sidebar input,
.blog-studio-sidebar select,
.blog-studio-sidebar textarea {
  max-width: 100% !important;
  min-width: 0 !important;
}

.blog-studio-block-top {
  flex-wrap: wrap !important;
}

.blog-studio-block-top strong {
  overflow-wrap: anywhere;
}

.blog-studio-block-top button {
  flex-shrink: 0;
}

.blog-live-preview {
  overflow-wrap: anywhere;
}

.blog-live-preview h2,
.blog-live-preview h3,
.blog-live-preview p,
.blog-live-preview blockquote,
.preview-link-card {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  body.blog-studio-clean {
    overflow: auto !important;
  }

  .blog-studio-page {
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  .blog-studio-form {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  .blog-studio-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  .blog-studio-main {
    height: auto !important;
    padding: 18px 14px 90px !important;
  }

  .blog-studio-topbar {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .blog-studio-canvas,
  .blog-live-preview {
    padding: 16px !important;
    border-radius: 18px !important;
  }

  .studio-heading-input {
    font-size: 20px !important;
  }
}

/* Blog studio cropped image preview polish */
.studio-selected-preview {
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
  background: #eef4f9;
  border: 1px solid #e1eaf3;
  max-height: none;
}

.studio-selected-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
}

.blog-live-preview .preview-block img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: unset;
  border-radius: 18px;
  background: #eef4f9;
}

.blog-live-preview figure.preview-block {
  margin: 22px 0;
}

.blog-live-preview figcaption {
  margin-top: 8px;
  color: #667587;
  font-size: 13px;
  text-align: center;
}

.blog-btn-danger {
  background: #ffe8e8;
  color: #a92f2f;
  border: 1px solid #f2caca;
}

.blog-btn-danger:hover {
  background: #ffd5d5;
}

.success-box {
  padding: 14px 16px;
  border-radius: 14px;
  background: #e8fff1;
  border: 1px solid #bde8ce;
  color: #246b44;
  margin-top: 16px;
}

/* Mobile studio scroll fix */
@media (max-width: 760px) {
  body.blog-studio-clean {
    overflow-y: auto !important;
    height: auto !important;
  }

  .blog-studio-page {
    position: relative !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
  }

  .blog-studio-form {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  .blog-studio-sidebar,
  .blog-studio-main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .blog-studio-actions {
    margin-bottom: 80px !important;
  }
}

/* My blog posts mobile polish */
@media (max-width: 560px) {
  .myposts-table tr {
    display: grid !important;
    grid-template-columns: 90px 1fr !important;
    gap: 12px !important;
  }

  .myposts-table td {
    width: auto !important;
    word-break: normal !important;
  }

  .myposts-table td:nth-child(n+3) {
    grid-column: 1 / -1 !important;
  }

  .myposts-actions {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }

  .myposts-actions .blog-btn {
    width: auto !important;
    min-width: 84px !important;
    writing-mode: horizontal-tb !important;
  }
}

.psas-reaction-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.blog-reaction-btn {
  min-width: 68px;
}

.blog-reaction-dropdown {
  position: relative;
  width: fit-content;
}

.blog-react-toggle {
  border: 1px solid #dce6f0;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  color: #1d2a39;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(28,39,60,.06);
}

.blog-react-toggle strong {
  background: #eef4f9;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.blog-react-main-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
}

.blog-react-menu {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  width: 230px;
  background: #fff;
  border: 1px solid #e1eaf3;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(28,39,60,.16);
  padding: 8px;
}

.blog-reaction-dropdown.is-open .blog-react-menu {
  display: grid;
  gap: 6px;
}

.blog-react-menu form {
  margin: 0;
}

.blog-react-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  color: #253447;
  font-weight: 800;
}

.blog-react-option:hover,
.blog-react-option.is-active {
  background: #eef8f2;
}

.blog-react-option strong {
  color: #667587;
  font-size: 12px;
}

.psas-reaction-svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* =========================================================
   Premium Blog Renderer
   ========================================================= */

.blog-render-heading {
  margin: 34px 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  color: #1d2a39;
}

.blog-render-paragraph {
  margin: 18px 0;
  font-size: 17px;
  line-height: 1.85;
  color: #344559;
}

.blog-render-quote {
  margin: 28px 0;
  padding: 22px 24px;
  border-left: 5px solid #4cc28a;
  border-radius: 18px;
  background: #f6fbf8;
  font-size: 20px;
  line-height: 1.7;
  font-style: italic;
  color: #223446;
}

.blog-render-divider {
  height: 2px;
  margin: 42px auto;
  width: 120px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #4cc28a, transparent);
}

.blog-render-link {
  margin: 24px 0;
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  border-radius: 18px;
  background: #f7fafc;
  border: 1px solid #e4ebf3;
  text-decoration: none;
}

.blog-render-link strong {
  color: #1d2a39;
  font-size: 17px;
}

.blog-render-link span {
  color: #6c7d91;
  font-size: 14px;
  word-break: break-word;
}

.blog-render-image-wrap,
.blog-render-video-wrap {
  margin: 34px 0;
}

.blog-render-image,
.blog-render-video {
  width: 100%;
  display: block;
  border-radius: 22px;
  background: #eef4f9;
}

.blog-render-caption {
  margin-top: 10px;
  text-align: center;
  color: #667587;
  font-size: 13px;
}

.blog-live-preview.width-narrow {
  max-width: 720px !important;
}

.blog-live-preview.width-normal {
  max-width: 980px !important;
}

.blog-live-preview.width-wide {
  max-width: 1180px !important;
}

.blog-live-preview.style-magazine {
  border-radius: 6px !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.12);
}

.blog-live-preview.style-journal {
  background: #fffdf7 !important;
  border-style: dashed !important;
}

.blog-live-preview.style-vlog {
  background: #101d2d !important;
  color: #fff !important;
}

.blog-live-preview.style-vlog h2,
.blog-live-preview.style-vlog h3,
.blog-live-preview.style-vlog p {
  color: #fff !important;
}

/* Published blog design settings */
.blog-post-shell {
  background: var(--blog-page-bg, #eef4f9);
  color: var(--blog-text-color, #1d2a39);
}

.blog-post-shell .blog-post-title,
.blog-post-shell .blog-render-heading,
.blog-post-shell .blog-render-paragraph,
.blog-post-shell .blog-post-excerpt {
  color: var(--blog-text-color, #1d2a39);
}

.blog-post-shell .blog-post-category,
.blog-post-shell .blog-kicker,
.blog-post-shell .blog-render-quote {
  border-color: var(--blog-accent-color, #4cc28a);
}

.blog-post-shell .blog-render-divider {
  background: linear-gradient(90deg, transparent, var(--blog-accent-color, #4cc28a), transparent);
}

.blog-font-serif {
  font-family: Georgia, "Times New Roman", serif;
}

.blog-font-rounded {
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

.blog-font-system {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.blog-width-narrow .blog-post-card,
.blog-width-narrow .blog-interactions-card,
.blog-width-narrow .blog-related-card {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.blog-width-wide .blog-post-card,
.blog-width-wide .blog-interactions-card,
.blog-width-wide .blog-related-card {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.blog-design-magazine .blog-post-card {
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0,0,0,.14);
}

.blog-design-journal .blog-post-card,
.blog-design-journal .blog-interactions-card,
.blog-design-journal .blog-related-card {
  background: #fffdf7;
  border-style: dashed;
}

.blog-design-vlog .blog-post-card {
  background: #101d2d;
  color: #fff;
}

.blog-design-vlog .blog-post-title,
.blog-design-vlog .blog-post-excerpt,
.blog-design-vlog .blog-render-heading,
.blog-design-vlog .blog-render-paragraph {
  color: #fff;
}

/* FINAL BLOG POLISH OVERRIDES */

/* Remove blank hero space when no real image exists */
.blog-post-hero.is-empty,
.blog-post-hero[style*="url('')"],
.blog-post-hero[style*='url("")'],
.blog-post-hero[style="background-image:url('');"],
.blog-post-hero[style='background-image:url("");'] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Make real hero images still look premium */
.blog-post-hero:not(.is-empty) {
  min-height: 320px;
  background-size: cover;
  background-position: center;
}

/* Softer placeholder/ghost text in studio fields */
.blog-studio-block input::placeholder,
.blog-studio-block textarea::placeholder,
.blog-studio-sidebar input::placeholder,
.blog-studio-sidebar textarea::placeholder {
  color: #9aa8b8 !important;
  opacity: 0.85 !important;
  font-style: italic;
}

/* Make template placeholder-preview text look slightly softer */
.blog-live-preview .preview-content .preview-block {
  color: inherit;
}

.blog-live-preview .preview-media-placeholder {
  min-height: 180px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef4f9;
  color: #8fa0b3;
  font-weight: 800;
}

.blog-post-hero {
    display:none !important;
}

/* Blog studio heading level selector */
.studio-heading-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: center;
}

.studio-heading-level {
  font-weight: 900;
  text-align: center;
}

.blog-live-preview .preview-heading.h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; }
.blog-live-preview .preview-heading.h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; }
.blog-live-preview .preview-heading.h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.18; }
.blog-live-preview .preview-heading.h4 { font-size: 22px; line-height: 1.25; }
.blog-live-preview .preview-heading.h5 { font-size: 18px; line-height: 1.3; }
.blog-live-preview .preview-heading.h6 { font-size: 15px; line-height: 1.35; text-transform: uppercase; letter-spacing: .05em; }

@media (max-width: 560px) {
  .studio-heading-row {
    grid-template-columns: 1fr;
  }
}

.blog-render-h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; }
.blog-render-h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.blog-render-h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.18; }
.blog-render-h4 { font-size: 22px; line-height: 1.25; }
.blog-render-h5 { font-size: 18px; line-height: 1.3; }
.blog-render-h6 { font-size: 15px; line-height: 1.35; text-transform: uppercase; letter-spacing: .05em; }

/* Final published heading level overrides */
.blog-post-content .blog-render-heading.blog-render-h1 {
  font-size: clamp(42px, 6vw, 68px) !important;
  line-height: 1.02 !important;
  font-weight: 950 !important;
}

.blog-post-content .blog-render-heading.blog-render-h2 {
  font-size: clamp(34px, 5vw, 50px) !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
}

.blog-post-content .blog-render-heading.blog-render-h3 {
  font-size: clamp(28px, 4vw, 38px) !important;
  line-height: 1.14 !important;
  font-weight: 850 !important;
}

.blog-post-content .blog-render-heading.blog-render-h4 {
  font-size: 24px !important;
  line-height: 1.22 !important;
  font-weight: 800 !important;
}

.blog-post-content .blog-render-heading.blog-render-h5 {
  font-size: 19px !important;
  line-height: 1.3 !important;
  font-weight: 800 !important;
}

.blog-post-content .blog-render-heading.blog-render-h6 {
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  opacity: .8 !important;
}

/* Final mobile blog studio scroll fix */
@media (max-width: 760px) {
  html,
  body.blog-studio-clean {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.blog-studio-clean .blog-studio-page {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body.blog-studio-clean .blog-studio-form {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
  }

  body.blog-studio-clean .blog-studio-sidebar,
  body.blog-studio-clean .blog-studio-main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.blog-studio-clean .blog-studio-actions {
    padding-bottom: 110px !important;
  }
}

/* Latest articles mobile thumbnail fix */
@media (max-width: 560px) {
  .blog-card-image,
  .myposts-thumb-box,
  .blog-related-thumb {
    display: block !important;
    width: 100% !important;
    min-height: 190px !important;
    height: 190px !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .myposts-thumb {
    width: 100% !important;
  }

  .myposts-table tr {
    grid-template-columns: 1fr !important;
  }
}

/* Published blog background image support */
.blog-post-shell.has-bg-image {
  background:
    linear-gradient(
      rgba(238, 244, 249, 0.72),
      rgba(238, 244, 249, 0.72)
    ),
    var(--blog-bg-image),
    var(--blog-page-bg, #eef4f9) !important;
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed !important;
}

.blog-post-shell.has-bg-image .blog-post-card,
.blog-post-shell.has-bg-image .blog-interactions-card,
.blog-post-shell.has-bg-image .blog-related-card {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(6px);
}

@media (max-width: 760px) {
  .blog-post-shell.has-bg-image {
    background-attachment: scroll !important;
  }
}

.studio-sidebar-actions {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 10px;
  position: sticky;
  bottom: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #ffffff 24%);
}

.studio-sidebar-actions .studio-pill-btn {
  width: 100%;
}

.studio-exit-btn {
  text-align: center;
}

.studio-mobile-drawer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 120px);
}

.studio-sidebar-actions {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  gap: 10px;
  position: static !important;
  bottom: auto !important;
}

.studio-sidebar-actions .studio-pill-btn {
  width: 100%;
}

.studio-exit-btn {
  text-align: center;
}

.blog-render-image-text{
  display:grid;
  grid-template-columns:minmax(220px,.95fr) minmax(0,1.05fr);
  gap:24px;
  align-items:center;
  margin:28px 0;
}

.blog-render-image-text.image-right .blog-render-image-text-media{
  order:2;
}

.blog-render-image-text.image-right .blog-render-image-text-copy{
  order:1;
}

.blog-render-image-text-media{
  margin:0;
}

.blog-render-image-text-media img{
  display:block;
  width:100%;
  max-height:420px;
  object-fit:cover;
  border-radius:22px;
}

.blog-render-image-text-copy h2{
  margin:0 0 10px;
  color:var(--blog-text-color, #1d2a39);
  font-size:28px;
  line-height:1.18;
}

.blog-render-image-text-copy p{
  margin:0;
  color:var(--blog-text-color, #2d3a49);
  font-size:16px;
  line-height:1.85;
}

@media(max-width:700px){
  .blog-render-image-text{
    grid-template-columns:1fr;
  }

  .blog-render-image-text.image-right .blog-render-image-text-media,
  .blog-render-image-text.image-right .blog-render-image-text-copy{
    order:initial;
  }

  .blog-render-image-text-copy h2{
    font-size:23px;
  }
}