/**
 * Blog Article Styles
 * Styles for BuildIt blog posts
 */

/* Article Container */
.blog-article {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

/* Article Header */
.blog-header {
    margin-bottom: 2rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.blog-tag {
    background: #E7F7F7;
    color: #548B99;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.blog-date {
    color: #424B54;
    font-size: 0.9375rem;
}

.blog-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1F2E3D;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-excerpt {
    font-size: 1.25rem;
    color: #424B54;
    line-height: 1.6;
}

/* Hero Image */
.blog-hero-image {
    width: 100%;
    max-width: 1000px;
    margin: 3rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    aspect-ratio: 16/9;
}

.blog-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Article Content */
.blog-content {
    font-size: 1.0625rem;
    color: #1F2E3D;
    line-height: 1.8;
}

.blog-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1F2E3D;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2E3D;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* Text Content Constraints - Hybrid Layout */
.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content h2,
.blog-content h3 {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content strong {
    color: #1F2E3D;
    font-weight: 700;
}

.blog-content a {
    color: #548B99;
    text-decoration: none;
    border-bottom: 1px solid #95C7C3;
    transition: border-color 0.3s ease;
}

.blog-content a:hover {
    border-bottom-color: #548B99;
}

/* Lists */
.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.blog-content ul li {
    list-style-type: disc;
}

.blog-content ol li {
    list-style-type: decimal;
}

/* Blockquotes */
.blog-content blockquote {
    max-width: 700px;
    margin: 2.5rem auto;
    padding: 1.5rem 2rem;
    border-left: 4px solid #548B99;
    background: #E7F7F7;
    font-style: italic;
    color: #424B54;
    border-radius: 4px;
}

.blog-content blockquote p {
    margin-bottom: 0;
}

/* Code Blocks */
.blog-content code {
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: Monaco, Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: #424B54;
}

.blog-content pre {
    max-width: 700px;
    margin: 2.5rem auto;
    background: #1F2E3D;
    color: #E7F7F7;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
}

.blog-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    max-width: 1000px;
    margin: 2.5rem auto;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.comparison-table thead {
    background: linear-gradient(135deg, #548B99 0%, #95C7C3 100%);
    color: white;
}

.comparison-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
}

.comparison-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f2;
    font-size: 0.9375rem;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, #E7F7F7 0%, #f0f9f9 100%);
    border-left: 4px solid #548B99;
    padding: 1.5rem 2rem;
    margin: 2.5rem auto;
    max-width: 700px;
    border-radius: 8px;
}

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

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #548B99 0%, #95C7C3 100%);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    text-align: center;
    margin: 4rem auto;
    max-width: 1000px;
}

.cta-box h3 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 1rem 0 !important;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: #548B99;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none !important;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* View Mode Dropdown */
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.blog-meta-left {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.blog-meta-right {
    margin-left: auto;
}

.view-mode-dropdown {
    position: relative;
}

.view-mode-btn {
    background: white;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #424B54;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.view-mode-btn:hover {
    border-color: #548B99;
    color: #548B99;
}

#currentMode {
    color: #548B99;
}

.view-mode-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #e0e0e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.view-mode-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.view-mode-option {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: #424B54;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.view-mode-option:hover {
    background: #f8f9fa;
}

.view-mode-option.active {
    color: #548B99;
    font-weight: 600;
}

.view-mode-option .radio {
    color: #548B99;
    font-size: 0.75rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .blog-article {
        padding-top: 100px;
    }

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

    .blog-excerpt {
        font-size: 1.125rem;
    }

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

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

    .comparison-table {
        font-size: 0.875rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 1rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
    }

    .cta-box h3 {
        font-size: 1.5rem;
    }

    .highlight-box {
        padding: 1.25rem 1.5rem;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-meta-right {
        margin-left: 0;
        width: 100%;
    }

    .view-mode-btn {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}