/* Variable fonts */
@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 75% 100%;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 75% 100%;
    font-style: italic;
}

/* Fallback for older browsers (optional) */
@font-face {
    font-family: 'Open Sans Fallback';
    src: url('/fonts/Open_Sans/static/OpenSans_Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Open Sans Fallback';
    src: url('/fonts/Open_Sans/static/OpenSans_Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Anton';
    src: url('/fonts/Anton/Anton-Regular.ttf') format('truetype');
    font-weight: 100 900;
}

:root {
    --primary-color: #660000;
    --secondary-color: #FFFFFF;
    --accent-color: #C90408;
    --font-family-text: 'Open Sans', 'Open Sans Fallback', sans-serif;
    --font-family-header: 'Anton', sans-serif;
    --mobile-width: 1000px;
}

html {
    height: 100%;
}

html, body {
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--font-family-text);
    font-weight: 400;
    font-stretch: 100%;
}

footer {
    margin-top: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-family: var(--font-family-header);
}

h1 {
    font-size: 2.5rem;
}

p {
    font-size: 1.35rem;
}

a {
    color: var(--primary-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    margin: 0;
    padding-inline-start: 0;
}

.navbar nav ul li a {
    position: relative;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.navbar img.logo {
    max-height: 80px;
    width: auto;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu {
    display: flex;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* Mobile styles */
@media (max-width: 1000px) {
    .navbar {
        position: relative;
        overflow: hidden;
    }

    .hamburger {
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 1rem;
        right: 1rem;
        z-index: 102;
        background-color: var(--primary-color);
        border-radius: 50%;
        width: 3rem;
        height: 3rem;
    }

    .hamburger img{
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .mobile-menu {
        position: fixed;
        top: 0;
        left: -110%;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding-top: 6rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        z-index: 100;
        transition: left 0.3s ease;
        overflow-y: auto;
        font-size: 1.25rem;
        font-weight: 600;
    }

    .mobile-menu.active {
        left: 0;
    }

    body:has(.mobile-menu.active) {
        overflow: hidden;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    .navbar nav ul {
        flex-direction: column;
        gap: 0;
        width: auto;
        padding-inline-start: 1rem;
        flex: 1;
        overflow-y: auto;
        max-height: calc(100vh - 6rem - 1rem);
    }

    .navbar nav ul li {
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar nav ul li a {
        display: block;
        font-size: 1.25rem;
    }

    .social-media {
        display: none;
    }

    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.15);
        margin: 0.25rem 0 0 0;
        width: 100%;
        flex-direction: column;
        list-style: none;
        padding: 0;
        z-index: auto;
        visibility: visible;
        box-sizing: border-box;
    }

    .dropdown-content li {
        padding: 0;
    }

    .dropdown-content li a {
        display: block;
        padding: 0 0.75rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        color: var(--secondary-color);
        text-decoration: none;
    }

    .dropdown-content li a:last-child {
        border-bottom: none;
    }

    li:has(.dropdown) {
        padding: 0;
        width: 100%;
    }

    li:has(.dropdown) > .dropdown {
        cursor: pointer;
        display: block;
        position: static;
        width: 100%;
    }

    li:has(.dropdown) .dropdown-content.open {
        display: flex !important;
    }

    .mobile-menu .dropdown-content {
        position: static !important;
        display: none !important;
        visibility: visible !important;
        box-shadow: none !important;
    }

    .mobile-menu .dropdown-content.open {
        display: flex !important;
    }

    .dropdown > span {
        cursor: pointer;
        display: block;
        padding: 0.25rem 0;
        user-select: none;
        width: 100%;
    }

    .language-dropdown {
        left: 0;
    }
}

.dropdown {
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
}
.dropdown-content {
    display: none;
    position: absolute;
    color: var(--secondary-color);
    background-color: var(--primary-color);
    min-width: 100px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    flex-direction: column;
    visibility: hidden;
}

.right {
    right: 0;
}

.language-dropdown {
    right: 0;
}

.dropdown-content a {
    color: var(--secondary-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: var(--accent-color);
}

li:has(.dropdown):hover .dropdown-content {
    display: block;
    visibility: visible;
}

.social-media img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

a.button {
    border: none;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 2rem;
    cursor: pointer;
    text-decoration: none;
}

a.primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

a.primary:hover {
    background-color: var(--accent-color);
}

a.secondary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

a.secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.content {
    max-width: 1000px;
    padding: 1rem;
    margin: auto;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.bg-color {
    width: 100%;
    background-color: var(--primary-color);
}

.bg-color h1,
.bg-color h2,
.bg-color h3,
.bg-color h4,
.bg-color h5,
.bg-color h6,
.bg-color p {
    color: var(--secondary-color);
}

.split2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.split2 p {
    font-size: 1rem;
    justify-self: start;
    text-align: left;
}

.split2 img {
    justify-self: end;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

/* Mobile styles */
@media (max-width: 1000px) {
    .split2 {
        grid-template-columns: 1fr;
    }

    .split2 p {
        text-align: center;
        justify-self: center;
    }

    .split2 img {
        justify-self: center;
    }
    .align-left {
        text-align: center;
    }
    .align-right {
        text-align: center;
    }
}

footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 1rem;
}

footer img {
    max-width: 200px;
    height: auto;
}

/* Popup Notification Styles */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.form-popup.success {
    display: flex;
}

.form-popup.error {
    display: flex;
}

.form-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.form-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: slideIn 0.3s ease-out;
}

.form-popup-content.success {
    border-left: 5px solid #4caf50;
}

.form-popup-content.success #form-popup-message {
    color: #2e7d32;
}

.form-popup-content.error {
    border-left: 5px solid #f44336;
}

.form-popup-content.error #form-popup-message {
    color: #c62828;
}

.form-popup-content.error #form-popup-message p {
    margin: 0.5rem 0;
}

#form-popup-message {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.form-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.form-popup-close:hover {
    color: #333;
}