/* Universal styles */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

:root{
    --header-height: 200px;

    --colour-1: #e6f1f5; 
    --colour-2: #9bcdd6; 
    --colour-3: #627260;
    --colour-4: #e5ab78; 
    --colour-5: #ffffffcd;
    --colour-6: #606b72; 
   
}

body{
    background: var(--colour-1);
    padding-top: 65px;
    transition: padding-top 0.6s ease;
}

/*------- NAVBAR -------*/
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--colour-5);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: top 0.6s ease-in-out;
}

#navbar.hidden {
    top: -135px;
}

#navbar ul {
    position: relative;
    overflow: hidden;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#navbar ul li.menu,
#navbar ul li.btn_logout {
    padding: 20px 0px;
    display: none;
    width: 100%;
    text-align: center;
}

#navbar #menu-toggle:checked ~ ul {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background-color 0.3s ease;
    z-index: 999;
}

#navbar #menu-toggle:checked ~ ul li.menu,
#navbar #menu-toggle:checked ~ ul li.btn_logout {
    display: block;
    margin-bottom: 20px;
    width: 80%;
    max-width: 300px;
}

#navbar .hamburger-icon {
    display: block;
    cursor: pointer;
    padding: 5px;
    position: absolute;
    top: 15px;
    right: 15px;
    left: auto;
    z-index: 1001;
}

#navbar .hamburger-icon .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--colour-3);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

#navbar #menu-toggle {
    display: none;
}

#navbar #menu-toggle:checked + .hamburger-icon .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#navbar #menu-toggle:checked + .hamburger-icon .bar:nth-child(2) {
    opacity: 0;
}

#navbar #menu-toggle:checked + .hamburger-icon .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- Logo Styles --- */
#navbar li.logo {
    padding: 0;
    margin-right: auto;
    order: -1;
}

#navbar li.logo a {
    display: flex;
    align-items: center;
    text-transform: uppercase;
    color: var(--colour-3);
    font-family: serif;
    font-weight: 300;
    font-size: 22px;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-left: 0;
    transition: color 0.3s ease;
}

#navbar li.logo a .img-logo {
    height: 25px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* --- Menu Item Styles --- */
#navbar li.menu a {
    color: var(--colour-3);
    text-transform: uppercase;
    text-align: center;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: color 0.3s ease;
}

#navbar #menu-toggle:checked ~ ul li.logo {
    display: none;
}

#navbar #menu-toggle:checked ~ ul li.menu a,
#navbar #menu-toggle:checked ~ ul li.btn_logout a {
    font-size: 18px;
    padding: 15px 20px;
    width: 100%;
}

#navbar #menu-toggle:checked ~ ul li.btn_logout a {
    margin-top: 20px;
}

#navbar li.menu a:hover,
#navbar li.menu a.active {
    color: var(--colour-2);
}

/* --- Logout Button Styles --- */
#navbar li.btn_logout {
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

#navbar li.btn_logout a {
    display: block;
    color: var(--colour-3);
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    padding: 10px 20px;
    box-sizing: border-box;
    transition: color 0.3s ease;
}

#navbar li.btn_logout a:hover {
    color: var(--colour-2);
}





/*------- FOOTER -------*/
.footer {
    background-color: var(--colour-6);
    padding: 50px 40px 25px;
    font-weight: 300;
    font-family: 'Arial', sans-serif;
    line-height: 1.7;
    color: var(--colour-1);
}


.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr 1.3fr;
    gap: 30px;
    max-width: 1200px;
    margin-left: 50px;
    padding: 0 20px;
}

/* Individual Footer Columns */
.footer-col {
    padding-left: 50px;
}

.footer-col.footer-logos {
    padding-left: 150px;
}

.footer-contact-info {
    padding-left: 50px;
}

/* Common heading style for all columns */
.footer-col h4,
.footer-contact h4 {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--colour-1);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-col ul li,
.footer-contact ul li {
    margin-bottom: 8px;
}

.footer-col ul li a,
.footer-contact ul li a {
    color: var(--colour-1);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.footer-col ul li a:hover,
.footer-contact ul li a:hover {
    text-decoration: underline;
    color: var(--colour-4);
}

/* --- Brand Info Column Specifics (.web-brand-info) --- */
.web-brand-info {
    display: flex;
    flex-direction: column;
}

.web-brand-info .footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
}

.web-brand-info .footer-logo::before {
    content: '';
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: var(--colour-4);
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.web-brand-info h3 {
    font-size: 1.6em;
    color: var(--colour-1);
    margin: 0;
    font-weight: 600;
}

.tagline {
    font-size: 0.85em;
    color: var(--colour-1);
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 220px;
}

.footer-contact-info ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: var(--colour-1);
    margin-bottom: 8px;
}

.footer-contact-info ul li i {
    font-size: 1.1em;
    color: var(--colour-1);
    margin-top: 2px;
}

.footer-contact-info ul li a {
    color: var(--colour-1);
    text-decoration: none;
}

.footer-contact-info ul li a:hover {
    text-decoration: underline;
    color: var(--colour-4);
}

/* --- Footer Logos Section Styles --- */
.footer-logos .verified-by,
.footer-logos .members-of {
    margin-bottom: 20px;
}

.footer-logos .members-of {
    margin-top: 0;
}

.footer-logos .logo-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.footer-logos .logo-group img {
    height: 35px;
    width: auto;
    filter: grayscale(0%) brightness(100%); /* Original color */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-logos .logo-group img:hover {
    transform: scale(1.05);
    filter: grayscale(60%) brightness(110%); /* Apply grayscale on hover */
}

/* --- Footer Bottom Section --- */
.footer-bottom {
    border-top: 1px solid var(--colour-1);
    color: var(--colour-1);
    margin-top: 30px;
    padding-top: 20px;
    font-size: 0.85em;
    text-align: left;
}

.bottom-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    padding-left: 10px;
    margin-left: 10px;
}

/* --- Media Query --- */

/* --- NAVBAR --- */
@media (min-width: 870px) {
    #navbar ul {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 20px;
        position: relative;
        background-color: var(--colour-5);
        height: auto;
    }

    #navbar .hamburger-icon {
        display: none;
    }

    #navbar #menu-toggle {
        display: none;
    }

    #navbar ul li.menu,
    #navbar ul li.btn_logout {
        display: block;
        width: auto;
        margin-bottom: 0;
    }

    #navbar li.logo {
        margin-right: 50px;
        order: 0;
    }

    #navbar li.logo a {
        font-size: 25px;
        max-width: unset;
    }

    #navbar #menu-toggle:checked ~ ul li.logo {
        display: block;
    }

    #navbar li.logo a .img-logo {
        height: 30px;
        margin-right: 10px;
    }

    #navbar li.menu a {
        padding: 14px 25px;
        font-size: 15px;
        display: block;
    }

    #navbar li.btn_logout {
        margin-left: auto;
        width: auto;
    }

    #navbar li.btn_logout a {
        padding: 12px 20px;
        font-size: 15px;
    }
}



/* --- FOOTER --- */

/* Small screens (e.g., phones, small tablets) */
@media (max-width: 768px) {
    .footer {
        padding: 30px 15px 15px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0;
    }
    .web-brand-info,
    .footer-col, /* This applies text-align: center to Quick Links title */
    .footer-contact,
    .footer-logos {
        text-align: center;
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .footer-col,
    .footer-col.footer-logos,
    .footer-contact-info {
        padding-left: 0;
    }
    
    /* Add this specifically for Quick Links content on small screens */
    .footer-col:nth-of-type(1) ul { /* Targets the ul within Quick Links column */
        text-align: center; /* Centers the list items' text */
        padding: 0; /* Remove default padding that pushes content right */
        width: fit-content; /* Shrink ul to content width */
        margin: auto; /* Center the ul block itself */
    }
    .web-brand-info .footer-logo {
        justify-content: center;
    }
    .tagline {
        margin: 0 auto 20px auto;
    }
    .footer-logos .logo-group {
        justify-content: center;
        gap: 8px;
    }
    .footer-bottom .bottom-content {
        justify-content: center;
        padding-left: 0;
    }
    .footer-contact-info ul {
        padding: 0;
    }
    .footer-contact-info ul li {
        justify-content: center;
        align-items: center;
        text-align: left;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Medium screens (e.g., tablets in landscape, small laptops - including 1022px) */
@media (min-width: 768px) and (max-width: 970px) {
     .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .web-brand-info {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        text-align: left;
    }
    

    .footer-col:nth-of-type(1) { /* Quick Links */
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        order: unset;
        text-align: center; /* This centers the "QUICK LINKS" title */
    }
    /* ADD OR UPDATE THIS BLOCK for Quick Links content centering */
    .footer-col:nth-of-type(1) ul { /* Targets the ul within Quick Links column */
        text-align: center; /* Centers the list items' text */
        padding: 0; /* Remove default padding that pushes content right */
        width: fit-content; /* Shrink ul to content width */
        margin: auto; /* Center the ul block itself */
    }

    .footer-contact {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        order: unset;
        text-align: center;
    }

    .footer-logos {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        margin-top: unset;
        text-align: center;
    }

    .web-brand-info .footer-logo {
        justify-content: flex-start;
    }
    .tagline {
        margin-left: 0;
    }
    .footer-logos .logo-group {
        justify-content: center;
    }
    .footer-contact-info ul li {
        justify-content: center;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
}


/* Large screens (e.g., desktops) */
@media (min-width: 1024px) {
    .footer-container {
        grid-template-columns: 1.5fr 0.8fr 1fr 1.3fr;
        gap: 30px;
    }
    .web-brand-info,
    .footer-col:nth-of-type(1), /* And here to revert Quick Links to left-aligned on desktop */
    .footer-contact,
    .footer-logos {
        grid-column: auto;
        grid-row: auto;
        order: unset;
        text-align: left; /* Default text-align left for desktop */
        margin-top: unset;
        margin-bottom: unset;
    }
    /* Revert Quick Links ul specific centering for desktop */
    .footer-col:nth-of-type(1) ul {
        text-align: left;
        width: auto;
        margin: 0;
        padding: 0; /* Ensure this is here if you remove default browser padding */
    }
    .web-brand-info .footer-logo,
    .footer-logos .logo-group {
        justify-content: flex-start;
    }
    .footer-contact-info ul li {
        justify-content: flex-start;
        width: auto;
        margin-left: unset;
        margin-right: unset;
    }
}