/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styling */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa; /* Light background */
    color: #333;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode {
    background-color: #000000; /* Black background for dark mode */
    color: #d3d3d3; /* Light grey text for dark mode */
}

/* Header Styling */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    color: #4caf50; /* Accent color remains consistent */
}

/* Link Buttons */
.link-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.link-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4caf50; /* Green background */
    color: white; /* White text */
    text-decoration: none; /* Remove underline */
    border: none;
    border-radius: 5px; /* Rounded corners */
    font-size: 16px; /* Adjust text size */
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.link-button:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: scale(1.05); /* Slight zoom effect */
}

.link-button:active {
    transform: scale(0.95); /* Slight shrink on click */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Reduced shadow */
}

.dark-mode .link-button {
    background-color: #222; /* Dark background for buttons in dark mode */
    color: #d3d3d3; /* Light grey text for better contrast */
}

.dark-mode .link-button:hover {
    background-color: #333; /* Slightly lighter on hover in dark mode */
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg);
}

/* Post Container */
.post-container {
    margin: 0 auto;
    max-width: 1000px;
    padding: 10px;
}

.post {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dark-mode .post {
    background-color: #222; /* Darker background for posts in dark mode */
    border: 1px solid #444; /* Subtle border for better visibility */
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #4caf50;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-content {
    margin-bottom: 10px;
}

.post-date {
    font-size: 0.9rem;
    color: #666;
}

.dark-mode .post-date {
    color: #999; /* Lighter grey for post dates in dark mode */
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
}

.page-link {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 16px;
    text-decoration: none;
    color: #4caf50;
    border: 1px solid #4caf50;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.page-link:hover {
    background-color: #4caf50;
    color: white;
}

.page-link.disabled {
    color: #ccc;
    border-color: #ccc;
    pointer-events: none;
}

.page-link.active {
    background-color: #4caf50;
    color: white;
    pointer-events: none;
}

.dark-mode .page-link {
    color: #d3d3d3; /* Light grey for pagination links in dark mode */
    border-color: #555; /* Subtle border for pagination links */
}

.dark-mode .page-link:hover {
    background-color: #333; /* Slightly lighter hover effect in dark mode */
    color: #fff; /* White text on hover */
}

.related-posts {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9f9f9; /* Light grey background for light mode */
    border: 1px solid #ddd; /* Light border for light mode */
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dark-mode .related-posts {
    background-color: #222; /* Dark background for dark mode */
    border: 1px solid #444; /* Subtle border for dark mode */
}

.related-posts h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333; /* Default text color */
}

.dark-mode .related-posts h3 {
    color: #d3d3d3; /* Lighter grey text for dark mode */
}

.related-posts ul {
    list-style: none;
    padding: 0;
}

.related-posts li {
    margin-bottom: 5px;
}

.related-posts a {
    text-decoration: none;
    color: #4caf50; /* Match your site's color scheme */
    transition: color 0.3s ease;
}

.related-posts a:hover {
    color: #45a049; /* Darker green on hover */
}

.dark-mode .related-posts a {
    color: #80e27e; /* Softer green for dark mode links */
}

.dark-mode .related-posts a:hover {
    color: #66bb6a; /* Slightly darker green on hover in dark mode */
}

/* Image width */
.post img {
    display: block;
    margin: 0 auto;             /* Centers the image horizontally */
    vertical-align: middle;     /* Aligns the image vertically with text */
    max-width: 100%;            /* Ensures image is responsive */
    height: auto;               /* Maintains aspect ratio */
    max-height: 900px;          /* Reduces the maximum height of images */
}
