html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f3f3f3;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.img-responsive {
    max-width: 100%;
    height: auto;
}


.sticky-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #6a0dad;
    color: white;
    padding: 1px 0;
    text-align: center;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-links li a:hover {
    color: rgb(176, 5, 219);
}

/* Hero Section */
.hero {
    padding: 100px 20px;
    margin-top: 80px;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(135deg, #6a0dad, #ff79c6);
    color: white;
}

.grid-layout {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line if there's not enough space */
    gap: 30px;
    padding: 20px;
    width: 100%; /* Full width of the container */
    box-sizing: border-box; /* To include padding in the width */
    max-width: 100%; /* Prevent horizontal overflow */
    justify-content: center; /* Center the grid items horizontally */
}

.grid-item {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%; /* Make grid items take full width */
    max-width: 600px; /* Limit the width of each item on mobile */
}

/* Social Wall & Contact */
.social-wall, .contact {
    padding: 50px 20px;
    text-align: center;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: auto;
}

.blog {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.blog-post {
    margin-bottom: 20px;
}

.blog-post h2 {
    color: #6a0dad;
}

.date {
    font-size: 0.9em;
    color: gray;
}

main {
    flex: 1;
}

/* Style the navigation menu */
.topnav {
    overflow: hidden;
    background-color: #6a0dad;
    position: relative;
}

/* Hide the links inside the navigation menu (except for logo/home) */
.topnav #myLinks {
    display: none;
}

/* Style navigation menu links */
.topnav a {
    color: white;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    display: block;
}

/* Style the hamburger menu */
.topnav a.icon {
    background: #6a0dad;
    display: block;
    position: absolute;
    right: 0;
    top: 0;
}

.topnav .icon {
    display: block;
}

/* Add a grey background color on mouse-over */
.topnav a:hover {
    background-color: #ddd;
    color: rgb(0, 0, 0);
}

/* Style the active link (or home/logo) */
.active {
    background-color: #04AA6D;
    color: white;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
    .grid-layout {
        flex-direction: column; /* Stack items vertically */
    }

    .hero {
        padding: 80px 20px;
    }

    .nav-links {
        gap: 10px;
    }

    .blog {
        margin: 20px auto;
        padding: 15px;
    }
}

@media (min-width: 769px) {
    .topnav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    /* Always show the nav-links in a row */
    .nav-links {
        display: flex !important; /* Ensure it's visible */
        list-style: none;
        gap: 15px;
        padding: 0;
    }

    .nav-links li {
        display: inline-block;
    }

    .nav-links li a {
        display: inline-block;
        padding: 14px 16px;
        text-decoration: none;
        color: white;
        font-weight: bold;
    }

    /* Hide the hamburger menu on desktop */
    .topnav a.icon {
        display: none !important;
    }

    /* Make sure #myLinks is not affecting visibility */
    #myLinks {
        display: block !important;
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }

    .grid-layout {
        flex-direction: column;
        padding: 10px;
    }

    .hero {
        padding: 60px 20px;
    }

    footer {
        font-size: 0.9em;
    }

    .nav-links {
        flex-direction: column;
        display: none; /* Hide regular nav links on small screens */
    }

    .topnav {
        display: block; /* Show the hamburger menu */
    }

    .grid-item {
        width: 100%; /* Ensure grid items take full width */
        max-width: 100%; /* Remove any extra width constraints */
    }
}

@media (max-width: 480px) {
    .sticky-header {
        padding: 10px 0;
    }

    .hero {
        padding: 50px 10px;
    }

    .grid-item {
        padding: 15px;
        max-width: 100%; /* Ensure items don't stretch beyond screen width */
    }

    .blog {
        margin: 10px;
        padding: 10px;
    }

    .blog-post h2 {
        font-size: 1.2em;
    }
}
