/**
 * Public health articles listing (/pages/articles)
 */
.med-articles {
    --med-primary: #0d9488;
    --med-bg: #f8fafc;
    --med-card: #fff;
    --med-border: #e2e8f0;
    --med-text: #1e293b;
    --med-muted: #64748b;
    font-family: 'Source Sans Pro', sans-serif;
    background: linear-gradient(180deg, var(--med-bg) 0%, #ecfdf5 100%);
    color: var(--med-text);
    padding: 0 0 48px;
    min-height: 60vh;
}

.med-articles h1,
.med-articles h2,
.med-articles h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.med-articles__hero {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
    color: #fff;
    padding: 36px 20px 40px;
    text-align: center;
}

.med-articles__hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.med-articles__hero h1 {
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    margin: 0 0 10px;
    line-height: 1.25;
}

.med-articles__hero p {
    margin: 0;
    font-size: 1.05rem;
    opacity: 0.95;
    line-height: 1.6;
}

.med-articles__search {
    max-width: 720px;
    margin: -22px auto 28px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.med-articles__search form {
    display: flex;
    gap: 10px;
    background: var(--med-card);
    border: 1px solid var(--med-border);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.med-articles__search input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 10px;
    outline: none;
    min-width: 0;
}

.med-articles__search button {
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    background: var(--med-primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.med-articles__search button:hover {
    background: #0f766e;
}

.med-articles__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.med-articles__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--med-muted);
}

.med-articles__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.med-article-card {
    background: var(--med-card);
    border: 1px solid var(--med-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.med-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.12);
}

.med-article-card__img {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    overflow: hidden;
}

.med-article-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.med-article-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    font-size: 2rem;
}

.med-article-card__body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.med-article-card__date {
    font-size: 13px;
    color: var(--med-muted);
    margin-bottom: 8px;
    white-space: nowrap;
}

.med-article-card__title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.35;
}

.med-article-card__title a {
    color: var(--med-text);
    text-decoration: none;
}

.med-article-card__title a:hover {
    color: var(--med-primary);
}

.med-article-card__excerpt {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.med-article-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--med-primary);
    text-decoration: none;
}

.med-article-card__cta:hover {
    color: #0f766e;
}

.med-articles__empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--med-card);
    border: 1px dashed var(--med-border);
    border-radius: 14px;
    color: var(--med-muted);
}

.med-articles__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.med-articles__pagination a,
.med-articles__pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid var(--med-border);
    background: var(--med-card);
    color: var(--med-text);
}

.med-articles__pagination a:hover {
    border-color: var(--med-primary);
    color: var(--med-primary);
}

.med-articles__pagination .current {
    background: var(--med-primary);
    border-color: var(--med-primary);
    color: #fff;
}

.med-articles-breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px 0;
    font-size: 14px;
    color: var(--med-muted);
}

.med-articles-breadcrumb a {
    color: var(--med-primary);
    text-decoration: none;
}

@media (max-width: 640px) {
    .med-articles__search form {
        flex-direction: column;
    }
    .med-articles__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .med-article-card {
        transition: none;
    }
    .med-article-card:hover {
        transform: none;
    }
}
