/* Single Post Main Container - v1.0.5 */
.single-post-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.custom-index-box .section-title {
  font-size: 28px;
  margin-bottom: 16px;
  margin-top: 0;
  /* Reset margins from section.css */
  margin-left: 0;
  line-height: 1.4;
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  /* Override Marcellus */
}

.custom-index-box .section-subtitle {
  margin-bottom: 16px;
}

/* Custom Hero Section Styles */
.custom-hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.custom-hero-image-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.custom-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tags Section */
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.hero-tag {
  color: var(--color-primary);
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 100%;
  text-decoration: none;
}

.hero-tag:hover {
  text-decoration: underline;
}

/* Single Post Title (Main & In-Content) */
.single-post-content h1 {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-secondary);
  position: relative;
  padding-top: 20px;
  margin-bottom: 0px;
  vertical-align: middle;
  letter-spacing: 0;
}

.single-post-content h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--color-primary, #e60012);
}

/* Paragraph Styling */
.single-post-content p {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-secondary);
  margin-bottom: 0px;
  padding-top: 24px;
}

/* H2 Styling - Light Background with Red Bottom Border */
.single-post-content h2:not(.section-title) {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-secondary);
  background-color: #faf3f3;
  padding: 10px 16px;
  border-bottom: 2px solid var(--color-primary, #e60012);
  margin-top: 24px;
  margin-bottom: 16px;
}

/* H3 Styling - Simple Dark Underline */
.single-post-content h3 {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-secondary);
  padding: 8px;
  border-bottom: 2px solid var(--color-secondary);
  margin-top: 32px;
  margin-bottom: 20px;
}

/* H4 Styling */
.single-post-content h4 {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-secondary);
  padding: 8px 0px;
}

/* List Styling (OL & UL) */
.single-post-content ol,
.single-post-content ul {
  padding-left: 24px;
}

/* Ensure padding for markers */
.single-post-content li {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

/* Ordered List - Bold Red Numbers */
.single-post-content ol {
  list-style-type: decimal;
}

.single-post-content ol li::marker {
  color: var(--color-primary, #e60012);
  font-weight: 700;
  font-size: 16px;
  font-family: "YuGothic", "Yu Gothic", sans-serif;
}

/* Unordered List - Red Bullets */
.single-post-content ul {
  list-style-type: disc;
}

.single-post-content ul li::marker {
  color: var(--color-primary, #e60012);
  font-size: 1.2em;
}

/* Index List Override - Reset Color */
.single-post-content .index-list li,
.single-post-content .index-list li::marker {
  color: #666;
}

/* Table Styling */
.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.single-post-content th,
.single-post-content td {
  padding: 12px 16px;
  border: 2px solid #fff;
  vertical-align: middle;
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

/* Header Cells */
.single-post-content th {
  background-color: var(--color-secondary);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* Body Cells - First Column Pink */
.single-post-content tbody td:first-child {
  background-color: var(--color-bg-profile);
  color: var(--color-secondary);
  font-weight: 500;
  text-align: center;
}

/* Body Cells - Other Columns White */
.single-post-content tbody td:not(:first-child) {
  background-color: var(--color-surface);
  color: var(--color-secondary);
}

/* Image & Caption Styling */
.single-post-content figure,
.single-post-content .wp-block-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  margin-bottom: 64px;
  margin-top: 40px;
  gap: 16px;
  width: 100%;
}

.single-post-content img {
  display: block;
  height: auto;
  max-width: 100%;
  margin: 0 auto;
}

.single-post-content figcaption {
  text-align: center;
  display: block;
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  letter-spacing: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* H1 Mobile Override */
  .single-post-content h1 {
    font-size: 20px;
    margin-bottom: 0px;
    padding: 16px 0px;
  }

  .single-post-content p {
    font-size: 14px;
  }

  /* Full Width Hero Image on Mobile */
  .custom-hero-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
  }

  .custom-hero-image-container {
    padding-top: 56.25%;
    /* Maintain aspect ratio */
  }
}

/* H2 Mobile Override */
.single-post-content h2:not(.section-title) {
  font-size: 18px;
}

/* H3 Mobile Override */
.single-post-content h3 {
  font-size: 16px;
  margin: 0;
  margin-bottom: 16px;
}

/* H4 Mobile Override */
.single-post-content h4 {
  font-size: 14px;
  margin: 0;
  margin-bottom: 16px;
}

/* Paragraph Mobile Override */
.single-post-content p {
  padding: 0px;
  padding-bottom: 16px;
}

/* Image Adjustments for Mobile */
.single-post-content figure,
.single-post-content .wp-block-image {
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* Caption size for mobile */
.single-post-content figcaption {
  font-size: 10px;
}

/* List Item Typography for Mobile */
.single-post-content li {
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Table Padding & Font for Mobile */
.single-post-content th,
.single-post-content td {
  padding: 8px;
  font-size: 12px;
}

/* Table Margins for Mobile */
.single-post-content table {
  margin-top: 0;
  margin-bottom: 16px;
}

.single-post-meta-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Meta Data */
.entry-meta-custom {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #666;
  font-size: 10px;
  font-weight: 300;
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  width: 12px;
  height: 12px;
  margin-right: 8px;
}

/* Social Share */
.social-share-custom {
  display: flex;
  gap: 15px;
  align-items: center;
}

.share-divider {
  width: 2px;
  height: 24px;
  background-color: #d9d9d9;
  display: inline-block;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.share-btn:hover {
  opacity: 0.8;
}

.btn-copy {
  background-color: #777;
}

.share-btn svg {
  fill: white;
}

/* Author Profile Box */
.author-profile-box {
  background-color: var(--color-bg-profile);
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img,
.author-avatar picture,
.avatar-img {
  max-width: 100%;
  border-radius: 100%;
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  background-color: #ddd;
  border-radius: 50%;
}

.author-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.author-role {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 150%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-text-gray);
}

.author-company {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-secondary);
}

.author-name {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 150%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-secondary);
}

.author-description {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-text-gray);
}

/* Index (TOC) Section */
.custom-index-box {
  background-color: var(--color-surface);
  padding: 24px;
  margin-bottom: 40px;
  border-radius: 2px;
}

.single-post-content .index-list,
.single-post-content .index-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.index-list {
  counter-reset: section;
}

.index-list li {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.index-list > li > a::before {
  counter-increment: section;
  content: counter(section) ". ";
  color: var(--color-secondary);
  margin-right: 5px;
  font-family: sans-serif;
  font-weight: normal;
}

.single-post-content .index-sublist {
  margin-top: 5px;
  padding-left: 1.2em;
  counter-reset: subsection;
}

.index-sublist > li {
  font-size: 1.1rem;
}

.index-sublist > li > a::before {
  counter-increment: subsection;
  content: counter(section) "-" counter(subsection) ". ";
  color: var(--color-secondary);
  margin-right: 5px;
  font-family: sans-serif;
  font-weight: normal;
}

.index-list a {
  font-family: "YuGothic", "Yu Gothic", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0;
  vertical-align: middle;
  color: var(--color-primary);
  text-decoration: none;
}

.index-list a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Chat Style Comments */
.comments-area {
  margin-top: 60px;
  margin-bottom: 60px;
}

.chat-comments-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
  margin-bottom: 40px;
}

.chat-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 80%;
}

.chat-left {
  align-self: flex-start;
  flex-direction: row;
}

.chat-right {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
}

.chat-avatar img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  object-fit: cover;
  display: block;
}

.chat-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-secondary);
}

.chat-right .chat-content-wrapper {
  align-items: flex-end;
}

.chat-left .chat-content-wrapper {
  align-items: flex-start;
}

.chat-right .chat-name {
  text-align: right;
}

.chat-bubble {
  background-color: white;
  padding: 24px 20px;
  border: 1px solid #707070;
  position: relative;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: #333;
  border-radius: 4px;
}

/* Bubble Tails */
/* Bubble Tails - Rotated Square Method */
.chat-bubble::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: white;
}

.chat-bubble::after {
  display: none;
}

/* Left Bubble Tail (Top-Left) */
.chat-left .chat-bubble::before {
  transform: rotate(29deg);
  left: 20px;
  top: -4px;
  width: 13px;
  height: 7px;
  border-top: 1px solid #707070;
  border-left: 1px solid #707070;
}

/* Right Bubble Tail (Top-Right) */
.chat-right .chat-bubble::before {
  transform: rotate(60deg);
  right: 20px;
  top: -5px;
  height: 9px;
  width: 6px;
  border-top: 1px solid #707070;
  border-left: 1px solid #707070;
}

/* Comment Form Styles (Basic) */
.comment-form {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 4px;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  margin-bottom: 20px;
}

.comment-form .submit {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  /* Meta Data */
  .entry-meta-custom {
    margin-bottom: 20px;
  }

  .share-btn {
    width: 32px;
    height: 32px;
  }

  .index-list a {
    font-size: 12px;
  }

  .section-title.entry-title {
    font-size: 20px;
  }

  .single-post-content h1::before {
    width: 40px;
    height: 2px;
  }

  .author-profile-box {
    padding: 20px;
  }

  .entry-meta-custom,
  .social-share-custom {
    color: var(--color-secondary);
    justify-content: flex-end;
    gap: 8px;
  }

  .custom-index-box .section-title {
    font-size: 20px;
  }

  .custom-index-box .section-subtitle {
    display: inline-block;
    margin-left: 10px;
    margin-top: 0;
    font-size: 12px;
  }

  .author-avatar img,
  .author-avatar picture,
  .avatar-img {
    width: 80px;
    height: 80px;
  }

  .chat-avatar {
    width: 64px;
    height: 64px;
  }

  .chat-avatar img {
    width: 64px;
    height: 64px;
  }

  .chat-row {
    gap: 8px;
  }

  .chat-bubble {
    font-size: 12px;
    line-height: 1.6;
  }

  .chat-comments-list {
    gap: 16px;
  }

  .custom-index-box {
    margin-bottom: 0;
  }
}

/* Accordion Body Text Override */
.malta-accordion__body p {
  font-family: "Yu Gothic", YuGothic, sans-serif !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Accordion Body Text Override */
.malta-accordion__body p {
  font-family: "Yu Gothic", YuGothic, sans-serif !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.xw-block-title-box > .xw-box-content p {
  font-size: 16px !important;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.xw-block-decobox.xw-box-type1 p {
  font-family: YuGothic;
  font-weight: 700;
  font-size: 16px;
  line-height: 160%;
  letter-spacing: 0%;
  vertical-align: middle;
  padding: 0;
}

/* Accordion Label - Mobile */
@media (max-width: 767.98px) {
  .malta-accordion__label {
    font-size: 12px !important;
  }

  .malta-accordion__body p {
    font-size: 12px !important;
  }

  .malta-accordion__body {
    padding: 16px !important;
  }

  .malta-accordion.is-style-simple .malta-accordion__header {
    padding: 12px 0 !important;
  }

  .wp-block-malta-decobox.xw-block-decobox.xw-box-type1 {
    padding: 16px !important;
  }

  .xw-block-decobox.xw-box-type1 p {
    font-size: 12px !important;
  }
}

/* Decoration Box Type1 - Desktop Padding */
.wp-block-malta-decobox.xw-block-decobox.xw-box-type1 {
  padding: 20px;
}
