/**
 * Content Feed Styles
 * Styles for content scroller and content cards
 */

/* Content Scroller Section */
.content-scroller {
    padding: 6rem 0;
    overflow: hidden;
}

.content-scroller__header {
    text-align: center;
    margin-bottom: 3rem;
}

.content-scroller__header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .content-scroller__header h2 {
        font-size: 3rem;
    }
}

.content-scroller__header p {
    font-size: 1.125rem;
    color: #666;
    max-width: 42rem;
    margin: 0 auto;
}

/* Filter Chips */
.content-scroller__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.content-filter-chip.filter-chip.active,
.content-filter-chip.filter-chip[data-active="true"] {
    background: #d0a843; /* accent color */
    color: #1c1c1c; /* primary color */
    border-color: #d0a843;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Scroller Container */
.content-scroller__container {
    position: relative;
}

.content-scroller__track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 2rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-scroller__track::-webkit-scrollbar {
    display: none;
}

.content-scroller__track > * {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

/* Scroll Buttons */
.content-scroll-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: white;
    border: 1px solid #e5e5e5;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 1024px) {
    .content-scroll-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.content-scroll-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.content-scroll-btn--prev {
    left: 0;
    transform: translateY(-50%) translateX(-1.5rem);
}

.content-scroll-btn--next {
    right: 0;
    transform: translateY(-50%) translateX(1.5rem);
}

/* CTA */
.content-scroller__cta {
    text-align: center;
    margin-top: 3rem;
}

/* Content Card Base */
.content-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 1rem; /* rounded-2xl */
    overflow: hidden;
    flex-shrink: 0; /* Prevent cards from shrinking */
}

/* Scroller Variant - Responsive Widths (per spec) */
.content-card-scroller {
    width: 78vw; /* Mobile */
    flex-shrink: 0;
    flex-grow: 0;
}

@media (min-width: 640px) {
    .content-card-scroller {
        width: 60vw;
    }
}

@media (min-width: 768px) {
    .content-card-scroller {
        width: 42vw;
    }
}

@media (min-width: 1024px) {
    .content-card-scroller {
        width: 36vw;
    }
}

@media (min-width: 1280px) {
    /* Per spec: 28vw for normal cards, allows 3 cards to be visible */
    .content-card-scroller:not(.featured) {
        width: 28vw;
    }
    
    /* Per spec: 32vw for featured cards */
    .content-card-scroller.featured {
        width: 32vw;
    }
}

/* Grid Variant */
.content-card-grid {
    width: 100%;
    aspect-ratio: 3/4;
}

/* Content Page Grid Layout - Match design specification */
.content-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .content-page__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .content-page__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Ensure content-page section is centered with proper padding */
#content-page-grid {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

#content-page-grid > .container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    #content-page-grid > .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    #content-page-grid > .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Card Image Hover Effect */
.content-card:hover .content-card__image {
    transform: scale(1.03);
}

/* Content Area - Ensure proper positioning - Always at bottom */
.content-card__content {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 10;
    padding: 1.25rem 1.5rem !important; /* Match project-card padding */
    margin-top: auto !important; /* Push to bottom */
}

@media (min-width: 768px) {
    .content-card__content {
        padding: 1.5rem !important; /* Match project-card padding on larger screens */
    }
}

/* Content Area Hover Effect */
.content-card:hover .content-card__content {
    transform: translateY(-0.25rem);
}

/* News Article Styles */
.news-article-hero {
    position: relative;
}

.news-article__hero {
    position: relative;
    height: 40vh;
    overflow: hidden;
}

@media (min-width: 768px) {
    .news-article__hero {
        height: 50vh;
    }
}

.news-article__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-article__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.5), transparent);
}

.news-article__content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 0;
}

.news-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.news-article__category {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(208, 168, 67, 0.1);
    color: #d0a843;
    font-size: 0.875rem;
    font-weight: 500;
}

.news-article__date,
.news-article__author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.news-article__date svg,
.news-article__author svg {
    width: 1rem;
    height: 1rem;
}

.news-article__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .news-article__title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .news-article__title {
        font-size: 3rem;
    }
}

.news-article__ingress {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 3rem;
}

.news-article__body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #666;
}

.news-article__body p {
    margin-bottom: 1.5rem;
}

.news-article__body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1c1c1c;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.news-article__body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1c1c1c;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.news-article__body blockquote {
    border-left: 4px solid #d0a843;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    font-size: 1.125rem;
    color: #666;
}

.news-article__body ul,
.news-article__body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.news-article__body li {
    margin-bottom: 0.75rem;
}

.news-article__body strong {
    color: #1c1c1c;
}

.news-article__related {
    padding: 4rem 0;
    background: #f5f5f5;
}

.news-article__related h2 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.news-article__related-grid {
    display: grid;
    gap: 1.5rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .news-article__related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .news-article__related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-article__ctas {
    padding: 4rem 0;
    text-align: center;
}

.news-article__ctas .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .news-article__ctas .container {
        flex-direction: row;
        justify-content: center;
    }
}
