/* ==============================
   Modern News Portal CSS
   ============================== */

:root {
    --primary-color: #5a3f85; /* Ungu modern */
    --accent-color: #9c6cd2;
    --text-dark: #1c1c1c;
    --text-gray: #555555;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-gray: #f9f9f9;
    --border-color: #e2e2e2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ==============================
   PAGE WRAPPER
   ============================== */
.page-wrapper {
    padding: 50px 20px 80px;
}

.container-news {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==============================
   LAYOUT GRID
   ============================== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.content-area {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ==============================
   SECTION HEADER
   ============================== */
.section-header h2 {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.header-line {
    height: 4px;
    width: 70px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-bottom: 25px;
}

/* ==============================
   NEWS LIST
   ============================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    background: var(--bg-white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.news-link {
    display: flex;
    flex-direction: row;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.news-thumbnail {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f0f0;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-item:hover .news-thumbnail img {
    transform: scale(1.05);
}

.news-body {
    flex: 1;
}

.news-title {
    font-family: 'Lora', serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.news-link:hover .news-title {
    color: var(--primary-color);
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==============================
   TAGS
   ============================== */
.tag-wrapper {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-label {
    background: linear-gradient(135deg, #a084f5, #5a3f85);
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 16px;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tag-label:hover {
    transform: scale(1.1);
    opacity: 0.9;
    cursor: pointer;
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.widget-title {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==============================
   AD WIDGET
   ============================== */
.ad-placeholder {
    background: #f0f0f0;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px dashed #ddd;
    font-weight: 500;
    color: #999;
}

/* ==============================
   PAGINATION
   ============================== */
.pagination-area {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-item .page-link {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    padding: 8px 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-area {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .news-link {
        flex-direction: column;
    }

    .news-thumbnail {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .container-news {
        padding: 0 15px;
    }

    .content-area {
        padding: 20px;
    }

    .news-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .news-excerpt {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }
}
