/* Blog Styles - Orange Theme */

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 120px 0 60px;
    text-align: center;
}

.blog-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.blog-main-desc {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

/* Tags Section */
.tags-section {
    background: #f8fafc;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
}

.tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.tag-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    color: #475569;
}

.tag-btn:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.tag-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.tag-btn.active .tag-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.tag-icon {
    font-size: 1.1rem;
}

.tag-name {
    font-weight: 500;
}

.tag-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.tag-btn:hover .tag-count {
    background: #fef3c7;
    color: #d97706;
}

@media (max-width: 768px) {
    .tags-section {
        padding: 20px 0;
    }

    .tags-grid {
        gap: 8px;
    }

    .tag-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .tag-icon {
        font-size: 0.9rem;
    }

    .tag-count {
        display: none;
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Animation for filtered cards */
.blog-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog-card.hidden {
    display: none;
}

.blog-card.show {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No results message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 1.1rem;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-header {
        padding: 100px 0 40px;
    }

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

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.blog-category {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: #d97706;
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-card-readmore {
    font-size: 0.875rem;
    font-weight: 600;
    color: #d97706;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-readmore {
    color: #b45309;
}

/* Blog CTA */
.blog-cta {
    text-align: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 60px 40px;
    border-radius: 24px;
    color: #fff;
}

.blog-cta h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.blog-cta p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 24px;
}

.blog-cta .btn {
    background: #f59e0b;
    color: #1e293b;
}

.blog-cta .btn:hover {
    background: #d97706;
}

/* Article Page */
.article-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 100px 0 50px;
}

.article-header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top row with breadcrumbs and meta - redesigned */
.article-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.breadcrumbs a:hover {
    color: #f59e0b;
}

.breadcrumbs span.sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

.breadcrumbs .current {
    color: #f59e0b;
    font-weight: 500;
}

/* Meta info on the right */
.article-meta {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.article-meta-item:first-child {
    padding-left: 0;
}

.article-meta-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.article-meta-item.article-category {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e293b;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: none !important;
    margin-right: 8px;
}

.article-meta-item.article-date,
.article-meta-item.article-reading-time {
    border-right: none;
    padding-right: 14px;
}

@media (max-width: 768px) {
    .article-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .article-meta {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .article-meta-item {
        padding: 0 10px;
    }

    .article-meta-item:first-child {
        padding-left: 0;
    }
}

/* Legacy support */
.article-meta-inline {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.article-category {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date, .article-reading-time {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.article-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
    text-align: center;
}

.article-excerpt {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .article-header {
        padding: 80px 0 30px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-excerpt {
        font-size: 1rem;
    }
}

/* Article Content */
.article-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Featured Image + TOC in 2 columns */
.article-header-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .article-header-grid {
        grid-template-columns: 1fr;
    }
}

.article-featured-image {
    border-radius: 16px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

/* Table of Contents */
.toc {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border-left: 4px solid #f59e0b;
    height: fit-content;
}

.toc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    display: block;
    padding: 4px 0;
}

.toc-list a:hover {
    color: #d97706;
}

/* Article Body */
.article-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
    max-width: 100%;
    margin: 0;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 30px 0 15px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    background: #f8fafc;
    border-left: 4px solid #f59e0b;
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
}

.article-body a {
    color: #d97706;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-body a:hover {
    color: #b45309;
}

.article-body .highlight-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
}

.article-body .highlight-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 12px;
}

.article-body .warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.article-body .warning-box h4 {
    color: #b45309;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.info-box h4 {
    color: #1d4ed8;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Comparison Table in Articles */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 0.9375rem;
}

.article-body th,
.article-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.article-body th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.article-body tr:hover {
    background: #f8fafc;
}

/* Article Internal Links */
.article-body .internal-link {
    color: #d97706;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed #d97706;
    transition: all 0.3s ease;
}

.article-body .internal-link:hover {
    color: #b45309;
    border-bottom-color: #b45309;
}

/* Numbered List Styling */
.article-body ol {
    counter-reset: article-counter;
    list-style: none;
    padding-left: 0;
}

.article-body ol li {
    counter-increment: article-counter;
    position: relative;
    padding-left: 50px;
    margin-bottom: 20px;
}

.article-body ol li::before {
    content: counter(article-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Checklist Styling */
.checklist {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.checklist li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.article-tag {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.875rem;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #f59e0b;
    color: #1e293b;
}

/* CTA Box - Full Width like Image + TOC */
.article-cta-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    padding: 60px 40px;
    margin: 50px 0;
    text-align: center;
    color: #fff;
    width: 100%;
}

.article-cta-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.article-cta-box p {
    font-size: 1.0625rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.article-cta-box .btn {
    background: #f59e0b;
    color: #1e293b;
    font-size: 1rem;
    padding: 14px 32px;
}

.article-cta-box .btn:hover {
    background: #d97706;
}

/* Related Articles */
.related-articles {
    background: #f8fafc;
    padding: 60px 0;
}

.related-articles .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog CTA Modal */
.blog-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.blog-modal.active {
    display: flex;
}

.blog-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.blog-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}

.blog-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.blog-modal-close:hover {
    color: #475569;
}

.blog-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

.blog-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.blog-modal-subtitle {
    color: #64748b;
    margin-bottom: 24px;
}

.blog-modal .form-group {
    text-align: left;
    margin-bottom: 16px;
}

.blog-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 6px;
}

.blog-modal .form-group input {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    transition: border-color 0.3s ease;
}

.blog-modal .form-group input::placeholder {
    color: #94a3b8;
}

.blog-modal .form-group input:focus {
    outline: none;
    border-color: #f59e0b;
}

.blog-modal .btn {
    width: 100%;
    margin-top: 8px;
}

.blog-modal-note {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 16px;
}

.blog-modal-success {
    display: none;
    padding: 20px 0;
}

.blog-modal-success.show {
    display: block;
}

.blog-modal-success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.blog-modal-success h4 {
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 8px;
}

.blog-modal-success p {
    color: #64748b;
}

/* Success message for form */
.form-success {
    display: none;
    text-align: center;
    padding: 20px;
}

.form-success.show {
    display: block;
}

.form-success-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.form-success h4 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.form-success p {
    color: #94a3b8;
    font-size: 0.9375rem;
    margin: 0;
}
