/* Base Styles */
* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #d9534f;
    --primary-color-dark: #c9302c;
    --text-color: #333;
    --highlight-color: #900;
    --contrast-text-color: #fff;
    --neutral-text-color: #333;
    --background-color: #f4f4f4;
    --border-color: #ccc;
    --focus-border-color: var(--primary-color);
    --link-color: #ff4500;
    --link-hover-color: #e03e00;
    --form-background-color: #ffffff;
}

body {
    background: #f9f9f9; /* Light background for better readability */
    color: #333; /* Default text color for better contrast */
}

/* FIX: Added position: relative to the header */
header {
    position: relative;
}

/* Navbar styles */
#navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 15px;
}

/* Navigation list */
.nav-list {
    list-style: none;
    display: flex;
    gap: 15px; /* Spacing between buttons */
    padding: 0;
    margin: 0;
}

/* General Button Styling */
.nav-list li a { 
    color: rgb(31, 31, 31);
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 20px; /* Rounded buttons */
    font-family: Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

nav ul li a:hover {
    background: #900; /* Highlight color */
    text-decoration: none;
    color: #fff; /* Contrast text color */
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 10px; /* Position the hamburger menu on the top left */
    z-index: 3; /* Ensure the menu toggle is above the hero content */
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: var(--highlight-color);
    margin: 4px 0;
    transition: 0.4s;
}

.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

.container h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
    color: #333;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-honours,
.project-duct,
.project-acme,
.project-subman {
    position: relative;
    width: 100%;
    height: 400px; /* Keep the card height */
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden; /* Ensure content stays within bounds */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-honours:hover,
.project-duct:hover,
.project-acme:hover,
.project-subman:hover {
    transform: scale(1.05);
}

.project-content {
    position: absolute;
    bottom: 0; /* Sticks the content to the bottom */
    left: 0; /* Aligns content to the left edge */
    width: 100%; /* Ensures it stretches across the full width */
    background-color: rgba(0, 0, 0, 0.6); /* Slightly transparent black background for contrast */
    color: white;
    padding: 20px;
    text-align: center;
    box-sizing: border-box; /* Ensures padding doesn't affect the size */
    border-radius: 0 0 8px 8px; /* Matches the card's bottom corners */
}

.project-content h5 {
    font-size: 1.2rem;
    color: #fff;
}

.project-content h6 {
    font-size: 1rem;
    color: #ddd;
    margin: 10px 0;
}

.project-content p {
    font-size: 0.9rem;
    color: #fff; /* Keeps text readable against dark background */
    margin-bottom: 15px;
}

.project-content a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #900; /* Button background */
    color: #fff; /* Button text */
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.project-content a:hover {
    background-color: #700; /* Darker button on hover */
    color: #fff;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
}

/* FIX: Corrected class from .footercontainer to .footer-container */
.footer-container h4 {
    margin-bottom: 15px;
}

.social-links a {
    color: white;
    font-size: 24px;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #900; /* Example hover color for social links */
}

/* Media Query for Tablets */
@media (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .project-honours,
    .project-duct,
    .project-acme,
    .project-subman {
        height: 300px; /* Adjusted for smaller screens */
    }
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    /* FIX: Consolidated menu styles here */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 9999;
    }

    .nav-list {
        position: absolute;
        z-index: 1000;
    }

    nav {
        background: none;
    }

    .nav-list {
        top: 60px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease-in-out;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        margin: 20px 0;
    }

    .nav-list li a {
        background-color: transparent;
        border-radius: 0;
        padding: 10px;
    }

    .container {
        padding: 10px 5px;
    }

    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .project-honours,
    .project-duct,
    .project-acme,
    .project-subman {
        height: 500px;
    }
    
    /* FIX: Added max-height and overflow to project content */
    .project-content {
        max-width: 100%;
        max-height: 50%;
        overflow-y: auto;
    }
}

/* FIX: This media query now only contains unique styles for smaller screens. */
@media (max-width: 480px) {
    .project-honours,
    .project-duct,
    .project-acme,
    .project-subman {
        height: 220px; /* Adjust for very small mobile screens */
    }

    .project-content {
        max-height: 70%; /* Increase content height slightly on smaller screens if needed */
    }
}
/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        position: absolute; /* stays in place */
        top: 10px;
        left: 10px;
        z-index: 9999; /* always on top */
    }

    .nav-list {
        position: absolute;
        z-index: 1000; /* below toggle */
    }

    nav {
        background: none;
    }

    .nav-list {
        top: 60px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease-in-out;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        margin: 20px 0;
    }

    .nav-list li a {
        background-color: transparent; /* Removes the red background */
        border-radius: 0; /* Optional: Makes the links rectangular instead of rounded */
        padding: 10px; /* Optional: Adjusts padding for the new style */
    }

    nav ul li a:hover {
    background: transparent; /* Highlight color */
    text-decoration: none;
    color: none; /* Contrast text color */
}

    .container {
        padding: 10px 5px;
    }

    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .project-honours,
    .project-duct,
    .project-acme,
    .project-subman {
        height: 500px; /* Further adjust for mobile */
    }
    
    /* FIX: Removed max-width to allow content to fill the card */
    .project-content {
        max-width: 100%; 
    }
}

/* FIX: This media query now only contains unique styles for smaller screens. */
@media (max-width: 480px) {
    .project-honours,
    .project-duct,
    .project-acme,
    .project-subman {
        height: 220px; /* Adjust for very small mobile screens */
    }
}