/* ============================================
   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;
    }
}