/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #444;
    background-color: #fafafa;
}

/* Header */
header {
    background-color: #333;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topnav a {
    color: #ffffff;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.topnav a:hover {
    background-color: #0096FF;
    color: white;
}

.topnav .icon {
    display: none;
}

.main {
    font-weight: bold;
    color: aqua;
    font-family: monospace;
}

/* Responsive Navigation */
@media screen and (max-width: 768px) {
    .topnav a:not(:first-child) {
        display: none;
    }
    .topnav a.icon {
        display: block;
    }
}

@media screen and (max-width: 768px) {
    .topnav.responsive {
        flex-direction: column;
    }
    .topnav.responsive a {
        display: block;
        text-align: left;
    }
}

/* Main Content */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.featured-images {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 5px solid #333;
}

.article-content {
    padding: 15px;
    text-align: center;
}

.article-content a {
    text-decoration: none;
    color: #304CFD;
    font-size: 20px;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.article-content a:hover {
    color: #0096FF;
}

.article-content p {
    color: #666;
    font-size: 16px;
    margin: 15px 0;
}

/* About Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 30px;
    display: none;
    background-color: rgba(0, 182, 207, 0.5);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.scroll-top:hover {
    background-color: rgba(51, 51, 51, 0.5);
}

.featured-images {
    max-width: 100%; /* Membuat gambar responsif */
    height: auto; /* Menjaga aspek rasio */
    object-fit: cover; /* Agar gambar memenuhi container dengan proporsi yang baik */
}

/* Untuk mengatur ukuran gambar di galeri */
.gallery-item img {
    max-width: 100%; /* Membuat gambar dalam galeri tidak melebihi container */
    height: auto; /* Menjaga proporsi gambar */
    object-fit: cover; /* Menjaga gambar tetap proporsional */
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-content p {
        font-size: 14px;
    }

    .article-content a {
        font-size: 18px;
    }

    .topnav {
        padding: 10px;
    }
}
