/* Add article button */
.end_buttons {
    padding: 1.5rem 2rem;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.new_input {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: var(--accent-gold);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.new_input:hover {
    background-color: var(--accent-gold-hover);
}

/* Articles section */
.main_content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Featured article (newest) */
.featured-article {
    background-color: var(--bg-secondary);
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-article:hover {
    box-shadow: 0 6px 20px var(--shadow-medium);
    transform: translateY(-2px);
}

.featured-article .image_container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.featured-article .image_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-article .article-content {
    padding: 2rem;
}

.featured-article h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.featured-article .about_article {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: border-color 0.3s ease;
}

.featured-article p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: color 0.3s ease;
}

/* Regular articles grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.article:hover {
    box-shadow: 0 4px 16px var(--shadow-medium);
    transform: translateY(-2px);
}

.image_container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.image_container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article:hover .image_container img {
    transform: scale(1.05);
}

.notification,
.visibility {
    position: absolute;
    top: 10px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.notification {
    right: 10px;
    background-color: var(--accent-green);
    color: white;
}

.visibility {
    left: 10px;
    background-color: var(--accent-gold);
    color: white;
}

.article-content {
    padding: 1.5rem;
}

.article h2 {
    padding: 10px 0 0 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.about_article {
    padding-left: 10px;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.datum {
    font-weight: 500;
}

.author {
    font-weight: 500;
}

.article p {
    padding: 0 10px 20px 10px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    hyphens: auto;
    transition: color 0.3s ease;
    max-height: 4.8em; /* Fallback for browsers that don't support line-clamp */
}

/* Pagination */
.next_page {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 2rem;
}

.next_page .button {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next_page .button:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.next_page .text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* Responsive design for article list */
@media (max-width: 768px) {
    .main_content {
        padding: 1rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-article .image_container {
        height: 200px;
    }

    .featured-article h2 {
        font-size: 1.6rem;
    }

    .featured-article .article-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article {
        margin: 0;
    }
}
