/* ===== AI News Section Styles ===== */
/* Extends main styles.css with news-specific styling */

/* ===== News Layout ===== */
.news-main {
    min-height: calc(100vh - 300px);
    padding-top: 80px;
}

/* ===== News Hero Section ===== */
.news-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.news-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.news-hero-content {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.news-hero .section-tag {
    color: var(--accent-light);
    margin-bottom: 0.75rem;
    display: inline-block;
}

.news-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.news-hero-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 0.5rem;
}

.news-date {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* ===== Date Navigation ===== */
.date-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.date-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all var(--transition-normal);
    font-size: 0.875rem;
    font-weight: 500;
}

.date-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.date-nav-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.date-nav-link svg {
    width: 16px;
    height: 16px;
}

.date-nav-today {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
}

.date-nav-today:hover {
    background: var(--accent-dark);
}

/* ===== News Content - Sidebar Layout ===== */
.news-content {
    padding: 2rem 0 3rem;
    background: var(--bg-secondary);
}

.news-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Sidebar ===== */
.news-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.category-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav-item {
    margin-bottom: 0.25rem;
}

.category-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.category-nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.category-nav-link.active {
    background: var(--accent-color);
    color: white;
}

.category-nav-link.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-count {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-light);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

/* Top Stories link special styling */
.category-nav-link.top-stories {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.875rem;
}

/* ===== Main Content Area ===== */
.news-articles {
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.content-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.article-count-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===== Articles Grid ===== */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== Article Cards ===== */
.article-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.article-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.article-rank {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 28px;
}

/* ===== Category Badges ===== */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-writing-docs { background: #e0f2fe; color: #0369a1; }
.category-coding-dev { background: #dcfce7; color: #15803d; }
.category-research-analysis { background: #f3e8ff; color: #7c3aed; }
.category-creative-media { background: #fef3c7; color: #b45309; }
.category-productivity { background: #ffe4e6; color: #be123c; }
.category-industry { background: #e0e7ff; color: #4338ca; }

/* ===== Article Content ===== */
.article-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.625rem;
}

.article-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.article-title a:hover {
    color: var(--accent-color);
}

.article-summary {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* ===== Key Points ===== */
.key-points {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.key-points h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.key-points ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-points li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.key-points li:last-child {
    margin-bottom: 0;
}

.key-points li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.75rem;
}

/* ===== Article Meta ===== */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.article-source {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
}

/* ===== Workflow Tags ===== */
.workflow-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.workflow-tag {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* ===== No Articles State ===== */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.no-articles-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    color: var(--text-light);
}

.no-articles h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-articles p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== Footer Logo Fix ===== */
.footer-logo {
    height: 50px;
    width: auto;
    display: inline-block;
}

.footer-logo img {
    height: 50px;
    width: auto;
    max-width: 100%;
}

/* ===== Archive Footer ===== */
.news-archive-section {
    padding: 2rem 0;
    background: white;
    border-top: 1px solid var(--border-color);
}

.archive-cta {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.archive-cta h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.archive-cta p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
    
    .news-sidebar {
        position: static;
        order: -1;
    }
    
    .sidebar-card {
        padding: 1rem;
    }
    
    .category-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .category-nav-item {
        margin-bottom: 0;
    }
    
    .category-nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
        border: 1px solid var(--border-color);
        border-radius: 20px;
    }
    
    .category-nav-link.top-stories {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 640px) {
    .news-hero {
        padding: 2rem 0 1.5rem;
    }
    
    .news-hero-title {
        font-size: 1.75rem;
    }
    
    .date-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .date-nav-link span {
        display: none;
    }
    
    .article-card {
        padding: 1.25rem;
    }
    
    .article-card-header {
        flex-wrap: wrap;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ===== Daily Summary Box ===== */
.daily-summary-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.daily-summary-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(193, 127, 62, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.daily-summary-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    position: relative;
}

.daily-summary-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    margin: 0;
}

/* Daily Summary with Image Layout - Float for text wrapping */
.daily-summary-image {
    float: left;
    width: 200px;
    margin: 0 1.5rem 1rem 0;
}

.daily-summary-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Clear float after box */
.daily-summary-box::after {
    content: '';
    display: table;
    clear: both;
}

@media (max-width: 640px) {
    .daily-summary-box {
        padding: 1.5rem;
    }
    
    .daily-summary-title {
        font-size: 1.25rem;
    }
    
    .daily-summary-text {
        font-size: 1rem;
    }
    
    .daily-summary-image {
        float: none;
        display: block;
        width: 140px;
        margin: 0 auto 1rem auto;
    }
    
    .daily-summary-box.has-image {
        text-align: center;
    }
}
