/** Global styles **/

/* Base */

:root {
    --background: #FABFA3;
    --primary: #05297d;
    --secondary: #4CAFFF;
    --text-secondary: #FFFFFF;
    --action-color: #3F82B8;

    --highlight: var(--secondary);
    --text-highlight: var(--text-secondary);

    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

::selection {
    background-color: var(--secondary);
    color: var(--text-secondary)
}

h2 {
    font-size: 1.5em;
    font-weight: 800;
    margin-block-start: 0.83em;
    margin-block-end: 0.41em;
}

h3 {
    font-size: 1.25em;
    font-weight: 800;
    margin-block-start: 1em;
    margin-block-end: 0.5em;
}

h4 {
    font-size: 1.125rem;
    font-weight: 700;
}

p a,
li a {
    color: var(--secondary);
    font-weight: bold;
    text-decoration: underline 1px solid var(--secondary);
}


/* # Layout */

#header, #footer {
    display: flex;
    padding: 4px 32px;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);

    .header-logo {
        padding: 18px 0;
    }

    .header-cta .button {
        text-transform: uppercase;
    }

    @media screen and (max-width: 768px) {
        padding: 4px 16px;
    }
}

/* ## Hero */

.hero {
    position: relative;
    
    .hero-content {
        width: 100%;
        display: flex;
        justify-content: center;
        background: var(--primary);

        h1 {
            font-weight: 800;
            text-transform: uppercase;
            
            margin: 50px 16px;
            width: fit-content;
            padding: 0 16px;
            background: var(--secondary);
            color: var(--text-secondary);
            font-size: 4.5rem;

            @media screen and (max-width: 768px) {
                font-size: 2.25rem;
            }
        }
    }

    .hero-overhang {
        position: absolute;
        top: 100%;
        width: 100%;
        z-index: 1;
    }
}

/* ## Main info */

.main-info {
    position: relative;

    a {
        color: inherit;
        text-decoration: none;
    }
    
    .info-background-text {
        background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='22px' width='92px'><text x='0' y='15' fill='rgba(255,255,255,0.22)' font-weight='700' font-family='Arial' font-size='20'>SZAVAZZ</text></svg>");
        
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
    }

    .info-overhang {
        width: 100%;
    }
}

.info-content {
    background: var(--background);
    padding-top: calc(1vw * (57 / 1440 * 100)); /* magic number: .hero-overhang height */ 

    > .content {
        position: relative;
        max-width: calc(100% - 64px);
        margin: 0 auto;
        padding: 4rem 0 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
        row-gap: 2em;
        justify-items: center;
        align-items: center;
        font-weight: 600;
        font-size: 1.5rem;

        @media screen and (max-width: 768px) {
            grid-template-columns: 1fr;
            row-gap: 2rem;    
        }

    }
}

.leade {
    display: block;
    grid-column: 1/-1;
    max-width: 70%;
    font-size: 1rem;

    @media screen and (max-width: 768px) {
        max-width: 90%;    
    }
}

.visszaszamlalo {
    grid-column: 1;
    position: relative;
    height: fit-content;
    margin-block: 2rem 3.5rem;

    @media screen and (max-width: 768px ) {
        width: 95%;
    }

    > .trace {
        color: var(--primary);
        border: 1px solid; 
        width: 25px; 
        position: absolute; 
        left: -25px; 
        border-width: 0px 0px 5px 5px; 
        border-radius: 0 1px 0 15px; 
        top: -585px; 
        bottom: 15.5px;

        @media screen and (max-width: 768px ) {
            top: -350px;
        }
    }

    > .content {
        display:flex; 
        flex-direction: column;

        #szamlalo {
            font-weight: 800;
            font-size: 4.5rem;
            color: var(--primary);

            @media screen and (max-width: 768px ) {
                font-size: 2.25rem;
            }

            ::before {
                content: '\f111' / "";
                font-family: "Font Awesome 7 Free";
                font-size: 18px;
                position: absolute;
                left: -32px;
                top: 75px;

                color: var(--primary);
                width: fit-content;

                @media screen and (max-width: 768px ) {
                    top: 50px;
                }
            }
        }

        .valasztas-datum {
            align-self: end;
            text-wrap: nowrap;
        }

        .bottom {
            display: flex;
            align-items: center;

            .trace {
                flex-grow: 1;
                padding-right: 20px;
                display: flex;
                flex-direction: row;
                align-items: center;
            }

            hr {
                border-width: 2.5px;
                border-color: var(--primary);
                border-style: solid;
                flex-grow: 1;
                height: 0px;
            }
        }
    }
}

.teendok {
    display: flex;
    flex-direction: column;
    
    .teendok-lista {
        color: var(--primary);
        font-weight: 800;

        li {
            margin: 2em 0;
            cursor: pointer;
            transition: all 250ms;

            &:first-of-type {
                margin-top: 1em;
            }

            
            &:not(.highlight):hover, &:not(.highlight):focus {
                color: var(--secondary);
                
                i:not(.list-marker) {
                    transform: translateX(2px);
                }
            }
            
            &:not(.highlight):active {
                color: var(--action-color);
                
                i:not(.list-marker) {
                    transform: translateX(4px);
                }
            }
            
            &:not(.highlight) span {
                text-decoration: underline dashed;
            }
        }
    }
}

/* ## Main content */

#text-content {
    max-width: 80ch;
    margin: 3em auto;
    font-size: 1.25rem;
    padding: 0 16px;

}

#teendok-reszletek > section {
    > h3:has(i.list-marker) {
        margin-block-start: 1.75em;

        &:not(.highlight) span {
            text-decoration: underline var(--secondary) 4px;
        }

        @media screen and (max-width: 768px) {
            margin-block-end: 1em;
        }
    }

    &:has(i.list-marker) > p {
        padding-inline-start: calc(1.5rem + (1em * 1.25 * 2));
        padding-inline-end: 1rem;

        @media screen and (max-width: 768px) {
            padding-inline-start: 1.5rem;
        }
    }
}

#tudnivalok-reszletek {
    h2 {
        margin-block-start: 1.5em;
    }

    li {
        margin-left: 1.5em;
        margin-top: .5em;
        list-style: square;

        a:not(:first-of-type) {
            font-weight: normal;
        }
    }
}

/* General elements */

.button {
    cursor: pointer;
    background-color: var(--secondary);
    color: var(--text-secondary);
    font-weight: 800;
    caret-color: transparent;
    transition: all 250ms, outline 0ms;
    padding: 10px 15px;

    &:hover, &:focus {
        outline: 2px solid var(--action-color);
    }

    &:active {
        background: var(--action-color);
    }
}

.text-background::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='22px' width='92px'><text x='0' y='20' fill='rgba(255,255,255,0.22)' font-weight='700' font-family='Arial' font-size='20'>SZAVAZZ</text></svg>");
}

.highlight {
    color: var(--highlight);
    -webkit-text-stroke: var(--text-highlight) 3px;
    paint-order: stroke fill;
    cursor: auto !important;
}

.decorated-list:has(.list-marker) {
    counter-reset: decorated-list;
    list-style: none;

    > :has(.list-marker) {
        counter-increment: decorated-list;
    }

    :has(> .list-marker) {
        display: flex;
        align-items: center;
        gap: .75rem;

        margin-block-start: 1.75em;

        @media screen and (max-width: 768px) {
            margin-block-end: 1em;
        }

        &:has(+ .description) {
            margin-block-end: 0.15em;
        }

        &+ div.description {
            font-size: 1rem;
            font-weight: normal;
            padding-left: calc(1.5rem + (1em * 1.35 * 2));
            max-width: 60ch;
        }
    }

    .list-marker {
        width: fit-content;

        &::after {
            content: counter(decorated-list)'.';
            color: white;
            font-family: "Poppins", Arial, sans-serif;
            font-weight: 800;
            font-size: .5em;
            display: flex;
            justify-content: center;
            align-items: center;
            -webkit-text-stroke: 0px;
        }
    }
}

.anchor {
    color: lightgray;
    font-weight: bold;
}

.anchor:hover, 
:focus > .anchor, 
:focus-visible > .anchor, 
:focus-within > .anchor {
    color: darkgray;
}

.img-icon {
    display: inline;
    vertical-align: middle;
    width: 1.11em;
    height: auto;
}