/* articles.css */
/* Version 3.1 */
/* Article Container */
.article {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* Ensure it takes up 1/3 of the row */
    min-width: 300px;
    max-width: 100%;
    position: relative;
    transition: all 0.3s ease;
    height: 400px; /* Set the initial height to 400px */
    overflow: hidden; /* Hide the overflow content */
}

/* Fullscreen state for the article */
.article.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    margin: 0;
    padding: 40px;
    border-radius: 0;
    background-color: white;
    overflow: auto;
}

/* Article Header (Title and Fullscreen Icon) */
.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.article-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    flex-grow: 1;
}

/* Fullscreen toggle icon */
.article-fullscreen-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
}

/* Ensure Media (images, iframes, videos) do not overflow their container */
.article img, .article video, .article iframe {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

.article iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Maintain aspect ratio */
    border: none; /* Remove default border */
    margin-bottom: 20px;
}

/* Article Footer Flexbox Container */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0;
}

/* Responsive for medium screens (2 columns) */
@media (max-width: 1024px) {
    .article {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Responsive for small screens (1 column) */
@media (max-width: 768px) {
    .article {
        flex: 1 1 100%;
    }
}
