/**
 * Company Darta - Single Post Styles
 * Optimized for Law Firm Educational Content
 */

/* Local Merriweather variable fonts */
/* Merriweather font is declared centrally in front-page.css (keep single canonical declaration there). */



/* ============================================ */
/* SINGLE POST HERO */
/* ============================================ */
.single-post-hero {
    position: relative;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 140px 0 80px;
    margin-top: 0;
    overflow: hidden;
}

.single-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.single-post-hero .container {
    position: relative;
    z-index: 2;
}

.post-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* Category Badge */
.post-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--secondary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category-badge:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

.post-category-badge i {
    font-size: 0.75rem;
}

/* Post Title */
.single-post-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 25px;
    line-height: 1.25;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hero Meta Box (desktop) */
.post-meta-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.95);
}

.meta-hero-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
}
.meta-hero-item i {
    color: var(--accent);
    font-size: 0.95rem;
}

/* Post Meta Row */
.post-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta-item i {
    color: var(--accent);
    font-size: 0.9rem;
}

.post-meta-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-meta-item a:hover {
    color: var(--accent);
}

.meta-separator {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

/* Breadcrumb */
.single-breadcrumb {
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.single-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-breadcrumb a:hover {
    color: var(--white);
}

.single-breadcrumb .separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
}

/* ============================================ */
/* MAIN CONTENT AREA */
/* ============================================ */
.single-post-section {
    padding: 60px 0 80px;
    background: #f8f9fa;
}

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* ============================================ */
/* ARTICLE CONTENT */
/* ============================================ */
.single-article {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.06);
}

/* Featured Image */
.single-featured-image {
    position: relative;
    margin: 0 0 30px; /* keep spacing but avoid negative gutters that cause cropping */
}

.single-featured-image img {
    width: 100%;
    max-width: 100%;
    height: auto; /* preserve aspect ratio */
    object-fit: contain; /* avoid cropping while fitting the container */
    display: block;
    margin: 0;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 25px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-style: italic;
}

/* Article Body */
.article-body {
    padding: 40px;
}

/* Reading Progress Indicator */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid rgba(139, 21, 56, 0.1);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 35px;
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    cursor: pointer;
}

.toc-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--secondary);
    margin: 0;
}

.toc-header h4 i {
    color: var(--primary);
}

.toc-toggle {
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.toc-toggle.collapsed {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list li:last-child {
    margin-bottom: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark-gray);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.toc-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.toc-list a:hover,
.toc-list a.active {
    background: rgba(139, 21, 56, 0.08);
    color: var(--primary);
    padding-left: 18px;
}

.toc-list .toc-h3 {
    padding-left: 25px;
    font-size: 0.9rem;
}

.toc-list .toc-h3::before {
    width: 4px;
    height: 4px;
}
.toc-nav {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 1000px; /* Large enough to show all content */
    opacity: 1;
}

.toc-nav.collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.toc-toggle {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.toc-toggle.collapsed {
    transform: rotate(180deg);
}

/* Entry Content Styles */
.single-entry-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--dark-gray);
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.single-entry-content > *:first-child {
    margin-top: 0;
}

/* First Paragraph - Drop Cap */
.single-entry-content > p:first-of-type::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 1;
    font-weight: 700;
    color: var(--primary);
    margin-right: 12px;
    margin-top: 5px;
}

.single-entry-content p {
    margin-bottom: 1.75rem;
}

/* Headings */
.single-entry-content h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 50px;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    position: relative;
}

.single-entry-content h2 .heading-anchor {
    position: absolute;
    left: -30px;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9em;
}

.single-entry-content h2:hover .heading-anchor {
    opacity: 1;
}

.single-entry-content h3 {
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
}

.single-entry-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 35px;
    margin-bottom: 15px;
}

/* Links */
.single-entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    transition: all 0.3s ease;
}

.single-entry-content a:hover {
    color: var(--accent);
    text-decoration-color: var(--primary);
}

/* Lists */
.single-entry-content ul,
.single-entry-content ol {
    margin: 0 0 30px 0;
    padding-left: 0;
}

.single-entry-content ul {
    list-style: none;
}

.single-entry-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 15px;
}

.single-entry-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.single-entry-content ol {
    counter-reset: item;
    list-style: none;
}

.single-entry-content ol li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    counter-increment: item;
}

.single-entry-content ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquotes */
.single-entry-content blockquote {
    margin: 40px 0;
    padding: 30px 35px;
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.05) 0%, rgba(212, 175, 55, 0.08) 100%);
    border-left: 5px solid var(--accent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--secondary);
    position: relative;
}

.single-entry-content blockquote::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.3;
    font-family: 'Merriweather', Georgia, serif; 
    line-height: 1;
}

.single-entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.single-entry-content blockquote cite {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 600;
    color: var(--primary);
}

.single-entry-content blockquote cite::before {
    content: '— ';
}

/* Images */
.single-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Ensure paragraphs and list items inside article content are justified */
.single-entry-content p,
.single-entry-content li {
    text-align: justify;
    text-justify: inter-word;
}

.single-entry-content figure {
    margin: 35px 0;
}

.single-entry-content figcaption {
    font-size: 0.85rem;
    color: var(--medium-gray);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* Tables */
.single-entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    font-size: 0.95rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.single-entry-content table th,
.single-entry-content table td {
    padding: 15px 18px;
    text-align: left;
    border: 1px solid #e9ecef;
}

.single-entry-content table th {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    font-weight: 600;
}

.single-entry-content table tr:nth-child(even) {
    background: #f8f9fa;
}

.single-entry-content table tr:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Code */
.single-entry-content code {
    background: #f1f3f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary);
}

.single-entry-content pre {
    background: var(--secondary);
    color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 30px 0;
}

.single-entry-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Highlight Box - for important legal notices */
.highlight-box,
.single-entry-content .wp-block-group.has-background {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 25px 30px;
    margin: 30px 0;
}

.highlight-box h4,
.highlight-box h5 {
    color: var(--secondary);
    margin-top: 0;
}

/* ============================================ */
/* POST FOOTER */
/* ============================================ */
.post-footer-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

/* Tags */
.post-tags-wrapper {
    margin-bottom: 35px;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 15px;
}

.tags-label i {
    color: var(--primary);
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tags-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    color: var(--dark-gray);
    border-radius: 50px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.post-tags-list a:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.post-tags-list a i {
    font-size: 0.75rem;
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 35px;
}

.share-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--secondary);
}

.share-label i {
    color: var(--primary);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.share-btn.facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877F2;
}

.share-btn.facebook:hover {
    background: #1877F2;
    color: var(--white);
}

.share-btn.twitter {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
}

.share-btn.twitter:hover {
    background: #000;
    color: var(--white);
}

.share-btn.linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077B5;
}

.share-btn.linkedin:hover {
    background: #0077B5;
    color: var(--white);
}

.share-btn.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.share-btn.whatsapp:hover {
    background: #25D366;
    color: var(--white);
}

.share-btn.copy-link {
    background: rgba(139, 21, 56, 0.1);
    color: var(--primary);
}

.share-btn.copy-link:hover {
    background: var(--primary);
    color: var(--white);
}

/* Visually hidden helper for accessible text (screen readers only) */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ============================================ */
/* AUTHOR BOX */
/* ============================================ */
.author-box {
    background: var(--white);
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 35px;
    border: 1px solid #e9ecef;
}

.author-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 20px;
}

.author-content {
    display: flex;
    gap: 25px;
}

.author-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 12px;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--dark-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.author-social a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ============================================ */
/* POST NAVIGATION */
/* ============================================ */
.post-navigation-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 50px;
    margin-bottom: 40px;
}

.nav-post {
    background: var(--white);
    border-radius: 10px;
    padding: 18px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.nav-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.nav-post.empty {
    opacity: 0.5;
    pointer-events: none;
    background: #f8f9fa;
}

.nav-post.prev-post {
    text-align: left;
}

.nav-post.next-post {
    text-align: right;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 6px;
}

.nav-label i {
    font-size: 0.65rem;
}


.nav-post.next-post .nav-label {
    justify-content: flex-end;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================ */
/* SIDEBAR */
/* ============================================ */
.single-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: none;
    overflow: visible;
}

.sidebar-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-scroll-container::-webkit-scrollbar {
    display: none;
}

.sidebar-scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.sidebar-scroll-container::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.sidebar-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Sidebar Widget */
.sidebar-widget {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-widget-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* CTA Widget */
.sidebar-cta {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
}

.sidebar-cta .cta-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.sidebar-cta .cta-icon i {
    font-size: 1.75rem;
    color: var(--accent);
}

.sidebar-cta h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.sidebar-cta p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.6;
}

.sidebar-cta .btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: var(--accent);
    color: var(--secondary);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-cta .btn-cta:hover {
    background: var(--white);
    transform: translateY(-2px);
}

/* Related Posts Widget */
.related-post-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.related-post-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.related-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumb img {
    transform: scale(1.1);
}

.related-post-info {
    flex: 1;
    min-width: 0;
}

.related-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: var(--primary);
}

.related-post-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ============================================ */
/* RELATED POSTS SECTION */
/* ============================================ */
.related-posts-section {
    background: var(--white);
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--medium-gray);
    font-size: 1.05rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* ============================================ */
/* REACTIONS - IMPROVED UX */
/* ============================================ */
.post-reactions-section {
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.03) 0%, rgba(212, 175, 55, 0.06) 100%);
    border: 1px solid rgba(139, 21, 56, 0.1);
    border-radius: 16px;
    padding: 35px 40px;
    margin: 40px 0;
    text-align: center;
}

.post-reactions-section h4 {
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 6px;
}

.reactions-subtitle {
    color: var(--medium-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.reactions-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 15px 25px;
    background: var(--white);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.reaction-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 21, 56, 0.1);
}

.reaction-btn i {
    font-size: 1.6rem;
    color: var(--medium-gray);
    transition: all 0.3s ease;
}

.reaction-btn:hover i {
    color: var(--primary);
}

.reaction-btn.reacted {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
    cursor: default;
}

.reaction-btn.reacted i,
.reaction-btn.reacted .reaction-label {
    color: var(--white);
}

.reaction-btn.reacted .reaction-count {
    background: var(--accent);
    color: var(--secondary);
}

.reaction-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
}

.reaction-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
    padding: 2px 8px;
    border-radius: 15px;
    min-width: 22px;
}

.reaction-count:empty {
    display: none;
}

/* Already reacted indicator */
.reaction-btn.reacted::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: var(--secondary);
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-btn {
    position: relative;
}

.reaction-feedback {
    margin-top: 15px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.reaction-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.reaction-feedback.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.reaction-feedback.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.reaction-feedback.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* ============================================ */
/* STAR RATING SECTION */
/* ============================================ */
.star-rating-section {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(139, 21, 56, 0.1);
}

.star-rating-section h5 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.star-rating-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.star-rating-display i {
    font-size: 1.5rem;
    color: var(--accent);
}

.star-rating-display i.empty {
    color: #ddd;
}

.rating-text {
    margin-left: 10px;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.rating-text strong {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* ============================================ */
/* COMMENTS SECTION */
/* ============================================ */
.comments-section {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.comments-title i {
    color: var(--primary);
}

.comments-count {
    background: var(--primary);
    color: var(--white);
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-avatar img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    flex: 1;
}

.comment-author-name {
    font-weight: 600;
    color: var(--secondary);
    font-size: 1rem;
}

.comment-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.comment-content {
    padding-left: 70px;
    color: var(--dark-gray);
    line-height: 1.7;
}

.comment-content p {
    margin-bottom: 10px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 70px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.comment-reply-link:hover {
    color: var(--accent);
}

/* Nested Comments */
.comment-children {
    list-style: none;
    padding-left: 50px;
    margin-top: 20px;
    border-left: 3px solid var(--accent);
}

/* Comment Form */
.comment-respond {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.comment-reply-title {
    font-size: 1.35rem;
    color: var(--secondary);
    margin-bottom: 25px;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form-author,
.comment-form-email {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.comment-form label {
    display: block;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--secondary);
    background: #fafafa;
    transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(139, 21, 56, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit .submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit .submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(139, 21, 56, 0.3);
}

/* ============================================ */
/* RESPONSIVE STYLES */
/* ============================================ */
@media (max-width: 1024px) {
    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .single-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

     .single-sidebar {
        position: static;
        height: auto;
        overflow: visible;
    }
    
    .sidebar-scroll-container {
        height: auto;
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }



}


@media (max-width: 768px) {
    .single-post-hero {
        padding: 120px 0 60px;
    }

    .single-post-title {
        font-size: 2rem;
    }

    .post-meta-row {
        gap: 15px;
    }

    .meta-separator {
        display: none;
    }

    .article-body {
        padding: 25px;
    }

    .single-entry-content {
        font-size: 1rem;
    }

    .single-entry-content h2 {
        font-size: 1.5rem;
    }

    .single-entry-content h3 {
        font-size: 1.25rem;
    }

    .single-entry-content > p:first-of-type::first-letter {
        font-size: 3rem;
    }

    /* ensure featured image uses same sizing on small screens */
    .single-featured-image {
        margin: 0 0 30px; /* keep consistent spacing across breakpoints */
    }

    .single-featured-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
        margin: 0;
    }

    .share-section {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .author-content {
        flex-direction: column;
        text-align: center;
    }

    .post-navigation-section {
        grid-template-columns: 1fr;
    }

    .nav-post.next-post {
        text-align: left;
    }

    .nav-post.next-post .nav-label {
        justify-content: flex-start;
    }

    .single-sidebar {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .comment-content,
    .comment-reply-link {
        padding-left: 0;
    }

    .comment-children {
        padding-left: 20px;
    }

     .meta-hero-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}
.meta-hero-item i {
    color: var(--accent);
    font-size: 0.85rem;
}
    
    .post-meta-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}
    
    .credits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar-scroll-container {
        grid-template-columns: 1fr;
    }
    
    .reactions-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .reaction-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .post-reactions-section {
        padding: 25px 20px;
    }
}

@media (max-width: 576px) {
    .single-post-hero {
        padding: 100px 0 50px;
    }

    .single-post-title {
        font-size: 1.6rem;
    }

    .post-category-badge {
        font-size: 0.7rem;
        padding: 6px 15px;
    }

    .article-body {
        padding: 20px;
    }

    .table-of-contents {
        padding: 20px;
    }

    .comments-section {
        padding: 25px;
    }

    .author-box {
        padding: 25px;
    }

    .author-avatar img {
        width: 80px;
        height: 80px;
    }
}
/* Add these at the end of the file */

/* Responsive Tables: allow horizontal scroll on small screens, enable wrapping and reduce font-size */
.single-entry-content {
    /* ensure the container can show horizontal overflow when tables are wide */
    -webkit-overflow-scrolling: touch;
}

.single-entry-content table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* prefer natural column widths */
    margin-bottom: 1rem;
}

.single-entry-content table th,
.single-entry-content table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}

/* On tablets & phones: let tables scroll horizontally rather than squeeze content */
@media (max-width: 768px) {
    .single-entry-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 520px; /* keeps columns readable and enables scrolling */
        font-size: 0.95rem;
    }

    .single-entry-content table th,
    .single-entry-content table td {
        padding: 10px 12px;
    }
}

@media (max-width: 420px) {
    .single-entry-content table {
        min-width: 420px; /* smaller minimum for very small screens */
        font-size: 0.9rem; /* slightly smaller text to aid readability */
    }

    .single-entry-content table th,
    .single-entry-content table td {
        padding: 8px 10px;
    }
}

/* Post Credits Row in Hero */
.post-credits-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credit-item i {
    color: var(--accent);
}

.credit-separator {
    color: rgba(255, 255, 255, 0.4);
}

/* Article Credits Box */
.article-credits-box {
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.05) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(139, 21, 56, 0.15);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.credit-column h5 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.credit-person {
    margin-bottom: 12px;
}

.credit-person .person-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.credit-person .person-name {
    display: block;
    font-size: 0.85rem;
    color: var(--medium-gray);
    font-weight: 400;
}

.credit-person strong {
    display: block;
    color: var(--secondary);
    font-size: 0.95rem;
}

.credit-person span {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.credit-column.dates .date-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.credit-column.dates .date-info i {
    color: var(--accent);
}

/* Professional Widget */
.professional-widget .professional-card {
    text-align: center;
}

.professional-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    margin-bottom: 15px;
}

.professional-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.professional-title {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.professional-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.spec-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(139, 21, 56, 0.1);
    color: var(--primary);
    border-radius: 20px;
}

.professional-bio {
    font-size: 0.9rem;
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 15px;
}

.btn-view-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-profile:hover {
    color: var(--accent);
}

/* Small Author Credit */
.author-credit-small {
    padding: 15px !important;
}

.small-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.small-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.small-author-info .label {
    display: block;
    font-size: 0.7rem;
    color: var(--medium-gray);
    text-transform: uppercase;
}

.small-author-info a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    text-decoration: none;
}

/* Related Posts No Image */
.related-post-thumb.no-image {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-post-thumb.no-image i {
    color: var(--medium-gray);
    font-size: 1.5rem;
}

.no-related {
    font-size: 0.9rem;
    color: var(--medium-gray);
    text-align: center;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .post-credits-row {
        flex-direction: column;
        gap: 8px;
        border-radius: 12px;
    }
    
    .credit-separator {
        display: none;
    }
    
    .credits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================ */
/* RESPONSIVE - Navigation */
/* ============================================ */
@media (max-width: 768px) {
    .post-meta-hero-row {
        flex-direction: row;
        gap: 15px;
        padding: 10px 20px;
        border-radius: 30px;
    }
    
    .meta-hero-item {
        font-size: 0.8rem;
    }
    
    .post-navigation-section {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 40px;
    }

    .nav-post.next-post {
        text-align: left;
    }

    .nav-post.next-post .nav-label {
        justify-content: flex-start;
    }
    
    .reactions-buttons {
        gap: 10px;
    }
    
    .reaction-btn {
        padding: 12px 18px;
        min-width: 90px;
    }
    
    .reaction-btn i {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .post-meta-hero-row {
        flex-direction: column;
        gap: 8px;
        padding: 15px 20px;
        border-radius: 12px;
    }
}
