/* --- Variabel Warna & Reset Dasar --- */
:root {
    --blue-light: #ffffff;
    --blue-dark: #ffffff;
    --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);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #000000; /* Hitam */
    text-decoration: none;
}

header nav a {
    color: black;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

header nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

header nav a.active {
    background-color: black;
    color: var(--white-dark);
    font-weight: 500;
}
/* --- Hero Section (Slider) --- */
.hero {
    position: relative; /* Diperlukan untuk menumpuk elemen */
    height: 500px;
    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; /* Semua slide disembunyikan awalnya */
    animation: fadeEffect 18s infinite; /* Durasi total animasi (6s per foto * 3 foto) */
    transition: opacity 1.5s ease-in-out;
}

/* Memberi jeda animasi untuk setiap slide agar tidak bersamaan */
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
/* Tambahkan jika ada slide ke-4 atau ke-5 */
.hero-slide:nth-child(4) { animation-delay: 18s; } 
.hero-slide:nth-child(5) { animation-delay: 24s; }

@keyframes fadeEffect {
  0% { opacity: 0; }
  15% { opacity: 1; } /* Muncul */
  85% { opacity: 1; } /* Bertahan */
  100% { opacity: 0; } /* Menghilang */
}

/* Lapisan gelap agar teks mudah dibaca */
.hero-overlay {
    position: relative; /* z-index hanya bekerja pada elemen yang di-position */
    z-index: 2;
    background: rgba(0, 0, 0, 0.4); /* Lapisan sedikit gelap */
    padding: 40px;
    border-radius: 10px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* --- Main Content --- */
.page-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
}

/* --- Kartu Statistik --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.stat-card {
    background: #000000; 
    color: white; 
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-card h3 {
    font-size: 48px;
    color: var(--blue-dark);
    margin-bottom: 5px;
}

.stat-card p {
    color: #6c757d;
    font-size: 16px;
}

/* --- Tombol (Button) --- */
.btn {
    display: inline-block;
    background: #000000; 
    color: #ffffff; 
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    background: #333333; 
    transform: translateY(-3px);
}


.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(300px, 1fr));
    gap: 30px;
}

.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-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 25px;
}

.post-card-content h4 a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 18px;
}

.post-card-content p {
    font-size: 14px;
    color: #6c757d;
    margin: 10px 0;
}

.post-card-content small {
    color: #adb5bd;
}

/* --- Footer --- */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }
}
/* --- Halaman Header (untuk semua halaman internal) --- */
.page-header {
    padding: 60px 20px;
    background: var(--text-dark);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 40px;
}


/* --- Layout Halaman Profil --- */
.profile-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* Membuat sidebar dan konten sejajar di atas */
}

.profile-sidebar {
    flex: 0 0 250px; /* Lebar sidebar tetap 250px */
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 15px;
    position: sticky; /* Membuat sidebar 'mengikuti' saat di-scroll */
    top: 100px; /* Jarak dari atas (setelah header utama) */
}

.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;
}

.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; /* Konten utama mengisi sisa ruang */
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.profile-content h2 {
    margin-top: 0;
    font-size: 28px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--blue-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.profile-content h3 {
    font-size: 22px;
    color: var(--text-dark);
    margin-top: 30px;
    margin-bottom: 10px;
}

/* --- Responsive untuk Halaman Profil --- */
@media (max-width: 992px) {
    .profile-layout {
        flex-direction: column;
    }
    .profile-sidebar {
        width: 100%;
        position: static; /* Hapus 'sticky' di mobile */
    }
}
/* --- Halaman Detail Artikel --- */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.article-meta {
    text-align: center;
    margin-top: -30px; /* Sedikit naik ke atas header */
    margin-bottom: 30px;
    color: var(--text-light);
    opacity: 0.9;
}
.article-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 30px;
}
.article-content {
    line-height: 1.8;
    font-size: 16px;
}
/* --- Halaman Formulir --- */
.form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.form-wrapper h4 {
    margin-top: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}
.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;
}
.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(350px, 1fr));
    gap: 40px;
    align-items: flex-start;
}
.contact-info h4, .contact-form-wrapper h4 {
    font-size: 22px;
    margin-bottom: 15px;
}
.contact-info p {
    margin-bottom: 10px;
}
.contact-info iframe {
    margin-top: 20px;
    border-radius: 10px;
}
/* --- Footer Modern --- */
footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.7); /* Warna teks abu-abu terang */
    padding: 60px 0 0 0;
    margin-top: 60px; /* Jarak dari konten terakhir di atasnya */
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* Garis bawah dekoratif untuk judul footer */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--blue-dark);
}

.footer-col p {
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* ===== Layout Berita Horizontal ===== */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.post-row {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #000;
}

.post-row.reverse {
    flex-direction: row-reverse;
}

.post-image {
    flex: 1;
}

.post-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.post-content {
    flex: 1;
}

.post-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.post-content h3 a {
    text-decoration: none;
    color: #000;
}

.post-content p {
    color: #444;
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-content small {
    color: #777;
}

/* Responsive */
@media (max-width: 768px) {
    .post-row {
        flex-direction: column !important;
    }

    .post-image img {
        height: 220px;
    }
}

/* ===== Learn More Section ===== */

.learn-section {
    background: #f2f2f2;
    padding: 80px 0;
}

.learn-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
}

.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.learn-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.learn-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.learn-card:hover img {
    transform: scale(1.08);
}

/* Overlay hitam transparan */
.learn-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

/* ===== Footer Modern Clean ===== */

footer {
    background: #f2f2f2;
    color: #333;
    padding: 80px 0 30px 0;
    margin-top: 80px;
    text-align: left; 
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}


.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #000000;
    text-align: left;
}

.footer-col p {
    line-height: 1.7;
    color: #555;
    text-align: left;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    text-decoration: none;
    color: #444;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #000;
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    margin-right: 15px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
    text-align: center; 
}

.learn-more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
}

.contact-info h4,
.contact-form h4 {
    margin-bottom: 20px;
    font-size: 20px;
}

.contact-info p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* WhatsApp Button */
.wa-container {
    margin-top: 30px;
}

.wa-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 14px 25px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
}

.wa-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

/* Animasi Pulse */
.wa-button::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 40px;
    background: rgba(37, 211, 102, 0.4);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    70% { transform: scale(1.2); opacity: 0; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* Form Style */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.contact-form button {
    padding: 12px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.contact-form button:hover {
    background: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ===== Alert Modern ===== */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    font-weight: 500;
    animation: fadeIn 0.4s ease;
}

.alert.success {
    background: #e6f9f0;
    color: #0f5132;
    border-left: 5px solid #25D366;
}

.alert.error {
    background: #fde8e8;
    color: #842029;
    border-left: 5px solid #dc3545;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE IMPROVED ===== */

/* Tablet */
@media (max-width: 992px) {

    .hero {
        height: 400px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-overlay {
        padding: 25px;
    }

    .section-title {
        font-size: 26px;
    }

    .post-row {
        gap: 20px;
    }

    .post-image img {
        height: 250px;
    }

    .learn-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Mobile */
@media (max-width: 768px) {

    /* Header */
    header .container {
        flex-direction: column;
        align-items: center;
    }

    header nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* Hero */
    .hero {
        height: 300px;
        padding: 20px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero-overlay {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Section */
    .page-section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 30px;
    }

    /* Stats */
    .stat-card h3 {
        font-size: 32px;
    }

    /* Post */
    .post-row {
        flex-direction: column !important;
        gap: 20px;
    }

    .post-image img {
        height: 200px;
    }

    .post-content h3 {
        font-size: 18px;
    }

    /* Learn */
    .learn-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .learn-card img {
        height: 140px;
    }

    .learn-overlay {
        font-size: 12px;
        padding: 10px;
    }
}


/* Small Mobile */
@media (max-width: 480px) {

    .hero {
        height: 260px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .hero p {
        font-size: 13px;
    }

    .container {
        padding: 0 15px;
    }

    .learn-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }
}

/* ===== SEARCH RESPONSIVE ===== */

.search-wrapper {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 25px;
}

.search-form {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-form input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border-radius: 30px;
    border: 1px solid #ccc;
    outline: none;
    transition: 0.3s;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
}

/* ===== FIX POST GRID ===== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.post-card-img {
    height: 180px;
}

/* ===== RESPONSIVE ARTICLE ===== */

/* Tablet */
@media (max-width: 992px) {

    .search-form {
        width: 100%;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {

    .search-wrapper {
        justify-content: center;
    }

    .search-form {
        width: 100%;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-card-img {
        height: 200px;
    }

    .post-card-content {
        padding: 20px;
    }

    .post-card-content h4 a {
        font-size: 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {

    .post-card-img {
        height: 180px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-section {
        padding: 40px 0;
    }
}

.article-author {
    font-weight: 600;
    color: #333;
}
