/*
 * Dcode single-article styling.
 * Copied from the original static article page HTML/CSS, then scoped
 * to .dcode-article-wrap only (unchanged from the source page).
 * Enqueued only on single Post pages, see functions.php.
 */

/*
 * Force Astra's boxed container to full width on single Post pages so
 * the article's own cream background reaches the edges, matching the
 * old full-width Elementor Canvas article pages, instead of showing
 * Astra's default site background as a gray strip around it.
 */
body.dcode-full-bleed-single {
  background-color: #F8EFE6 !important;
}

body.dcode-full-bleed-single .ast-container,
body.dcode-full-bleed-single .site-content,
body.dcode-full-bleed-single #content,
body.dcode-full-bleed-single #primary,
body.dcode-full-bleed-single .entry-content,
body.dcode-full-bleed-single article {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dcode-article-wrap {
  font-family: 'Quicksand', sans-serif;
  background-color: #F8EFE6;
  color: #152A50;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  padding-bottom: 60px;
}

.dcode-article-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.dcode-article-wrap h1,
.dcode-article-wrap h2,
.dcode-article-wrap h3,
.dcode-article-wrap h4 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
  color: #152A50;
}

.dcode-article-wrap p,
.dcode-article-wrap a,
.dcode-article-wrap button,
.dcode-article-wrap input,
.dcode-article-wrap span,
.dcode-article-wrap div,
.dcode-article-wrap li {
  font-family: 'Quicksand', sans-serif;
}

.dcode-article-wrap a,
.dcode-article-wrap button,
.dcode-article-wrap i,
.dcode-article-wrap .dcode-card {
  text-decoration: none !important;
  transition: none !important;
  animation: none !important;
  outline: none;
}

.dcode-article-wrap a:hover,
.dcode-article-wrap button:hover,
.dcode-article-wrap i:hover,
.dcode-article-wrap .dcode-card:hover {
  color: inherit;
  background-color: transparent;
  text-decoration: none !important;
  opacity: 1 !important;
  transform: none !important;
  box-shadow: none !important;
}

.dcode-article-wrap a,
.dcode-article-wrap button,
.dcode-article-wrap .dcode-card {
  cursor: pointer;
}

.dcode-breadcrumb-strip {
  width: 100%;
  background-color: #F8EFE6;
  border-bottom: 1px solid rgba(116, 129, 137, 0.4);
  padding: 10px 24px;
}

.dcode-breadcrumb-container {
  max-width: 1300px;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #748189;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dcode-breadcrumb-container a {
  color: #152A50 !important;
  font-weight: 600;
}

.dcode-breadcrumb-separator {
  margin: 0 8px;
  color: #748189;
}

.dcode-article-header-block {
  width: 100%;
  margin: 0 0 24px 0;
  padding: 0;
}

.dcode-article-header-block .dcode-category-tag {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(21, 42, 80, 0.85);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #FFFFFF;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.dcode-article-headline {
  font-size: 38px;
  font-weight: 700;
  color: #152A50;
  line-height: 1.25;
  margin-bottom: 14px;
}

.dcode-article-meta {
  font-size: 14px;
  font-weight: 600;
  color: #748189;
  margin-bottom: 18px;
}

.dcode-social-share-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(116, 129, 137, 0.3);
}

.dcode-social-share-row span {
  font-size: 13px;
  font-weight: 700;
  color: #152A50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.dcode-social-share-row a {
  color: #152A50 !important;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #748189;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dcode-featured-media-container {
  width: 100%;
  margin: 0 0 32px 0;
  padding: 0;
}

.dcode-featured-image-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.dcode-image-caption {
  font-size: 13px;
  color: #748189;
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}

.dcode-article-layout {
  max-width: 1300px;
  margin: 32px auto 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.dcode-main-content-col {
  flex: 0 0 calc(70% - 20px);
  width: calc(70% - 20px);
}

.dcode-sidebar-col {
  flex: 0 0 calc(30% - 20px);
  width: calc(30% - 20px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dcode-article-body {
  font-size: 17px;
  line-height: 1.7;
  color: #152A50;
}

.dcode-article-body p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.75;
  color: #152A50;
}

/*
 * The wildcard reset above (.dcode-article-wrap * { margin: 0; padding: 0; })
 * also zeroes out list indentation, which pushes bullets off the left
 * edge. Restore it for lists inside the article body only.
 */
.dcode-article-body ul,
.dcode-article-body ol {
  padding-left: 22px;
  margin-bottom: 20px;
}

.dcode-article-body ul {
  list-style: disc;
}

.dcode-article-body ol {
  list-style: decimal;
}

.dcode-article-body li {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.75;
}

@media (max-width: 768px) {
  .dcode-article-body li {
    font-size: 16px;
  }
}

.dcode-callout-box {
  background-color: rgba(116, 129, 137, 0.12);
  border-left: 4px solid #152A50;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 15px;
  font-weight: 600;
  color: #152A50;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dcode-callout-box i {
  color: #152A50;
  font-size: 18px;
  flex-shrink: 0;
}

.dcode-content-divider {
  border: none;
  border-top: 1px solid #748189;
  margin: 36px 0;
}

.dcode-author-card {
  background-color: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(21, 42, 80, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
}

.dcode-author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #152A50;
  color: #F8EFE6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.dcode-author-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: #152A50;
  margin-bottom: 4px;
}

.dcode-author-info p {
  font-size: 14px;
  color: #748189;
  margin-bottom: 0;
}

.dcode-related-section {
  margin-top: 36px;
}

.dcode-related-section h3 {
  font-size: 24px;
  font-weight: 700;
  color: #152A50;
  margin-bottom: 20px;
  border-bottom: 2px solid #152A50;
  padding-bottom: 8px;
}

.dcode-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dcode-card,
.dcode-related-grid .dcode-card,
.dcode-article-wrap .dcode-related-grid article.dcode-card {
  background-color: #FFFFFF !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(21, 42, 80, 0.08) !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dcode-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dcode-category-tag {
  display: inline-block;
  align-self: flex-start;
  background-color: #F7E4C2;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #152A50;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.dcode-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #152A50;
  line-height: 1.35;
  margin-bottom: 8px;
}

.dcode-read-more {
  font-size: 13px;
  font-weight: 700;
  color: #F0B24A !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
  padding-top: 4px;
  display: inline-block;
}

.dcode-sidebar-sticky-wrapper {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dcode-trending-widget {
  background-color: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(21, 42, 80, 0.08);
}

.dcode-trending-widget h4 {
  font-size: 20px;
  font-weight: 700;
  color: #152A50;
  margin-bottom: 16px;
  border-bottom: 2px solid #152A50;
  padding-bottom: 8px;
}

.dcode-trending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dcode-trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dcode-trending-number {
  font-size: 20px;
  font-weight: 700;
  color: #F0B24A;
  line-height: 1;
  min-width: 20px;
}

.dcode-trending-item a {
  font-size: 14px;
  font-weight: 600;
  color: #152A50 !important;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .dcode-article-layout {
    flex-direction: column;
    gap: 40px;
  }

  .dcode-main-content-col,
  .dcode-sidebar-col {
    flex: 1 1 100%;
    width: 100%;
  }

  .dcode-sidebar-sticky-wrapper {
    position: static;
  }

  .dcode-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .dcode-article-headline {
    font-size: 26px;
  }

  .dcode-featured-image-img {
    height: 280px;
  }

  .dcode-article-body {
    font-size: 16px;
  }

  .dcode-article-body p {
    font-size: 16px;
  }

  .dcode-related-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .dcode-author-card {
    flex-direction: column;
    text-align: center;
  }
}
