/* General Styles */
body, html {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Header Menu */
header {
    background-color: #333;
    padding: 10px;
    color: #fff;
    text-align: center;
}

header nav ul {
    list-style-type: none;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    text-decoration: none;
    color: #fff;
}

/* Content Container: Main Blog and Sidebar */
.content-container {
    display: flex; /* Use Flexbox to align main content and sidebar */
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

/* Main Blog Content */
.blog-content {
    flex: 3; /* Take 3 parts of the available width */
    margin-right: 20px; /* Space between blog content and sidebar */
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: calc(100% - 300px - 40px); /* Adjust width considering sidebar and spacing */
}

/* Blog Header */
.blog-header {
    text-align: center;
}

.blog-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.blog-title {
    font-size: 24px;
    margin-top: 20px;
}

.blog-meta {
    font-size: 14px;
    color: #777;
    margin: 10px 0;
}

/* Sidebar for Suggested Articles */
.sidebar {
    flex: 1; /* Take 1 part of the available width */
    width: 280px; /* Fixed width for sidebar */
    padding: 20px;
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: sticky; /* Sticky position to keep sidebar visible when scrolling */
    top: 20px; /* Stick the sidebar 20px from the top */
    max-height: 100vh; /* Ensure the sidebar doesn’t overflow */
    overflow-y: auto; /* Enable scrolling if content exceeds sidebar height */
}

/* Sidebar Header */
.sidebar h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

/* Suggested Flashcard Style for Sidebar */
.suggested-flashcard {
    display: flex;
    flex-direction: column; /* Stack image on top of content */
    align-items: center;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 100%; /* Ensure flashcards take the full width of the sidebar */
    max-width: 240px; /* Constrain the maximum width of each flashcard */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s; /* Add hover effect */
}

.suggested-flashcard:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Rectangular Thumbnail Style */
.suggested-thumbnail-rectangular {
    width: 100%; /* Full width of the flashcard */
    height: auto; /* Maintain aspect ratio */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-bottom: 10px; /* Space between image and content */
    object-fit: contain; /* Resize the image within the container without cropping */
    max-height: 150px; /* Set a max height for better alignment */
}

/* Suggested Content */
.suggested-content {
    text-align: center; /* Center the text content */
    width: 100%; /* Ensure content takes full width */
}

.suggested-title {
    font-size: 16px;
    margin: 10px 0 5px; /* Spacing adjustments */
    color: #3498db;
}

.suggested-title a {
    text-decoration: none;
    color: inherit;
}

.suggested-title a:hover {
    text-decoration: underline; /* Underline on hover */
}

.suggested-description {
    font-size: 13px; /* Slightly smaller font size */
    color: #777;
    margin: 0;
    padding: 0 10px; /* Padding for readability */
}

/* Back to Publications Button */
.back-button {
    text-align: center;
    margin-top: 20px;
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    background-color: #3498db;
    color: #fff;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #2980b9;
}

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

/* Responsive Design: For smaller screens, stack sidebar and content */
@media (max-width: 768px) {
    .content-container {
        flex-direction: column; /* Stack sidebar below main content */
    }

    .sidebar {
        width: 100%; /* Full width for sidebar */
        margin-top: 20px; /* Add spacing on top of sidebar */
    }

    .blog-content {
        width: 100%; /* Full width for content */
        margin-right: 0; /* Remove right margin */
    }
}