/* General Reset */
html, body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #f4f4f4;
    color: #333;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers content horizontally */
}

a {
    font-weight: bold;
    text-decoration: none; /* Optional: Remove underline */
}

header {
    background-color: #333;
    color: white;
    padding: 1rem 0;
    text-align: center;
    width: 100%; /* Header spans full width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    background-color: #444;
    width: 100%; /* Navigation spans full width */
}

nav a {
    color: white;
    text-decoration: none;
    padding: 1rem;
    font-weight: bold;
}

nav a:hover {
    background-color: #555;
    border-radius: 5px; /* Smooth hover transition */
}

main {
    flex: 1;
    width: 90%; /* Limit the content width */
    max-width: 1200px; /* Prevent content from stretching too far */
    margin-top: 2rem;
    margin-bottom: 2rem;
}

section {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 10px; /* Rounded corners for all sections */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center-align text inside sections */
}

/* General styles for the topics container */
.topics-container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 20px;
}

/* Styling individual topics */
.topic {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

/* Hover effect for topics */
.topic:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Headings within the topics */
.topic h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Paragraphs within the topics */
.topic p {
    color: #555;
    font-size: 1rem;
    line-height: 1.5;
}

/* About */
.about-section {
    background: white;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
}

.about-section h2 {
    color: #444;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-section p {
    margin-bottom: 1rem;
}

h2 {
    color: #444;
    border-bottom: 2px solid #ddd; /* Underline effect for headings */
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

ul {
    list-style: none; /* Remove default bullet points */
    padding: 0;
}

ul li {
    padding: 0.5rem;
    background-color: #f9f9f9;
    margin: 0.5rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Blog Section */
#blogs {
    margin-top: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three columns */
    gap: 2rem; /* Space between the articles */
}

.blog-entry {
    background-color: #ffffff; /* White background */
    padding: 1.5rem; /* Inner spacing */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow effect */
    border: 1px solid #ddd; /* Light border for definition */
    text-align: left; /* Align blog text to the left */
}

.blog-entry h3 {
    margin-top: 0; /* Remove extra margin at the top */
    color: #333;
}

.blog-entry p {
    margin-bottom: 0; /* Remove extra margin at the bottom */
    line-height: 1.6; /* Improve text readability */
}

/* "Read More" Button Styling */
.read-more-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    cursor: pointer;
    border-radius: 5px;
}

.read-more-btn:hover {
    background-color: #555;
}

/* Initially hide the extra content */
.extra-content {
    display: none;  /* Hides the extra content */
    margin-top: 1rem;
}

.read-more-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background-color: #555;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: white;
    width: 100%; /* Footer spans full width */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px); /* Slightly offset vertically */
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* When the element is in view (added dynamically by JS), it will fade in */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}