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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    max-height: 60px;
}

/* Navigation Styles */
nav {
    margin-left: auto; /* Push nav to the right */
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end; /* Align items to the right */
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
}

/* Main Content Styles */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

.content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #0066cc;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Special reduced spacing for specific sections */
.update-item h2:contains("User Control Panel") + p,
.update-item h2:contains("Enthusiasts Networks") + ul p,
.update-item h3:contains("YouTube Channel") + p {
    margin-bottom: 0.2rem;
}

/* Directory Section Styles */
.directory-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaeaea;
}

.directory-section h2 {
    color: #0066cc;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.directory-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.directory-section li {
    background-color: #f9f9f9;
    padding: 1.25rem;
    border-radius: 5px;
    border-left: 4px solid #0066cc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.directory-section li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.directory-section h3 {
    color: #0066cc;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.directory-section p {
    font-size: 0.95rem;
    color: #555;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: #fff;
    width: 100%;
    margin-top: auto;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Media Queries for Mobile */
@media screen and (max-width: 768px) {
    header {
        justify-content: space-between;
    }
    
    .hamburger {
        display: block;
    }
    
    nav {
        width: auto;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        flex-direction: column;
        justify-content: flex-start; /* Reset to top alignment for mobile menu */
        background-color: #fff;
        padding: 2rem 1rem;
        padding-top: 4rem; /* Space for close button */
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 100;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 1rem 0;
    }
    
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 99;
    }
    
    .overlay.active {
        display: block;
    }
    
    /* Animation for hamburger menu */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Mobile adjustments for directory section */
    .directory-section ul {
        grid-template-columns: 1fr;
    }
}