/* Styles for the base template */

html, body {
    font-family: Lato, Calibri, sans-serif;
    font-size: 1.1rem;
    background-color: #f2f2f2;
    color: #333;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: "Poppins", Lato, Calibri, sans-serif;
    font-weight: lighter;
}

.header {
    display: flex;
    position: relative;
    background: none;
    margin-top: 0;
    height: 6rem;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.30);
    padding: 0.2rem 1rem;
    font-family: "Poppins", Calibri, sans-serif;
    overflow: visible;
    justify-content: space-between;
    align-items: center;
}

.header-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(45deg, #4A5F4D, #90EE90, #bab464);
}

.header-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/images/pike_pattern.webp');
    background-size: 100%;
    background-repeat: repeat;
    background-position: 0 50%;
    opacity: 0.65;
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    display: flex;
    max-width: 120px;
    height: auto;
}

.header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    flex-wrap: wrap;
}

.header-nav a {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    font-family: "Poppins", Calibri, sans-serif;
    font-size: 1.05rem;
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    text-decoration: none;
    text-align: center;
}

.header-nav a.header-nav-item:not(.no-hover):hover {
    color: #b4e3b4;
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.nav-item-with-dropdown {
    display: flex;
    align-items: center;
    margin: 0 0.5rem;
    position: relative;
}

.nav-item-with-dropdown a.header-nav-item.no-hover {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    font-family: "Poppins", Calibri, sans-serif;
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
    margin: 0;
    text-decoration: none;
    text-align: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.95);
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
    z-index: 9999;
    white-space: nowrap;
    text-align: center;
}

.dropdown-item {
    color: #fff;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #006400;
    transform: scale(1.05);
}

.nav-item-with-dropdown:hover .dropdown-menu {
    display: block;
}

.main-content {
    padding: 1rem 2rem 2rem 2rem;
    flex: 1 0 auto;
}

.page-title {
    text-align: center;
    font-size: 2rem;
    font-family: "Poppins", Lato, Calibri, sans-serif;
    margin-bottom: 1.75rem;
    color: darkgreen;
}

.subtitle {
    font-size: 1.6rem;
    color: #1c1c1c;
    margin-bottom: 0;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #e8e8e8;
    border-top: 1px solid #ccc;
    flex-shrink: 0;
}

.btn,
.btn-primary {
    background-color: #024502;
    color: #ffffff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.btn:hover,
.btn-primary:hover {
    background-color: #6B8E23;
    transform: scale(1.05);
}

.btn:active,
.btn-primary:active {
    transform: translateY(0);
}

.button-wrapper {
    display: flex;
    padding: .25rem 1rem;
}

.footer-container {
    font-family: Lato, Calibri, sans-serif;
    font-size: 0.8rem;
    color: #666;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.center-text {
    text-align: center;
    margin: 0;
}

.general-conditions {
    margin: 0;
    text-align: left;
    color: #666;
    text-decoration: underline;
    transition: color 0.3s ease-in-out;
}

.general-conditions:hover {
    cursor: pointer;
    color: #454545;
}

.update {
    margin: 0;
    text-align: right;
}

.justified-text {
    text-align: justify;
}

.github-link {
    color: #666;
    text-decoration: underline;
    transition: color 0.3s ease-in-out;
}

.github-link:hover {
    cursor: pointer;
    color: #454545;
}

@media (max-width: 1077px) {
    .header {
        height: auto;
        padding: 0.5rem 1rem;
    }

    .header-logo img {
        max-width: 110px;
    }

    .header-nav a {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
        margin: 0 0.4rem;
    }

    .nav-item-with-dropdown {
        margin: 0 0.4rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
        margin: 0;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1.4rem;
    }
}

@media (max-width: 976px) {
    .header-nav a {
        font-size: 0.95rem;
        padding: 0.35rem 0.7rem;
        margin: 0 0.3rem;
    }

    .header-logo img {
        max-width: 100px;
    }

    .nav-item-with-dropdown {
        margin: 0 0.3rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.95rem;
        padding: 0.35rem 0.7rem;
        margin: 0;
    }
}

@media (max-width: 896px) {
    .header-logo img {
        max-width: 90px;
    }

    .header-nav a {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
        margin: 0 0.2rem;
    }

    .nav-item-with-dropdown {
        margin: 0 0.2rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
        margin: 0;
    }
}

@media (max-width: 813px) {
    .header-logo img {
        max-width: 80px;
    }

    .header-nav a {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
        margin: 0 0.15rem;
    }

    .nav-item-with-dropdown {
        margin: 0 0.15rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
        margin: 0;
    }

    html, body {
        font-size: 1rem;
    }

    .footer-container {
        font-size: 0.7rem;
    }
}

@media (max-width: 682px) {
    .header-logo img {
        max-width: 75px;
    }

    .header-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-nav a {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        margin: 0.2rem 0.1rem;
        text-align: center;
    }

    .nav-item-with-dropdown {
        margin: 0.2rem 0.1rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
        margin: 0;
    }

    .dropdown-item {
        padding: 0.4rem 0.8rem;
        text-align: center;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    html, body {
        font-size: 0.95rem;
    }
}

@media (max-width: 613px) {
    .header-logo img {
        max-width: 70px;
    }

    .header-nav a {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        margin: 0.15rem 0.1rem;
    }

    .nav-item-with-dropdown {
        margin: 0.15rem 0.1rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
        margin: 0;
    }

    .dropdown-item {
        padding: 0.35rem 0.7rem;
    }

    .footer-container {
        font-size: 0.65rem;
    }
}

@media (max-width: 565px) {
    .header-logo img {
        max-width: 60px;
    }

    .header-nav a {
        font-size: 0.7rem;
        padding: 0.25rem 0.3rem;
        margin: 0.1rem 0.05rem;
    }

    .nav-item-with-dropdown {
        margin: 0.1rem 0.05rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
        margin: 0;
    }

    .dropdown-item {
        padding: 0.3rem 0.6rem;
        text-align: center;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    html, body {
        font-size: 0.9rem;
    }

    .footer-container {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .header-logo img {
        display: none;
    }
}

@media (max-width: 420px) {
    .header-nav a {
        font-size: 0.65rem;
        padding: 0.2rem 0.25rem;
        margin: 0.1rem 0.05rem;
    }

    .nav-item-with-dropdown {
        margin: 0.1rem 0.05rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.65rem;
        padding: 0.2rem 0.25rem;
        margin: 0;
    }

    .dropdown-item {
        padding: 0.25rem 0.5rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    html, body {
        font-size: 0.85rem;
    }

    .footer-container {
        font-size: 0.55rem;
    }
}

@media (max-width: 367px) {
    .header-nav a {
        font-size: 0.6rem;
        padding: 0.2rem 0.2rem;
    }

    .nav-item-with-dropdown {
        margin: 0.05rem 0.025rem;
    }

    .nav-item-with-dropdown a.header-nav-item.no-hover {
        font-size: 0.6rem;
        padding: 0.1rem 0.2rem;
        margin: 0;
    }

    .dropdown-item {
        padding: 0.2rem 0.4rem;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    html, body {
        font-size: 0.8rem;
    }

    .footer-container {
        font-size: 0.5rem;
    }
}