/* ============================================
   CONVERTICO GUIDES - FRONTEND STYLES
   Dark Mode Support with Light Mode Default
   ============================================ */

/* CSS Variables - Scoped to guides pages only */
.guides-page,
.guide-article-page {
    --g-color-red: #e64e4e;
    --g-color-blue: #3399cc;
    --g-color-green: #339966;
    --g-color-purple: #8b5cf6;
    --g-color-orange: #f59e0b;
    
    --g-bg: #f8fafc;
    --g-bg-card: #ffffff;
    --g-bg-secondary: #f1f5f9;
    --g-text: #1e293b;
    --g-text-secondary: #475569;
    --g-text-muted: #64748b;
    --g-border: #e2e8f0;
    --g-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --g-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --g-radius: 12px;
}

[data-theme="dark"] .guides-page,
[data-theme="dark"] .guide-article-page {
    --g-bg: #0f172a;
    --g-bg-card: #1e293b;
    --g-bg-secondary: #334155;
    --g-text: #f1f5f9;
    --g-text-secondary: #cbd5e1;
    --g-text-muted: #94a3b8;
    --g-border: #475569;
    --g-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --g-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================
   COMMON ELEMENTS
   ============================================ */

.guides-page,
.guide-article-page {
    background: var(--g-bg);
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
}

.guides-container,
.article-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--g-text-muted);
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    color: var(--g-border);
}

.breadcrumbs a {
    color: var(--g-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--g-color-blue);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--g-text);
    margin-bottom: 1.5rem;
}

.section-title i {
    width: 24px;
    height: 24px;
    color: var(--g-color-blue);
}

/* Category Badges */
.guide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    align-self: flex-start;
    width: fit-content;
}

.guide-badge i {
    width: 14px;
    height: 14px;
}

.guide-badge.badge-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
}

.guide-badge.badge-sm i {
    width: 12px;
    height: 12px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--g-color-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--g-bg-card);
    color: var(--g-text);
    border: 1px solid var(--g-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--g-bg-secondary);
    border-color: var(--g-color-blue);
}

.btn-secondary i,
.btn-primary i {
    width: 18px;
    height: 18px;
}

/* ============================================
   GUIDES INDEX PAGE
   ============================================ */

/* Page Header */
.guides-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.guides-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--g-text);
    margin-bottom: 0.75rem;
}

.guides-title i {
    width: 36px;
    height: 36px;
    color: var(--g-color-blue);
}

.guides-subtitle {
    font-size: 1.1rem;
    color: var(--g-text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Featured Section */
.featured-section {
    margin-bottom: 3rem;
}

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

.featured-card {
    display: flex;
    flex-direction: column;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--g-shadow-lg);
    border-color: var(--g-color-blue);
}

.featured-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

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

.featured-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--g-text);
    margin: 0.75rem 0 0.5rem;
    line-height: 1.4;
}

.featured-content p {
    font-size: 0.875rem;
    color: var(--g-text-secondary);
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

.featured-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--g-text-muted);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--g-border);
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.featured-meta i {
    width: 14px;
    height: 14px;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--g-bg-secondary);
    color: var(--g-text-secondary);
    border: 1px solid transparent;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-btn i {
    width: 16px;
    height: 16px;
}

.filter-btn:hover {
    background: var(--g-bg);
    color: var(--g-text);
    border-color: var(--g-border);
}

.filter-btn.active {
    background: var(--g-color-blue);
    color: white;
    border-color: var(--g-color-blue);
}

/* Guides Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.guide-card {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
    transition: all 0.3s;
}

.guide-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--g-shadow-lg);
    border-color: var(--g-color-blue);
}

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

.guide-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.guide-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.guide-card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--g-text);
    margin: 0.75rem 0 0.5rem;
    line-height: 1.4;
}

.guide-card-excerpt {
    font-size: 0.85rem;
    color: var(--g-text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.guide-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--g-text-muted);
    margin-top: 1rem;
}

.guide-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.guide-card-meta i {
    width: 14px;
    height: 14px;
}

.guide-card-cta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--g-color-blue);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--g-border);
}

.guide-card-cta i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.guide-card:hover .guide-card-cta i {
    transform: translateX(4px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination-btn,
.pagination-page {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--g-bg-card);
    color: var(--g-text-secondary);
    border: 1px solid var(--g-border);
    border-radius: 8px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-btn:hover,
.pagination-page:hover {
    background: var(--g-bg-secondary);
    color: var(--g-text);
}

.pagination-page.active {
    background: var(--g-color-blue);
    color: white;
    border-color: var(--g-color-blue);
}

.pagination-btn i {
    width: 16px;
    height: 16px;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
}

.empty-state i {
    width: 64px;
    height: 64px;
    color: var(--g-text-muted);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--g-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--g-text-muted);
    margin-bottom: 1.5rem;
}

/* Related Tools Section */
.related-tools-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--g-bg-secondary);
    border-radius: 10px;
    text-decoration: none;
    color: var(--g-text);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.tool-card i {
    width: 28px;
    height: 28px;
}

.tool-card:hover {
    background: var(--g-color-blue);
    color: white;
}

.tool-card:hover i {
    color: white !important;
}

/* ============================================
   GUIDE ARTICLE PAGE
   ============================================ */

.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Article Main */
.article-main {
    min-width: 0;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--g-text);
    line-height: 1.3;
    margin: 1rem 0;
}

.article-excerpt {
    font-size: 1.1rem;
    color: var(--g-text-secondary);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--g-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--g-text-muted);
}

.meta-item i {
    width: 16px;
    height: 16px;
}

/* Featured Image */
.article-featured-image {
    margin: 0 0 2rem;
    border-radius: var(--g-radius);
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile TOC */
.toc-mobile {
    display: none;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    margin-bottom: 2rem;
    overflow: hidden;
}

.toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--g-text);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.toc-toggle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-toggle i {
    width: 18px;
    height: 18px;
}

.toc-chevron {
    transition: transform 0.2s;
}

.toc-mobile.expanded .toc-chevron {
    transform: rotate(180deg);
}

.toc-mobile .toc-content {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--g-border);
}

.toc-mobile.expanded .toc-content {
    display: block;
}

/* Article Content */
.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--g-text);
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    color: var(--g-text);
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--g-text);
}

.article-content p {
    margin: 0 0 1.25rem;
}

.article-content a {
    color: var(--g-color-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    color: #2980b9;
}

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

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content code {
    background: var(--g-bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Consolas', 'Monaco', monospace;
}

.article-content pre {
    background: var(--g-bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Info & Note Boxes */
.article-content .info-box,
.article-content .note-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--g-radius);
    margin: 1.5rem 0;
}

.article-content .info-box {
    background: rgba(51, 153, 204, 0.1);
    border: 1px solid rgba(51, 153, 204, 0.3);
}

.article-content .note-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.article-content .box-icon {
    flex-shrink: 0;
}

.article-content .box-icon svg {
    width: 24px;
    height: 24px;
    color: var(--g-color-blue);
}

.article-content .note-box .box-icon svg {
    color: var(--g-color-orange);
}

.article-content .box-content p {
    margin: 0;
}

/* CTA Box */
.article-content .cta-box {
    background: linear-gradient(135deg, rgba(51, 153, 204, 0.1), rgba(51, 153, 102, 0.1));
    border: 1px solid rgba(51, 153, 204, 0.3);
    border-radius: var(--g-radius);
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.article-content .cta-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.article-content .cta-box p {
    margin: 0 0 1rem;
    color: var(--g-text-secondary);
}

.article-content .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--g-color-blue);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin: 0.25rem;
    transition: all 0.2s;
}

.article-content .cta-button:hover {
    background: #2980b9;
    color: white;
    transform: translateY(-1px);
}

/* Steps List */
.article-content .steps-list {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.article-content .steps-list li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
    counter-increment: step-counter;
}

.article-content .steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--g-color-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Checkmark List */
.article-content .checkmark-list {
    list-style: none;
    padding-left: 0;
}

.article-content .checkmark-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-content .checkmark-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--g-color-green);
    font-weight: 700;
}

/* Size Grid */
.article-content .size-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.article-content .size-item {
    background: var(--g-bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.article-content .size-icon {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--g-color-blue);
    margin-bottom: 0.25rem;
}

.article-content .size-description {
    font-size: 0.8rem;
    color: var(--g-text-muted);
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--g-border);
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--g-text-muted);
}

.tags-label i {
    width: 16px;
    height: 16px;
}

.tag-link {
    padding: 0.35rem 0.75rem;
    background: var(--g-bg-secondary);
    color: var(--g-text-secondary);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--g-color-blue);
    color: white;
}

/* Share Section */
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--g-border);
}

.share-label {
    font-size: 0.875rem;
    color: var(--g-text-muted);
}

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

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--g-bg-secondary);
    color: var(--g-text-secondary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn i {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-twitter:hover {
    background: #1da1f2;
    color: white;
}

.share-facebook:hover {
    background: #4267B2;
    color: white;
}

.share-linkedin:hover {
    background: #0077b5;
    color: white;
}

.share-copy:hover {
    background: var(--g-color-green);
    color: white;
}

/* Author Section */
.author-section {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--g-bg-secondary);
    border-radius: var(--g-radius);
    margin-top: 2rem;
}

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

.author-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-label {
    font-size: 0.75rem;
    color: var(--g-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.author-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--g-text);
    margin-top: 0.25rem;
}

.author-bio {
    font-size: 0.875rem;
    color: var(--g-text-secondary);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

/* Desktop TOC */
.toc-desktop {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--g-text);
    margin: 0 0 1rem;
}

.toc-title i {
    width: 18px;
    height: 18px;
    color: var(--g-color-blue);
}

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

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

.toc-list a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--g-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.toc-list a:hover {
    background: var(--g-bg-secondary);
    color: var(--g-text);
}

.toc-list a.active {
    background: rgba(51, 153, 204, 0.1);
    color: var(--g-color-blue);
}

/* Sidebar Tools */
.sidebar-tools {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1.25rem;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--g-text);
    margin: 0 0 1rem;
}

.sidebar-title i {
    width: 18px;
    height: 18px;
    color: var(--g-color-blue);
}

.sidebar-tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-tool {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--g-bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--g-text);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sidebar-tool i {
    width: 20px;
    height: 20px;
}

.sidebar-tool:hover {
    background: var(--g-color-blue);
    color: white;
}

.sidebar-tool:hover i {
    color: white !important;
}

/* Related Guides */
.related-guides {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--g-border);
}

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

.related-card {
    display: flex;
    flex-direction: column;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--g-shadow-lg);
    border-color: var(--g-color-blue);
}

.related-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

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

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

.related-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--g-text);
    margin: 0.5rem 0;
    line-height: 1.4;
}

.related-content p {
    font-size: 0.8rem;
    color: var(--g-text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.read-more {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--g-color-blue);
    margin-top: 0.75rem;
}

.read-more i {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.related-card:hover .read-more i {
    transform: translateX(3px);
}

/* Back to Guides */
.back-to-guides {
    text-align: center;
    margin-top: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .toc-desktop {
        display: none;
    }
    
    .toc-mobile {
        display: block;
    }
}

@media (max-width: 900px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .article-content .size-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .guides-page,
    .guide-article-page {
        padding: 1rem 0.75rem 3rem;
    }
    
    .guides-title {
        font-size: 1.5rem;
    }
    
    .guides-title i {
        width: 28px;
        height: 28px;
    }
    
    .category-filter {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-meta {
        gap: 0.75rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-pages {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}


.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: 12px;
    overflow: hidden;
}
.comparison-table th,
.comparison-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--g-border);
}
.comparison-table th {
    background: var(--g-bg-secondary);
    font-weight: 600;
    color: var(--g-text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.comparison-table tr:last-child td {
    border-bottom: none;
}
.comparison-table tr:hover td {
    background: var(--g-bg-secondary);
}
.comparison-table code {
    background: rgba(51, 153, 204, 0.1);
    color: #3399cc;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}
@media (max-width: 768px) {
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}


/* FAQ Section */
.article-content .faq-item {
    background: var(--g-bg-secondary);
    border: 1px solid var(--g-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.article-content .faq-item:hover {
    border-color: var(--g-color-blue);
    box-shadow: var(--g-shadow);
}

.article-content .faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--g-text);
}

.article-content .faq-item p {
    margin: 0;
    font-size: 0.925rem;
    color: var(--g-text-secondary);
    line-height: 1.6;
}

.article-content .faq-item p a {
    color: var(--g-color-blue);
}

/* Responsive for lateral banners */
@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .guides-container {
        max-width: min(900px, calc(100vw - 340px));
    }
}

@media screen and (min-width: 1001px) and (max-width: 1199px) {
    .guides-container {
        max-width: calc(100vw - 300px);
        min-width: 420px;
        padding: 0 15px;
    }
    
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1000px) {
    .guides-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Article page responsive for lateral banners */
@media screen and (min-width: 1200px) and (max-width: 1399px) {
    .article-container {
        max-width: min(900px, calc(100vw - 340px));
    }
}

@media screen and (min-width: 1001px) and (max-width: 1199px) {
    .article-container {
        max-width: calc(100vw - 300px);
        min-width: 420px;
        padding: 0 15px;
    }
    
    .article-layout {
        gap: 1.5rem;
    }
    
    .article-sidebar {
        width: 220px;
        flex-shrink: 0;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 1000px) {
    .article-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .article-sidebar {
        display: none;
    }
}

/* ============================================================
   Guide FAQ accordion (2026-10-14) - markup from _guide_faq.php
   Single column, bordered rows, support line (shadcnblocks Faq 2 + Faq 4 help link)
   ============================================================ */
.article-content .gfaq {
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    background: var(--g-bg-card);
    overflow: hidden;
    margin: 1.25rem 0 1.75rem;
}
.article-content .gfaq-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--g-bg-secondary);
    border-bottom: 1px solid var(--g-border);
    font-size: 0.85rem;
    color: var(--g-text-muted);
}
.article-content .gfaq-count { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; }
.article-content .gfaq-count svg { color: var(--g-color-blue); flex-shrink: 0; }
.article-content .gfaq-toggle-all {
    background: none;
    border: 0;
    margin: -0.25rem -0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    color: var(--g-color-blue);
    cursor: pointer;
}
.article-content .gfaq-toggle-all:hover { background: var(--g-bg-card); }
.article-content .gfaq-toggle-all:focus-visible { outline: 2px solid var(--g-color-blue); outline-offset: 1px; }

.article-content .gfaq-item + .gfaq-item { border-top: 1px solid var(--g-border); }
/* Reset the site-wide details/summary rules in custom_styles.css (dotted border-bottom, margins, bold 16px) - that was the faint 2nd line under each row */
.article-content .gfaq-item { margin: 0; padding: 0; border-bottom: 0; }
.article-content .gfaq-item > summary { margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }
.article-content .gfaq-item > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.article-content .gfaq-item > summary::-webkit-details-marker { display: none; }
.article-content .gfaq-item > summary h3 {
    margin: 0;
    padding: 0;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--g-text);
    transition: color 0.15s;
}
.article-content .gfaq-item > summary:hover h3,
.article-content .gfaq-item[open] > summary h3 { color: var(--g-color-blue); }
.article-content .gfaq-item > summary:focus-visible { outline: 2px solid var(--g-color-blue); outline-offset: -2px; }
.article-content .gfaq-chev { flex-shrink: 0; color: var(--g-text-muted); transition: transform 0.2s ease, color 0.2s; }
.article-content .gfaq-item[open] > summary .gfaq-chev { transform: rotate(180deg); color: var(--g-color-blue); }

.article-content .gfaq-a {
    padding: 0 1.25rem 1.1rem;
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--g-text-secondary);
}
.article-content .gfaq-a p { margin: 0 0 0.75rem; }
.article-content .gfaq-a ul,
.article-content .gfaq-a ol { margin: 0 0 0.75rem; }
.article-content .gfaq-a > :last-child { margin-bottom: 0; }
.article-content .gfaq-item[open] .gfaq-a { animation: gfaqIn 0.2s ease; }
@keyframes gfaqIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.article-content .gfaq-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid var(--g-border);
    background: var(--g-bg-secondary);
    font-size: 0.9rem;
    color: var(--g-text-secondary);
}
.article-content .gfaq-help svg { color: var(--g-color-green); flex-shrink: 0; }

@media (max-width: 600px) {
    .article-content .gfaq-bar,
    .article-content .gfaq-help { padding-left: 1rem; padding-right: 1rem; }
    .article-content .gfaq-item > summary { padding: 0.9rem 1rem; }
    .article-content .gfaq-a { padding: 0 1rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .article-content .gfaq-chev { transition: none; }
    .article-content .gfaq-item[open] .gfaq-a { animation: none; }
}

/* ============================================================
   Guide sidebar + meta refresh (2026-10-14)
   - sticky column that always fits the screen (TOC scrolls inside)
   - numbered TOC steps with done/active states and reading progress
   - "Tools in this guide" rows built from the guide's own links
   ============================================================ */
@media (min-width: 1025px) {
    .article-sidebar {
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 104px);
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .article-sidebar .toc-desktop { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; margin-bottom: 0; }
    .article-sidebar .sidebar-tools { flex: 0 0 auto; }
    .article-sidebar .toc-steps { overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; }
}

.toc-desktop,
.sidebar-tools {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 1rem 1rem 0.85rem;
}
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.toc-head .toc-title { margin: 0; font-size: 0.88rem; }
.toc-left { font-size: 0.72rem; font-weight: 600; color: var(--g-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.toc-progress { height: 3px; border-radius: 3px; background: var(--g-bg-secondary); overflow: hidden; margin-bottom: 0.75rem; flex-shrink: 0; }
.toc-progress span { display: block; height: 100%; width: 0; background: var(--g-color-blue); border-radius: inherit; transition: width 0.15s linear; }

.toc-steps { list-style: none; margin: 0; padding: 0; counter-reset: tocstep; position: relative; }
.toc-steps li { position: relative; margin: 0; counter-increment: tocstep; }
.toc-steps li + li::before {
    /* thin connector between step numbers */
    content: ''; position: absolute; left: 13px; top: -6px; height: 12px; width: 1px; background: var(--g-border);
}
.toc-steps a {
    display: flex; align-items: flex-start; gap: 0.6rem;
    padding: 0.32rem 0.45rem 0.32rem 0.2rem;
    font-size: 0.83rem; line-height: 1.38;
    color: var(--g-text-secondary); text-decoration: none;
    border-radius: 6px; background: none;
    transition: color 0.15s, background 0.15s;
}
.toc-steps a::before {
    content: counter(tocstep);
    flex: 0 0 18px; height: 18px; margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--g-border);
    background: var(--g-bg-card);
    font-size: 0.66rem; font-weight: 600; color: var(--g-text-muted);
    font-variant-numeric: tabular-nums;
    transition: all 0.15s;
}
.toc-steps a:hover { color: var(--g-text); background: var(--g-bg-secondary); }
.toc-steps li.is-done a { color: var(--g-text-muted); }
.toc-steps li.is-done a::before { content: '\2713'; border-color: var(--g-color-green); color: var(--g-color-green); font-size: 0.7rem; }
.toc-steps li.is-active a,
.toc-steps a.active { color: var(--g-color-blue); background: color-mix(in srgb, var(--g-color-blue) 9%, transparent); font-weight: 600; }
.toc-steps li.is-active a::before { background: var(--g-color-blue); border-color: var(--g-color-blue); color: #fff; }
.toc-top {
    display: inline-flex; align-items: center; gap: 0.35rem; align-self: flex-start;
    margin-top: 0.6rem; padding-top: 0.6rem; width: 100%;
    border-top: 1px solid var(--g-border);
    font-size: 0.76rem; color: var(--g-text-muted); text-decoration: none; flex-shrink: 0;
}
.toc-top:hover { color: var(--g-color-blue); }
.toc-top svg { width: 14px; height: 14px; }

/* Tools in this guide */
.sidebar-tools .sidebar-title { font-size: 0.88rem; margin-bottom: 0.7rem; }
.sidebar-tools-list { gap: 0.4rem; }
.sidebar-tools .sidebar-tool {
    --tc: var(--g-color-blue);
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.5rem 0.55rem;
    background: none; border: 1px solid transparent; border-radius: 9px;
    color: var(--g-text); text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.sidebar-tools .sidebar-tool:hover { background: var(--g-bg-secondary); border-color: var(--g-border); color: var(--g-text); }
.sidebar-tool-icon {
    flex: 0 0 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--tc) 12%, transparent); color: var(--tc);
}
.sidebar-tools .sidebar-tool .sidebar-tool-icon svg { width: 17px; height: 17px; color: var(--tc) !important; }
.sidebar-tool-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-tool-text strong { font-size: 0.83rem; font-weight: 600; line-height: 1.3; }
.sidebar-tool-text small { font-size: 0.72rem; color: var(--g-text-muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-tools .sidebar-tool .sidebar-tool-go { width: 15px; height: 15px; flex-shrink: 0; color: var(--g-text-muted) !important; opacity: 0; transform: translateX(-3px); transition: opacity 0.15s, transform 0.15s; }
.sidebar-tools .sidebar-tool:hover .sidebar-tool-go { opacity: 1; transform: none; color: var(--g-color-blue) !important; }
.sidebar-tools .sidebar-tool:hover .sidebar-tool-icon svg { color: var(--tc) !important; }

/* Meta row: published + updated */
.article-meta .meta-updated { color: var(--g-color-green); font-weight: 500; }
.article-meta .meta-updated svg { color: var(--g-color-green); }
.article-meta time { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
    .toc-progress span, .toc-steps a, .toc-steps a::before, .sidebar-tool-go { transition: none; }
}

/* ==========================================================================
   "The Bottom Line" summary card (2026-10-22)
   Styles the closing summary section of a guide - no markup change needed.
   Also catches older closing sections (Conclusion, Wrapping Up, Key Takeaways).
   ========================================================================== */
.article-content section#the-bottom-line,
.article-content section#conclusion,
.article-content section#wrapping-up,
.article-content section#key-takeaways {
    --bl-accent: var(--g-color-green);
    margin: 2.5rem 0 1.5rem;
    padding: 1.5rem 1.75rem 1.25rem;
    border-radius: var(--g-radius);
    background: rgba(51, 153, 102, 0.06);
    border: 1px solid rgba(51, 153, 102, 0.28);
}

.article-content section#the-bottom-line > h2,
.article-content section#conclusion > h2,
.article-content section#wrapping-up > h2,
.article-content section#key-takeaways > h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--g-text);
}

/* Lucide "flag" icon in a small round badge */
.article-content section#the-bottom-line > h2::before,
.article-content section#conclusion > h2::before,
.article-content section#wrapping-up > h2::before,
.article-content section#key-takeaways > h2::before {
    content: "";
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'/%3E%3Cline x1='4' y1='22' x2='4' y2='15'/%3E%3C/svg%3E") center / 17px 17px no-repeat,
        var(--bl-accent);
}

/* Takeaway list: check marks instead of bullets, light dividers */
.article-content section#the-bottom-line > ul,
.article-content section#conclusion > ul,
.article-content section#wrapping-up > ul,
.article-content section#key-takeaways > ul {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.article-content section#the-bottom-line > ul > li,
.article-content section#conclusion > ul > li,
.article-content section#wrapping-up > ul > li,
.article-content section#key-takeaways > ul > li {
    position: relative;
    margin: 0;
    padding: 0.6rem 0 0.6rem 2.1rem;
    border-bottom: 1px solid rgba(51, 153, 102, 0.18);
    line-height: 1.55;
    color: var(--g-text);
}

.article-content section#the-bottom-line > ul > li:last-child,
.article-content section#conclusion > ul > li:last-child,
.article-content section#wrapping-up > ul > li:last-child,
.article-content section#key-takeaways > ul > li:last-child {
    border-bottom: 0;
}

.article-content section#the-bottom-line > ul > li::before,
.article-content section#conclusion > ul > li::before,
.article-content section#wrapping-up > ul > li::before,
.article-content section#key-takeaways > ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23339966' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px 12px no-repeat,
        rgba(51, 153, 102, 0.14);
}

.article-content section#the-bottom-line > ul > li strong,
.article-content section#conclusion > ul > li strong,
.article-content section#wrapping-up > ul > li strong,
.article-content section#key-takeaways > ul > li strong {
    font-weight: 600;
}

/* Closing line: a little sign-off */
.article-content section#the-bottom-line > p:last-child,
.article-content section#conclusion > p:last-child,
.article-content section#wrapping-up > p:last-child,
.article-content section#key-takeaways > p:last-child {
    margin: 0.25rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px dashed rgba(51, 153, 102, 0.35);
    font-style: italic;
    color: var(--g-text-secondary);
}

[data-theme="dark"] .article-content section#the-bottom-line,
[data-theme="dark"] .article-content section#conclusion,
[data-theme="dark"] .article-content section#wrapping-up,
[data-theme="dark"] .article-content section#key-takeaways {
    background: rgba(51, 153, 102, 0.10);
    border-color: rgba(51, 153, 102, 0.40);
}

@media (max-width: 600px) {
    .article-content section#the-bottom-line,
    .article-content section#conclusion,
    .article-content section#wrapping-up,
    .article-content section#key-takeaways {
        padding: 1.15rem 1rem 1rem;
    }
}


/* 2026-10-23: default thumbnail for related guides with no image (or a broken one) */
.related-image { position: relative; }
.related-image img { position: relative; z-index: 1; }
.related-image .g-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; color: var(--g-color-green); background-color: color-mix(in srgb, var(--g-color-green) 9%, var(--g-bg-secondary)); background-image: radial-gradient(color-mix(in srgb, var(--g-color-green) 22%, transparent) 1px, transparent 1.2px); background-size: 16px 16px; }
.related-image .g-ph svg { width: 36px; height: 36px; stroke-width: 1.6; padding: 11px; box-sizing: content-box; border-radius: 14px; background: var(--g-bg-card); }
.related-image .g-ph b { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
