/*
Theme Name: Hello Elementor Child
Theme URI: https://elementor.com/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created for Hector Hernandez migration.
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* ============================================
   DESIGN TOKENS - TECH AESTHETIC
   ============================================ */
:root {
    --hh-corporate: #0F172A;
    --hh-action: #2563EB;
    --hh-accent: #06B6D4;
    --hh-purple: #8B5CF6;
    --hh-secondary: #64748B;
    --hh-bg-dark: #0F172A;
    --hh-bg-light: #F8FAFC;
    --hh-border: #E2E8F0;
    --hh-text: #1E293B;
    --hh-text-muted: #94A3B8;
    --hh-white: #FFFFFF;
    --hh-glow: rgba(37, 99, 235, 0.15);
    --hh-font-display: 'Montserrat', system-ui, sans-serif;
    --hh-font-body: 'Inter', system-ui, sans-serif;
    --hh-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   ANCHOR SCROLL OFFSET - Compensate fixed header
   ============================================ */
h1[id],
h2[id],
h3[id],
h4[id],
h5[id],
h6[id],
[id]:target {
    scroll-margin-top: 110px;
}

/* ============================================
   SINGLE POST - LAYOUT & BACKGROUND
   ============================================ */

body.single-post {
    background-color: var(--hh-bg-light);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
}

body.single-post .site-main {
    padding-top: 1.5rem;
    padding-bottom: 5rem;
    max-width: 820px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ============================================
   SINGLE POST - TECH HERO HEADER (.page-header)
   ============================================ */

body.single-post .page-header {
    position: relative;
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 1.5rem 1.5rem;
    background: var(--hh-white);
    border-radius: 1.25rem;
    border: 1px solid var(--hh-border);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 40px -15px rgba(37, 99, 235, 0.1);
    overflow: hidden;
}

/* Tech corner accents */
body.single-post .page-header::before,
body.single-post .page-header::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid transparent;
    opacity: 0.3;
}

body.single-post .page-header::before {
    top: 12px;
    left: 12px;
    border-top-color: var(--hh-action);
    border-left-color: var(--hh-action);
    border-radius: 8px 0 0 0;
}

body.single-post .page-header::after {
    bottom: 12px;
    right: 12px;
    border-bottom-color: var(--hh-accent);
    border-right-color: var(--hh-accent);
    border-radius: 0 0 8px 0;
}

/* Top gradient line */
body.single-post .page-header .entry-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
    border-radius: 0 0 3px 3px;
}

body.single-post .entry-title,
body.single-post h1.entry-title {
    position: relative;
    font-family: var(--hh-font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--hh-corporate);
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

/* ============================================
   SINGLE POST - CONTENT TYPOGRAPHY (.page-content)
   ============================================ */

body.single-post .page-content {
    font-family: var(--hh-font-body);
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--hh-text);
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* Paragraphs */
body.single-post .page-content p {
    margin-bottom: 1.75rem;
    text-align: justify;
}

/* Featured image - remove top margin for tight spacing */
body.single-post .page-content>.wp-block-post-featured-image:first-child,
body.single-post .page-content>figure:first-child {
    margin-top: 0;
}

body.single-post .page-content>.wp-block-post-featured-image:first-child img,
body.single-post .page-content>figure:first-child img {
    margin-top: 0;
}

/* H2 - Tech section headers */
body.single-post .page-content h2 {
    position: relative;
    font-family: var(--hh-font-display);
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--hh-corporate);
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
    text-align: left;
}

body.single-post .page-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--hh-action), var(--hh-accent));
    border-radius: 2px;
}

body.single-post .page-content h2::after {
    content: '';
    display: block;
    margin-top: 0.75rem;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--hh-action), transparent);
    opacity: 0.3;
}

/* H3 */
body.single-post .page-content h3 {
    font-family: var(--hh-font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--hh-corporate);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--hh-border);
    text-align: left;
}

/* H4 */
body.single-post .page-content h4 {
    font-family: var(--hh-font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--hh-action);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

/* Links */
body.single-post .page-content a {
    color: var(--hh-action);
    text-decoration: none;
    background: linear-gradient(90deg, var(--hh-action), var(--hh-action)) no-repeat 0 100%;
    background-size: 0% 2px;
    transition: background-size 0.3s, color 0.3s;
}

body.single-post .page-content a:hover {
    color: var(--hh-accent);
    background-size: 100% 2px;
}

/* Bold and Strong */
body.single-post .page-content strong,
body.single-post .page-content b {
    font-weight: 600;
    color: var(--hh-corporate);
}

/* Lists */
body.single-post .page-content ul,
body.single-post .page-content ol {
    margin-bottom: 1.75rem;
    padding-left: 0;
    text-align: left;
}

body.single-post .page-content li {
    position: relative;
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
    list-style: none;
}

body.single-post .page-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.625rem;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    border-radius: 2px;
    transform: rotate(45deg);
}

body.single-post .page-content ol {
    counter-reset: item;
}

body.single-post .page-content ol li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    color: var(--hh-white);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--hh-font-mono);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquotes - Tech Terminal Style */
body.single-post .page-content blockquote {
    position: relative;
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--hh-bg-dark), #1E293B);
    border-left: none;
    border-radius: 1rem;
    color: #E2E8F0;
    font-style: normal;
    overflow: hidden;
}

body.single-post .page-content blockquote::before {
    content: '>';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--hh-font-mono);
    font-size: 1.25rem;
    color: var(--hh-accent);
    opacity: 0.7;
}

body.single-post .page-content blockquote::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
}

body.single-post .page-content blockquote p {
    margin-bottom: 0;
    padding-left: 1.5rem;
    color: #CBD5E1;
    text-align: left;
}

/* Code - Tech Terminal Style */
body.single-post .page-content pre,
body.single-post .page-content code {
    font-family: var(--hh-font-mono);
    font-size: 0.875rem;
}

body.single-post .page-content code {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #92400E;
    font-weight: 500;
}

body.single-post .page-content pre {
    position: relative;
    background: var(--hh-bg-dark);
    color: #E2E8F0;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 1rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.single-post .page-content pre::before {
    content: '< />';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.7rem;
    color: var(--hh-accent);
    opacity: 0.5;
}

body.single-post .page-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Images - Tech Frame */
body.single-post .page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(37, 99, 235, 0.1);
    margin: 2rem 0;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.single-post .page-content img:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(37, 99, 235, 0.2);
}

body.single-post .page-content figure {
    margin: 2.5rem 0;
}

body.single-post .page-content figcaption {
    text-align: center;
    font-size: 0.8rem;
    color: var(--hh-secondary);
    margin-top: 0.75rem;
    font-family: var(--hh-font-mono);
}

body.single-post .page-content figcaption::before {
    content: '// ';
    opacity: 0.5;
}

/* Tables - Tech Data Grid */
body.single-post .page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.single-post .page-content th,
body.single-post .page-content td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--hh-border);
}

body.single-post .page-content th {
    background: linear-gradient(135deg, var(--hh-bg-dark), #1E293B);
    color: var(--hh-white);
    font-weight: 600;
    font-family: var(--hh-font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.single-post .page-content tr {
    background-color: var(--hh-white);
    transition: background-color 0.2s;
}

body.single-post .page-content tr:nth-child(even) {
    background-color: #F8FAFC;
}

body.single-post .page-content tr:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Horizontal rules - Tech Divider */
body.single-post .page-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hh-action), var(--hh-accent), var(--hh-purple), transparent);
    margin: 4rem 0;
    opacity: 0.3;
}

/* ============================================
   SINGLE POST - TAGS (TECH CHIPS)
   ============================================ */

body.single-post .post-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--hh-border);
}

body.single-post .post-tags .tag-links a,
body.single-post .tag-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    color: var(--hh-secondary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--hh-font-mono);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.3s;
}

body.single-post .post-tags .tag-links a:hover,
body.single-post .tag-links a:hover {
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    color: var(--hh-white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* ============================================
   SINGLE POST - COMMENTS (TECH CONTAINER)
   ============================================ */

body.single-post .comments-area {
    margin-top: 4rem;
    padding: 2.5rem;
    background: var(--hh-white);
    border: 1px solid var(--hh-border);
    border-radius: 1rem;
    position: relative;
}

body.single-post .comments-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
}

body.single-post .comment-reply-title {
    font-family: var(--hh-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hh-corporate);
    margin-bottom: 1.5rem;
}

/* ============================================
   SINGLE POST - POST META (AUTHOR, DATE, CATEGORY)
   ============================================ */

body.single-post .hh-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--hh-border);
}

body.single-post .hh-post-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--hh-secondary);
    font-family: var(--hh-font-body);
}

body.single-post .hh-post-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--hh-action);
}

body.single-post .hh-post-meta-author {
    font-weight: 600;
    color: var(--hh-corporate);
}

body.single-post .hh-post-meta-author a {
    color: var(--hh-action);
    text-decoration: none;
    transition: color 0.2s;
}

body.single-post .hh-post-meta-author a:hover {
    color: var(--hh-accent);
}

/* Category Chips Container */
body.single-post .hh-post-meta-categories {
    flex-wrap: wrap;
}

body.single-post .hh-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

body.single-post .hh-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    color: var(--hh-action);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--hh-font-mono);
    text-decoration: none;
    border-radius: 9999px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: all 0.25s ease;
}

body.single-post .hh-category-chip:hover {
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    color: var(--hh-white);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ============================================
   SINGLE POST - AUTHOR BOX
   ============================================ */

body.single-post .hh-author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: var(--hh-white);
    border: 1px solid var(--hh-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

body.single-post .hh-author-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
}

body.single-post .hh-author-box-avatar {
    flex-shrink: 0;
}

body.single-post .hh-author-box-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    border: 3px solid var(--hh-action);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    object-fit: cover;
}

body.single-post .hh-author-box-info {
    flex: 1;
}

body.single-post .hh-author-box-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--hh-font-mono);
    color: var(--hh-action);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

body.single-post .hh-author-box-label::before {
    content: '//';
    opacity: 0.5;
}

body.single-post .hh-author-box-name {
    font-family: var(--hh-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hh-corporate);
    margin-bottom: 0.25rem;
}

body.single-post .hh-author-box-title {
    font-size: 0.875rem;
    color: var(--hh-action);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

body.single-post .hh-author-box-bio {
    font-size: 0.95rem;
    color: var(--hh-secondary);
    line-height: 1.6;
    text-align: justify;
}

body.single-post .hh-author-box-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

body.single-post .hh-author-box-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    border-radius: 0.5rem;
    color: var(--hh-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

body.single-post .hh-author-box-social a:hover {
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    color: var(--hh-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

body.single-post .hh-author-box-social svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body.single-post .site-main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    body.single-post .page-header {
        padding: 2rem 1.5rem;
    }

    body.single-post .page-content {
        font-size: 1rem;
        text-align: justify;
    }

    body.single-post .page-content h2 {
        font-size: 1.375rem;
    }

    body.single-post .comments-area {
        padding: 1.5rem;
    }

    body.single-post .hh-post-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    body.single-post .hh-author-box {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    body.single-post .hh-author-box-bio {
        text-align: center;
    }

    body.single-post .hh-author-box-social {
        justify-content: center;
    }
}

/* ============================================
   RANK MATH TABLE OF CONTENTS - ELEGANT STYLE
   ============================================ */

/* Main TOC Container - Glassmorphism Card */
body.single-post .wp-block-rank-math-toc-block {
    position: relative;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1.25rem;
    padding: 0;
    margin: 2.5rem 0;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 25px -5px rgba(37, 99, 235, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

body.single-post .wp-block-rank-math-toc-block:hover {
    box-shadow:
        0 8px 15px -3px rgba(0, 0, 0, 0.08),
        0 15px 35px -5px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Top Gradient Accent Line */
body.single-post .wp-block-rank-math-toc-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--hh-action),
            var(--hh-accent),
            var(--hh-purple));
}

/* Decorative Corner Elements */
body.single-post .wp-block-rank-math-toc-block::after {
    content: '{ }';
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-family: var(--hh-font-mono);
    font-size: 0.8rem;
    color: var(--hh-accent);
    opacity: 0.3;
    font-weight: 600;
}

/* TOC Title (H2) */
body.single-post .wp-block-rank-math-toc-block>h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 1.25rem 1.75rem;
    font-family: var(--hh-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--hh-corporate);
    background: linear-gradient(135deg,
            rgba(241, 245, 249, 0.8) 0%,
            rgba(226, 232, 240, 0.5) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    letter-spacing: 0.02em;
}

/* Remove default h2 styles from TOC title */
body.single-post .wp-block-rank-math-toc-block>h2::before,
body.single-post .wp-block-rank-math-toc-block>h2::after {
    display: none !important;
}

/* Nav Container */
body.single-post .wp-block-rank-math-toc-block nav {
    padding: 1rem 1.75rem 1.75rem;
}

/* Reset list styles for TOC */
body.single-post .wp-block-rank-math-toc-block ol,
body.single-post .wp-block-rank-math-toc-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}

/* TOC List Items - Override default styles */
body.single-post .wp-block-rank-math-toc-block li {
    position: relative;
    margin-bottom: 0;
    padding: 0;
    counter-increment: toc-counter;
}

/* Remove the numbered boxes from TOC items */
body.single-post .wp-block-rank-math-toc-block ol li::before,
body.single-post .wp-block-rank-math-toc-block ul li::before {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* TOC Links - Main Level */
body.single-post .wp-block-rank-math-toc-block li>a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 0;
    font-family: var(--hh-font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--hh-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    margin-left: 0;
    padding-left: 1rem;
    background: transparent !important;
    background-size: 0 !important;
}

/* Counter before link text */
body.single-post .wp-block-rank-math-toc-block>nav>ol>li>a::before {
    content: counter(toc-counter, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    font-family: var(--hh-font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hh-action);
    background: linear-gradient(135deg,
            rgba(37, 99, 235, 0.08) 0%,
            rgba(6, 182, 212, 0.08) 100%);
    border-radius: 0.5rem;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* Hover state for main links */
body.single-post .wp-block-rank-math-toc-block li>a:hover {
    color: var(--hh-action);
    background: linear-gradient(135deg,
            rgba(37, 99, 235, 0.04) 0%,
            rgba(6, 182, 212, 0.02) 100%) !important;
    border-left-color: var(--hh-action);
}

body.single-post .wp-block-rank-math-toc-block>nav>ol>li>a:hover::before {
    color: var(--hh-white);
    background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
    border-color: transparent;
    transform: scale(1.05);
}

/* Nested Lists (Sub-items) */
body.single-post .wp-block-rank-math-toc-block ol ol,
body.single-post .wp-block-rank-math-toc-block ul ul {
    margin-left: 0;
    padding-left: 2.5rem;
    margin-top: 0.25rem;
    border-left: 1px dashed rgba(148, 163, 184, 0.4);
}

/* Sub-item links */
body.single-post .wp-block-rank-math-toc-block ol ol li>a,
body.single-post .wp-block-rank-math-toc-block ul ul li>a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--hh-secondary);
    padding: 0.5rem 0.75rem;
    padding-left: 1rem;
}

/* Minimal indicator for sub-items */
body.single-post .wp-block-rank-math-toc-block ol ol li>a::before {
    content: '—';
    font-family: var(--hh-font-mono);
    font-size: 0.7rem;
    color: var(--hh-text-muted);
    margin-right: 0.5rem;
    opacity: 0.5;
}

/* Hover for sub-items */
body.single-post .wp-block-rank-math-toc-block ol ol li>a:hover,
body.single-post .wp-block-rank-math-toc-block ul ul li>a:hover {
    color: var(--hh-action);
    background: rgba(37, 99, 235, 0.03) !important;
}

body.single-post .wp-block-rank-math-toc-block ol ol li>a:hover::before {
    color: var(--hh-action);
    opacity: 1;
}

/* Third level nesting */
body.single-post .wp-block-rank-math-toc-block ol ol ol,
body.single-post .wp-block-rank-math-toc-block ul ul ul {
    padding-left: 1.5rem;
}

body.single-post .wp-block-rank-math-toc-block ol ol ol li>a {
    font-size: 0.8rem;
    color: var(--hh-text-muted);
    padding: 0.4rem 0.5rem;
}

/* Collapsed/Expanded state indicator (if using collapsible TOC) */
body.single-post .wp-block-rank-math-toc-block .rank-math-toc-collapsible-heading::after {
    content: '▾';
    font-size: 0.7rem;
    margin-left: 0.5rem;
    color: var(--hh-secondary);
    transition: transform 0.25s ease;
}

body.single-post .wp-block-rank-math-toc-block .rank-math-toc-collapsible-heading.toc-hidden::after {
    transform: rotate(-90deg);
}

/* Responsive adjustments for TOC */
@media (max-width: 768px) {
    body.single-post .wp-block-rank-math-toc-block {
        margin: 2rem 0;
        border-radius: 1rem;
    }

    body.single-post .wp-block-rank-math-toc-block>h2 {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }

    body.single-post .wp-block-rank-math-toc-block nav {
        padding: 0.75rem 1.25rem 1.25rem;
    }

    body.single-post .wp-block-rank-math-toc-block li>a {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }

    body.single-post .wp-block-rank-math-toc-block>nav>ol>li>a::before {
        min-width: 1.5rem;
        height: 1.5rem;
        font-size: 0.65rem;
    }

    body.single-post .wp-block-rank-math-toc-block ol ol {
        padding-left: 1.75rem;
    }

    body.single-post .wp-block-rank-math-toc-block::after {
        display: none;
    }
}

/* ============================================
   RELATED POSTS - DESKTOP SIDEBAR
   ============================================ */

/* Desktop: CSS Grid layout with sidebar */
@media (min-width: 1200px) {
    body.single-post .site-main {
        display: grid;
        grid-template-columns: minmax(0, 900px) 240px;
        grid-auto-rows: min-content;
        gap: 1rem 2rem;
        max-width: 1180px;
        margin: 0 auto;
        padding-top: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
        align-items: start;
    }

    /* All content elements go in the first column */
    body.single-post .site-main>*:not(.hh-related-sidebar) {
        grid-column: 1;
    }

    /* Sidebar spans header and content rows */
    body.single-post .site-main>.hh-related-sidebar {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: start;
    }

    /* Hide inline slider on desktop */
    body.single-post .hh-related-inline {
        display: none;
    }

    /* Author Box spans full width */
    body.single-post .site-main>.hh-author-box {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

/* Sidebar styles (desktop only) */
body.single-post .hh-related-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    body.single-post .hh-related-sidebar {
        display: block;
        width: 240px;
        flex-shrink: 0;
    }

    body.single-post .hh-related-sidebar-inner {
        position: sticky;
        top: 120px;
        background: var(--hh-white);
        border: 1px solid var(--hh-border);
        border-radius: 1rem;
        padding: 1.25rem;
        box-shadow:
            0 4px 6px -1px rgba(0, 0, 0, 0.05),
            0 10px 25px -5px rgba(37, 99, 235, 0.08);
    }

    body.single-post .hh-related-sidebar-inner::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
        border-radius: 1rem 1rem 0 0;
    }

    body.single-post .hh-related-sidebar-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: var(--hh-font-display);
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--hh-corporate);
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px dashed var(--hh-border);
    }

    body.single-post .hh-related-sidebar-title svg {
        color: var(--hh-action);
    }

    body.single-post .hh-related-sidebar-cards {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    body.single-post .hh-related-sidebar-viewall {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        margin-top: 1rem;
        padding: 0.75rem 1rem;
        font-family: var(--hh-font-mono);
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--hh-action);
        text-decoration: none;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-radius: 0.5rem;
        transition: all 0.25s ease;
    }

    body.single-post .hh-related-sidebar-viewall:hover {
        background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
        color: var(--hh-white);
        border-color: transparent;
    }
}

/* ============================================
   RELATED POSTS - CARD STYLES
   ============================================ */

body.single-post .hh-related-card {
    display: block;
    text-decoration: none;
    background: var(--hh-white);
    border: 1px solid var(--hh-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

body.single-post .hh-related-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

body.single-post .hh-related-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hh-bg-dark), #1E293B);
}

body.single-post .hh-related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.single-post .hh-related-card:hover .hh-related-card-image img {
    transform: scale(1.05);
}

body.single-post .hh-related-card-content {
    padding: 0.875rem;
}

body.single-post .hh-related-card-category {
    display: inline-block;
    font-family: var(--hh-font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--hh-action);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

body.single-post .hh-related-card-title {
    font-family: var(--hh-font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hh-corporate);
    line-height: 1.35;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.single-post .hh-related-card-date {
    font-family: var(--hh-font-mono);
    font-size: 0.7rem;
    color: var(--hh-text-muted);
}

/* ============================================
   RELATED POSTS - MOBILE/TABLET SLIDER
   ============================================ */

@media (max-width: 1199px) {
    body.single-post .hh-related-inline {
        margin-top: 3rem;
        padding: 2rem;
        background: var(--hh-white);
        border: 1px solid var(--hh-border);
        border-radius: 1rem;
        position: relative;
        overflow: hidden;
    }

    body.single-post .hh-related-inline::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--hh-action), var(--hh-accent), var(--hh-purple));
    }

    body.single-post .hh-related-header {
        margin-bottom: 1.25rem;
    }

    body.single-post .hh-related-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: var(--hh-font-display);
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--hh-corporate);
        margin: 0;
    }

    body.single-post .hh-related-title svg {
        color: var(--hh-action);
    }

    /* Slider container with navigation */
    body.single-post .hh-related-slider-container {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* Navigation arrows */
    body.single-post .hh-related-nav {
        flex-shrink: 0;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
        border: none;
        border-radius: 50%;
        color: var(--hh-white);
        cursor: pointer;
        transition: all 0.25s ease;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    }

    body.single-post .hh-related-nav:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    }

    body.single-post .hh-related-nav svg {
        width: 18px;
        height: 18px;
    }

    /* Slider track */
    body.single-post .hh-related-slider {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 0.25rem 0;
    }

    body.single-post .hh-related-slider::-webkit-scrollbar {
        display: none;
    }

    /* Cards in slider - show 2 at a time */
    body.single-post .hh-related-slider .hh-related-card {
        flex-shrink: 0;
        width: calc(50% - 0.5rem);
        min-width: 200px;
        scroll-snap-align: start;
    }

    /* Mobile: slightly smaller cards */
    @media (max-width: 600px) {
        body.single-post .hh-related-slider .hh-related-card {
            width: calc(50% - 0.5rem);
            min-width: 160px;
        }

        body.single-post .hh-related-nav {
            width: 32px;
            height: 32px;
        }

        body.single-post .hh-related-nav svg {
            width: 16px;
            height: 16px;
        }
    }

    /* Footer with View All button */
    body.single-post .hh-related-footer {
        margin-top: 1.25rem;
        text-align: center;
    }

    body.single-post .hh-related-viewall {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
        font-family: var(--hh-font-mono);
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--hh-action);
        text-decoration: none;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-radius: 9999px;
        transition: all 0.25s ease;
    }

    body.single-post .hh-related-viewall:hover {
        background: linear-gradient(135deg, var(--hh-action), var(--hh-accent));
        color: var(--hh-white);
        border-color: transparent;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    }
}

/* Hide sidebar on mobile/tablet */
@media (max-width: 1199px) {
    body.single-post .hh-related-sidebar {
        display: none !important;
    }
}