/* Post Page Typography & Content Styling */

/* Smooth scroll for Table of Contents transition */
html {
  scroll-behavior: smooth;
}

/* Custom Text Selection */
::selection {
  background-color: rgba(246, 164, 36, 0.2);
  color: #1d2331;
}

/* Main Container Hierarchy */
.newPost {
  line-height: 1.6;
  color: #2c2f34;
}

#post-page .post-content {

  /* Headings Hierarchy */
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: #1d2331;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
  }

  .dark & h2,
  .dark & h3,
  .dark & h4,
  .dark & h5,
  .dark & h6 {
    color: #ffffff;
  }

  h2 {
    font-size: 1.75rem;
    border-right: 4px solid #f6a424;
    padding-right: 15px;
    margin-top: 3rem;
  }

  h3 {
    font-size: 1.5rem;
    padding-right: 10px;
    border-right: 3px solid #f6a424;
  }

  h4 {
    font-size: 1.25rem;
  }

  @media (max-width: 768px) {
    h2 {
      font-size: 1.5rem;
    }

    h3 {
      font-size: 1.35rem;
    }

    h4 {
      font-size: 1.15rem;
    }
  }

  /* Body Text */
  p,
  div {
    font-size: 1.05rem;
    line-height: 1.95;
    color: #4a5568;
    margin-bottom: 1.75rem;
    text-align: justify;
  }

  .dark & p,
  .dark & div {
    color: #f8fafc;
  }

  /* Images & Figures */
  img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2rem 0;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  }

  figure {
    margin: 2.5rem 0;
  }

  figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
    margin-top: 0.75rem;
    font-style: italic;
  }

  .dark & figcaption {
    color: #cbd5e1;
  }

  /* Links */
  a {
    color: #f6a424;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
  }

  a:hover {
    color: #d88b15;
    text-decoration-thickness: 2px;
  }

  /* Lists */
  ul,
  ol {
    margin: 1.5rem 2.5rem 2rem 0;
    padding: 0;
  }

  li {
    margin-bottom: 0.75rem;
    padding-right: 0.5rem;
    line-height: 1.8;
    color: #4a5568;
  }

  .dark & li {
    color: #f8fafc;
  }

  ul {
    list-style-type: none;
  }

  ul li::before {
    content: "•";
    color: #f6a424;
    font-weight: bold;
    display: inline-block;
    width: 1.25em;
    margin-right: -1.25em;
  }

  ol {
    list-style-type: decimal;
  }

  /* Tables */
  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
  }

  .dark & table {
    background: #0f172a;
    border-color: #1e293b;
  }

  th,
  td {
    padding: 1rem 1.25rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
  }

  th {
    background-color: #f8fafc;
    color: #1d2331;
    font-weight: 700;
    font-size: 0.95rem;
  }

  .dark & th {
    background-color: #1e293b;
    color: #ffffff;
    border-color: #334155;
  }

  .dark & td {
    border-color: #334155;
    color: #e2e8f0;
  }

  tr:last-child td {
    border-bottom: none;
  }

  tr:nth-child(even) {
    background-color: #fcfcfc;
  }

  .dark & tr:nth-child(even) {
    background-color: #1e293b;
  }

  tr:hover {
    background-color: rgba(246, 164, 36, 0.02);
  }

  /* WordPress Block Styles */
  .wp-block-button {
    margin: 2.5rem 0;
    text-align: center;
  }

  .wp-block-button__link {
    background-color: #f6a424;
    color: white !important;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    text-decoration: none !important;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(246, 164, 36, 0.2);
  }

  .wp-block-button__link:hover {
    background-color: #d88b15;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(246, 164, 36, 0.3);
  }

  /* Blockquote */
  blockquote {
    border-right: 5px solid #f6a424;
    background-color: #fffaf0;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
  }

  .dark & blockquote {
    background-color: #1e293b;
    border-color: #f6a424;
  }

  blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: #1d2331;
    font-size: 1.1rem;
  }

  .dark & blockquote p {
    color: #ffffff;
  }

  /* Horizontal Rule */
  hr {
    border: none;
    height: 2px;
    background: linear-gradient(to left, transparent, #f6a424, transparent);
    margin: 1rem 0 0 0;
    opacity: 0.6;
  }
}

/* Specific Layout Adjustments */
@media screen and (max-width: 412px) {
  #post-page .post-content {

    p,
    div {
      font-size: 1rem;
    }

    blockquote {
      padding: 1rem 1.5rem;
    }
  }
}