/* --- Variabel Warna & Reset Dasar --- */
:root {
    --blue-light: #4e95ff;
    --blue-dark: #0d6efd;
    --text-dark: #343a40;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--bg-light); 
    color: var(--text-dark); 
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 600;
}

/* --- Header & Navigasi --- */
header {
    background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}


.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

header nav a.active {
    background-color: white;
    color: var(--blue-dark);
    font-weight: 500;
}

/* --- Hero Section (Slider) --- */
.hero {
    position: relative;
    height: 400px; /* Dikurangi untuk mobile */
    width: 100%;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    animation: fadeEffect 18s infinite;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; } 
.hero-slide:nth-child(5) { animation-delay: 24s; }

@keyframes fadeEffect {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

.hero-overlay {
    position: absolute;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    padding: 30px 15px; /* Padding dikurangi untuk mobile */
    border-radius: 10px;
    max-width: 90%; /* Batas lebar untuk mobile */
}

.hero h1 {
    font-size: 36px; /* Dikurangi untuk mobile */
    margin-bottom: 10px;
}

.hero p {
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* --- Main Content --- */
.page-section {
    padding: 60px 0; /* Dikurangi untuk mobile */
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
    padding: 0 15px; /* Padding untuk mobile */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kolom untuk web */
    gap: 20px;
    max-width: 900px; /* bisa disesuaikan */
    margin: 0 auto;
}

.stat-card {
    background: white;
    padding: 25px 15px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 36px;
    color: var(--blue-dark);
    margin-bottom: 5px;
}

.stat-card p {
    color: #6c757d;
    font-size: 14px;
}



/* --- Tombol (Button) --- */
.btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
    color: white;
    padding: 12px 25px; /* Padding dikurangi sedikit */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    font-size: 14px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn.btn-secondary {
    background: #6c757d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Kartu Berita Terbaru --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Dikurangi min-width */
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.post-card-img {
    width: 100%;
    height: 160px; /* Dikurangi untuk mobile */
    object-fit: cover;
}

.post-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card-content {
    padding: 20px 15px; /* Padding dikurangi */
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

/* --- Halaman Header --- */
.page-header {
    padding: 15px 15px; /* Kurangi padding untuk tampil lebih rapat */
    background: var(--text-dark);
    color: white;
    text-align: center;
    margin-top: 10px; /* Menambahkan margin top jika diperlukan */
}

.page-header h1 {
    font-size: 20px; /* Kurangi font-size untuk tampilan mobile */
    margin-bottom: 10px; /* Kurangi jarak bawah untuk lebih rapat */
}

/* --- Layout Halaman Profil --- */
.profile-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-sidebar {
    flex: 0 0 250px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 15px;
    position: sticky;
    top: 100px;
}

.profile-sidebar ul {
    list-style: none;
}

.profile-sidebar li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
}

.profile-sidebar li a:hover {
    background-color: var(--bg-light);
}

.profile-sidebar li a.active {
    background-color: var(--blue-dark);
    color: white;
}

.profile-content {
    flex: 1;
    background: white;
    padding: 30px 20px; /* Padding dikurangi untuk mobile */
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.profile-content h2 {
    margin-top: 0;
    font-size: 24px; /* Dikurangi untuk mobile */
    color: var(--text-dark);
    border-bottom: 2px solid var(--blue-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.profile-content h3 {
    font-size: 20px; /* Dikurangi untuk mobile */
    color: var(--text-dark);
    margin-top: 25px;
    margin-bottom: 10px;
}

/* --- Halaman Detail Artikel --- */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px 20px; /* Padding dikurangi untuk mobile */
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.article-meta {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 25px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 25px;
}

.article-content {
    line-height: 1.7;
    font-size: 15px;
}

/* --- Halaman Formulir --- */
.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px 20px; /* Padding dikurangi untuk mobile */
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-wrapper h4 {
    margin-top: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 14px;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* --- Halaman Kontak --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Dikurangi min-width */
    gap: 30px;
    align-items: flex-start;
}

.contact-info h4, .contact-form-wrapper h4 {
    font-size: 20px; /* Dikurangi untuk mobile */
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 14px;
}

.contact-info iframe {
    margin-top: 20px;
    border-radius: 10px;
    width: 100%;
    height: 200px; /* Tinggi dikurangi untuk mobile */
}

/* --- Footer Modern --- */
footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 0 0; /* Padding dikurangi */
    margin-top: 40px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Dikurangi min-width */
    gap: 30px;
    padding-bottom: 30px;
}

.footer-col h4 {
    color: white;
    font-size: 16px; /* Dikurangi untuk mobile */
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px; /* Dikurangi untuk mobile */
    height: 2px;
    background: var(--blue-dark);
}

.footer-col p {
    margin-bottom: 8px;
    font-size: 13px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    font-size: 13px;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0; /* Dikurangi untuk mobile */
    text-align: center;
    font-size: 12px;
}

/* --- Konten Profil --- */
.konten-apa-adanya {
    white-space: pre-line;
    line-height: 1.7;
    font-size: 15px; /* Dikurangi untuk mobile */
    color: var(--text-dark);
}

.konten-apa-adanya ol, 
.konten-apa-adanya ul {
    margin: 12px 0 12px 20px; /* Dikurangi untuk mobile */
    padding-left: 15px;
}

.konten-apa-adanya li {
    margin-bottom: 6px;
}

/* --- Numbering list di Mobile --- */
@media (max-width: 767px) {
    .konten-apa-adanya ol {
        list-style-type: decimal;
        list-style-position: outside;
        padding-left: 25px; /* lebih lebar supaya angka tidak terlalu mepet */
        margin-left: 0;
    }

    .konten-apa-adanya ol li {
        margin-bottom: 10px; /* jarak antar item lebih lega */
        line-height: 1.6;
    }

    /* Angka numbering lebih besar & tebal */
    .konten-apa-adanya ol li::marker {
        font-weight: bold;
        font-size: 1.1em;
        color: var(--blue-dark);
    }
}


/* --- RESPONSIVE BREAKPOINTS --- */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .profile-layout {
        flex-direction: column;
    }
    
    .profile-sidebar {
        width: 100%;
        position: static;
        flex: none;
    }
    
    .profile-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .profile-sidebar li {
        flex: 0 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    header nav {
        justify-content: center;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .hero-overlay {
        padding: 20px 10px;
    }
    
    .page-section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 10px;
    }
    
    .stat-card h3 {
        font-size: 28px;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .page-header {
        padding: 30px 15px;
    }
    
    .page-header h1 {
        font-size: 26px;
    }
    
    .profile-content {
        padding: 25px 15px;
    }
    
    .profile-content h2 {
        font-size: 22px;
    }
    
    .article-container {
        padding: 25px 15px;
    }
    
    .article-content {
        font-size: 14px;
    }
    
    .form-wrapper {
        padding: 25px 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: left;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Mobile Small (≤ 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    header nav a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .hero {
        height: 250px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card h3 {
        font-size: 24px;
    }
    
    .stat-card p {
        font-size: 12px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .profile-sidebar ul {
        display: block;
    }
    
    .profile-content h2 {
        font-size: 20px;
    }
    
    .profile-content h3 {
        font-size: 18px;
    }
    
    .article-container {
        padding: 20px 10px;
    }
    
    .form-wrapper {
        padding: 20px 10px;
    }
    
    .contact-info iframe {
        height: 180px;
    }
}