/* 
    CodeRegime Blog - Modern SaaS Theme
    Strict Design System Implementation
*/

:root {
    /* Strict Theme Colors */
    --primary-color: #007bff;
    --secondary-color: #555555;
    --background-color: #F3F4FF;
    --text-color: #333333;
    --heading-color: #1E2460;
    --link-color: #0051C8;
    --link-hover-color: #0056b3;
    --white-color: #ffffff;
    --black-color: #000000;
    --paper: #F3F4FF;
    --card-bg: #ffffff;
    --border: #767676;
    --accent: #c8f04b;
    --accent-2: #0051C8;
    --ink: #1E2460;
    --muted: #555555;
    
    /* Layout & Spacing */
    --container-max: 1200px;
    --gutter: 2.5rem;
    --card-radius: 12px;
    
    /* Typography */
    --font-heading: 'Poppins', 'Inter', sans-serif;
    --font-body: 'Inter', 'Poppins', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* Motion & Effects */
    --transition-fast: all 0.2s ease;
    --shadow-card: 0 8px 24px rgba(30, 36, 96, 0.06);
    --shadow-hover: 0 12px 32px rgba(30, 36, 96, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.blog-page-body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.blog-details-main {
    padding-top: 7rem;
    padding-bottom: 6rem;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 600;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* Breadcrumb */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.blog-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.blog-breadcrumb .material-symbols-outlined {
    font-size: 16px;
    color: rgba(118, 118, 118, 0.5); /* Lighter border color for chevron */
}

.blog-breadcrumb .truncate {
    color: var(--heading-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* 12-Column Responsive Layout Setup (Using Flex/Grid) */
.blog-layout-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
}

@media (min-width: 1024px) {
    .blog-layout-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        align-items: start;
    }
    
    .blog-main-content {
        grid-column: span 8; /* Approx 66% width */
    }
    
    .blog-sidebar {
        grid-column: span 4; /* Approx 33% width */
    }
    
    .blog-breadcrumb .truncate {
        max-width: none;
    }
}

/* --- Left Content Area --- */
.blog-main-content {
    background-color: transparent;
}

.post-header-section {
    margin-bottom: 2.5rem;
}

.post-category {
    display: inline-block;
    background-color: var(--accent);
    color: var(--ink);
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(200, 240, 75, 0.4);
}

.post-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.post-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.meta-item .material-symbols-outlined {
    font-size: 1.2rem;
    color: var(--accent-2);
}

.meta-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-name {
    color: var(--ink);
    font-weight: 600;
}

.post-featured-image-container {
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 3.5rem;
    box-shadow: var(--shadow-card);
    background-color: var(--card-bg);
    border: 1px solid rgba(118, 118, 118, 0.1); /* Subtle border */
}

.post-featured-image-container img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Content Styling */
.post-content {
    font-size: 1.125rem;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 1.75rem;
}

.post-content h2 {
    font-size: 2rem;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.5rem;
}

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

.post-content blockquote {
    background-color: var(--white-color);
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
    font-style: italic;
    color: var(--secondary-color);
    box-shadow: var(--shadow-card);
}

.post-content pre {
    background-color: var(--ink);
    padding: 1.5rem;
    border-radius: var(--card-radius);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--white-color);
}

/* Post Actions (Tags & Share) */
.post-footer-actions {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(118, 118, 118, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .post-footer-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

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

.post-tags .tag {
    background-color: var(--white-color);
    color: var(--ink);
    border: 1px solid rgba(118, 118, 118, 0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.post-tags .tag:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
    text-decoration: none;
}

.post-share-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

.share-btn {
    background-color: var(--white-color);
    color: var(--ink);
    border: 1px solid rgba(118, 118, 118, 0.2);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.share-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.share-btn:active {
    transform: translateY(0);
}

/* --- Right Sidebar --- */
.sidebar-sticky-wrapper {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(118, 118, 118, 0.15);
    padding: 2.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-card);
}

.sidebar-card-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Author Card */
.author-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-card-content img {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    border: 3px solid var(--white-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 1.25rem;
    object-fit: cover;
}

.author-card-content h5 {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.author-profile-link {
    color: var(--link-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.author-profile-link:hover {
    color: var(--link-hover-color);
}

/* TOC Card */
.toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toc-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    display: block;
}

.toc-list a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    text-decoration: none;
}

.toc-sub-item a {
    padding-left: 1.75rem;
    font-size: 0.85rem;
}

/* CTA Card */
.cta-card {
    background-color: var(--accent-2);
    color: var(--white-color);
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 12px 32px rgba(0, 81, 200, 0.2);
}

.cta-card .sidebar-card-title {
    color: var(--white-color);
}

.cta-card .sidebar-card-title::after {
    background-color: var(--accent);
}

.cta-bg-shape {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(20%, -30%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-card:hover .cta-bg-shape {
    transform: translate(10%, -20%) scale(1.2);
}

.cta-card .cta-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.cta-card .cta-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    line-height: 1.6;
}

.cta-button {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--white-color);
    color: var(--accent-2);
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    text-decoration: none;
    color: var(--primary-color);
}

/* Utilities */
.text-muted {
    color: var(--muted);
    font-size: 0.9rem;
}
