/* ================================================================
   Single Post CSS — compound selectors & pseudo-elements only.
   Base styles (flex, grid, spacing, colors) → Tailwind in single.php.
   Loaded only on: is_single()
================================================================ */

/* ----------------------------------------------------------------
   Meta bar icons — compound selector (.class i)
   Cannot use Tailwind: selector targets <i> inside parent class
---------------------------------------------------------------- */
.single-meta-author i,
.single-meta-date i,
.single-meta-read i {
  color: #ef519e;
  font-size: 1.3rem;
}

/* ----------------------------------------------------------------
   Author avatar — compound selector (.parent .child)
   WordPress outputs <img> via get_avatar(); only way to override
   forced size is !important here.
---------------------------------------------------------------- */
.single-author-box .single-author-avatar {
  width: 8rem !important;
  height: 8rem !important;
  border-radius: 50%;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  -o-object-fit: cover;
  object-fit: cover;
  border: 2px solid #ef519e;
}

/* ----------------------------------------------------------------
   Section title underline decoration — pseudo-element ::after
---------------------------------------------------------------- */
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4.8rem;
  height: 0.3rem;
  background: #ef519e;
  border-radius: 10rem;
}

/* ----------------------------------------------------------------
   Sidebar recent post thumbnail hover — compound selector
   Cannot use Tailwind: targets <img> inside a parent element
---------------------------------------------------------------- */
.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  -webkit-transition: -webkit-transform 0.35s;
  transition: -webkit-transform 0.35s;
  transition: transform 0.35s;
  transition: transform 0.35s, -webkit-transform 0.35s;
}

@media (hover: hover) {
  .sidebar-post-thumb:hover img {
    -webkit-transform: scale(1.06);
    transform: scale(1.06);
  }
}

/* ----------------------------------------------------------------
   Article body typography — all compound (.single-content X)
   These target WP editor-generated HTML; cannot add Tailwind to it.
---------------------------------------------------------------- */
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5 {
  font-weight: 700;
  color: #1a1a2e;
  margin: 3.2rem 0 1.4rem;
  line-height: 1.3;
}

.single-content h2 { font-size: 2.6rem; }
.single-content h3 { font-size: 2.2rem; }
.single-content h4 { font-size: 1.9rem; }
.single-content h5 { font-size: 1.7rem; }

@media (max-width: 800px) {
  .single-content h2 { font-size: 2.2rem; }
  .single-content h3 { font-size: 1.9rem; }
  .single-content h4 { font-size: 1.7rem; }
}

.single-content p {
  margin-bottom: 1.8rem;
}

.single-content a {
  color: #ef519e;
  -webkit-text-decoration: underline;
  text-decoration: underline;
  text-underline-offset: 0.3em;
  -webkit-transition: color 0.2s;
  transition: color 0.2s;
}

.single-content a:hover {
  color: #d93d8a;
}

.single-content ul,
.single-content ol {
  padding-left: 2.4rem;
  margin-bottom: 1.8rem;
}

.single-content ul { list-style: disc; }
.single-content ol { list-style: decimal; }
.single-content li { margin-bottom: 0.6rem; }

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.8rem;
  margin: 2.4rem auto;
  display: block;
}

.single-content figure {
  margin: 2.4rem 0;
}

.single-content figcaption {
  font-size: 1.3rem;
  color: #888;
  text-align: center;
  margin-top: 0.8rem;
}

.single-content blockquote {
  border-left: 0.4rem solid #ef519e;
  padding: 1.6rem 2.4rem;
  margin: 2.8rem 0;
  background: #fdf2f8;
  border-radius: 0 0.8rem 0.8rem 0;
  font-size: 1.8rem;
  font-style: italic;
  color: #555;
}

.single-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  overflow-x: auto;
  display: block;
}

.single-content th,
.single-content td {
  padding: 1rem 1.4rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.single-content th {
  background: #f9fafb;
  font-weight: 600;
  color: #1a1a2e;
}

.single-content tr:nth-child(even) td {
  background: #fafafa;
}

.single-content code {
  font-family: 'Courier New', Courier, monospace;
  background: #f3f4f6;
  padding: 0.2em 0.5em;
  border-radius: 0.3rem;
  font-size: 0.88em;
  color: #e11d48;
}

.single-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 2rem;
  border-radius: 0.8rem;
  overflow-x: auto;
  margin-bottom: 2rem;
  font-size: 1.4rem;
  line-height: 1.6;
}

.single-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.single-content hr {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 3.2rem 0;
}

/* ----------------------------------------------------------------
   Social share widget — compound selectors
   HTML comes from partials/social-share.php (not modified to Tailwind)
---------------------------------------------------------------- */
.newsdt-sc .igr {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 0.8rem;
}

.newsdt-sc .i-link {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  color: #555;
  font-size: 1.4rem;
  -webkit-transition: 0.25s;
  transition: 0.25s;
}

@media (hover: hover) {
  .newsdt-sc .i-link:hover {
    background: #ef519e;
    border-color: #ef519e;
    color: #fff;
  }
}
