/* Mengimpor font modern 'Plus Jakarta Sans' dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Palet warna yang lebih modern dan fresh */
    --primary-color: #4F46E5; 
    --hover-color: #4338CA;
    --accent-color: #F43F5E;  
    --bg-color: #F8FAFC;      
    --card-bg: #FFFFFF;
    --text-main: #1E293B;     
    --text-muted: #64748B;
    --border-color: #E2E8F0;

    /* Variabel tambahan untuk UI kekinian */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* --- HEADER PORTAL artikel --- */
header {
    background-color: var(--card-bg);
}

.top-bar {
    background-color: var(--primary-color);
    color: #E0E7FF;
    font-size: 0.85rem;
    padding: 0.6rem 0;
    font-weight: 500;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar span {
    color: #FFF;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.header-main {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* Navigasi Full Width dengan Efek Glassmorphism */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.main-nav .container {
    display: flex;
    gap: 1rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: rgba(79, 70, 229, 0.04);
}

/* --- LAYOUT UTAMA --- */
.news-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2.5rem;
    padding: 1rem 0 3rem; /* padding atas dikurangi karena ada leaderboard iklan */
}

.section-block h2 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-block h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 28px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 4px;
}

.grid-container {
    display: grid;
    /* Ganti baris di bawah ini */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 1.5rem;
    margin-bottom: 2rem; /* jarak buat iklan in-feed */
}

/* --- KARTU artikel (CARDS) --- */
.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Bikin gambar jadi kotak sempurna ala IG */
    height: auto; /* Timpa aturan height 200px sebelumnya */
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img {
    transform: scale(1.08); 
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    z-index: 1; /* biar efek zoom gambar tetep di bawah konten */
}

.category-tag {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.card-content h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.card-content h3 a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.card-content h3 a:hover {
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* --- SIDEBAR --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.widget {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.widget-list {
    list-style: none;
}

.widget-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.widget-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget-list a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    display: block;
    transition: var(--transition);
}

.widget-list a:hover {
    color: var(--primary-color);
    transform: translateX(6px); 
}

/* --- KELAS IKLAN (ADS) BARU --- */
.ad-space a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.ad-space img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Kunci agar foto full, tidak terpotong, dan rasio terjaga */
    border-radius: var(--radius-sm); /* Opsional: menyamakan lengkungan sudut dengan container */
}

.ad-space {
    background-color: #E2E8F0;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px dashed #CBD5E1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.ad-space:hover {
    background-color: #CBD5E1;
}

.ad-header { width: 300px; height: 90px; }
.ad-leaderboard { width: 100%; height: 90px; margin: 2rem auto 0 auto; }
.ad-infeed { width: 100%; height: 120px; }
.ad-sidebar { width: 100%; height: 250px; }

/* Responsif Mobile Layout & Ads */
@media (max-width: 900px) {
    .news-layout {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .main-nav .container {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Penyesuaian Iklan untuk Mobile */
    .ad-header { width: 100%; }
    .ad-leaderboard { height: 75px; margin: 1.5rem auto 0 auto; }
    .ad-sidebar { height: auto; padding: 3rem 1rem; } 
    .ad-infeed { height: auto; padding: 2rem 1rem; }
}

/* --- FOOTER PORTAL artikel --- */
.site-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo img {
    height: 50px; 
    margin-bottom: 1.5rem;
}

.branding-col p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-color);
    color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    background-color: var(--bg-color);
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .bottom-flex {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-col h4::after {
        width: 50px;
    }
}
/* --- FILTER BUTTON & HEADER WRAP --- */
.section-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* --- MODAL POPUP FILTER --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 480px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--bg-color);
    color: var(--accent-color);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.input-with-icon input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-color);
    transition: border-color 0.2s;
    appearance: none;
}

.input-with-icon input {
    padding-left: 40px;
}

.form-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2364748B" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
    cursor: pointer;
}

.input-with-icon input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background-color: var(--bg-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.btn-outline, .btn-primary {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    background: white;
    color: var(--text-main);
    border-color: var(--text-muted);
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--hover-color);
    border-color: var(--hover-color);
}
/* --- SEARCH BOX ARTIKEL --- */
.search-box {
    width: 100%;
    max-width: 320px;
}

.search-box input[type="search"] {
    border-radius: 50px; /* Memberikan kesan modern dan melengkung */
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Penyesuaian Responsif untuk Header Section */
@media (max-width: 768px) {
    .section-header-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .search-box {
        max-width: 100%;
    }
}
/* --- DOPAMINE SAWERIA BUTTON --- */
.dopamine-saweria-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 28px;
    /* Gradasi yang terasa lebih 'cair' dan hidup */
    background: linear-gradient(135deg, #FF7A00 0%, #FF004D 100%);
    border-radius: 50px;
    text-decoration: none;
    z-index: 9999;
    overflow: hidden;
    transform: scale(1);
    /* Transisi dibuat lebih membal (bouncy) */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    /* Glow yang lebih dramatis namun soft */
    box-shadow: 0 10px 25px rgba(255, 0, 77, 0.3), 
                inset 0 2px 0 rgba(255, 255, 255, 0.3);
    /* Animasi idle mengambang, BUKAN berdenyut keras */
    animation: floatingIdle 4s ease-in-out infinite;
}

.saweria-content {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.saweria-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.saweria-icon {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sparkle-star {
    animation: starPulse 2s infinite alternate;
}

/* Efek Kilauan (Sweep Shine) */
.saweria-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    z-index: 1;
    transition: left 0.7s ease;
}

/* INTERAKSI HOVER: Memicu Antisipasi (Dopamin) */
.dopamine-saweria-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 20px 35px rgba(255, 0, 77, 0.5), 
                inset 0 2px 0 rgba(255, 255, 255, 0.5);
    animation: none; /* Hentikan float saat di-hover */
}

.dopamine-saweria-btn:hover .saweria-shine {
    left: 200%; /* Kilauan lari cepat saat kursor mendekat */
}

.dopamine-saweria-btn:hover .saweria-icon {
    transform: rotate(-15deg) scale(1.2); /* Ikon bereaksi ceria */
}

.dopamine-saweria-btn:hover .saweria-text {
    transform: translateX(4px);
}

/* INTERAKSI ACTIVE: Memicu Kepuasan Taktil (Sensory Feedback) */
.dopamine-saweria-btn:active {
    transform: scale(0.92) translateY(2px);
    box-shadow: 0 5px 10px rgba(255, 0, 77, 0.4), 
                inset 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Keyframes Baru */
@keyframes floatingIdle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes starPulse {
    0% { transform: scale(0.8); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 1; }
}

@media (max-width: 480px) {
    .dopamine-saweria-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }
    .saweria-text { font-size: 14px; }
    .saweria-icon { width: 22px; height: 22px; }
}
/* Penyesuaian khusus untuk dropdown filter agar mirip tombol */
select.filter-btn {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%2364748B" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
    background-color: var(--card-bg);
}
/* Styling untuk nama perusahaan dan badge terverifikasi */
.perusahaan-nama {
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: -2px; /* Menyesuaikan agar sejajar vertikal dengan teks */
}
/* --- FOOTER LEGAL & SECURITY INFO --- */
.footer-legal-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Posisi di kanan untuk desktop */
    text-align: right;
    gap: 12px;
}

.komdigi-security-img {
    max-width: 180px; /* Ukuran default desktop */
    height: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.footer-legal-info p {
    margin: 0;
    line-height: 1.5;
}

.security-badges-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 4px;
}

.security-badges-row img {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
    transition: var(--transition);
}

.security-badges-row img:hover {
    transform: translateY(-2px);
}

/* Penyesuaian Responsif (Layar HP) - Sudah Digabung & Dirapikan */
@media (max-width: 768px) {
    /* Ruang ekstra di bawah agar tidak tertimpa tombol Saweria */
    .footer-bottom {
        padding-bottom: 90px;
    }
    
    /* Perkecil logo Komdigi di layar HP */
    .komdigi-security-img {
        max-width: 120px; 
    }

    /* Pusatkan semua elemen legal ke tengah */
    .footer-legal-info {
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    /* Cegah teks nomor/link PSE terpotong atau keluar batas layar */
    .footer-legal-info p,
    .footer-legal-info a {
        word-break: break-word;
    }
    
    /* Pusatkan barisan 3 logo keamanan */
    .security-badges-row {
        justify-content: center;
        flex-wrap: wrap;
    }
}