/* News System Styles */

/* Hero section — featured articles */
.news-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}
.news-hero__main {
    grid-row: 1 / 3;
}
.news-hero__main .news-card {
    height: 100%;
}
.news-hero__main .news-card__image {
    height: 280px;
}
.news-hero__main .news-card__title {
    font-size: 1.35rem;
}
.news-hero__side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}
.news-hero__side .news-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
}
.news-hero__side .news-card__image {
    height: 100%;
    min-height: 100px;
}
.news-hero__side .news-card__title {
    font-size: 0.95rem;
}

/* News card */
.news-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}
.news-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    color: inherit;
}
.news-card__image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f1f3f4;
}
.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-card__image--placeholder {
    background: linear-gradient(135deg, #e8eaed 0%, #f1f3f4 100%);
}
.news-card__body {
    padding: 0.75rem;
}
.news-card__category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a73e8;
    margin-bottom: 0.25rem;
}
.news-card__title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.35rem;
    color: #202124;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card__excerpt {
    font-size: 0.85rem;
    color: #5f6368;
    line-height: 1.5;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* No-image card: title on top, excerpt fills the space */
.news-card--noimg .news-card__body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 220px;
}
.news-card--noimg .news-card__title {
    font-size: 1.1rem;
    -webkit-line-clamp: 4;
}
.news-card--noimg .news-card__excerpt {
    flex: 1;
    -webkit-line-clamp: 5;
    font-size: 0.88rem;
}

.news-card__meta {
    font-size: 0.75rem;
    color: #9aa0a6;
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.news-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Category section on homepage */
.news-section {
    margin-bottom: 2rem;
}
.news-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 0.5rem;
}
.news-section__header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #202124;
    margin: 0;
}
.news-section__header a {
    font-size: 0.85rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}
.news-section__header a:hover {
    text-decoration: underline;
}

/* News page layout */
.news-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}
.news-page__header {
    margin-bottom: 1.5rem;
}
.news-page__header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.news-page__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.pill--active {
    background: #1a73e8 !important;
    color: #fff !important;
}

/* Pagination */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}
.news-pagination a,
.news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #e8eaed;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #3c4043;
    text-decoration: none;
}
.news-pagination a:hover {
    background: #f1f3f4;
}
.news-pagination .active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* Article detail */
.article-detail {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.article-detail__title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: #202124;
    margin: 0.5rem 0 0.75rem;
}
.article-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #5f6368;
    margin-bottom: 1.25rem;
}
.article-detail__category {
    color: #1a73e8;
    font-weight: 500;
}
.article-detail__image {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.article-detail__image img {
    width: 100%;
    display: block;
}
.article-detail__credit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px 0 0 0;
}
.article-detail__content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #3c4043;
    margin-bottom: 1.5rem;
}
.article-detail__content p {
    margin-bottom: 1rem;
}
.article-detail__source-link {
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}
.article-detail__source-link a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}
.article-detail__source-link a:hover {
    text-decoration: underline;
}
.article-detail__related {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8eaed;
}
.article-detail__related h2 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: #9aa0a6;
    margin-bottom: 0.5rem;
}
.breadcrumb a {
    color: #5f6368;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #1a73e8;
}

/* Embed container */
.article-embed {
    position: relative;
    width: 100%;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}
.article-embed iframe {
    max-width: 100%;
}

/* Tags */
.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0;
}
.tag-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Homepage layout */
.home-search {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    padding-top: 1rem;
}
.home-search-tabs {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}
.home-search-tabs a {
    color: #5f6368;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.home-search-tabs a:hover {
    color: #202124;
}
.home-search-tabs a.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.home-news {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 0;
}
.home-directory-pills {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8eaed;
}
.home-directory-pills h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .news-hero { grid-template-columns: 1fr; }
    .news-hero__main { grid-row: auto; }
    .news-hero__side { grid-template-rows: auto; }
    .news-hero__side .news-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-grid--4 { grid-template-columns: 1fr; }
    .article-detail__title { font-size: 1.35rem; }
    .news-hero__main .news-card__image { height: 200px; }
}
