/* ==========================================================================
   GreenStar – News / Blog Listing Styles
   File: assets/css/news.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. News Hero Section
   -------------------------------------------------------------------------- */
.news-hero {
    background: var(--color-primary-dark);
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.news-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.news-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(10, 40, 10, .6) 0%,
        rgba(30, 86, 30, .45) 55%,
        rgba(0, 0, 0, .35) 100%
    );
}
.news-hero__container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.news-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
    animation: fadeUp 0.6s ease both;
}
.news-hero__subtitle {
    font-size: var(--fs-md);
    color: rgba(255,255,255,0.8);
    line-height: var(--lh-loose);
    animation: fadeUp 0.6s ease 0.1s both;
}

/* --------------------------------------------------------------------------
   2. Category Filter Bar
   -------------------------------------------------------------------------- */
.news-filter {
    background: var(--color-white);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 1.5rem 0;
    position: sticky;
    top: 72px; /* Header height */
    z-index: 90;
}
.news-filter__list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none; /* Firefox */
}
.news-filter__list::-webkit-scrollbar { display: none; } /* Safari/Chrome */
.news-filter__link {
    display: inline-flex;
    white-space: nowrap;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text-light);
    background: var(--color-off-white);
    transition: all var(--transition);
}
.news-filter__link:hover {
    color: var(--color-primary);
    background: rgba(45,122,45,0.08);
}
.news-filter__link.active {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   3. Featured Post (First Post)
   -------------------------------------------------------------------------- */
.news-featured {
    margin-bottom: 4rem;
    animation: fadeUp 0.6s ease 0.2s both;
}
.news-featured__card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-featured__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.news-featured__img {
    position: relative;
    overflow: hidden;
}
.news-featured__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.news-featured__card:hover .news-featured__img img { transform: scale(1.05); }

.news-featured__content {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: var(--fs-xs);
}
.news-meta__cat {
    background: rgba(45,122,45,0.1);
    color: var(--color-primary-dark);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.news-meta__date {
    color: var(--color-text-light);
    font-weight: 600;
}
.news-featured__title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.25rem;
}
.news-featured__title a {
    color: var(--color-dark);
    transition: color var(--transition);
}
.news-featured__title a:hover { color: var(--color-primary); }
.news-featured__excerpt {
    font-size: var(--fs-md);
    color: var(--color-text-light);
    line-height: var(--lh-loose);
    margin-bottom: 2rem;
}
.news-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--color-primary);
    transition: gap var(--transition);
}
.news-readmore::after { content: '→'; font-size: 1.1em; transition: transform var(--transition); }
.news-readmore:hover { gap: 0.8rem; }
.news-readmore:hover::after { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   4. News Grid & Standard Cards
   -------------------------------------------------------------------------- */
.news-grid-section {
    padding: 4rem 0 6rem;
    background: var(--color-off-white);
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.news-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition);
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(45,122,45,0.15);
}
.news-card__img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--color-light-gray);
}
.news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.news-card:hover .news-card__img img { transform: scale(1.06); }
.news-card__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-white);
    color: var(--color-primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}
.news-card__body {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-card__date {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.news-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    line-height: 1.35;
}
.news-card__title a { color: inherit; transition: color var(--transition); }
.news-card__title a:hover { color: var(--color-primary); }
.news-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}
.news-card__footer { margin-top: auto; }

/* --------------------------------------------------------------------------
   5. Pagination
   -------------------------------------------------------------------------- */
.news-pagination {
    margin-top: 4rem;
    text-align: center;
}
.news-pagination .nav-links {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-white);
    padding: 0.5rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}
.news-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 50px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
    transition: all var(--transition);
}
.news-pagination .page-numbers:hover:not(.current):not(.dots) {
    background: var(--color-off-white);
    color: var(--color-primary);
}
.news-pagination .page-numbers.current {
    background: var(--color-primary);
    color: var(--color-white);
}
.news-pagination .page-numbers.dots { color: var(--color-text-light); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .news-featured__card { grid-template-columns: 1fr; }
    .news-featured__img { aspect-ratio: 16/9; }
    .news-featured__content { padding: 2.5rem 2rem; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .news-hero { padding: 4rem 0 3rem; }
    .news-hero__title { font-size: 2.2rem; }
    .news-grid { grid-template-columns: 1fr; }
    .news-filter__link { padding: 0.4rem 1rem; font-size: 0.8rem; }
}
