* {
    box-sizing: border-box;
}

body {
    background-color: #FAFAFA; /* Light neutral base */
    background-image: url('images/coding class.jpg'); /* Ensure path is correct */
    background-repeat: no-repeat;
    background-size: cover;
    font-family: 'Raleway', Arial, sans-serif;
    color: #6B7280; /* Muted gray for readability */
}

header {
    position: relative;
    background-color: #374151; /* Cool Slate Gray */
    color: white;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white; /* Changed to white for better contrast */
}

.navbar-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    margin: 0 1rem; /* Spacing for larger screens */
}

.navbar-menu a {
    color: white; /* Changed to white for better contrast */
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-menu a:hover {
    color: #60A5FA; /* Soft sky blue */
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    height: 4px;
    width: 25px;
    background-color: #6B7280; /* Muted gray */
    margin: 2px;
    transition: all 0.3s ease;
}

/* Footer styles */
footer {
    background-color: #374151; /* Cool Slate Gray for footer */
    color: white;
    text-align: center;
    padding: 15px;
    position: relative; /* Allows for better positioning */
    width: 100%; /* Make sure the footer spans the full width */
    margin-top: auto; /* Ensure the footer stays at the bottom */
}

footer p {
    margin: 0.5rem 0;
    color: #6B7280;
}

.social-media-paragraph {
    display: flex; /* Keep it as a flex container */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    padding: 0; /* Remove padding if needed */
}

.social-media {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between social media links */
}

.social-media a {
    color: #60A5FA; /* Soft sky blue */
    text-decoration: none;
    font-size: 1rem;
}

.social-media a:hover {
    text-decoration: underline; /* Underline on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 40%; /* Full width for mobile */
        height: 100vh; /* Adjust to content height */
        position: absolute;
        top: 0;
        left: 0;
        background-color: white;
        color: #374151 !important; /* Deep Charcoal */
        z-index: 120;
        padding-top: 90px; /* Reduced padding for mobile */
        opacity: 0;
        transform: translateY(-100%); /* Slide out initially */
        transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transitions */
    }

    .navbar-menu.active {
        display: flex;
        opacity: 1;
        transform: translateY(0); /* Smooth slide down */
        color: #374151 !important;
    }

    .navbar-menu.active a{
        color: #374151 !important;
    }
    .navbar-menu a:hover {
        background-color: transparent;
        color: #3B82F6 !important;
    }

    .navbar-menu li {
        margin: 10px 0; /* Increased vertical spacing for mobile */
    }

    .navbar-menu.active a:hover{
        color: #60A5FA;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px); /* Adjust translation */
    }

    .navbar-toggle.active .bar:nth-child(2) {
        opacity: 0; /* Hide middle bar */
    }

    .navbar-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px); /* Adjust translation */
    }

    
}

h1, h2, h3 {
    margin: 0.5rem 0;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #3B82F6; /* Vibrant blue for headings */
}

h2 {
    text-align: center;
    font-size: 2rem;
    color: #3B82F6; /* Vibrant blue for headings */
}

h3 {
    font-size: 1.5rem;
    color: #4B5563; /* Slate gray for subheadings */
}

/* Paragraph Styles */
p {
    font-size: 1rem; /* Adjust text size for readability */
    line-height: 1.6; /* Improved line height for readability */
    margin: 0.5rem 0; /* Space above and below paragraphs */
    text-align: justify; /* Justified alignment for a cleaner look */
    max-width: 800px; /* Constrain paragraph width */
    margin-left: auto; /* Center the paragraph */
    margin-right: auto; /* Center the paragraph */
}

figure {
    text-align: center;
}

figcaption {
    font-style: italic;
    margin-top: 0.5rem;
    color: #6B7280; /* Muted gray for figure captions */
}

/* Courses Section */
#courses {
    max-width: 800px; /* Max width for courses section */
    margin: 20px auto; /* Center and add margin */
    padding: 0 15px; /* Padding for smaller screens */
}

article {
    background-color: #FFFFFF; /* White background for articles */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    margin-bottom: 20px; /* Space between articles */
    padding: 15px; /* Inner padding for articles */
    transition: transform 0.2s ease; /* Smooth hover effect */
}

article:hover {
    transform: translateY(-2px); /* Lift effect on hover */
}

article h3 {
    margin-top: 0; /* Remove default margin for h3 in articles */
}


footer {
    padding: 10px; /* Slightly reduce padding on smaller screens */
}

.social-media {
    gap: 10px; /* Less gap for smaller screens */
}

footer p {
    font-size: 0.9rem; /* Slightly smaller text */
}

.social-media a {
    font-size: 1.1rem; /* Slightly smaller icon text */
}


@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu {
        width: 100%;
    }

    .nav-toggle {
        font-size: 1.2em;
    }

    footer {
        padding: 8px; /* Further reduce padding on extra small screens */
    }

    .social-media a {
        font-size: 1rem; /* Reduce font size for icons */
    }

    footer p {
        font-size: 0.8rem; /* Smaller text for extra small screens */
    }
}

@media (max-width: 600px) {
    .box {
        width: 3.5rem;
        height: 3.5rem;
    }
}