/* =================================================================== */


/* FILE: css/style.css                                               */


/* FUNGSI: Stylesheet Terpusat untuk Halaman Publik (User)           */


/* DITULIS ULANG DAN DIRAPIKAN                                       */


/* =================================================================== */


/* --- 1. Gaya Dasar & Layout --- */

html,
body {
    height: 100%;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    /* Mendorong footer ke bawah */
}


/* --- 2. Komponen Header & Footer --- */

.main-header {
    background: linear-gradient(135deg, #1f1f1f, #000000);
}

.nav-link {
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #00ffc8 !important;
    transform: translateY(-2px);
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    background: #00ffc8;
    transition: width 0.3s ease;
    bottom: 0;
    left: 0;
}

.link-underline:hover::after {
    width: 100%;
}

.footer {
    background: linear-gradient(135deg, #1f1f1f, #000000);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    color: #f1f1f1;
    flex-shrink: 0;
}

.social-icons a img {
    filter: invert(100%);
    transition: transform 0.2s ease;
}

.social-icons a:hover img {
    transform: scale(1.2);
}

.footer hr {
    opacity: 0.2;
}


/* --- 3. Komponen Umum (Digunakan di banyak halaman) --- */

.hero-section {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: 0 0 2rem 2rem;
    margin-bottom: 40px;
}

.section-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    text-align: left;
    /* Default rata kiri */
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #28a745;
}


/* Base style untuk semua kartu konten */

.content-card {
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}


/* --- 4. Gaya Spesifik Per Halaman --- */


/* Halaman Index (Beranda) */

.search-container {
    max-width: 600px;
    margin: 20px auto 0;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 12px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box button {
    background-color: #f8f9fa;
    color: #1e7e34;
    border: none;
    padding: 0 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box button:hover {
    background-color: #1e7e34;
    color: white;
}

.blog-card {
    height: 100%;
    margin-bottom: 30px;
}

.blog-cover {
    height: 220px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-cover {
    transform: scale(1.03);
}

.card-text-ellipsis {
    color: #6c757d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Halaman Detail Postingan & Profil */

.post-cover {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 25px;
}

.post-content p,
.profile-content div {
    font-size: 1.1rem;
    line-height: 1.7;
}

.profile-content strong {
    color: #1e7e34;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}


/* Halaman Pendaftaran */

.form-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid #eee;
}

.form-section legend {
    font-weight: 600;
    color: #1e7e34;
    padding: 0 15px;
    font-size: 1.5rem;
}

.lampiran-list {
    background-color: #e9f5ee;
    border-left: 5px solid #28a745;
    border-radius: 0.5rem;
    padding: 20px;
    margin-top: 20px;
}

.lampiran-list li {
    margin-bottom: 8px;
    font-weight: 500;
}


/* Halaman Login */

.login-container {
    max-width: 450px;
    margin: -50px auto 50px;
    position: relative;
    z-index: 10;
}

.login-card {
    padding: 2.5rem;
}

.login-title {
    color: #1e7e34;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #28a745;
}

.btn-login {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #1e7e34;
    border-color: #1c7430;
    transform: translateY(-2px);
}


/* Halaman Cek Nilai */

.result-card {
    margin-bottom: 30px;
}

.result-card .card-header {
    background-color: #28a745;
}


/* --- 5. Media Queries (Responsif) --- */

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
    }
    .blog-cover {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    .blog-cover {
        height: 160px;
    }
    .login-container {
        margin-top: -30px;
        padding: 0 15px;
    }
    .login-card {
        padding: 1.5rem;
    }
}


/* ====================================================== */


/* GAYA TAMBAHAN KHUSUS UNTUK HALAMAN KONTAK (kontak.php) */


/* ====================================================== */

.contact-form-container {
    max-width: 750px;
    margin: 0 auto;
}

.contact-form-container legend {
    font-weight: 600;
    color: #1e7e34;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}


/* ====================================================== */


/* GAYA TAMBAHAN UNTUK HALAMAN DETAIL POSTINGAN           */


/* ====================================================== */

.post-cover {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 0.75rem;
    /* Menyamakan dengan radius kartu */
    margin-bottom: 1.5rem;
}

.post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    /* Spasi antar baris agar lebih nyaman dibaca */
    text-align: justify;
    color: #343a40;
}