/* newest-item.php styling */
.article-newest-items {
    margin: 50px;
}

.article-newest-items .article-newest-items-grid {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 3fr;
    gap: 20px;
}

.article-newest-items .article-newest-items-grid .card{
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-newest-items .article-newest-items-grid .card .card-image{
    height: 150px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 10px 10px 0px 0px;
}

.article-newest-items h2 {
    text-align: center;
}

.article-newest-items .article-newest-items-grid .card .card-content {
    padding: 20px;
}

.article-newest-items .article-newest-items-grid .card .card-content h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #2E2E2E;
    text-align: center;
}

.article-newest-items .article-newest-items-grid .card .card-image {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 150px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.article-newest-items .article-newest-items-grid .card .card-image .new-label{
    position: relative;
    left: 10px;
    top: 10px;
    width: fit-content;
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
}

.article-newest-items .article-newest-items-grid .card .card-image .views {
    position: absolute;
    top: 10px;
    right: 10px;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-newest-items .article-newest-items-grid .card a,
.article-newest-items .article-newest-items-grid .card a:hover,
.article-newest-items .article-newest-items-grid .card a * {
    text-decoration: none;
}

.article-newest-items .article-newest-items-grid .card:hover {
    transform: scale(1.05);
}

/* popular-item.php styling */
.article-popular-items {
    margin: 50px;
}

.article-popular-items .article-popular-items-grid {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 3fr;
    gap: 20px;
}

.article-popular-items .article-popular-items-grid .card{
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-popular-items .article-popular-items-grid .card .card-image{
    height: 150px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 10px 10px 0px 0px;
}

.article-popular-items .article-popular-items-grid .card .card-content {
    padding: 20px;
}

.article-popular-items .article-popular-items-grid .card .card-content h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #2E2E2E;
    text-align: center;
}

.article-popular-items .article-popular-items-grid .card .card-image {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 150px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.article-popular-items .article-popular-items-grid .card .card-image .new-label{
    position: relative;
    left: 10px;
    top: 10px;
    width: fit-content;
    background-color: #FF6B6B;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
}

.article-popular-items .article-popular-items-grid .card .card-image .views {
    position: absolute;
    top: 10px;
    right: 10px;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-popular-items h2 {
    text-align: center;
}

.article-popular-items .article-popular-items-grid .card a,
.article-popular-items .article-popular-items-grid .card a:hover,
.article-popular-items .article-popular-items-grid .card a * {
    text-decoration: none;
}

.article-popular-items .article-popular-items-grid .card:hover {
    transform: scale(1.05);
}

.article-popular-items-footer {
    text-align: center;
    margin-top: 20px;
}

.article-popular-items-footer a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.2rem;
}

/* random-item.php styling */
.article-random-items {
    margin: 50px;
}

.article-random-items h2 {
    text-align: center;
    margin-bottom: 20px;
}

.article-random-items .article-random-items-grid {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 3fr;
    gap: 20px;
}

.article-random-items .article-random-items-grid .card{
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-random-items .article-random-items-grid .card .card-image{
    height: 150px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 10px 10px 0px 0px;
}

.article-random-items .article-random-items-grid .card .card-content {
    padding: 20px;
}

.article-random-items .article-random-items-grid .card .card-content h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #2E2E2E;
    text-align: center;
}

.article-random-items .article-random-items-grid .card .card-image {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 150px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.article-random-items .article-random-items-grid .card .card-image .new-label{
    position: relative;
    left: 10px;
    top: 10px;
    width: fit-content;
    background-color: #FF6B6B;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
}

.article-random-items .article-random-items-grid .card .card-image .views {
    position: absolute;
    top: 10px;
    right: 10px;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-random-items .article-random-items-grid .card a,
.article-random-items .article-random-items-grid .card a:hover,
.article-random-items .article-random-items-grid .card a * {
    text-decoration: none;
}

.article-random-items .article-random-items-grid .card:hover {
    transform: scale(1.05);
}

.article-random-items-footer {
    text-align: center;
    margin-top: 20px;
}

.article-random-items-footer a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.2rem;
}

.article-random-items h2 {
    text-align: center;
}

/* article detail page */
main .hero-image {
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

main .hero-image h1 {
    margin-top: 9vh !important;
    text-align: center;
}

.main-container .article-detail .article-meta {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    color: #555;
}

.main-container .article-detail .article-meta a {
    color: #555;
    text-decoration: none;
}

/* Single article card */
.article-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin: 20px 0;
}

.article-card:hover {
    transform: scale(1.02);
}

.article-card .article-card-image {
    height: 200px;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 10px 10px 0px 0px;
    position: relative;
    overflow: hidden;
}

.article-card .article-card-image .views {
    position: absolute;
    top: 10px;
    right: 10px;
    width: fit-content;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card .article-card-content {
    padding: 20px;
}

.article-card-content h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #2E2E2E;
    text-align: center;
}

.article-card a,
.article-card a:hover,
.article-card a * {
    text-decoration: none;
}

/* mobile */
@media (max-width: 768px) {

    .article-popular-items,
    .article-newest-items,
    .article-random-items {
        margin: 10px;
        margin-top: 40px;
    }   

    .article-newest-items .article-newest-items-grid,
    .article-popular-items .article-popular-items-grid,
    .article-random-items .article-random-items-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .article-card .article-card-image {
        height: 150px;
    }

    .article-popular-items h2, .article-random-items h2, .article-newest-items h2 {
        text-align: center;
        font-size: 1.7rem;
        margin-bottom: 20px;
    }

    .hero-image .container .hero-text h1 {
        font-size: 2rem;
        margin-top: 7vh !important;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.3rem;
    }
}