:root {
    --radius: 5px;
    --shadow: 0 4px 24px rgba(79, 140, 255, 0.3);
    --font-main: 'Inter', 'Segoe UI', Arial, sans-serif;
}

*,
*::after,
*::before{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html, body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--background) 100%);
    position: relative;
}

body{
    max-width: 100vw;
}

header{
    top: 0;
    position: sticky;
    z-index: 100;
}

header > div {
    color: #fff;
    width: 100%;
    background: linear-gradient(135deg, #01481b, #00992b);
    box-shadow: var(--shadow);
    padding: .5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

header div div.title-section,
footer div.title-section{
    display: flex;
    align-items: center;
    gap: 3px;
}

header div div img[alt="Logo"]{
    max-height:60px;
    padding: 3px 0 3px 3px;
    border-radius: 10px;
}
header div div h1{
    font-size: 14pt;
    font-family: sans-serif;
    padding-top: .3rem;
}
header div div h3{
    font-size: 12pt;
    font-family: sans-serif;
    padding: 0.3rem .3rem 0 .3rem;
    text-align: right;
}

header nav {
    width: 100%;
    background:linear-gradient(135deg, #998500, #80611a);
    box-shadow: var(--shadow);
    padding: .3rem 0;
}

header nav .nav-toggle {
  display: none;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 500;
} 

header nav ul {
    list-style: none;
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

header nav ul{
    width: 100%;
    z-index: 1000;
} 

header nav ul li {
    position: relative;
    white-space: nowrap;
}

header nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: #fff;
    font-weight: 300;
    font-size: 1rem;
    font-family: verdana;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

header nav ul li a:hover{
    background: linear-gradient(135deg, #e3f0ff 0%, #cbe2ff 100%);
    color: #005f99;
}

header nav ul li a[href="#"]:hover{
    cursor: default;
}

header nav ul li a.active,
header nav ul li:has(.active)>a{
    background: linear-gradient(135deg, #e3f0ff 0%, #cbe2ff 100%);
    color: #005f99;
}

header nav ul li ul {
    display: none;
    position: absolute;
    top: 105%;
    right: 50%;
    transform: translate(50%, 0);
    min-width: 180px;
    width: fit-content;
    background:linear-gradient(135deg, #998500bb, #80611ac9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 0.5rem 0;
    z-index: 1000;
    flex-direction: column;
    align-items: baseline;
    gap: 0;
}

header nav ul li:hover > ul{
    display: flex;
}

header nav ul li ul li{
    width: 100%;
}

header nav ul li ul li a {
    padding: 0.5rem;
    color: #fff;
    border-radius: 0;
    background: none;
    font-size: 1rem;
}

header nav ul li ul li a:hover,
header nav ul li ul li a:focus {
    text-align: right;
    background: #f0f7ff;
    color: #005f99;
}

main {
    max-width:100%;
}

main .page-header{
    position: relative;
    margin: auto;
}

main .page-header img{
    width: 100%;
}

main .page-header h1{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    background-color:transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-family: Verdana;
    font-size: clamp(1rem, 3rem, 5vw);
    overflow: auto;
    padding-top: 1rem;
    padding-left: 1rem;
}


footer {
    background: linear-gradient(135deg, #4e0113 0%, #a3020a 100%);
    color: #fff;
    text-align: center;
    font-size: var(--font-main);
    padding-top:1rem;
    padding-bottom: 3px;
    box-shadow: var(--shadow);
}

footer div:has(ul){
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
}

footer div.title-section img{
    max-width: 80px;
    border-radius: 10px;
}

footer div.title-section p{
    text-align: left;
}

footer div ul{
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin-bottom: 2.5rem;
}

footer div ul li{
    display: flex;
    align-items: center;
    gap: 1rem;
}

footer div ul li a{
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer div:last-of-type a{
    color: #a7a7b1;
}

footer > div:last-of-type{
    display: flex;
    justify-content: center;
    gap: 2.5em;
    margin-bottom: 2.5rem;
}

@media (max-width: 1097px) {
    header > div div.motto{
        width: 100%;
        text-align: center;
    }
    header > div div.motto h3{
        text-align: center;
        padding: .3rem;
    }
}


@media (max-width: 750px) {
    header > div div.motto{
        width: 100%;
        text-align: center;
    }
    header div div.title-section div h1:last-child{
        display: none;
    }
    header div div h3{
        text-align: center;
    }
    header nav{
        position: absolute;
        top: 10%;
        right: .1rem;
        width: fit-content;
        background: none;
    }
    header nav .nav-toggle {
        display: flex;
        color: goldenrod;
    }

    header nav:has(ul.active){
       background:linear-gradient(135deg, #998500bb, #80611ac9);
       padding: 0 .5rem;
       border-radius: 0 5px 5px 0;
    }

    header nav > ul {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: fit-content;
        position: absolute;
        background:linear-gradient(135deg, #998500bb, #80611ac9);
        box-shadow: var(--shadow);
        backdrop-filter: blur(5px);
    }

    header nav ul.active {
        display: flex;
        top: 0;
        right: 100%;
        padding: 1rem 0;
    }

    header nav ul li ul {
        top: 0;
        right:100%;
        transform: translate(0, 0);
        min-width: fit-content;
        max-width: 50vw;
    }

    header nav ul li a{
        width: 100%;
    }
    
    header nav ul li{
        width: 100%;
    }
    
    header nav ul li ul li a{
        text-align: right;
    }
}
