/* post-modern.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #c1dfef;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    background: #1e3d58;
    color: #fff;
    padding: 1rem 2rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

header .logo {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

button#style-toggle {
    padding: 0.5rem;
    background-color: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    aspect-ratio: 1 / 1;
    width: 50px;
}

button#style-toggle i {
    font-size: 2rem;
}

/* Main Content Styles */
main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 1rem;
    width: 100%;
    background: white;´
    box-sizing: border-box;
}

.featured-news,
.news-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-news article,
.news-sections article {
    color: #333;
    padding: 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: calc(50% - 10px);
    box-sizing: border-box;
}

.featured-news article:hover,
.news-sections article:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.featured-news h2,
.featured-news h3,
.news-sections h3 {
    color: #1e3d58;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

#featured-news-content, #latest-news-content, #most-popular-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
}

article p {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

article small {
    display: block;
    margin-top: 1rem;
    color: #999;
}

article.large {
    width: 100%;
    max-width: none;
}

article.small {
    width: 100%;
    max-width: calc(33.33333% - 20px);
}

article:has(div h2) {
    width: 100%;
    max-width: none;
    background: #1e3d58;
}

article.large h3, article.large h2 {
    font-size: 2rem;
}

article.small h3, article.small h2 {
    font-size: 1rem;
}

.featured-news article:has(div h2) h2,
.news-sections article:has(div h2) h2 {
    color: #fff;
    font-size: 3rem;
}

.featured-news article:has(div h2) p,
.news-sections article:has(div h2) p {
    color: #ddd;
    font-size: 1.5rem;
}

.full-article {
    display: none;
}

.full-content {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-button {
    display: block;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background-color: #1e3d58;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    width: max-content;
}

.back-button:hover {
    background-color: #14293d;
}

/* Sidebar Styles */
aside {
    padding: 1rem;
    background: #eaeaea;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

aside .sidebar {
    max-width: 1200px;
    width: 100%;
}

aside h3 {
    color: #1e3d58;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    margin-bottom: 0.5rem;
}

aside ul li a {
    text-decoration: none;
    color: #333;
}

input[type="text"], input[type="email"], button {
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
}

button {
    background-color: #1e3d58;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background-color: #14293d;
}

/* Footer Styles */
footer {
    background: #1e3d58;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 0.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }

    header .logo {
        font-size: 1.5rem;
    }
    
    main section.featured-news article,
    main section.news-sections article {
        max-width: 100%;
    }
}
