/** 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;
    background-color: #ffffff;

    --depracation-notice-height: 42px;
}

::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;
}

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

wa-callout {
    gap: .75rem;
    padding: .5rem .75rem;
    border-color: var(--primary);
    border-width: 2px;
}

figcaption {
    font-style: italic;
    font-size: .9em;
}

wa-button {
    &[variant="brand"]::part(base) {
        background: var(--primary);
        border-radius: var(--wa-form-control-border-radius);
    }

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

/* # Layout */

body {
    display: flex;
    flex-direction: column;

    main#content {
        flex-grow: 1;
    }
}

#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;
    }
}

.notice + #header {
    margin-top: var(--depracation-notice-height);
}

#footer {
    flex-direction: column;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 1rem 2rem;

    .footer-content {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        column-gap: 3.5rem;
        padding: 0 1rem;

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

    ul {
        margin-left: 1rem;
        list-style: "- ";

        li {
            margin-bottom: .5rem;
        }
    }

    a {
        color: lightgray;
        text-decoration: none;
    }
}

/* ## 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.absolute {
        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: 0 0 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: 0;
            }
        }
    }
}

.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):is(:hover, :focus, :focus-within, :focus-visible) {
                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 {
    margin: 3em auto;
    display: grid;
    grid-template-columns: 1fr min(calc(100% - 32px), calc(80ch - 32px)) 1fr;

    > * {
        grid-column: 2;
    }
}

#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) > :is(p, ul) {
        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;
        }
    }
}

section#videos {
    grid-column: 1/-1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-block-start: 1rem;
}

/* 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: 0;
        }
    }
}

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

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

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

wa-card.reminder {
    &::part(header) {
        border-top: 5px solid var(--primary);
    }

    @media screen and (max-width: 768px) {
        &::part(footer) {
            flex-direction: column;
            gap: 1rem;
        }
    }
}

.subtitle {
    font-size: .9em; 
    color:gray;
    font-style: italic;
}

p:has(> .subtitle) {
    margin-top: -.5rem;
}

p:has(.begin)::first-letter {
    font-size: 1.25em;
}

.notice {
    text-align: center;
    padding: .5rem;
    font-size: 1rem;
    background: #282215;
    color: white;
    border-bottom: 2px solid #423212;
    font-weight: 500;
    
    position: fixed;
    width: 100%;
    z-index: 10;
}