/*-- -------------------------- -->
<---     Defaults               -->
<--- -------------------------- -*/
@media only screen and (min-width: 0em){
    :root{
        --primary: #fff;
        --secondary: #1e73be;
        --bodyFontSize: 1.3rem;
        --headerFontSize: clamp(1.724rem, 3.9vw, 2.5rem);
        --headerPadding: clamp(7rem, 5vw, 11rem);
    }
    a {
        color: var(--secondary);
        font-size: var(--bodyFontSize);
    }
    ul {
        list-style-type: none;
        font-size: 1.3rem;
    }
    p {
        font-size: var(--bodyFontSize);
        color: #000;
    }
    h1 {
        font-size: var(--headerFontSize);
    }
    h2 {
        font-size: 1.9rem;
    }
    h3 {
        font-size: 1.7rem;
    }
    h4 {
        font-size: 1.5rem;
    }
    li {
        font-size: 1.3rem;
    }
}

/* Reset Margins */
@media only screen and (min-width: 0rem) {
    body,
    html {
      margin: 0;
      padding: 0;
      overflow-x: hidden;
    }
}

/*-- -------------------------- -->
<---     Navigation             -->
<--- -------------------------- -*/

#header-element {
    background-color: #f7f7f7;
}

#header-element a, 
#header-element span.a-nav {
    color: #000;
    text-decoration: none;
}

#header-element a:hover, 
#header-element span.a-nav:hover {
    color: var(--secondary);
}

#header-element .a-nav.active {
    color: var(--secondary);
}

#header-element .dropdown-menu a.active {
    color: var(--secondary);
    background-color: #f0f0f0;
}

/*-- -------------------------- -->
<---     Base Navigation        -->
<--- -------------------------- -*/
@media only screen and (min-width: 0){
    #header-element{
        width: 100%;
        box-sizing: border-box;
        padding: 0 1rem;
        position: sticky;
        z-index: 10000;
        top: 0;
        left: 0;
    }
    .header-container{
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 1.5rem;
    }
    .logo{
        width: 20%;
        max-width: 30rem;
        height: 8.0625rem;
        margin: 0 auto 0 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 100;
    }
    .logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    .ul-nav{
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: clamp(1.25rem, 2.5vw, 2.25rem);
        margin: 0;
        padding: 0;
    }
    .li-nav{
        padding: 0.5rem 0;
    }
    .a-nav{
        font-size: 1.5rem;
        line-height: 1.5em;
        display: block;
        position: relative;
    }
    .toggle-button{
        display: none;
    }

    .dropdown {
        position: relative;
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        border: 1px solid #ddd;
        padding: 0.8rem;
        list-style: none;
        z-index: 10000;
        overflow-y: auto; 
        max-height: 30rem;
    }

    .dropdown-menu li a {
        display: block;
        padding: 0.8rem;
        text-decoration: none;
    }

    .dropdown-menu li a:hover {
        background-color: #f7f7f7;
    }
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .dropdown-toggle {
        cursor: pointer;
    }
}

/*-- -------------------------- -->
<---     Mobile Navigation      -->
<--- -------------------------- -*/
@media only screen and (max-width: 63.9375rem) {
    .logo{
        width: auto;
        height: 100%;
        max-width: 10rem;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-right: auto;
        padding: 1rem;
    }
    .logo img {
        max-width: 100%;
        height: auto;
    }
    .toggle-button {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        width: 40px;
        height: 40px;
        padding: 10px;
        box-sizing: border-box;
    }

    .hamburger {
        display: block;
        width: 100%;
        height: .2rem;
        background-color: #000;
        position: relative;
        transition: background-color 0.3s ease;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        display: block;
        width: 100%;
        height: 0.2rem;
        background-color: #000;
        position: absolute;
        transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
    }

    .hamburger::before {
        top: -8px;
    }

    .hamburger::after {
        top: 8px;
    }

    /* Hamburger animation */
    .toggle-button.open .hamburger {
        background-color: transparent;
    }

    .toggle-button.open .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .toggle-button.open .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        padding: 1rem;
        box-sizing: border-box;
        transition: opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
    }

    .header-nav.open {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .ul-nav {
        flex-direction: column; 
        gap: 1rem;
    }

    .li-nav{
        padding: 0.5rem 0;
    }

    .toggle-button.open ~ .header-nav {
        display: block;
    }
    
    .dropdown-menu{
        touch-action: manipulation;
        pointer-events: auto;
        max-height: 20rem;
    }
}

/*-- -------------------------- -->
<---    Footer                  -->
<--- -------------------------- -*/
@media only screen and (min-width: 0){
    #footer-element {
        width: 100%;
        box-sizing: border-box;
        z-index: 10000;
    }

    .footer-container {
        width: 100%;
    }

    .footer-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        background-color: #fff;
        padding: 1rem 1rem 0 1rem;
    }

    .footer-links a {
        color: #000;
        text-decoration: none;
    }

    .footer-links a:hover {
        color: var(--secondary);
        text-decoration: underline;
    }

    .copyright {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #fff;
        padding: 0.5rem 1rem 1rem 1rem;
    }

    .copyright p {
        color: #000;
    }
}

@media only screen and (max-width: 63.9375rem){
    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
        text-align: center;
    }

    .copyright {
        padding: 0.5rem 1rem 1rem 1rem;
        text-align: center;
    }
}

/*-- -------------------------- -->
<---     Sidebar                -->
<--- -------------------------- -*/

@media only screen and (min-width: 64rem) {
    .main-container {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        gap: 2rem;
    }
    
    main#main {
        flex: 1;
    }
    
    #sidebar-element {
        padding: 2rem 1rem;
        background-color: #f7f7f7;
        margin-top: 2rem;
        width: 300px;
    }
    
    .sidebar-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        margin: 0 auto;
        gap: 2rem;
    }

    .sidebar-card {
        width: 100%;
        background-color: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .sidebar-image-link {
        display: block;
        width: 100%;
    }
    
    .sidebar-image {
        width: 100%;
        height: 200px;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .sidebar-card-text {
        font-size: 1rem;
        margin: 0.75rem 1rem 0.25rem;
    }

    .sidebar-card-desc {
        font-size: 0.9rem;
        color: #555;
        margin: 0 1rem 0.75rem;
        line-height: 1.4;
    }

    .sidebar-btn {
        display: block;
        background-color: var(--secondary);
        color: white;
        padding: 0.6rem 1rem;
        text-decoration: none;
        font-weight: bold;
        border-radius: 4px;
        text-align: center;
        margin: 0 1rem 1rem;
        width: calc(100% - 2rem);
        font-size: 0.95rem;
        transition: background-color 0.3s ease;
        box-sizing: border-box;
    }

    .sidebar-btn:hover {
        background-color: #018e94;
    }
}

/*-- -------------------------- -->
<---     Sidebar on Mobile      -->
<--- -------------------------- -*/
@media only screen and (max-width: 63.9375rem) {
    .main-container {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #sidebar-element {
        width: 100%;
        padding: 2rem 1rem;
        background-color: #f7f7f7;
    }
    
    .sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: center;
        margin: 0 auto;
        gap: 1.5rem;
        max-width: 700px;
    }

    .sidebar-card {
        width: 280px;
        background-color: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .sidebar-image-link {
        display: block;
        width: 100%;
    }

    .sidebar-image {
        width: 100%;
        height: 180px;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .sidebar-card-text {
        font-size: 1rem;
        margin: 0.75rem 1rem 0.25rem;
    }

    .sidebar-card-desc {
        font-size: 0.9rem;
        color: #555;
        margin: 0 1rem 0.75rem;
        line-height: 1.4;
    }

    .sidebar-btn {
        display: block;
        background-color: var(--secondary);
        color: white;
        padding: 0.6rem 1rem;
        text-decoration: none;
        font-weight: bold;
        border-radius: 4px;
        text-align: center;
        margin: 0 1rem 1rem;
        width: calc(100% - 2rem);
        font-size: 0.95rem;
        transition: background-color 0.3s ease;
        box-sizing: border-box;
    }

    .sidebar-btn:hover {
        background-color: #018e94;
    }
}




