/* Page Setup */
@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --algebra-orange: #EF6B00;
    --algebra-red: #D10067;
}

html {
    font-family: "Host Grotesk", ui-sans-serif, "Helvetica Neue", Helvetica, sans-serif;
    scroll-behavior: smooth;
}

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

    background: linear-gradient(58deg, #EF6B00 9%, #D10067 78%) no-repeat;
    color: white;
}

/* Header and Navigation */
header {
    position: sticky;
    top: 0;
    overflow-x: hidden;
    z-index: 100;
    background: #2A2A2A;

    .header-content {
        width: 80vw;
        margin: auto;
        padding: 1.5rem 0;

        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    &.transparent {
        background: none;

        img {
            filter: brightness(0) saturate(100%) invert(1);
        }

        .hamburger-button path {
            stroke: white;
        }
    }

    .hamburger-button path {
        stroke: var(--algebra-red);
    }
}

nav.desktop {
    display: none;
    align-items: center;

    h1 {
        margin: 0;
    }

    a {
        display: inline-block;
        margin: 0 0.5rem;
        padding: 0.3rem 0;
        text-decoration: none;
        color: unset;
        transition: 0.2s ease;
        border-radius: 1rem;

        &:hover {
            background-color: white;
            color: black;
            padding: 0.3rem 1.3rem;
        }

        iconify-icon {
            width: 20px;
            vertical-align: -2px;
        }
    }
}

nav.secondary {
    width: 100vw;
    display: flex;
    justify-content: center;
    background-color: var(--algebra-orange);

    a {
        display: inline-block;
        text-align: center;
        flex: 1;
        padding: 1rem 0;
        text-decoration: none;
        /*background-color: var(--algebra-orange);*/
        transition: background-color 100ms ease;
        color: unset;

        &:hover {
            background-color: white;
            color: var(--algebra-orange);
        }

        @media (min-width: 600px) {
            padding: 1rem;
            flex: unset;
        }
    }
}

nav.mobile {
    position: fixed;
    top: 93.9px; /* ruzan fix za safari na ios-u (visina headera) */
    width: 100vw;
    display: flex;
    flex-direction: column;
    background-color: color-mix(in srgb, var(--algebra-red) 85%, black 15%);
    visibility: hidden;
    box-shadow: 0 9px 1em #0000004d;

    a {
        display: inline-block;
        padding: 1rem 2rem;
        text-decoration: none;
        background-color: var(--algebra-red);
        color: unset;

        &:not(:last-child) {
            margin-bottom: 1px;
        }

        &:hover {
            background-color: white;
            color: var(--algebra-red);
        }

        iconify-icon {
            width: 20px;
            margin-right: 8px;
            vertical-align: -2px;
        }
    }
}

@media (min-width: 890px) {
    header {
        .hamburger-button {
            display: none;
        }
    }

    nav.desktop {
        display: flex;
    }

    nav.mobile {
        display: none;
    }
}

#loading-overlay {
    position: fixed;
    top: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(58deg, #EF6B00 9%, #D10067 78%) no-repeat;
    z-index: 1000;
}

/* Inputs */
:root {
    --input-theme: var(--algebra-red);
}

button {
    border: none;
    text-align: center;
    background-color: var(--input-theme);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.2rem;
    transition: background-color 0.1s ease;
    cursor: pointer;

    &:not(:disabled):hover {
        color: revert;
        background-color: #ccc;
    }

    &:disabled {
        cursor: default;
        background-color: #ccc;
    }
}

select,
input[type=text], input[type=password], input[type=email],
textarea {
    font-family: ui-sans-serif, sans-serif;
    border: 2px #ccc solid;
    border-radius: 5px;
    padding: 0.5rem;
    margin: 0.7rem 0;
    transition: border-color 150ms ease;

    &:focus {
        outline: none;
        border-color: var(--input-theme);
    }

    &:disabled {
        background-color: #e7e7e7;
    }
}
/* Contact Modal */
#contact-dialog {
    border: none;
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0 0;
    padding: 0;
    box-shadow: 0 -9px 1em #0000004d;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;

    @media (min-width: 600px) {
        width: 80vw;
        max-width: 850px;
        margin: revert;
        border-radius: 8px;
        box-shadow: 0 9px 1em #0000004d;
    }

    &::backdrop {
        background-color: rgba(0, 0, 0, 0.25);
    }

    .heading {
        padding: 15px 0;
        background: linear-gradient(188deg, #EF6B00 9%, #D10067 78%) no-repeat;
        display: flex;
        justify-content: center;

        h2 {
            color: white;
            margin: 0;
        }

        a {
            position: absolute;
            right: 15px;

            svg {
                stroke: white;
            }
        }
    }

    form {
        padding: 15px;
        display: flex;
        flex-direction: column;

        label {
            font-weight: bold;
        }

        .checkbox {
            margin: 0 0 0.7rem;
        }
    }
}

/* Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
    color: black;

    &.transparent {
        color: unset;
        background-color: unset;
    }
}

/* Site-Wide utils */
.title {
    --theme: var(--algebra-red);

    text-align: center;
    color: var(--theme);
    border-bottom: var(--theme) .15rem solid;
    margin: 1.2rem auto;
    padding: 0 40px 5px;
    scroll-margin-top: 160px;
}

.secondary.title {
    --theme: var(--algebra-orange);
}

.page-image-hero {
    display: flex;
    height: 40vh;

    justify-content: center;
    align-items: center;

    background-image: var(--image);
    background-size: cover;
    background-position: center;

    & img {
        flex: 1;
        object-fit: cover;
        object-position: center;
        overflow: hidden;
    }

    & h1 {
        text-align: center;
        margin: 0 0.5rem;
        color: white;
        text-shadow: 0 0 1em #000000e6;
    }
}