/* =========================================
   NEWS & MEDIA LAYOUT (Professional Style)
   ========================================= */

/* --- Layout Grid --- */
.news-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    /* Main Content + Sidebar */
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Typography & Text --- */
.news-title {
    font-family: var(--font-heading, serif);
    /* Use serif for that "newspaper" feel if avail, else fallback */
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Badges & Categories --- */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.cat-event {
    background: #e0f2fe;
    color: #0284c7;
}

.cat-artikel {
    background: #fef3c7;
    color: #d97706;
}

.cat-program {
    background: #dcfce7;
    color: #16a34a;
}

.cat-ekonomi {
    background: #fae8ff;
    color: #a855f7;
}

/* --- News Cards (Grid) --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.news-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.1);
}

.news-card__thumb {
    height: 200px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}

.news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card__img {
    transform: scale(1.05);
}

.news-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Featured Big Card (Visual) --- */
.hero-news {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    aspect-ratio: 21/9;
}

.hero-news__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-news__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 40px;
    color: white;
}

/* --- Sidebar Components --- */
.sidebar-widget {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popular-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.popular-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.popular-ref {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-text-primary);
}

.popular-ref:hover {
    color: var(--color-primary);
}

/* Infographic Box */
.info-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.info-box::before {
    content: '"';
    font-family: serif;
    font-size: 10rem;
    position: absolute;
    top: -40px;
    left: 10px;
    color: rgba(255, 255, 255, 0.05);
}

/* Newsletter Minimal */
.newsletter-mini input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Responsive fixes */
@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero-news {
        aspect-ratio: 16/9;
    }
}

/* --- Toolbar / Navigation (Redesign) --- */
.news-tabs {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.news-tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    /* Safe wrapping for mobile */
}

/* Tabs */
.news-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.news-menu .tab {
    position: relative;
    text-decoration: none;
    color: #64748b;
    /* slate-500 */
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 0;
    transition: all 0.3s ease;
    border-bottom: none !important;
    /* Override inline styles if any */
}

.news-menu .tab:hover {
    color: var(--color-primary);
}

.news-menu .tab.active {
    color: var(--color-primary);
}

.news-menu .tab.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    /* Align with container bottom padding + border */
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 10px var(--color-primary-glow, rgba(0, 0, 0, 0.2));
}

/* Actions (Search + Filter Pill) */
.news-actions {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 100px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.news-actions:focus-within {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

/* Search Input */
.news-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.news-search-box input {
    border: none;
    background: transparent;
    padding: 8px 12px 8px 36px;
    font-size: 0.9rem;
    width: 180px;
    outline: none;
    color: var(--color-text-primary);
    border-radius: 20px;
    transition: width 0.3s ease;
}

.news-search-box input::placeholder {
    color: #94a3b8;
}

.news-search-box input:focus {
    width: 240px;
    /* Expand on focus */
}

.news-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Divider between search and select */
.action-divider {
    width: 1px;
    height: 24px;
    background: #cbd5e1;
    margin: 0 4px;
}

/* Select Box */
.news-sort-select {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    outline: none;
    border-radius: 20px;
    transition: background 0.2s;
}

.news-sort-select:hover {
    background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 768px) {
    .news-tabs {
        padding: 12px 0;
    }

    .news-search-box input {
        width: 120px;
    }

    .news-search-box input:focus {
        width: 160px;
    }

    .news-menu {
        gap: 20px;
    }
}