/* --- Navbar styling --- */

.navbar {
    position: fixed;
    top: 0;
    
    z-index: 1000;
    
    margin: 0px;
    padding: 0px;
    width: 100%;
    
    list-style-type: none;
    background-color: white;
    border-bottom: 2px solid green;

    display: grid;
    grid-template-columns: 70px 1fr 1fr 1fr minmax(0px, 1fr) 1.2fr;
    place-items: center;
}
.navbar li a{
    text-decoration: none;
    color: black;
}
.navbar li {
    padding: 5px 16px;
    margin: 0px 5px;
    transition: 0.2s ease;
    border-left: 4px solid transparent;
    box-sizing: border-box;
}
.navbar>li:hover{
    transform: scale(1.05);
    border-left: 4px solid green;
}

#logoutBtn {
    font-size: 20px;
}
/* Dropdown menu styling */
.dropdown {
    list-style: none;
    text-decoration: none;

    position: fixed;
    top: 100%;
    right: 0;

    background: white;
    border: 2px solid var(--primary-green-600);
    min-width: 180px;

    padding: 10px;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .navbar {
        grid-template-columns: 100px auto fit-content(150px);
    }

    .navbar li:not(:first-child):not(:nth-child(5)):not(:last-child) {
        display: none;
    }

    .navbar li:nth-child(5) {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        border-radius: 50%;
        background-color: var(--primary-green-600);
        cursor: pointer;
        border: none;
        position: relative;
        transition: background-color 0.3s ease;
    }

    .navbar li:nth-child(5):hover {
        background-color: var(--primary-green-500);
    }

    .navbar li:nth-child(5)::before {
        content: "";
        display: block;
        width: 22px;
        height: 2px;
        background-color: white;
        box-shadow: 0 6px 0 white, 0 -6px 0 white;
        transition: all 0.3s ease;
    }

    .navbar li:nth-child(5)::after {
        content: "";
        display: block;
        width: 22px;
        height: 2px;
        background-color: white;
        position: absolute;
        transition: all 0.3s ease;
    }

    .navbar li:last-child {
        place-items: center;
        margin-left: auto;
    }

    /* Mobile Menu Dropdown */
    .mobile-menu {
        position: fixed;
        top: 11vh;
        left: 0;
        width: 100%;
        background-color: white;
        border-bottom: 2px solid green;
        display: none;
        flex-direction: column;
        z-index: 999;
        max-height: calc(100vh - 11vh);
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-menu.active {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-menu a {
        display: block;
        padding: 15px 20px;
        color: black;
        text-decoration: none;
        border-bottom: 1px solid #eee;
        transition: background-color 0.2s ease;
        font-weight: 600;
    }

    .mobile-menu a:active {
        background-color: var(--primary-yellow-100);
    }

    .mobile-menu a:hover {
        background-color: var(--primary-green-100);
    }

    .mobile-menu a.login-link {
        background-color: var(--primary-green-600);
        color: white;
        border-bottom: none;
    }

    .mobile-menu a.login-link:hover {
        background-color: green;
    }

    .mobile-menu a.logout-link {
        background-color: var(--primary-yellow-300);
        color: black;
        border-bottom: none;
    }

    .mobile-menu a.logout-link:hover {
        background-color: var(--primary-yellow-200);
    }
}

/* --- News window styling --- */

#announcementWrapper{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.scrollBtn{
    border: 2px solid transparent;
    border-radius: 999px;
    background-color: var(--primary-yellow-300);
    box-shadow: 0 4px 8px var(--primary-shadow-300);

    width: 50px;
    aspect-ratio: 1 / 1;
    padding: 0;
    margin: 0;

    font-size: 1.5rem;

    transition: 0.3s ease-out;
}
.scrollBtn:hover{
    border: 2px solid var(--primary-yellow-500);
    background-color: white;
    color: var(--primary-yellow-500);
    box-shadow: 0 0 8px var(--primary-yellow-500);
    transform: translateY(-2px);
}

#announcement{
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 30px 0;

    box-shadow: 0 4px 12px var(--primary-shadow-200);
    border-radius: 20px;

    width: min(80%,700px);

    aspect-ratio: 14/9;
}

#announcementImg{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Home Hero Styling --- */

.homeHero {
    margin-bottom: 30px;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 4px 8px 1px var(--primary-shadow-100);
}

.homeHero h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: green;
}

.homeHero p {
    color: color-mix(in srgb, var(--primary-green-300), black 20%);
    margin-bottom: 12px;
}

/* --- News Announcement Styling --- */

.homeNews ul {
    padding-left: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.homeNews li {
    margin-bottom: 6px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

#newsContainer li p{
    display: inline;
    margin: 0 5px;
}
#newsContainer li p:nth-child(2){
    color: gray;
}
.editSymbol, .delSymbol, .showMoreSymbol{
    cursor: pointer;
    transition: 0.2s ease;
}
.editSymbol:hover{
    color: orange;
    transform: scale(1.1);
}
.delSymbol:hover{
    color: crimson;
    transform: scale(1.1);
}
.showMoreSymbol{
    transform: scale(1.3);
}
.showMoreSymbol:hover{
    color: rgb(131, 131, 131);
    transform: scale(1.45);
}

/* Use to solve News edit form */
.inlineDiv{
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin: 10px;
    box-sizing: border-box;
}

.newsEditContainer{
    display: flex;
    flex-direction: column;
    margin: 20px;
    width: fit-content;
    border-radius: 30px;
    box-shadow: 0 4px 8px var(--primary-shadow-300);
}

.newsEditContainer button{
    margin: 0 auto;
}

/* Just go to course Button */

#goToCourse{
    border: 2px solid transparent;
    border-radius: 20px;
    background-color: var(--primary-yellow-100);
    box-shadow: 0 4px 8px var(--primary-shadow-100);

    padding: 5px;
    margin: 0;

    font-size: 15px;
    font-weight: 700;
    color: rgb(111, 117, 24);

    transition: all 0.3s ease-out;
    cursor: pointer;
}
#goToCourse:hover{
    border: 2px solid var(--primary-yellow-400);
    background-color: white;
    color: var(--primary-yellow-500);
    box-shadow: 0 0 8px var(--primary-yellow-500);
    transform: translateY(-2px);
}
#goToCourse:active{
    transform: translateY(0px) scale(0.97);
    box-shadow: 0 2px 4px var(--primary-shadow-100);
}

/* --- Contact Section Styling --- */

#contact {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 6px 12px var(--primary-shadow-100);
    border-bottom: 5px solid var(--primary-green-300);
    margin-top: 40px;
}

#contact h2 {
    color: green;
    border-bottom: 2px solid var(--primary-yellow-600);
    display: inline-block;
    margin-bottom: 20px;
}

#contact ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#contact li {
    background: rgb(238, 238, 238);
    padding: 15px 25px;
    border-radius: 10px;
    transition: 
        transform 0.2s ease-out, 
        background-color 0.2s ease-out
    ;
    border: 1px solid #eee;
}

#contact li:hover {
    transform: translateY(-3px);
    background-color: var(--primary-yellow-100);
    border-color: var(--primary-yellow-500);
}

#contact a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

#contact i {
    font-size: 1.4rem;
    color: black;
}

/* Specific brand colors on hover */
#contact li:hover i.fa-instagram {
    color: #E1306C; 
}

#contact li:hover i.fa-facebook {
    color: #1877F2;
}

.logo {
    display: block;
    margin: 40px auto 10px;
    max-width: 150px;
    filter: drop-shadow(0 4px 8px var(--primary-shadow-100));
}

#change-language{
    display: flex;
    position: fixed;

    z-index: 999;
    right: 20px;
    bottom: 0;

    border: 4px solid green;
    background-color: var(--primary-green-100);
    box-shadow: 0 0 12px 6px var(--primary-shadow-200);

    width: fit-content;
    padding: 10px;
    gap: 10px;

    border-radius: 40px;
}

.changeLangBtn {
    border: none;
    background: none;
    padding: 0;
    margin: 0;

    border: 1px solid green;
    border-radius: 20px;

    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.changeLangBtn:hover {
    transform: translateY(2px);
}
.changeLangBtn:active {
    opacity: 60%;
}

.changeLangBtn img {
    display: block;
    width: 50px;
    height: 40px;
    object-fit: cover;
}

@media (max-width: 768px) {
    #change-language{
        padding: 5px;
        border: 2px solid green;
    }
    .changeLangBtn img {
        width: 25px;
        height: 25px;
    }
}

.hidden{
    display: none;
}