/* /css/content.css */

:root {
    --accent-color: #ff6b6b; /* Vibrant red */
    --gradient-accent: linear-gradient(45deg, #ff6b6b, #feca57);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* --- Main Layout Containers --- */
.app-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Prevent horizontal scrolling and smooth scrolling */
html {
	width: 100%;
	overflow-x: hidden;
	scroll-padding-top: 110px; /* Adjust for desktop header height */
	scroll-behavior: smooth;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar-content {
    flex-basis: 340px;
    position: sticky;
    top: 100px;
}

.sidebar-content:empty {
    display: none;
}

.main-content:has(> .placeholder-text),
.main-content:has(> .content-grid) {
    flex-basis: 100%;
}

/* --- Main Content Layouts --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feed-layout .card {
    margin-bottom: 2rem;
}

/* --- Card Styles (Universal) --- */
.card {
	border-radius: 12px 12px 12px 0; /* Asymmetric bottom-left corner */
	background: linear-gradient(145deg, var(--surface-color), #f8fafc); /* Subtle gradient */
	overflow: hidden;
    position: relative;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.card:hover .card-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
.card-image {
    transition: transform 0.3s ease;
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Replaces fixed height for consistency */
    object-fit: cover;
    background-color: #eee;
}
.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
}

.card-image-wrapper {
    position: relative;
}
.card-category-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background: var(--accent-color);
}

.card-title {
	font-family: var(--font-heading);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.card-summary, .card-category, .card-date {
    font-family: var(--font-body);
}
.featured-card .card-title {
    font-size: 2.2rem;
}

.card-summary {
    font-size: 0.95rem;
    color: var(--text-light-color);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-title {
    font-variation-settings: 'wght' 600;
}
.card:hover .card-title {
    font-variation-settings: 'wght' 700; /* Bolder on hover */
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    /* This now adds 1rem top/bottom padding and 1.5rem left/right padding */
    padding: 1rem 1.5rem;
    margin-top: auto;
}

.card-date, .card-link {
    font-size: 0.9rem;
    font-weight: 600;
}

.placeholder-text {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light-color);
    margin-top: 3rem;
}

/* --- Desktop Sidebar Styles --- */
.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-content .card {
    flex-direction: row;
    align-items: center;
    padding: 0.75rem;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sidebar-content .card-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-content .card-content {
    padding: 0;
}

.sidebar-content .card-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sidebar-content .card-category,
.sidebar-content .card-summary,
.sidebar-content .card-footer {
    display: none;
}

/* --- Featured Article Card Styles --- */
/* --- Featured Article Card Styles --- */
.featured-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--primary-color), #4a5568); /* Dark slate gradient */
    color: white; /* Base color for text */
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* NEW: Make the title use the site's accent color for visibility */
.featured-card .card-title {
    color: var(--secondary-color); /* Amber color for the title */
}

/* Ensure the summary text is a lighter, more subtle white */
.featured-card .card-summary {
    color: rgba(255, 255, 255, 0.8);
}

.featured-card .card-image {
    flex: 1 1 55%;
    height: 350px;
    border-radius: 12px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.featured-card .card-content {
    flex: 1 1 45%;
    padding: 0;
}

.featured-card .card-title {
    font-size: 2rem;
    line-height: 1.3;
}

.featured-card .card-summary {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .featured-card {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }
    .featured-card .card-image {
        margin-bottom: 1.5rem;
        height: 200px;
    }
}

/* --- Load More Button Styles --- */
.load-more-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.load-more-btn:hover {
    background-color: #1a202c;
    transform: translateY(-2px);
}

/* --- Social Media Feed Card Styles --- */



.feed-card .card-content {
    order: 1;
}

.feed-card .card-image {
    order: 2;
    height: auto;
    max-height: 500px;
    border-radius: 12px;
    margin-top: 1rem;
}

.feed-card .card-footer {
    display: none;
}

.feed-card .card-actions {
    order: 3;
    display: flex;
    justify-content: center;
    gap: 4rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding: 0.5rem 1rem;
}

.feed-card .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light-color);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.feed-card .action-btn:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

/* --- Sidebar Link Wrapper Style --- */
a.card-link-wrapper,
a.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
}


/* --- NEW: Subscribe Banner Styles --- */
.subscribe-banner {
    background-color: var(--primary-color);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.subscribe-banner h3 {
    font-family: 'Poppins', var(--font-family);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.subscribe-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 0 1.5rem;
}

.subscribe-btn {
    background-color: var(--secondary-color); /* Amber button */
    color: var(--primary-color); /* Dark text */
    text-decoration: none;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subscribe-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(246, 173, 85, 0.3);
}


/* --- NEW: Favorite Button Styles --- */
.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.favorite-btn svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

/* Style for the favorited state */
.favorite-btn.favorited {
    background: var(--accent-color);
    border-color: var(--accent-color);
}
.favorite-btn.favorited svg {
    color: white;
    fill: white;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: white;
}

.favorite-btn.favorited {
    animation: pulse 0.3s ease;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Add position relative to the card so the absolute button is positioned correctly */
.card {
    position: relative;
}

.card {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    to { opacity: 1; }
}
.content-grid .card:nth-child(1) { animation-delay: 0.1s; }
.content-grid .card:nth-child(2) { animation-delay: 0.2s; }
.content-grid .card:nth-child(3) { animation-delay: 0.3s; }
/* Add more as needed */


/* --- NEW: Tag Pill Styles --- */
.card-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
    display: inline-block;
    background-color: var(--background-color);
    color: var(--text-light-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.tag-pill:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* --- Empty State Styles --- */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    background-color: var(--surface-color);
}

.empty-state-icon {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-light-color);
    max-width: 450px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.empty-state-cta {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.empty-state-cta:hover {
    background-color: #1a202c;
    transform: translateY(-2px);
}

