/* Variabel CSS untuk warna utama */
:root {
    --primary-color: #3399ff; /* Biru Muda */
    --hover-color: #0066cc;   /* Biru lebih gelap untuk hover */
    --text-color: #555;
}

/* General Styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

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

/* Header */
.site-header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

.header-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.header-content {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-content h1 {
    font-size: 3rem;
    margin: 0;
}

/* Filter dan Pencarian */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.filter-item {
    display: flex;
    align-items: center;
    max-width: 300px;
}

.filter-item input,
.filter-item select {
    padding: 8px;
    font-size: 1rem;
    width: 200px;
    box-sizing: border-box;
}

.filter-item button {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

.filter-item button:hover {
    background-color: var(--hover-color);
}

/* Total Artikel */
.total-articles {
    text-align: right;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Daftar Artikel */
.articles-section {
    margin-top: 30px;
}

.articles-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.articles-table thead {
    background-color: var(--primary-color);
    color: white;
}

.articles-table th,
.articles-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
}

.articles-table tbody tr:hover {
    background-color: #f1f1f1;
}

.readmore {
    color: #00bcd4; /* Biru muda */
    text-decoration: none; /* Menghilangkan garis bawah */
}

.readmore:hover {
    text-decoration: underline; /* Menambahkan garis bawah saat di-hover */
}

.cover-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.cover-img:hover {
    transform: scale(1.1);
}

.article-link {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-link:hover {
    color: #00b5e2;
    text-decoration: underline;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a,
.btn,
.filter-item button {
    text-decoration: none;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover,
.btn:hover,
.filter-item button:hover {
    background-color: var(--hover-color);
}

.pagination .current {
    padding: 10px 20px;
    background-color: #f1f1f1;
    color: #333;
    border-radius: 5px;
}

/* Tombol Tambah & Edit Artikel */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.btn-container {
    display: flex;
    gap: 20px;
}

.btn i {
    margin-right: 8px;
}

/* Styling untuk mobile */

/* Styling khusus untuk halaman Tambah Artikel */
.add-article-container {
    max-width: 700px;
    margin: 100px auto;
    padding: 40px;
    background: #3399ff; /* Background biru muda */
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: white; /* Tulisan berwarna putih */
}

.add-article-container h1 {
    font-size: 28px;
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.add-article-container label {
    font-weight: bold;
    display: block;
    margin-top: 15px;
    text-align: left;
    font-size: 16px;
    color: white; /* Tulisan label putih */
}

.add-article-container input,
.add-article-container textarea {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 2px solid #ccc; /* Border abu-abu muda */
    border-radius: 10px;
    font-size: 16px;
    background-color: white; /* Latar belakang putih */
    color: #333; /* Teks abu-abu tua */
    transition: all 0.3s ease-in-out;
}

.add-article-container input:focus,
.add-article-container textarea:focus {
    border-color: #2575fc;
    box-shadow: 0 0 10px rgba(37, 117, 252, 0.6);
    outline: none;
}

.add-article-container textarea {
    resize: vertical;
    height: 180px;
}

.add-article-container input[type="file"] {
    border: none;
    background-color: transparent;
    color: #333; /* Teks file input abu-abu tua */
}

.add-article-container input[type="submit"] {
    background-color: #336699; /* Tombol putih */
    color: white; /* Teks tombol biru muda */
    border: none;
    cursor: pointer;
    padding: 15px 25px;
    margin-top: 20px;
    border-radius: 25px;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
}

.add-article-container input[type="submit"]:hover {
    background-color: #99ccff; /* Tombol sedikit lebih gelap saat hover */
    color: #666666;
    transform: translateY(-2px);
}

.add-article-container a {
    display: block;
    margin-top: 30px;
    color: white; /* Link putih */
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
}

.add-article-container a:hover {
    text-decoration: underline;
}

/* CSS khusus untuk halaman login */
body.login-page {
    background-color: #f7f9fc; /* Background abu-abu muda untuk login */
    font-family: Arial, sans-serif;
}

.login-page .login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-page .login-container h2 {
    font-size: 26px;
    margin-bottom: 20px;
    color: #333;
}

.login-page .login-container .form-control {
    border-radius: 25px;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.login-page .login-container .form-control:focus {
    border-color: #4f94d4;
    outline: none;
}

.login-page .login-container .btn {
    background-color: #4f94d4; /* Biru muda */
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 25px;
    width: 100%;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
}

.login-page .login-container .btn:hover {
    background-color: #3a7caa; /* Biru tua */
}

.login-page .login-container .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.login-page .password-field {
    position: relative;
}

.login-page .password-field .toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.3rem;
    color: #888;
}

.login-page .password-field .toggle-password:hover {
    color: #4f94d4;
}

.login-page .login-container .text-center a {
    color: #4f94d4;
    text-decoration: none;
}

.login-page .login-container .text-center a:hover {
    text-decoration: underline;
}

/* CSS untuk halaman View Artikel */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fb;
    color: #333;
}

#view-article {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.site-header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

.header-container img {
    max-width: 200px;
    margin: 0 auto;
}

.article-container {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-header h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
}

.author {
    text-align: center;
    font-size: 1rem;
    color: #777;
    margin-bottom: 30px;
}

.article-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
}

.article-cover img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.article-content {
    text-align: justify;
    line-height: 1.6;
    color: #555;
}

.article-content p {
    font-size: 1.1rem;
}

.back-button {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 25px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: var(--hover-color);
}

/* Update untuk halaman View Artikel di perangkat mobile */
@media screen and (max-width: 768px) {
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        z-index: 1000;
    }

    .site-header img {
        content: url('assets/images/header-mobile.png');
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .header-content {
        top: 40%;
        font-size: 1.5rem;
        padding: 0 10px;
    }

    .header-content h1 {
        font-size: 1.4rem;
        margin: 0;
    }

    body {
        padding-top: 25vh;
    }
}

@media screen and (max-width: 768px) {
    .filters {
        flex-direction: column;
        padding: 0 15px;
    }

    .total-articles {
        text-align: center;
        padding: 0 15px;
    }

    .articles-table th,
    .articles-table td {
        font-size: 0.9rem;
    }

    .articles-table th:nth-child(4),
    .articles-table td:nth-child(4) {
        display: none;
    }

    .pagination {
        font-size: 0.9rem;
    }

    .action-buttons {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .login-container {
        width: 90%;
        padding: 25px;
    }
}
