/* ========================================
   Articles — Shared styles for listing & article pages
   ======================================== */

/* ---------- Article Page ---------- */

.article-hero {
    background-color: #E6F3F3;
    padding: 60px 0 40px;
}

.article-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    color: #22252A;
    max-width: 800px;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #6C727F;
}

.article-meta time {
    font-weight: 500;
}

.article-author {
    color: #005B5C;
    font-weight: 600;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    display: inline-block;
    padding: 4px 14px;
    background-color: #005B5C;
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.article-tag:hover {
    background-color: #004445;
}

.article-hero-image {
    background-color: #ffffff;
    padding: 40px 0 0;
}

.article-hero-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-body {
    background-color: #ffffff;
    padding: 50px 0 80px;
}

.article-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #22252A;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #22252A;
    margin: 45px 0 18px;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #005B5C;
    margin: 35px 0 14px;
    line-height: 1.3;
}

.article-content p {
    margin-bottom: 20px;
    color: #3D4048;
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px 20px;
    color: #3D4048;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.75;
}

.article-content blockquote {
    border-left: 4px solid #F28C35;
    padding: 16px 24px;
    margin: 30px 0;
    background-color: #FFF8F2;
    border-radius: 0 8px 8px 0;
    color: #22252A;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.75;
}

.article-content a {
    color: #005B5C;
    text-decoration: underline;
    text-decoration-color: rgba(0, 91, 92, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.article-content a:hover {
    text-decoration-color: #005B5C;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.article-content code {
    background-color: #F0F1F3;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.92em;
    color: #005B5C;
}

.article-content pre {
    background-color: #22252A;
    color: #E1E4EA;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-cta {
    background-color: #F5F5F7;
    padding: 60px 0;
}

/* ---------- Listing Page ---------- */

.articles-hero {
    background-color: #E6F3F3;
    padding: 60px 0;
    text-align: center;
}

.articles-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #22252A;
    margin-bottom: 12px;
}

.articles-hero p {
    font-size: 1.15rem;
    color: #6C727F;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Tag filter bar */
.tag-filter {
    background-color: #ffffff;
    padding: 30px 0;
    border-bottom: 1px solid #E1E4EA;
    position: sticky;
    top: 90px;
    z-index: 50;
}

.tag-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.tag-filter-btn {
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6C727F;
    background-color: #F5F5F7;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter-btn:hover {
    color: #005B5C;
    background-color: #E6F3F3;
}

.tag-filter-btn.active {
    color: #ffffff;
    background-color: #005B5C;
    border-color: #005B5C;
}

/* Article cards grid */
.articles-grid-section {
    background-color: #F5F5F7;
    padding: 60px 0 80px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #E1E4EA;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

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

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

.article-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.article-card-date {
    font-size: 0.82rem;
    color: #6C727F;
    font-weight: 500;
}

.article-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #22252A;
    line-height: 1.3;
    margin: 0;
}

.article-card-excerpt {
    font-size: 0.95rem;
    color: #6C727F;
    line-height: 1.65;
    flex-grow: 1;
}

.article-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.article-card-tag {
    display: inline-block;
    padding: 3px 10px;
    background-color: #E6F3F3;
    color: #005B5C;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* No results message */
.articles-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6C727F;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .article-hero {
        padding: 40px 0 30px;
    }

    .article-hero h1 {
        font-size: 1.8rem;
    }

    .article-body {
        padding: 30px 0 60px;
    }

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

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

    .article-content h3 {
        font-size: 1.2rem;
    }

    .articles-hero h1 {
        font-size: 2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .tag-filter {
        top: 0;
    }

    .tag-filter-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 4px;
    }

    .tag-filter-inner::-webkit-scrollbar {
        display: none;
    }

    .tag-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
