/* Reset Default Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Page Load Fade-In Effect */
.fade-in {
    opacity: 0;
    transform: translateY(20px); /* Starts slightly lower */
    animation: fadeInAnimation 0.8s ease-in-out forwards;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styling */
.header {
    background-color: #656E77; /* Medium gray for a bold, clean look */
    opacity: 0.7;
    color: #DDDBDE; /* Light gray for the text */
    height: 100px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3B373B; /* Dark gray border */
}

.header a:hover {
    color: #DDDBDE; /* Blue on hover */
    text-decoration: underline; /* Add underline on hover */
}

/* Logo Styling */
.logo img {
    max-height: 100%; /* Ensure the logo scales within the header */
    width: auto; /* Maintain the aspect ratio */
    object-fit: contain; /* Prevent distortion or overflow */
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100px;
    padding: 0 20px;
}

.navbar ul {
    list-style: none; /* Remove bullet points */
    display: flex; /* Horizontal layout */
    gap: 25px; /* Space between links */
    padding: 0;
    padding-right: 10px;
    margin: 0;
}

/* Individual Navigation Links */
.navbar ul li {
    display: flex;
    align-items: center; /* Ensures vertical alignment */
}

.navbar ul li a {
    display: inline-block;
    position: relative; /* Needed for the underline effect */
    text-decoration: none; /* Remove default underline */
    color: #DDDBDE; /* Light gray text color */
    font-weight: bold;
    padding: 10px 15px;
    line-height: 1;
    transition: color 0.3s ease-in-out; /* Smooth color transition */
}

/* Add the underline effect */
.navbar ul li a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #CAD4DF; /* Soft blue-gray */
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

/* Hover Effect */
.navbar ul li a:hover {
    color: #CAD4DF; /* Change text color on hover */
}

/* Underline Expands on Hover */
.navbar ul li a:hover::after {
    width: 100%;
    left: 0;
}

/* Active Page Indicator */
.navbar ul li a.active {
    color: #CAD4DF; /* Soft blue-gray to match hover effect */
    font-weight: bold; /* Make it stand out */
}

/* Underline for Active Page */
.navbar ul li a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px; /* Aligns directly under the link */
    width: 100%;
    height: 2px;
    background-color: #CAD4DF; /* Soft blue-gray */
}

/* Search Bar Container */
.search-container {
    display: flex;
    align-items: center;
    background: #DDDBDE; /* Light gray background */
    border-radius: 5px;
    padding: 5px;
}

/* Search Input */
.search-container input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px;
    font-size: 14px;
    width: 150px;
}

/* Search Button */
.search-container button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    color: #3B373B; /* Dark gray */
}

/* Adjust Icon Size */
.search-container button i {
    font-size: 16px;
}

/* Apply Flexbox to the Body */
html, body {
    height: 100%; /* Ensure the body takes up the full viewport height */
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Main Content Wrapper */
main {
    flex: 1; /* Push the footer to the bottom by taking up available space */
}

/* Background image styling for the home page */
body.home-page {
    background: url('/static/images/BG-Image.jpg') no-repeat center center fixed;
    background-size: cover; /* Ensure the image covers the entire viewport */
}

/* Home Container Styling */
.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 300px;
    max-width: 700px; /* Restrict the width */
    margin: 0 auto; /* Center horizontally */
    color: #3B373B; /* Dark gray text */
    background: rgba(255, 255, 255, 0.7); /* Slightly opaque white */
    margin-top: 13%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Heading Styling */
.home-container h1 {
    font-size: 2em;
    text-decoration: underline;
    margin-bottom: 10px;
    color: #656E77; /* Medium gray */
}

.home-container h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #3B373B; /* Dark gray */
}

.home-container p {
    font-size: 1em;
    margin-bottom: 20px;
}

.home-container h2 {
    animation: fadeIn 2s ease-in-out;
}

.home-logo {
    max-height: 50%; /* Ensure the logo scales within the header */
    width: auto; /* Maintain the aspect ratio */
    object-fit: contain; /* Prevent distortion or overflow */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.home-container p {
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Base Typography */
body {
    font-family: 'Open Sans', Arial, sans-serif; /* Modern and clean font */
    font-size: 16px; /* Standard text size */
    line-height: 1.6; /* Improves readability */
    letter-spacing: 0.5px; /* Adds slight spacing for a polished feel */
    color: #3B373B; /* Dark gray for readability */
}

/* Headings */
h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #656E77; /* Medium gray */
}

h2 {
    font-size: 2rem;
    font-weight: bold;
    color: #656E77;
}

h3 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #3B373B; /* Dark gray for slight contrast */
}

/* Paragraphs */
p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #3B373B;
}

/* Links */
a {
    text-decoration: none;
    color: #CAD4DF; /* Soft blue-gray */
    transition: color 0.3s ease-in-out;
}

/* Contact Form Container */
form {
    background: #DDDBDE; /* Light gray background */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
}

/* Form Labels */
form label {
    font-size: 16px;
    font-weight: bold;
    color: #3B373B; /* Dark gray */
    margin-bottom: 5px;
}

/* Input Fields */
form input,
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #656E77; /* Medium gray border */
    border-radius: 5px;
    font-size: 14px;
    background: white;
    color: #3B373B;
}

/* Textarea Resizing */
form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
form button {
    background: #3B373B; /* Dark gray */
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Button Hover Effect */
form button:hover {
    background: #656E77; /* Medium gray */
}

/* Base Button Styling */
.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #CAD4DF; /* Soft blue-gray */
    background-color: transparent;
    color: #3B373B; /* Dark gray text */
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Hover Effect */
.button:hover {
    background-color: #CAD4DF; /* Soft blue-gray background */
    color: #3B373B; /* Dark gray text */
    transform: scale(1.05); /* Slight enlargement */
}

/* Button Click Effect */
.button:active {
    transform: scale(0.98); /* Slight press effect */
}

a:hover {
    color: #656E77; /* Darker hover effect */
}

/* Flash Messages */
.flash-messages {
    background: #DDDBDE; /* Soft blue-gray */
    color: #3B373B; /* Dark gray text */
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    max-width: 500px; /* Matches form width */
    margin: 0 auto 20px; /* Centers message & adds space below */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Success Message */
.flash-success {
    background: #28a745; /* Green for success */
    color: white;
}

/* Resource Categories Grid - Three Columns */
.resource-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 30px; /* Space between columns */
    margin-top: 20px;
}

/* Individual Category Boxes */
.resource-category {
    background: #DDDBDE; /* Light gray */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.resource-category p {
    text-align: justify;
}

.resource-category h2 {
    text-decoration: underline;
    text-underline-offset: 10px;
}

/* Resource Items Inside Categories */
.resource-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    color: #3B373B;
    margin-top: 10px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer Styling */
.footer {
    background-color: #3B373B; /* Dark gray for a grounded footer */
    color: #DDDBDE; /* Light gray for contrast */
    text-align: center;
    padding: 15px 0;
    font-size: 0.9em;
    border-top: 1px solid #656E77; /* Medium gray border to tie in with header */
}

/* Footer Content Spacing */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px; /* Space between elements */
}

/* Footer Links */
.footer a {
    color: #DDDBDE; /* Neutral link color */
    text-decoration: none; /* Remove underline */
    font-weight: bold;
}

.footer a:hover {
    color: #0056b3; /* Blue on hover */
    text-decoration: underline; /* Add underline on hover */
}

.copy {
    color: #DDDBDE;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px; /* Space between icons */
    margin-top: 10px;
}

.social-links a {
    color: #DDDBDE; /* Neutral icon color */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth hover effect */
}

.social-links a:hover {
    color: #0056b3; /* Blue on hover */
    transform: scale(1.2); /* Slight zoom on hover */
}

/* Base Styles (Default for Desktop or Larger Screens) */
/* Styles you've already implemented will apply here by default */

/* Wide Screen Desktops (e.g., 1440px and above) */
@media (min-width: 1440px) {
    .content-wrapper {
        max-width: 1200px; /* Limit content width for readability */
        margin: 0 auto; /* Center content */
    }

    .logo img {
        width: 100px; /* Larger logo for wide screens */
    }
}

/* Laptops (e.g., 1024px - 1440px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .content-wrapper {
        max-width: 90%; /* Adjust width slightly */
        margin: 0 auto;
    }

    .logo img {
        width: 85px; /* Slightly smaller logo */
    }
}

/* Tablets (e.g., 768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .header, .footer {
        padding: 15px; /* Adjust padding */
    }

    .navbar ul {
        flex-direction: column; /* Stack navigation links vertically */
        gap: 15px; /* Add space between links */
    }

    .logo img {
        width: 75px; /* Standard logo size */
    }

    main {
        padding: 15px;
    }
}

/* Smartphones - General (e.g., 480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    body {
        font-size: 14px; /* Adjust font size for smaller screens */
    }

    .header, .footer {
        text-align: center; /* Center-align text */
        padding: 10px;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .logo img {
        width: 60px; /* Smaller logo for phones */
    }
}

/* Samsung & Apple iPhones (Small Screens - 479px and below) */
@media (max-width: 479px) {
    body {
        font-size: 12px; /* Smallest font size for small devices */
    }

    .header, .footer {
        padding: 8px; /* Reduce padding */
    }

    .navbar ul li a {
        font-size: 0.8em; /* Smaller link font size */
    }

    .logo img {
        width: 50px; /* Smallest logo size */
    }

    main {
        padding: 10px;
    }
}

@media (max-width: 900px) {
    .resource-categories {
        grid-template-columns: repeat(2, 1fr); /* Two columns on medium screens */
    }
}

@media (max-width: 600px) {
    .resource-categories {
        grid-template-columns: repeat(1, 1fr); /* One column on small screens */
    }
}
