/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography */
html, body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #FFF;
    background-color: #FFF;
    height: 100%;
}

body{
	display: grid;
	/*flex-direction: column; */
	grid-template-rows: auto 1fr auto; /* header / content / footer */
    min-height: 100vh;
    min-height: 100dvh;  /* dynamic viewport height, updates with toolbar */
}

/* Colors */
:root {
    --nav_bg:   #fff;
    --nav_c: #59b957;
    --footer_bg: #fff;
    --footer_c: #59b957;
    --main_bg:  #FFF;
    --main_c: #22385B;
    --signin_bg: #2B4360;
    --signin_c: #657A93;
    --ribbon_bg: #053427;
    --ribbon_c: #95b1a9;
    --ribbon_active: #22614f;
}

/* Nav bar */
nav, footer{
	display: flex;
	align-items: center;
	justify-content: center; 
}

nav{
	background-color: var(--nav_bg);
	color: var(--nav_c);
	height: clamp(70px, 5.5vh, 100px);
}

main{ 
	padding: 0 1rem 1rem 1rem;
	background-color: var(--main_bg);
}

footer{
	height: clamp(3rem, 5.5vh, 6rem);
	background-color: var(--footer_bg);
	color: var(--footer_c);
	border-top: 1px solid var(--footer_c);
	border-bottom: 1px solid var(--footer_c);
}

.nav-container, .footer-container {
	width: 85%;
}
.nav-container {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}

.footer-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: clamp(.8rem, 2vw, 1rem);
}

.logo img{
	width: clamp(70px, 20vw, 150px);
	height: auto;
	display: block;
}

.logo {
	justify-self: start;
}

.name{
	font-weight: bold;
	font-size: clamp(14px, 2vw, 20px);
	display: inline-block;
	justify-self: center;
}

.sign-in{
	font-weight: bold;
	font-size: clamp(14px, 2vw, 20px);
	display: inline-block;
	justify-self: end;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(35px, 5.8vw, 55px);
    height: clamp(35px, 5.8vw, 55px);
    border-radius: 50%;
    background-color: var(--nav_c);
    color: var(--nav_bg);
    font-size: clamp(1rem, 1.2vw, 2rem);
    font-weight: 600;
    font-family: inherit;
    user-select: none;
}
.sign-in a{
	color: var(--nav_c);
	text-decoration: none;
	padding-right: 10px;
}

.container{
	display: flex;
	flex-direction: row;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.avatar-wrapper {
    position: relative;
}

.avatar {
    cursor: pointer;
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}

.avatar-dropdown.open {
    display: block;
}

.dropdown-name {
    padding: 0.75em 1em;
    font-weight: 600;
    color: var(--main_c);
    border-bottom: 1px solid #eee;
}

.avatar-dropdown a {
    display: block;
    padding: 0.75em 1em;
    color: var(--main_c);
    text-decoration: none;
    font-size: 0.95rem;
}

.avatar-dropdown a:hover {
    background-color: #f5f5f5;
}

/* Base styles = mobile (< 480px) already your default */

/* Small devices (large phones, 480px and up) */
@media (min-width: 480px) {
    .nav-container, .footer-container {
        width: 90%;
    }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .nav-container, .footer-container {
        width: 80%;
    }
    .container {
        flex-direction: row;
    }
}

/* Small laptops/desktops (1024px and up) */
@media (min-width: 1024px) {
    .nav-container, .footer-container {
        width: 75%;
    }
}

/* Large desktops (1440px and up) */
@media (min-width: 1440px) {
    .nav-container, .footer-container {
        max-width: 1200px; /* prevents it from getting absurdly wide */
        width: 75%;
    }
}

