:root {
    --primary-color: #0d47a1;
    --secondary-color: #f4f6f8;
    --font-color: #333333;
    --grey-color: #6c757d;
    --border-color: #e0e0e0;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Poppins', sans-serif;
    --container-width: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--font-color); background-color: #ffffff; line-height: 1.7; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; color: #222222; }

.hidden { display: none !important; }

/* HEADER */
.header { background-color: #fff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.header-content { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary-color); cursor: pointer;}
.main-nav ul { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; }
.main-nav a { font-size: 15px; font-weight: 500; padding: 5px 0; position: relative; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.main-nav a:hover, .main-nav a.active { color: var(--primary-color); }
.main-nav > ul > li > a.nav-link::after { content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background-color: var(--primary-color); transition: width 0.3s ease-in-out; }
.main-nav > ul > li > a.nav-link:hover::after, .main-nav > ul > li > a.nav-link.active::after { width: 100%; }
.hamburger-menu { display: none; font-size: 24px; background: none; border: none; cursor: pointer; color: var(--font-color); }

/* HERO SLIDER */
.hero-slider { margin-top: 25px; position: relative; max-width: 100%; overflow: hidden; border-radius: 12px; }
.slide { display: none; cursor: pointer; }
.slide.active { display: block; animation: fade 0.8s ease-in-out; }
@keyframes fade { from { opacity: .4 } to { opacity: 1 } }
.hero-article { display: block; position: relative; color: #fff; }
.hero-article img { width: 100%; height: 500px; object-fit: cover; }
.hero-article::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 20%, rgba(0,0,0,0) 70%); }
.hero-article-content { position: absolute; bottom: 0; left: 0; padding: 40px; z-index: 2; }
.hero-article h2 { font-size: 2.2rem; line-height: 1.3; margin-top: 10px; color: #fff; max-width: 90%; }
.category-tag { background-color: var(--primary-color); color: #fff; padding: 6px 12px; font-size: 12px; font-weight: 700; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 16px; margin-top: -30px; color: white; font-weight: bold; font-size: 24px; transition: 0.3s ease; border-radius: 0 5px 5px 0; user-select: none; background-color: rgba(0,0,0,0.3); z-index: 3; }
.next { right: 0; border-radius: 5px 0 0 5px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.6); }
.dots-container { text-align: center; padding: 10px; position: absolute; bottom: 20px; width: 100%; z-index: 3; }
.dot { cursor: pointer; height: 12px; width: 12px; margin: 0 5px; background-color: rgba(255,255,255,0.5); border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; }
.dot.active, .dot:hover { background-color: rgba(255,255,255,1); }

.main-layout { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; margin-top: 40px; }
.section-title { font-size: 24px; padding-bottom: 10px; margin-bottom: 25px; border-bottom: 3px solid var(--primary-color); display: inline-block; }
.articles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.article-card { background: #fff; border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; cursor: pointer;}
.article-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.article-card img { width: 100%; height: 220px; object-fit: cover; pointer-events: none;}
.article-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; pointer-events: none;}
.article-content h3 { font-size: 1.25rem; line-height: 1.4; margin: 10px 0; color: #333; flex-grow: 1; }
.article-meta { font-size: 13px; color: var(--grey-color); margin-top: auto; }

/* TAMPILAN DETAIL ARTIKEL */
.article-view-container { padding-top: 25px; padding-bottom: 25px; }
.article-view-content { max-width: 800px; margin: 0 auto; }
#back-button { display: inline-flex; align-items: center; gap: 8px; background-color: var(--secondary-color); border: 1px solid var(--border-color); padding: 10px 20px; border-radius: 50px; font-weight: 500; font-size: 16px; cursor: pointer; margin-bottom: 20px; transition: background-color 0.3s ease; }
#back-button:hover { background-color: #ddd; }
.article-view-content #article-detail-image { width: 100%; height: auto; max-height: 450px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.article-view-content #article-detail-title { font-size: 2.5rem; line-height: 1.3; margin: 20px 0; }
.article-view-content #article-detail-meta { color: var(--grey-color); margin-bottom: 30px; }
.article-view-content #article-detail-body { font-size: 1.1rem; line-height: 1.8; color: #333; }
.article-view-content #article-detail-body p { margin-bottom: 20px; }

/* SIDEBAR */
.sidebar .widget { background-color: var(--secondary-color); padding: 25px; border-radius: 8px; margin-bottom: 30px; }
.widget-title { font-size: 20px; padding-bottom: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.widget-list li { padding: 10px 0; border-bottom: 1px dashed var(--border-color); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { font-weight: 500; cursor: pointer; }
.widget-list a:hover { color: var(--primary-color); }
.widget-popular-list li a { display: flex; align-items: flex-start; gap: 15px; padding: 12px 0; border-bottom: 1px dashed var(--border-color); cursor: pointer;}
.widget-popular-list li:last-child a { border-bottom: none; }
.widget-popular-list span { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--primary-color); line-height: 1; opacity: 0.7; }
.widget-popular-list li a:hover { color: var(--primary-color); }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 50%; background-color: #fff; border: 1px solid var(--border-color); color: var(--grey-color); transition: all 0.3s ease; }
.social-links a:hover { color: #fff; background-color: var(--primary-color); border-color: var(--primary-color); }

/* FOOTER */
.footer { background-color: #1c1c1c; color: #cccccc; padding: 60px 0 0; margin-top: 50px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer h3 { color: #ffffff; margin-bottom: 20px; font-size: 18px; }
.footer-logo { font-family: var(--font-body); font-weight: 700; font-size: 22px; }
.footer p { font-size: 15px; line-height: 1.8; max-width: 350px; }
.footer-section.links ul li { margin-bottom: 10px; }
.footer-section.links a:hover { color: #ffffff; padding-left: 5px; }
.footer-section.social .social-links-footer a { margin-right: 15px; font-size: 18px; }
.footer-section.social .social-links-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333333; text-align: center; padding: 25px 0; font-size: 14px; color: #aaaaaa; }

@media (max-width: 1150px) {
     .main-nav ul { gap: 15px; }
     .main-nav a { font-size: 14px; }
}
@media (max-width: 992px) { 
    .main-layout { grid-template-columns: 1fr; } 
    .articles-grid { grid-template-columns: 1fr 1fr; } 
    .main-nav { display: none; }
    .hamburger-menu { display: block; }
    .main-nav.active { display: block; position: absolute; top: 70px; left: 0; width: 100%; background-color: #ffffff; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border-top: 1px solid var(--border-color);}
    .main-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
    .main-nav li { border-bottom: 1px solid var(--border-color); }
    .main-nav li:last-child { border-bottom: none; }
    .main-nav a { display: block; padding: 15px 20px; }
    .main-nav > ul > li > a.nav-link::after { display: none; }
}
@media (max-width: 767px) { 
    .articles-grid { grid-template-columns: 1fr; } 
    .footer-content { grid-template-columns: 1fr; text-align: center; } 
    .footer-content .footer-section.about p { margin: 0 auto; } 
    .social-links-footer { justify-content: center; } 
    .article-view-container { padding-left: 15px; padding-right: 15px; } 
    .article-view-content #article-detail-title { font-size: 1.8rem; line-height: 1.4; }
    .article-view-content #article-detail-body { font-size: 1rem; }
}
