/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: rgb(167, 202, 131);
    color: #333;
    line-height: 1.6;
    background-image: url(download\ \(3\).jpg);
    background-repeat: repeat;
    background-size: cover;
}

#title {
    align-content: space-around;
    text-align: center;
background-color: rgb(160, 92, 160);
color: rgb(61, 1, 1);
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 2.22em;
    font-weight: 1000px;
}

/* Navigation */
.navbar {
    background-color: rgb(3, 3, 129);
    position: relative;
    top: 0;
    z-index: 1000;
    min-height: 80px;
    gap: 100px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}

.navbar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    justify-content: center;
}

.navbar li {
    position: relative;
}

.navbar a {
    display: block;
    padding: 25px;
    color: yellow;
    font-size: 1.8rem;
    text-decoration: none;
}

.navbar a:hover {
    background-color: rgb(1, 1, 33);
}

/* Dropdown Menu */
.dropdown {
    display: none;
    position: absolute;
    background-color: rgb(5, 5, 1200);
    max-width: 250px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
}

.dropdown a {
    color: yellow;
}

.navbar li:hover .dropdown{
    display: block;
}
.navbar li .dropdown a:hover {
    background-color: rgb(122, 1, 122);
}
.navbar ul li a{
    font-size: 20px;
    justify-content: space-between;
}
/* ==========================================================================
   Mobile-Only Navigation Toggle (Applies to screens under 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* 1. Hide the functional checkbox controller */
    #mobile-menu-checkbox {
        display: block;
    }

    /* 2. Style the Mobile Menu Bar Toggle Button */
    .burger-button {
        display: block;
        background-color: #000080; /* Deep navy */
        color: #ffffff;
        padding: 15px 20px;
        font-size: 1.1rem;
        font-weight: bold;
        text-align: left;
        cursor: pointer;
        user-select: none;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    /* 3. Hide the entire navbar by default on mobile */
    .navbar {
        display: none;
        width: 100%;
        background-color: #000080;
    }

    /* 4. The Toggle Mechanic: When checkbox is checked, show the navigation list */
    #mobile-menu-checkbox:checked ~ .navbar {
        display: block;
    }

    /* 5. Transform layout stack to fit narrow vertical rows */
    .navbar > ul {
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .navbar > ul > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar > ul > li > a {
        display: block;
        padding: 14px 20px;
        color: #ffffff;
        text-decoration: none;
        font-weight: bold;
    }

    /* 6. Display dropdown sub-menus inline as vertical accordion cards */
    .navbar .dropdown {
        background-color: rgba(0, 0, 0, 0.15); /* Tint background to show hierarchy */
        padding: 0;
    }

    .navbar .dropdown ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .navbar .dropdown ul li a {
        display: block;
        padding: 12px 20px 12px 35px; /* Pushes text right to show it is a submenu item */
        color: #e0e0e0;
        text-decoration: none;
        font-size: 0.9rem;
    }

    /* Subtle touch feedback hover/press color */
    .navbar a:active, .navbar a:hover {
        background-color: #1e3f66;
    }
}

/* ==========================================================================
   Desktop Fallback (Hides the mobile elements on big screens)
   ========================================================================== */
@media (min-width: 769px) {
    #mobile-menu-checkbox,
    .burger-button {
        display: none !important;
    }
}

/* Search Bar */
.search {
    display: flex;
    align-items: center;
    padding: 20px 0;
    margin-left: 0px;
}

.search input {
    width: 70%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 15px;
}
.Announcement a{
    color: rgb(118, 131, 1);
    font-size: 1.25em;
    text-decoration: none;
    font-weight: 800;
    
}
.img{
        height: 15px;
        width: 15px;
        display: contents;
        justify-content: center;
        align-items: center;
    }
/* Main Content Layout - Mobile First */
main {
    display: flex;
    flex-direction: column; /* Stacked by default */
    padding: 15px;
    gap: 20px;
}

aside, section, article {
    background: rgb(187, 185, 185);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
aside h1{
     font-size: 1.6rem;
     font-weight: 750;
    color: rgb(85, 7, 129);
}
aside .Q{
    color: rgb(4, 0, 17);
    font-size: 1.8em;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;}
    
aside ul a{
    font-size: 1.4em;
    font-weight: 500;
}
aside li{
    list-style: none;
    margin-left: 22px;
}
article h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: rgb(85, 7, 129);
    ul li a p{
        font-size: 1.3rem;
        color:rgb(85, 7, 129) ;
    }
}
/* Section (Subject Descriptions) */
section ul {
    list-style: none;
}

section li {
    margin-bottom: 30px;
}
section ul li p{
    font-size: 22px;
    font-weight: 520;
} 

section h1 {
    color: #960756;
    border-left: 5px solid #960756;
    padding-left: 10px;
    margin-bottom: 10px;
    font-weight: 900;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

/* Article (Rules & Hazards) */
article ul {
    list-style: none;
}

article h2 {
    font-size: 1.3rem;
    margin-top: 15px;
}
article ul li p{
    font-weight: 520;
    font-size: 1.3em;
}

/* RESPONSIVE DESIGN - Desktop (Laptops) */
@media (min-width: 1024px) {
    main {
        flex-direction: row; /* Side-by-side layout */
        align-items: flex-start;
    }

    aside {
        flex: 1; /* Narrower sidebar */
        position: sticky;
        top: 80px;
    }

    section {
        flex: 2; /* Wider center content */
    }

    article {
        flex: 1; /* Narrower right side */
    }

    .navbar a {
        font-size: 16px;
    }
}

/* Small Screen Adjustments */
@media (max-width: 600px) {
    .navbar ul {
        flex-direction: column;
    }
    
    .dropdown {
        position: static; /* Dropdowns flow within the menu on mobile */
        width: 100%;
    }
    
    #title {
        font-size: 1.5rem;
    }
}
footer{
   background-color: rgb(0, 0, 63);
   height: 122px; 
   text-align: center;
   font-size: 1.2em;
   font-weight: 600;
   color: green;
}
