@font-face {
    font-family: Oswald;
    src: url(../fonts/Oswald/Oswald-VariableFont_wght.ttf);
}

@font-face {
    font-family: F4B;
    src: url(../fonts/F4B/f4b.ttf);
}

@font-face {
    font-family: Raleway;
    src: url(../fonts/Raleway/Raleway-VariableFont_wght.ttf);
}

@font-face {
    font-family: JustAnotherHand;
    src: url(../fonts/JustAnotherHand/JustAnotherHand-Regular.ttf);
}


@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        /* opacity: 0; */
    }

    100% {
        transform: translateY(0);
        /* opacity: 1; */
    }
}

:root {
    --header-color: #ffffffd4;
    --background-color: #eaeaea;
    --text-color: black;
    --text-color-dim: rgb(108, 108, 108);
    --background-color-inverse: black;
    --text-color-inverse: white;

    --main-content-background: #18157c;
    --blur-background: rgb(255, 255, 255, 0.8);

    --flag-blue: #01127c;
    --flag-yellow: #ff9e1a;

    --header-height: 70px;
    --header-tucked-height: 60px;
}

body {
    font-family: F4B;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100vh;
    color: var(--text-color);
    background-color: var(--main-content-background);
}

.modal-open {
    overflow: hidden !important;
}

body.modal-open .page-wrapper {
    transform: scale(0.95);
    filter: brightness(0.5);
    overflow: hidden !important;
    pointer-events: none;
}

/* Ensure page wrapper does not affect modal */
.page-wrapper {
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    width: 100%;
    transform-origin: 50% 25%;
}

main {
    margin-top: var(--header-height);
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    background: transparent;
    min-height: calc(100vh - var(--header-height));
    transition: filter 0.3s, margin-top 0.3s;
}

main.hidden {
    margin-top: var(--header-tucked-height);
}



.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 40px);
    max-width: 1000px;
    margin-top: 20px;
    margin-bottom: 20px;
    gap: 20px;
}


button {
    font-family: system-ui;
    user-select: none;
    -webkit-user-drag: none;
}

/* End of Body */

/* ~~~~~~~~~~~~~ */

/* Header */


header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    color: var(--text-color);
    position: fixed;
    top: 0;
    z-index: 1000;
    background: var(--header-color);
    transition: height 0.3s, box-shadow 0.3s;
    width: 100%;
    backdrop-filter: blur(7px);
}

header.hidden {
    height: var(--header-tucked-height);
    box-shadow: 0 4px 10px rgb(107 107 107 / 41%);
}


.header-logo-a {
    height: 100%;
    display: flex;
    align-items: center;
}

.header-logo-and-nav {
    display: flex;
    align-items: center;
    margin-left: 50px;
    gap: 30px;
}

.logo {
    height: calc(100% - 20px);
    transition: height 0.3s, margin-left 0.3s;
    margin-left: 10px;
    max-width: 300px;
}

#nav-list {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    position: absolute;
    right: 20px;
}

#nav-list-collapse {
    font-size: 25px;
    margin-left: 10px;
    top: 10px;
    position: absolute;
    color: var(--text-color);
    cursor: pointer;
}

#nav-list ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    list-style-type: none;
    padding-left: 0;
    text-align: center;
    list-style-type: none;
    margin: 0;
}


nav ul li a {
    color: var(--flag-yellow);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 30px;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    font-family: system-ui;
    font-weight: 300;
}


#nav-list ul li {
    margin: 15px 0;
}

#nav-list ul li a {
    color: var(--text-blue);
    font-size: 18px;
}

#nav-list ul li a:hover {
    color: var(--flag-yellow);
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 3px;
    background: var(--flag-yellow);
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

nav ul li a:hover::after,
nav ul li a:focus::after,
nav ul li a.current::after {
    width: 100%;
    left: 0;
}

#nav-list.show {
    transform: unset;
}

.mobile-only {
    display: none;
}

.scale-on-hover {
    transition: transform 0.2s ease;
}

.scale-on-hover:hover {
    transform: scale(1.05);
}

#hamburger-icon {
    cursor: pointer;
}

.hamburger-line {
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Default (Hamburger) State */
.hamburger-line.nav_top {
    transform-origin: center;
}

.hamburger-line.nav_middle {
    opacity: 1;
}

.hamburger-line.nav_bottom {
    transform-origin: center;
}

/* Active (X) State */
#hamburger-icon.nav_active .hamburger-line.nav_top {
    transform: translateY(6px) translateX(-6px) rotate(45deg);
}

#hamburger-icon.nav_active .hamburger-line.nav_middle {
    opacity: 0;
}

#hamburger-icon.nav_active .hamburger-line.nav_bottom {
    transform: translateY(-6px) translateX(-6px) rotate(-45deg);
}


/* Toggle switch */
.toggle-switch {
    display: flex;
    align-items: center;
    margin-right: 20px;
    gap: 10px;
    transition: margin-right 0.3s;
}

#tucked-header.hidden .toggle-switch {
    margin-right: 10px;
}

.switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

/* End of Header */

/* Generic styling for body items */
.paragraph-title {
    font-family: Raleway;
    color: rgb(255 158 26);
    font-weight: bold;
    font-size: 32px;
    margin-bottom: 0px;
}
.paragraph-content {
    font-family: Raleway;
    color: white;
    font-size: 20px;
    text-align: center;
    width: calc(100% - 40px);
    max-width: 750px;
}
section {
    margin-bottom: 20px;
    margin-top: 20px;
    background-color: rgb(227, 227, 227);
    transition: background-color 0.4s ease;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    width: calc(100% - 40px);
    max-width: 700px;
}
/* End of generic styling for body items */

@media (max-width: 960px) {
    .mobile-only {
        display: unset;
    }


    .header-logo-and-nav {
        margin-left: 0px;
    }

    .hamburger-menu {
        display: block;
    }

    /* Mobile menu */
    #nav-list {
        min-width: 200px;
        background: linear-gradient(90deg, #161548, var(--flag-blue));
        transition: all 0.2s ease-in-out;
        z-index: 1000;
        height: calc(100vh - var(--header-height));
        border-radius: 0;
        transform: unset;
        position: fixed;
        top: var(--header-height);
        right: 0;
        transform: translateX(100%);
        left: unset;
    }

    #nav-list ul {
        flex-direction: column;
        margin: 0 60px;
        gap: 0;
        margin-top: 20px;
    }

    #nav-list ul li a {
        color: #ffffff;
    }

    /* Class that will be toggled by JavaScript */
    header {
        justify-content: space-between;
    }

    #tucked-header.hidden #nav-list {
        height: calc(100vh - var(--header-tucked-height));
        top: var(--header-tucked-height);
    }
}


@media (max-width: 768px) {
    :root {
        --header-height: 65px;
        --header-tucked-height: 60px;
    }


    #nav-list ul {
        margin: 0 20px;
    }

    .logo {
        max-width: 250px;
        object-fit: contain;
    }

    #tucked-header.hidden #nav-list {
        height: calc(100vh - 60px);
        top: 60px;
    }
}

@media (max-width: 500px) {
    .logo {
		max-width: 240px;
	}
    
}