/**
 * THCAIndex Blog Styles
 *
 * Maintains visual parity with main site theme
 * Uses established brand colors, typography, and spacing
 * Follows WCAG 2.1 AA accessibility guidelines
 */

/* ============================================================================
   BLOG CONTAINER & LAYOUT
   ============================================================================ */

.blog-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 var(--spacing-xl);
}

/* ============================================================================
   BLOG HEADER - Matches site header styling
   ============================================================================ */

.blog-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.blog-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.blog-header h1 i {
    color: var(--primary-green);
    font-size: 1.8rem;
}

.blog-header p {
    font-size: 1rem;
    color: var(--text-medium);
    font-family: var(--font-body);
    margin: 0;
}

/* ============================================================================
   BLOG GRID - Matches product card grid
   ============================================================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

/* ============================================================================
   BLOG CARDS - Matches product card styling
   ============================================================================ */

.blog-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-green);
}

/* When blog-card is a link, prevent nested link styling */
a.blog-card .blog-card-title a {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--light-green-bg) 0%, #e0f2e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Placeholder icon for posts without images */
.blog-card-image:empty::after {
    content: '\f15c'; /* Font Awesome file icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: var(--primary-green);
    opacity: 0.2;
}

.blog-card-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   BLOG CARD ELEMENTS
   ============================================================================ */

.blog-card-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-medium);
}

.blog-card-title a:hover {
    color: var(--primary-green);
}

.blog-card-excerpt {
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    font-family: var(--font-body);
    flex: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    font-family: var(--font-body);
}

.blog-card-date,
.blog-card-readtime {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.blog-card-date i,
.blog-card-readtime i {
    color: var(--primary-green);
}

/* ============================================================================
   PAGINATION - Matches site pagination
   ============================================================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-3xl) 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition-medium);
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination a:hover {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    border-color: var(--primary-green);
}

/* ============================================================================
   CATEGORY CARDS - Article index page category browsing
   ============================================================================ */

.category-cards-section {
    margin-bottom: var(--spacing-4xl);
}

.category-cards-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

.category-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.category-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium);
    position: relative;
    z-index: 1;
}

.category-card:hover .category-card-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

.category-card-icon i {
    font-size: 2.5rem;
    color: white;
}

.category-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--light-green-bg) 0%, #e0f2e9 100%);
}

.category-card:hover .category-card-image {
    opacity: 0.95;
}

.category-card-content {
    padding: var(--spacing-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    transition: color var(--transition-medium);
}

.category-card:hover .category-card-title {
    color: var(--primary-green);
}

.category-card-description {
    display: none;
}

.category-card-stats {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: auto;
}

.category-card-count {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
}

.category-card-count i {
    font-size: 0.85rem;
}

/* Section divider */
.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--spacing-4xl) 0 var(--spacing-3xl);
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid var(--border-color);
}

.section-divider::before {
    margin-right: var(--spacing-xl);
}

.section-divider::after {
    margin-left: var(--spacing-xl);
}

.section-divider-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-medium);
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-divider-text i {
    color: var(--primary-green);
}

/* ============================================================================
   CATEGORY & TAG PAGES
   ============================================================================ */

.category-header,
.tag-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.category-header h1,
.tag-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.category-header h1 i,
.tag-header h1 i {
    color: var(--primary-green);
    font-size: 1.8rem;
}

.category-header p,
.tag-header p {
    font-size: 1rem;
    color: var(--text-medium);
    font-family: var(--font-body);
    margin: 0;
}

.category-header-meta {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================================================
   BLOG POST DETAIL PAGE
   ============================================================================ */

.blog-post-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 var(--spacing-xl);
}

/* Breadcrumbs matching site style */
.breadcrumbs {
    margin-bottom: var(--spacing-xl);
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-medium);
}

.breadcrumbs a:hover {
    color: var(--primary-green);
}

/* Blog post header */
.blog-post-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--border-color);
}

.blog-post-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    font-size: 0.95rem;
    color: var(--text-light);
    flex-wrap: wrap;
    font-family: var(--font-body);
}

.blog-post-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.blog-post-meta-item i {
    color: var(--primary-green);
}

.blog-post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

/* Blog post content styling */
.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
    font-family: var(--font-body);
}

.blog-post-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5rem 0 1rem;
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--light-green-bg);
}

.blog-post-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.blog-post-content p {
    margin-bottom: var(--spacing-xl);
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: var(--spacing-xl);
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: var(--spacing-sm);
}

.blog-post-content a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: underline;
    transition: color var(--transition-medium);
}

.blog-post-content a:hover {
    color: var(--secondary-green);
}

.blog-post-content blockquote {
    border-left: 4px solid var(--primary-green);
    padding-left: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    font-style: italic;
    color: var(--text-dark);
    background: var(--light-green-bg);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.blog-post-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
    border: 1px solid #e2e8f0;
}

.blog-post-content pre {
    background: var(--text-dark);
    color: #f8f8f2;
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-xl) 0;
    box-shadow: var(--shadow-md);
}

/* Blog post tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin: var(--spacing-3xl) 0;
    padding: var(--spacing-xl) 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.blog-post-tag {
    background: white;
    color: var(--primary-green);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-medium);
    font-family: var(--font-heading);
    border: 2px solid var(--primary-green);
}

.blog-post-tag:hover {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Blog post navigation (prev/next) */
.blog-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin: var(--spacing-3xl) 0;
}

.blog-nav-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-decoration: none;
    transition: all var(--transition-medium);
}

.blog-nav-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-nav-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.blog-nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-heading);
}

/* Related posts section */
.related-posts {
    margin: var(--spacing-4xl) 0;
}

.related-posts-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.related-post-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-decoration: none;
    transition: all var(--transition-medium);
}

.related-post-card:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.related-post-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.related-post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: var(--font-body);
}

/* ============================================================================
   ADMIN TEMPLATES
   ============================================================================ */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    margin-top: 20px;
}

.admin-badge {
    display: inline-block;
    background: var(--accent-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
    font-family: var(--font-heading);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
    font-family: var(--font-heading);
}

.card-body {
    padding: var(--spacing-xl);
}

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

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 1.75rem;
    }

    .blog-header h1 i {
        font-size: 1.6rem;
    }

    .category-header h1,
    .tag-header h1 {
        font-size: 1.75rem;
    }

    .category-header h1 i,
    .tag-header h1 i {
        font-size: 1.6rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .category-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .category-cards-section h2 {
        font-size: 1.5rem;
    }

    .section-divider-text {
        font-size: 1.1rem;
    }

    .blog-container,
    .blog-post-container {
        padding: 0 var(--spacing-lg);
    }

    .blog-post-title {
        font-size: 2rem;
    }

    .blog-post-navigation {
        grid-template-columns: 1fr;
    }

    .blog-post-meta {
        gap: var(--spacing-lg);
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: var(--spacing-xs);
    }

    .pagination a,
    .pagination span {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }

    .blog-header h1 i {
        font-size: 1.4rem;
    }

    .blog-header p {
        font-size: 0.95rem;
    }

    .category-header h1,
    .tag-header h1 {
        font-size: 1.5rem;
    }

    .category-header h1 i,
    .tag-header h1 i {
        font-size: 1.4rem;
    }

    .category-header p,
    .tag-header p {
        font-size: 0.95rem;
    }

    .category-cards-grid {
        grid-template-columns: 1fr;
    }

    .category-card-icon {
        width: 60px;
        height: 60px;
    }

    .category-card-icon i {
        font-size: 2rem;
    }

    .category-card-image {
        height: 150px;
    }

    .category-card-title {
        font-size: 1.05rem;
    }

    .category-card-content {
        padding: var(--spacing-md);
    }

    .section-divider::before,
    .section-divider::after {
        flex: 0.5;
    }

    .blog-post-title {
        font-size: 1.75rem;
    }

    .blog-post-content {
        font-size: 1rem;
    }

    .blog-post-content h2 {
        font-size: 1.5rem;
    }

    .blog-post-content h3 {
        font-size: 1.25rem;
    }
}

/* ============================================================================
   TUTORIAL VISUAL ENHANCEMENTS
   ============================================================================ */

/* Quick Reference Box */
.quick-reference-box {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 2px solid #0ea5e9;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-2xl) 0;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

.quick-reference-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.quick-reference-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #075985;
}

.quick-icon {
    font-size: 2rem;
}

.quick-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

.quick-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tutorial Step Cards */
.tutorial-step {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-left: 5px solid var(--primary-green);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.tutorial-step:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.step-number-badge {
    display: inline-block;
    background: var(--primary-green);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: var(--spacing-md) 0 var(--spacing-lg) 0 !important;
    padding: 0 !important;
    border: none !important;
}

.step-detail {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) 0;
}

.step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    line-height: 1.6;
}

.step-content strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* Screenshot Styling */
.tutorial-screenshot {
    margin: var(--spacing-xl) 0;
    background: #f8fafc;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 2px dashed #cbd5e1;
}

.tutorial-screenshot img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.screenshot-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: var(--spacing-sm);
    font-style: italic;
}

/* Full-width Screenshot Layout (for horizontal/wide screenshots) */
.tutorial-screenshot-fullwidth {
    margin: var(--spacing-lg) 0 var(--spacing-xl) 0;
    background: #f8fafc;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 2px dashed #cbd5e1;
}

.tutorial-screenshot-fullwidth img {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.step-details-list {
    margin-top: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Progress Indicator */
.step-progress {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: #f8fafc;
    border-radius: var(--radius-md);
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
}

/* Pro Tips Box */
.pro-tips-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    border-left: 5px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin: var(--spacing-2xl) 0;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.pro-tips-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.pro-tips-icon {
    font-size: 2rem;
}

.pro-tips-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #92400e;
}

.pro-tips-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.pro-tips-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.pro-tips-list li::before {
    content: "✨";
    position: absolute;
    left: 0;
    top: 0;
}

/* Tutorial CTA Section (Call-to-Action Button) */
.tutorial-cta-section {
    text-align: center;
    margin: 3rem 0;
}

.tutorial-cta-button {
    display: inline-block;
    padding: 1.5rem 3rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #059669;
}

.tutorial-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
    color: white;
    text-decoration: none;
}

.tutorial-divider {
    margin: 2rem 0 1rem 0;
    position: relative;
    text-align: center;
}

.tutorial-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.divider-text {
    position: relative;
    background: white;
    padding: 0 1.5rem;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.blog-empty {
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
    color: var(--text-light);
}

.blog-empty i {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
    color: var(--primary-green);
}

.blog-empty h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
}

.blog-empty p {
    font-family: var(--font-body);
    font-size: 1.1rem;
}

/* ============================================================================
   BUTTON STYLES (matching site buttons)
   ============================================================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--tertiary-green) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--text-light);
    border: 2px solid var(--border-color);
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all var(--transition-medium);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-secondary:hover {
    background: var(--text-medium);
}

/* ============================================================================
   TABLE OF CONTENTS
   ============================================================================ */

.blog-toc {
    background: linear-gradient(135deg, var(--light-green-bg) 0%, #e0f2e9 100%);
    border: 2px solid var(--primary-green);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-md);
}

.blog-toc-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

.blog-toc-toggle {
    background: none;
    border: none;
    color: var(--primary-green);
    font-size: 1.2rem;
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: transform var(--transition-fast);
}

.blog-toc-toggle:hover {
    transform: scale(1.1);
}

.blog-toc-toggle.collapsed {
    transform: rotate(-90deg);
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: var(--spacing-md);
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
}

.blog-toc-list.collapsed {
    max-height: 0;
    margin-top: 0;
}

.blog-toc-item {
    margin-bottom: var(--spacing-sm);
}

.blog-toc-level-2 {
    padding-left: 0;
}

.blog-toc-level-3 {
    padding-left: var(--spacing-xl);
    font-size: 0.95rem;
}

.blog-toc-link {
    color: var(--text-dark);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-medium);
}

.blog-toc-link:hover {
    background: white;
    color: var(--primary-green);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* ============================================================================
   SIDE-BY-SIDE LAYOUTS - Image + Text Side-by-Side (General Blog Feature)
   ============================================================================ */

/* Container for side-by-side layout */
.side-by-side-layout {
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    background: rgba(var(--primary-green-rgb), 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--primary-green-rgb), 0.1);
}

/* Image side */
.side-by-side-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.side-by-side-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Text side */
.side-by-side-text {
    flex: 1;
    padding: var(--spacing-sm);
    line-height: 1.8;
}

.side-by-side-text p {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.side-by-side-text p:last-child {
    margin-bottom: 0;
}

.side-by-side-text ul,
.side-by-side-text ol {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.side-by-side-text li {
    margin-bottom: var(--spacing-xs);
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .side-by-side-layout {
        flex-direction: column;
    }

    .side-by-side-image {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ============================================================================
   COLOR-CODED TEXT - Matches Tutorial Label Colors
   ============================================================================ */

/* Color classes for matching tutorial labels */
.color-green {
    color: #28a745;
    font-weight: 600;
}

.color-blue {
    color: #007bff;
    font-weight: 600;
}

.color-purple {
    color: #6f42c1;
    font-weight: 600;
}

.color-orange {
    color: #fd7e14;
    font-weight: 600;
}

.color-pink {
    color: #e83e8c;
    font-weight: 600;
}

.color-cyan {
    color: #17a2b8;
    font-weight: 600;
}

.color-yellow {
    color: #ffc107;
    font-weight: 600;
}

/* Background highlight variants for emphasis */
.bg-green {
    background-color: rgba(40, 167, 69, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #28a745;
    font-weight: 600;
}

.bg-blue {
    background-color: rgba(0, 123, 255, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #007bff;
    font-weight: 600;
}

.bg-purple {
    background-color: rgba(111, 66, 193, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #6f42c1;
    font-weight: 600;
}

.bg-orange {
    background-color: rgba(253, 126, 20, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #fd7e14;
    font-weight: 600;
}

.bg-pink {
    background-color: rgba(232, 62, 140, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #e83e8c;
    font-weight: 600;
}

.bg-cyan {
    background-color: rgba(23, 162, 184, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #17a2b8;
    font-weight: 600;
}

.bg-yellow {
    background-color: rgba(255, 193, 7, 0.2);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: #856404;
    font-weight: 600;
}
