/**
 * Careerscape Resource Hub - Styles
 * Version: 3.0.0 - Sidebar Filter Layout
 */

/* ===================================
   ELEMENTOR ANIMATION FIX
   Force visibility for hero and TOC elements
   Prevents elements from being hidden until user interaction
   =================================== */
.csr-hero-image,
.csr-table-of-contents,
.csr-toc-wrapper,
.csr-article-hero,
.csr-article-sidebar,
.csr-sidebar-sticky {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    animation: none !important;
}

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    --csr-primary: #1e3a5f;
    --csr-primary-dark: #163049;
    --csr-text-primary: #0f172a;
    --csr-text-secondary: #475569;
    --csr-border: #e2e8f0;
    --csr-bg-light: #f8fafc;
    --csr-white: #ffffff;
    --csr-radius: 16px;
    --csr-radius-sm: 8px;
}

/* Screen reader only - visually hidden but accessible */
.csr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================
   MAIN LAYOUT
   =================================== */
.csr-resource-hub {
    background: transparent;
    padding: 0;
}

/* Disable transitions during resize to prevent lag */
body.csr-resizing .csr-filter-sidebar,
body.csr-resizing .csr-filter-overlay,
body.csr-resizing .csr-article-card {
    transition: none !important;
}

.csr-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* ===================================
   SIDEBAR FILTERS
   =================================== */
.csr-filter-sidebar {
    background: var(--csr-white);
    border-radius: var(--csr-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.csr-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.csr-sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--csr-text-primary);
}

.csr-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--csr-text-secondary);
    transition: color 0.2s;
}

.csr-sidebar-close:hover {
    color: var(--csr-text-primary);
}

/* Mobile Filter Button */
.csr-mobile-filter-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 50%;
    padding: 14px 24px;
    background: var(--csr-white);
    border: 1px solid var(--csr-border);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--csr-text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.csr-mobile-filter-btn:hover {
    border-color: var(--csr-primary);
    color: var(--csr-primary);
}

.csr-mobile-filter-btn svg {
    flex-shrink: 0;
}

/* Filter Row - hidden on desktop */
.csr-filter-row {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Tablet count - hidden on desktop */
.csr-results-count-tablet {
    display: none;
}

/* Filter Overlay */
.csr-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    will-change: opacity;
    transition: opacity 0.3s ease;
}

.csr-filter-overlay.active {
    display: block;
    opacity: 1;
}

.csr-filter-section {
    border-bottom: 1px solid var(--csr-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.csr-filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 24px;
}

.csr-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    user-select: none;
}

.csr-filter-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--csr-text-primary);
    margin: 0;
}

.csr-filter-header svg {
    color: var(--csr-text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.csr-filter-header.open svg {
    transform: rotate(180deg);
}

.csr-filter-options {
    margin-top: 12px;
}

.csr-filter-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.csr-filter-option:hover .csr-filter-label {
    color: var(--csr-text-primary);
}

.csr-filter-option input[type="checkbox"] {
    display: none;
}

.csr-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.csr-filter-option input:checked + .csr-checkbox {
    background: var(--csr-primary);
    border-color: var(--csr-primary);
}

.csr-filter-option input:checked + .csr-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.csr-filter-label {
    font-size: 0.95rem;
    color: var(--csr-text-secondary);
    transition: color 0.2s;
}

.csr-filter-option input:checked ~ .csr-filter-label {
    color: var(--csr-text-primary);
    font-weight: 500;
}

.csr-apply-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--csr-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.csr-apply-btn:hover {
    background: var(--csr-primary-dark);
}

.csr-clear-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--csr-text-secondary);
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 12px;
    transition: color 0.2s;
}

.csr-clear-btn:hover {
    color: var(--csr-text-primary);
}

/* ===================================
   ARTICLES SECTION
   =================================== */
.csr-articles-main {
    min-width: 0;
}

.csr-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.csr-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--csr-text-primary);
}

.csr-results-count {
    color: #334155; /* Darker for better contrast - WCAG AA compliant */
    font-size: 0.95rem;
    margin: 0;
}

/* Active Filters */
.csr-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.csr-active-filters:empty {
    display: none;
}

.csr-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.csr-active-filter-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: #0369a1;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

.csr-active-filter-tag button:hover {
    color: #075985;
}

/* ===================================
   ARTICLES GRID
   =================================== */
.csr-articles-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.csr-articles-grid.hidden {
    display: none;
}

/* ===================================
   SKELETON LOADER
   =================================== */
.csr-grid-skeleton {
    display: none;
    gap: 24px;
    width: 100%;
}

.csr-grid-skeleton.loading {
    display: grid;
}

.csr-card-skeleton {
    background: var(--csr-white);
    border-radius: var(--csr-radius);
    overflow: hidden;
}

.csr-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: csr-shimmer 1.5s infinite;
}

@keyframes csr-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.csr-skeleton-image {
    aspect-ratio: 16/10;
}

.csr-skeleton-content {
    padding: 20px;
}

.csr-skeleton-type {
    height: 12px;
    width: 60px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.csr-skeleton-title {
    height: 20px;
    width: 100%;
    margin-bottom: 12px;
    border-radius: 4px;
}

.csr-skeleton-excerpt {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}

.csr-skeleton-excerpt:last-child {
    width: 70%;
}

.csr-article-card {
    background: var(--csr-white);
    border-radius: var(--csr-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.csr-article-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.csr-article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.csr-article-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.csr-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.csr-article-card:hover .csr-article-image img {
    transform: scale(1.05);
}

.csr-article-content {
    padding: 20px;
}

.csr-article-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--csr-text-secondary);
    margin-bottom: 8px;
}

.csr-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--csr-text-primary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.csr-article-excerpt {
    font-size: 0.9rem;
    color: var(--csr-text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* No Articles */
.csr-no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--csr-white);
    border-radius: var(--csr-radius);
}

.csr-no-articles p {
    color: var(--csr-text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* ===================================
   PAGINATION
   =================================== */
.csr-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.csr-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--csr-white);
    border: 1px solid var(--csr-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--csr-text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.csr-pagination-btn:hover:not(:disabled):not(.active) {
    border-color: var(--csr-primary);
    color: var(--csr-primary);
}

.csr-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.csr-pagination-btn.active {
    background: var(--csr-primary);
    border-color: var(--csr-primary);
    color: white;
}

.csr-pagination-numbers {
    display: flex;
    gap: 4px;
}

.csr-pagination-num {
    min-width: 40px;
    justify-content: center;
}

.csr-pagination-ellipsis {
    padding: 10px 8px;
    color: var(--csr-text-secondary);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .csr-main-layout {
        grid-template-columns: 1fr;
    }
    
    /* Hide desktop count, show filter row */
    .csr-results-count-desktop {
        display: none;
    }
    
    .csr-filter-row {
        display: flex;
    }
    
    .csr-results-count-tablet {
        display: block;
        color: #334155; /* Darker color for better contrast */
    }
    
    .csr-mobile-filter-btn {
        display: flex;
    }
    
    /* Hide sidebar by default, show as drawer */
    .csr-filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        z-index: 9999;
        border-radius: 0;
        overflow-y: auto;
        padding-bottom: 100px;
        will-change: left;
        transition: left 0.3s ease;
    }
    
    .csr-filter-sidebar.open {
        left: 0;
    }
    
    /* Show close button on mobile */
    .csr-sidebar-close {
        display: block;
    }
    
    .csr-articles-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Horizontal card layout for tablet */
    .csr-article-card .csr-article-link {
        display: grid;
        grid-template-columns: 300px 1fr;
        align-items: stretch;
    }
    
    .csr-article-card .csr-article-image {
        aspect-ratio: auto;
        height: 100%;
        min-height: 200px;
    }
    
    .csr-article-card .csr-article-image img {
        height: 100%;
        object-fit: cover;
    }
    
    .csr-article-card .csr-article-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .csr-filter-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .csr-articles-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* On mobile: stack filter row vertically - count above button */
    .csr-filter-row {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 16px;
    }
    
    /* Reset to stacked card layout on mobile */
    .csr-article-card .csr-article-link {
        display: block;
        grid-template-columns: none;
    }
    
    .csr-article-card .csr-article-image {
        aspect-ratio: 16/10;
        height: auto;
        min-height: auto;
    }
    
    .csr-pagination {
        gap: 4px;
    }
    
    .csr-pagination-prev,
    .csr-pagination-next {
        padding: 10px 12px;
    }
    
    .csr-pagination-prev span,
    .csr-pagination-next span {
        display: none;
    }
}

/* ===================================
   ARTICLE PAGE STYLES
   =================================== */
.csr-article-header {
    padding: 2rem 0;
}

.csr-article-header-inner {
    max-width: 800px;
    margin: 0 auto;
}

.csr-article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--csr-text-secondary);
    margin-bottom: 1.5rem;
}

.csr-article-breadcrumb a {
    color: var(--csr-primary);
    text-decoration: none;
}

.csr-article-breadcrumb a:hover {
    text-decoration: underline;
}

.csr-article-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--csr-text-primary);
    margin: 0 0 1.5rem 0;
}

.csr-article-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.csr-article-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.csr-article-author-avatar {
    width: 48px;
    height: 48px;
    background: var(--csr-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.csr-article-author-name {
    font-weight: 600;
    color: var(--csr-text-primary);
    margin: 0;
}

.csr-article-author-title {
    color: var(--csr-text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.csr-article-date {
    color: var(--csr-text-secondary);
    font-size: 0.875rem;
}

.csr-article-reading-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--csr-text-secondary);
    font-size: 0.875rem;
}

/* Article Body */
.csr-article-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--csr-text-primary);
}

.csr-article-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
}

.csr-article-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.csr-article-body p {
    margin: 0 0 1.5rem;
}

.csr-article-body ul,
.csr-article-body ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}

.csr-article-body li {
    margin-bottom: 0.5rem;
}

.csr-article-body blockquote {
    border-left: 4px solid var(--csr-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--csr-text-secondary);
}

/* Article Share */
.csr-share-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.csr-share-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--csr-bg-light);
    border-radius: var(--csr-radius);
    gap: 1rem;
    flex-wrap: wrap;
}

.csr-share-label {
    font-weight: 600;
    color: var(--csr-text-primary);
}

.csr-share-buttons {
    display: flex;
    gap: 0.75rem;
}

.csr-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.csr-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.csr-share-linkedin { background: #0077b5; }
.csr-share-twitter { background: #1da1f2; }
.csr-share-facebook { background: #1877f2; }

.csr-copy-link {
    background: var(--csr-text-secondary);
    border: none;
    cursor: pointer;
}

/* Article Tags */
.csr-tags-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.csr-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.csr-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--csr-bg-light);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--csr-text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.csr-tag:hover {
    background: var(--csr-primary);
    color: white;
}

/* Related Articles */
.csr-related-section {
    padding: 3rem 0;
    background: var(--csr-bg-light);
}

.csr-related-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.csr-related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--csr-text-primary);
    margin: 0 0 1.5rem;
}

.csr-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .csr-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .csr-related-grid {
        grid-template-columns: 1fr;
    }
    
    .csr-article-main-title {
        font-size: 1.75rem;
    }
    
    .csr-article-body {
        font-size: 1rem;
    }
    
    .csr-share-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   ARTICLE HEADER - NEW DESIGN
   =================================== */
.csr-article-header {
    margin-bottom: 3rem;
}

.csr-article-badges {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.csr-article-category {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.csr-article-tag {
    display: inline-block;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.csr-article-header-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .csr-article-header-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .csr-article-header-title {
        font-size: 3rem;
    }
}

.csr-article-header-subtitle {
    font-size: 1.125rem;
    color: #475569;
    line-height: 1.75;
    margin: 0 0 2rem;
    max-width: 48rem;
}

@media (min-width: 768px) {
    .csr-article-header-subtitle {
        font-size: 1.25rem;
    }
}

.csr-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.csr-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.csr-meta-item svg {
    flex-shrink: 0;
}

.csr-meta-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.csr-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px white, 0 1px 2px rgba(0,0,0,0.1);
}

.csr-author-name {
    font-weight: 500;
    color: #334155;
}

/* Share button in header meta */
.csr-meta-share {
    position: relative;
    margin-left: auto;
}

.csr-share-toggle-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: #f1f5f9;
    border: none;
    border-radius: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.csr-share-toggle-header:hover {
    background: #e2e8f0;
    color: #334155;
}

.csr-share-toggle-header svg {
    flex-shrink: 0;
}

.csr-meta-share .csr-share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 140px;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
    z-index: 50;
    overflow: hidden;
}

.csr-meta-share .csr-share-link {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    color: #334155;
    font-size: 0.875rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.csr-meta-share .csr-share-link:hover {
    background: #f1f5f9;
}

.csr-featured-image-wrapper {
    margin-top: 0;
    margin-bottom: 2rem;
}

.csr-featured-image {
    aspect-ratio: 21/9;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .csr-featured-image {
        aspect-ratio: 2/1;
        border-radius: 1rem;
    }
}

@media (min-width: 1024px) {
    .csr-featured-image {
        aspect-ratio: 21/9;
    }
}

.csr-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================
   ARTICLE PROSE CONTENT
   =================================== */
.csr-article-prose {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #334155;
}

/* Reset WordPress/theme default heading margins */
.csr-article-prose > *:first-child {
    margin-top: 0 !important;
}

.csr-article-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2rem 0 1rem;
    scroll-margin-top: 6rem;
}

.csr-article-prose h2:first-child {
    margin-top: 0;
}

.csr-article-prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 1.75rem 0 0.75rem;
    scroll-margin-top: 6rem;
}

.csr-article-prose h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 1.5rem 0 0.5rem;
}

.csr-article-prose p {
    margin: 0 0 1.5rem;
}

.csr-article-prose a {
    color: #d97706;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.csr-article-prose a:hover {
    color: #b45309;
}

.csr-article-prose strong {
    font-weight: 600;
    color: #0f172a;
}

.csr-article-prose ul,
.csr-article-prose ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}

.csr-article-prose li {
    margin-bottom: 0.5rem;
}

.csr-article-prose blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
}

.csr-article-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.csr-article-prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.csr-article-prose code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.csr-article-prose pre code {
    background: none;
    padding: 0;
}

/* WordPress Table Blocks */
.csr-article-prose .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.csr-article-prose .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.csr-article-prose .wp-block-table table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.csr-article-prose .wp-block-table table td {
    color: #334155;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
}

.csr-article-prose .wp-block-table table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.csr-article-prose .wp-block-table table tbody tr:hover {
    background: #f1f5f9;
}

/* Standard HTML tables (non-Gutenberg) */
.csr-article-prose table:not(.wp-block-table table) {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    margin: 1.5rem 0;
}

.csr-article-prose table:not(.wp-block-table table) th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
}

.csr-article-prose table:not(.wp-block-table table) td {
    color: #334155;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
}

.csr-article-prose table:not(.wp-block-table table) tbody tr:nth-child(even) {
    background: #f8fafc;
}

.csr-article-prose table:not(.wp-block-table table) tbody tr:hover {
    background: #f1f5f9;
}

/* ===================================
   TABLE OF CONTENTS - STICKY
   =================================== */
.csr-table-of-contents {
    padding: 0;
    margin: 0;
}

.csr-toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1rem;
    padding: 0;
}

.csr-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #e2e8f0;
}

.csr-toc-list li {
    position: relative;
    margin: 0;
    padding: 0;
}

.csr-toc-link {
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #64748b;
    text-decoration: none;
    padding: 0.5rem 0 0.5rem 1rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.csr-toc-link:hover {
    color: #1e40af;
    border-left-color: #cbd5e1;
}

.csr-toc-link.active {
    color: #1e40af;
    border-left-color: #1e40af;
    font-weight: 500;
}

.csr-toc-link.level-3 {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

.csr-toc-link.level-4 {
    padding-left: 2rem;
    font-size: 0.8125rem;
}

/* ===================================
   AUTHOR CARD
   =================================== */
.csr-author-card {
    background: linear-gradient(to bottom right, #f8fafc, rgba(241, 245, 249, 0.5));
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
}

@media (min-width: 768px) {
    .csr-author-card {
        padding: 2rem;
    }
}

.csr-author-card-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .csr-author-card-inner {
        flex-direction: row;
    }
}

.csr-author-avatar-wrapper {
    flex-shrink: 0;
}

.csr-author-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px white, 0 4px 6px rgba(0,0,0,0.1);
}

@media (min-width: 640px) {
    .csr-author-card-avatar {
        width: 80px;
        height: 80px;
    }
}

.csr-author-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .csr-author-avatar-placeholder {
        width: 80px;
        height: 80px;
    }
}

.csr-author-avatar-placeholder svg {
    color: #94a3b8;
}

.csr-author-info {
    flex: 1;
}

.csr-author-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 500;
    margin: 0 0 0.25rem;
}

.csr-author-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem;
}

.csr-author-bio {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.csr-author-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.csr-author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    transition: color 0.2s;
}

.csr-author-social a:hover {
    color: #0f172a;
}

/* ===================================
   ENGAGEMENT BAR
   =================================== */
.csr-engagement-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.csr-engage-left,
.csr-engage-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.csr-engage-right {
    position: relative;
}

.csr-engage-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    border-radius: 0.375rem;
}

.csr-engage-btn:hover {
    color: #d97706;
    background: #fffbeb;
}

.csr-engage-btn svg {
    flex-shrink: 0;
}

.csr-share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 50;
    overflow: hidden;
}

.csr-share-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.csr-share-link:hover {
    background: #f8fafc;
}

/* ===================================
   RELATED ARTICLES - NEW DESIGN
   =================================== */
.csr-related-articles {
    margin-top: 4rem;
}

.csr-related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.csr-related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.csr-related-view-all {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s;
}

.csr-related-view-all:hover {
    color: #1e3a8a;
}

.csr-related-grid {
    display: grid;
    gap: 1.5rem;
}

.csr-related-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.csr-related-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.csr-related-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.csr-related-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}

.csr-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.csr-related-card:hover .csr-related-image img {
    transform: scale(1.05);
}

.csr-related-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.csr-related-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.csr-related-category {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.625rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.csr-related-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.csr-related-card:hover .csr-related-card-title {
    color: #1e40af;
}

.csr-related-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.csr-related-meta {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.75rem;
}

@media (max-width: 1024px) {
    .csr-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .csr-related-grid {
        grid-template-columns: 1fr;
    }
    
    .csr-related-card:hover {
        transform: none;
    }
}

/* ===================================
   AD SLOT
   =================================== */
.csr-ad-slot {
    position: relative;
    background-color: #f8fafc;
    background-image: radial-gradient(circle, #e2e8f0 1px, transparent 1px);
    background-size: 12px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* When ad code is present, remove placeholder styling */
.csr-ad-slot:has(ins.adsbygoogle) {
    background: transparent;
    border: none;
    background-image: none;
    border-radius: 0;
}

/* Responsive AdSense support */
.csr-ad-slot ins.adsbygoogle {
    display: block;
}

/* Bottom article ad - full width within content area */
.csr-ad-horizontal {
    width: 100%;
    min-height: 90px;
}

@media (max-width: 767px) {
    .csr-ad-horizontal {
        min-height: 50px;
    }
}

/* Sidebar ads - full width of sidebar */
.csr-ad-vertical,
.csr-ad-square {
    width: 100%;
    min-height: 250px;
}

/* Half page ad - 300x600 */
.csr-ad-halfpage {
    width: 100%;
    min-height: 600px;
}

/* Top leaderboard - responsive, min height for placeholder */
.csr-ad-leaderboard {
    width: 100%;
    min-height: 90px;
}

/* Mobile - smaller min height */
@media (max-width: 767px) {
    .csr-ad-leaderboard {
        min-height: 50px;
    }
}

.csr-ad-inline {
    width: 100%;
    height: 128px;
    margin: 2rem 0;
}

.csr-ad-placeholder {
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.csr-ad-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}

.csr-ad-sublabel {
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* ===================================
   ARTICLE TEMPLATE LAYOUT
   =================================== */
.csr-article-template {
    min-height: 100vh;
}

.csr-top-ad-wrapper {
    padding: 1rem 0;
}

.csr-top-ad-wrapper .csr-ad-slot {
    width: 100%;
    min-height: 90px;
}

/* Responsive ad support - let AdSense control sizing */
.csr-top-ad-wrapper .csr-ad-slot ins.adsbygoogle {
    display: block;
    width: 100%;
}

/* ===================================
   BREADCRUMBS
   =================================== */
.csr-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.875rem;
}

.csr-breadcrumb-item {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

.csr-breadcrumb-item:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.csr-breadcrumb-item svg {
    display: block;
}

.csr-breadcrumb-sep {
    color: #94a3b8;
    flex-shrink: 0;
}

.csr-breadcrumb-current {
    color: #64748b;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide "Resources" breadcrumb on mobile to fit everything on one line */
@media (max-width: 479px) {
    .csr-breadcrumbs .csr-breadcrumb-item:nth-of-type(2),
    .csr-breadcrumbs .csr-breadcrumb-sep:nth-of-type(2) {
        display: none;
    }
}

@media (min-width: 480px) {
    .csr-breadcrumb-current {
        max-width: 220px;
    }
}

@media (min-width: 768px) {
    .csr-breadcrumb-current {
        max-width: 350px;
    }
}

/* ===================================
   HERO HEADER - TWO COLUMN
   =================================== */
.csr-article-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 0 2rem;
}

@media (min-width: 768px) {
    .csr-article-hero {
        grid-template-columns: 1.2fr 1fr;
        gap: 2.5rem;
        padding: 2rem 0 3rem;
        align-items: stretch;
    }
}

@media (min-width: 1024px) {
    .csr-article-hero {
        grid-template-columns: 1.3fr 1fr;
        gap: 3rem;
    }
}

.csr-hero-content {
    order: 1;
}

@media (min-width: 768px) {
    .csr-hero-content {
        order: 0;
    }
}

.csr-article-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .csr-article-hero-title {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .csr-article-hero-title {
        font-size: 2.5rem;
    }
}

.csr-article-hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
    margin: 0 0 1.25rem;
}

@media (min-width: 768px) {
    .csr-article-hero-subtitle {
        font-size: 1.125rem;
    }
}

.csr-article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.csr-hero-meta-item {
    display: inline;
}

.csr-article-hero-actions {
    display: flex;
    gap: 0.75rem;
}

.csr-share-wrapper {
    position: relative;
}

.csr-share-wrapper .csr-share-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

.csr-share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #475569;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.csr-share-option:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Translate dropdown */
.csr-translate-wrapper {
    position: relative;
}

.csr-translate-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
}

.csr-translate-header {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #f1f5f9;
}

.csr-translate-option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    color: #475569;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.csr-translate-option:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Listen button */
.csr-listen-btn.is-playing {
    background: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
}

.csr-listen-btn.is-playing:hover {
    background: #1e3a8a;
}

.csr-hero-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.csr-hero-action-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Selected/Active speak icon */
.csr-hero-action-btn.is-playing {
    background: #235383;
    border-color: #235383;
    color: #ffffff;
}

.csr-hero-action-btn.is-playing:hover {
    background: #1c4368;
    border-color: #1c4368;
    color: #ffffff;
}

.csr-hero-image {
    order: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    max-height: 280px;
}

@media (min-width: 480px) {
    .csr-hero-image {
        max-height: 320px;
    }
}

@media (min-width: 768px) {
    .csr-hero-image {
        order: 1;
        border-radius: 1rem;
        max-height: none;
        height: 100%;
        margin-right: 0;
    }
}

@media (min-width: 1024px) {
    .csr-hero-image {
        max-height: 340px;
    }
}

.csr-hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

@media (min-width: 768px) {
    .csr-hero-image img {
        height: 100%;
        aspect-ratio: unset;
    }
}

@media (min-width: 1024px) {
    .csr-hero-image img {
        height: 100%;
        aspect-ratio: unset;
    }
}

/* ===================================
   ARTICLE CONTENT LAYOUT
   =================================== */
.csr-article-layout {
    padding: 0 0 2rem;
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .csr-article-layout {
        padding: 0 0 3rem;
        gap: 3rem;
    }
}

/* Sidebar layouts */
.csr-article-template.has-sidebar .csr-article-layout {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .csr-article-template.has-sidebar .csr-article-layout {
        grid-template-columns: 1fr 300px;
    }
    
    .csr-article-template.has-sidebar.sidebar-left .csr-article-layout {
        grid-template-columns: 300px 1fr;
    }
    
    .csr-article-template.has-sidebar.sidebar-left .csr-article-sidebar {
        order: -1;
    }
}

.csr-article-template.no-sidebar .csr-article-layout {
    /* Full width - let Elementor container control the width */
}

/* Main content area */
.csr-article-main {
    min-width: 0;
}

/* ===================================
   STICKY SIDEBAR
   =================================== */
.csr-article-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .csr-article-sidebar {
        display: block;
        padding-top: 1.5rem; /* Match header top spacing */
    }
}

/* Newsletter static at top */
.csr-sidebar-static {
    margin-bottom: 1.5rem;
}

/* TOC is sticky and follows */
.csr-sidebar-sticky {
    /* JS will handle the sticky behavior */
}

.csr-sidebar-sticky-placeholder {
    display: none;
}

/* Sidebar CTA Boxes - Dark design like newsletter */
.csr-sidebar-cta {
    background: linear-gradient(to bottom right, #0f172a, #1e293b);
    border-radius: 1rem;
    padding: 1.5rem;
    color: #fff;
}

.csr-sidebar-cta-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.5rem;
}

.csr-sidebar-cta-text {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.csr-sidebar-cta-btn {
    display: inline-block;
    padding: 0.625rem 1rem;
    background: #f59e0b;
    color: #0f172a;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.csr-sidebar-cta-btn:hover {
    background: #d97706;
    color: #0f172a;
}

/* TOC Wrapper - Clean card design */
.csr-toc-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* Bottom ad wrapper */
.csr-bottom-ad-wrapper {
    margin-top: 3rem;
}

/* Related articles columns */
.csr-related-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.csr-related-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .csr-related-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .csr-related-cols-2,
    .csr-related-cols-3 {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   COMMENT SECTION
   =================================== */
.csr-comment-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.csr-comment-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 1.5rem;
}

.csr-comment-form {
    margin-bottom: 2rem;
}

.csr-comment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .csr-comment-fields {
        grid-template-columns: 1fr;
    }
}

.csr-comment-input,
.csr-comment-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.csr-comment-input:focus,
.csr-comment-textarea:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.csr-comment-textarea {
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

.csr-comment-submit {
    padding: 0.75rem 1.5rem;
    background: #d97706;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.csr-comment-submit:hover {
    background: #b45309;
}

.csr-comment-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.csr-comments-list {
    margin-top: 2rem;
}

.csr-no-comments {
    color: #64748b;
    font-size: 0.875rem;
    font-style: italic;
}

.csr-comment {
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.csr-comment:last-child {
    border-bottom: none;
}

.csr-comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.csr-comment-author {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.875rem;
}

.csr-comment-date {
    font-size: 0.75rem;
    color: #94a3b8;
}

.csr-comment-text {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Like button active state */
.csr-like-btn.liked {
    color: #d97706;
}

.csr-like-btn.liked svg {
    fill: #d97706;
}

.csr-like-count {
    margin-left: 0.25rem;
}

/* Comment form success message */
.csr-comment-success {
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 0.5rem;
    color: #166534;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ===================================
   CTA BLOCKS (Gutenberg)
   =================================== */
.csr-cta-block {
    background: linear-gradient(to bottom right, #0f172a, #1e293b);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
    margin: 2rem 0;
}

.csr-cta-block-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
}

.csr-cta-block-text {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.csr-cta-block-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f59e0b;
    color: #0f172a;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.csr-cta-block-btn:hover {
    background: #d97706;
    color: #0f172a;
}

/* Responsive CTA blocks */
@media (max-width: 767px) {
    .csr-cta-block {
        padding: 1.5rem;
    }
    
    .csr-cta-block-title {
        font-size: 1.125rem;
    }
    
    .csr-cta-block-text {
        font-size: 0.9375rem;
    }
}

/* ========================================
   ARCHIVE TEMPLATE WIDGET
   ======================================== */

.csr-archive-template {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.csr-archive-header {
    margin-bottom: 3rem;
    text-align: center;
}

.csr-archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.csr-archive-count {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.csr-archive-description {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Archive Layout */
.csr-archive-layout {
    display: grid;
    gap: 3rem;
}

.csr-archive-template.has-sidebar .csr-archive-layout {
    grid-template-columns: 1fr 300px;
}

.csr-archive-template.has-sidebar.sidebar-left .csr-archive-layout {
    grid-template-columns: 300px 1fr;
}

.csr-archive-main {
    min-width: 0;
}

/* Articles Grid */
.csr-archive-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .csr-archive-grid {
        grid-template-columns: 1fr !important;
    }
    
    .csr-archive-template.has-sidebar .csr-archive-layout {
        grid-template-columns: 1fr;
    }
    
    .csr-archive-sidebar {
        order: 2;
    }
}

/* Article Cards in Archive */
.csr-archive-grid .csr-article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s, transform 0.3s;
}

.csr-archive-grid .csr-article-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.csr-archive-grid .csr-article-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f8fafc;
}

.csr-archive-grid .csr-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csr-archive-grid .csr-article-content {
    padding: 1.5rem;
}

.csr-archive-grid .csr-article-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d97706;
    margin-bottom: 0.75rem;
}

.csr-archive-grid .csr-article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.csr-archive-grid .csr-article-title a {
    color: #0f172a;
    text-decoration: none;
}

.csr-archive-grid .csr-article-title a:hover {
    color: #0284c7;
}

.csr-archive-grid .csr-article-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.csr-archive-grid .csr-article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.csr-archive-grid .csr-article-date,
.csr-archive-grid .csr-article-read-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* No Articles Message */
.csr-no-articles {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8fafc;
    border-radius: 8px;
}

.csr-no-articles p {
    font-size: 1.125rem;
    color: #64748b;
}

/* Archive Sidebar */
.csr-archive-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.csr-sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.csr-sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.csr-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.csr-category-list li {
    margin-bottom: 0.5rem;
}

.csr-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    color: #0284c7;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s;
}

.csr-category-list a:hover {
    background: #f0f9ff;
}

.csr-category-count {
    font-size: 0.875rem;
    color: #94a3b8;
}

.csr-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.csr-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.csr-tag:hover {
    background: #0284c7;
    color: white;
}

/* Pagination */
.csr-pagination {
    margin-top: 3rem;
}

.csr-pagination .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.csr-pagination .page-numbers li {
    margin: 0;
}

.csr-pagination .page-numbers a,
.csr-pagination .page-numbers span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #0284c7;
    text-decoration: none;
    transition: all 0.2s;
}

.csr-pagination .page-numbers a:hover:not(.current) {
    background: #f0f9ff;
    border-color: #0284c7;
}

.csr-pagination .page-numbers .current {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
}

.csr-pagination .page-numbers .prev,
.csr-pagination .page-numbers .next {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .csr-archive-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .csr-archive-template {
        padding: 1rem;
    }
    
    .csr-archive-title {
        font-size: 1.75rem;
    }
    
    .csr-archive-header {
        margin-bottom: 2rem;
        text-align: left;
    }
    
    .csr-archive-description {
        font-size: 1rem;
    }
}

/* Archive Mode - Locked Category Filter */
.csr-filter-locked {
    opacity: 0.6;
    pointer-events: none;
}

.csr-filter-locked input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.csr-filter-lock-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    color: #64748b;
    opacity: 0.7;
}

.csr-filter-lock-icon svg {
    width: 14px;
    height: 14px;
}
