/* ========================================
   CODEASSESS BLOG - SHARED STYLESHEET
   All blogs inherit these styles
   ======================================== */

:root {
    --primary-color: #11C6C7;
    --primary-dark: #0faeb0;
    --primary-light: #F0FFF4;
    --primary-border: #A7F3D0;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-tertiary: #4B5563;
    --bg-light: #F0FFF4;
    --bg-gray: #f3f4f6;
    --border-color: #E5E7EB;
}

* {
    box-sizing: border-box;
}

/* ========================================
   GRADIENT ACCENT
   ======================================== */
.gradient-accent {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* ========================================
   TYPOGRAPHY - PROSE CONTENT
   ======================================== */
.prose-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.prose-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.prose-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1F2937;
    line-height: 1.4;
}

.prose-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.prose-content p {
    line-height: 1.75;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.prose-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.prose-content ul,
.prose-content ol {
    margin-bottom: 1.5rem;
    margin-left: 1.5rem;
}

.prose-content li {
    margin-bottom: 0.75rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.prose-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   BLOCKQUOTE & CALLOUTS
   ======================================== */
.prose-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1rem 1rem 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-tertiary);
    background: var(--bg-light);
    border-radius: 0.375rem;
}

.highlight-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.highlight-box p {
    margin-bottom: 0;
    font-weight: 500;
}

.cta-inline {
    background: var(--bg-light);
    border: 1px solid var(--primary-border);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.cta-inline h3 {
    margin-top: 0;
}

.cta-inline p {
    margin-bottom: 1rem;
}

.cta-inline a {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.cta-inline a:hover {
    background-color: var(--primary-dark);
    text-decoration: none;
}

/* ========================================
   IMAGES - BLOG CONTENT
   ======================================== */
.blog-hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 2rem 0;
    object-fit: cover;
    display: block;
}

.blog-content-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    background: linear-gradient(135deg, var(--bg-light) 0%, #E0F2FE 100%);
    height: 20rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    border: 1px solid var(--primary-border);
}

.image-placeholder svg {
    width: 4rem;
    height: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.image-placeholder p {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0;
}

/* ========================================
   TABLE OF CONTENTS
   ======================================== */
.toc-item {
    padding: 0.5rem 0;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.toc-item:hover {
    color: var(--primary-dark);
    padding-left: 0.25rem;
}

/* ========================================
   BUTTONS & INTERACTIONS
   ======================================== */
.copy-link-btn {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
}

.copy-link-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   ARTICLE CARDS - FEATURED & RELATED
   ======================================== */
.related-article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.related-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(17, 198, 199, 0.1);
}

.article-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.article-card-image {
    width: 100%;
    height: 10rem;
    object-fit: cover;
}

/* ========================================
   FEATURED ARTICLES SECTION
   ======================================== */
.featured-article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.featured-article-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

/* ========================================
   HERO SECTION - BLOG ARTICLE
   ======================================== */
.blog-hero-section {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.95));
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.blog-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .blog-hero-meta {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
}

.blog-meta-text {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.blog-meta-author {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   CATEGORY TAGS & BADGES
   ======================================== */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.read-time-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-gray);
    color: var(--text-secondary);
}

/* ========================================
   CTA SECTIONS - FOOTER
   ======================================== */
.cta-footer {
    text-align: center;
    padding: 2rem 0;
}

.cta-footer h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-footer p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* ========================================
   SIDEBAR - TABLE OF CONTENTS
   ======================================== */
.toc-sidebar {
    background: var(--bg-gray);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.toc-sidebar h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.toc-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

/* Mobile - Tablets */
@media (max-width: 768px) {
    .prose-content h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }

    .prose-content h3 {
        font-size: 1.125rem;
    }

    .prose-content p {
        font-size: 0.95rem;
    }

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

    .image-placeholder {
        height: 15rem;
    }

    .featured-article-image {
        height: 10rem;
    }

    .toc-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .prose-content h2 {
        font-size: 1.25rem;
    }

    .prose-content h3 {
        font-size: 1rem;
    }

    .blog-hero-title {
        font-size: 1.5rem;
    }

    .prose-content ul,
    .prose-content ol {
        margin-left: 1rem;
    }

    .image-placeholder {
        height: 12rem;
    }

    .cta-inline {
        padding: 1rem;
    }
}

/* Large Screens */
@media (min-width: 1024px) {
    .prose-content h2 {
        font-size: 2rem;
    }

    .blog-hero-title {
        font-size: 2.5rem;
    }

    .toc-sidebar {
        position: sticky;
        top: 6rem;
        height: fit-content;
    }
}

/* ========================================
   FILTER BUTTONS - BLOG LANDING
   ======================================== */
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-btn.inactive {
    background-color: var(--bg-gray);
    color: var(--text-secondary);
}

.filter-btn.inactive:hover {
    background-color: #E5E7EB;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .toc-sidebar,
    .copy-link-btn,
    .cta-inline,
    .related-article {
        display: none;
    }

    .prose-content {
        color: #000;
    }

    .prose-content a {
        color: #000;
        text-decoration: underline;
    }
}

.blog-hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 0;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
    .blog-hero-image {
        border-radius: 0.5rem;
        aspect-ratio: auto;
    }
}