:root {
    --col-orange: #ff9800;
    --col-paper: #dcc29a;
    --col-paper--highlight: #e6cda7;
    --col-paper--dark: #ac9470;
    --text-minor: #333;
    --gap-main-column-side: 0.75rem;
    --main-width: 44rem;

    scroll-behavior: smooth;
}

@media (min-width: 44rem) {
    :root {
        --gap-main-column-side: 1.5rem;
    }
}

.error {
    border: 0.25rem solid red;
    margin: 0.5rem;
    padding: 0.5rem;
    display: block;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 3px;
    text-align: center;
}

:where(img) {
    max-width: 100%;
    height: auto;
}

hgroup > :not(:first-child) {
    margin-top: 0;
}
hgroup > :not(:last-child) {
    margin-bottom: 0;
}

/* BORDERS */

#header#header {
    margin-top: calc(1rem + 4vh);
}
#header {
    background-color: var(--col-paper);
    box-shadow:
        0 0 0 5px black,
        0 0 0 15px #df0b0b,
        0 0 0 20px black;
}
main,
#menu {
    background-color: var(--col-paper);
    box-shadow:
        5px 0 0 0 black,
        15px 0 0 0 #df0b0b,
        20px 0 0 0 black,
        -5px 0 0 0 black,
        -15px 0 0 0 #df0b0b,
        -20px 0 0 0 black;
}

/* LAYOUT */

body {
    background-color: var(--col-orange);
    font-family:
        "Arial CE", "Lucida Grande CE", "Helvetica CE", Arial, lucida,
        sans-serif;
    margin: 0;
}

#header,
#bottom {
    display: flex;
    width: max-content;

    margin: auto;
}
#header {
    width: 100vw;
    max-width: var(--main-width);
    justify-content: center;
}
#header > img {
    height: auto;
}

#bottom {
    width: 100vw;
    max-width: calc(var(--main-width) + 40px + 26px);
    display: flex;
    position: relative;
    top: -1rem;
}
#bottom .web_footer__img {
    height: 9rem;
    width: auto;
}
#bottom .web_footer__mid {
    height: 9rem;
    flex: 1;
    background-size: contain;
    background-repeat: repeat-x;
    background-position: right;
}

main {
    width: 100vw;
    max-width: var(--main-width);

    padding: 1px 0 3rem;
    box-sizing: border-box;

    margin: auto;
}

.layout__normal-content {
    padding-left: var(--gap-main-column-side);
    padding-right: var(--gap-main-column-side);
}

.layout__hr {
    border: 0;
    height: 10px;
    width: 100%;
    background-image: url("/images/ramecek_bottom.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

.layout__skip-to-content {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(-100%);
    background-color: var(--col-paper--highlight);
}
.layout__skip-to-content:focus {
    transform: translateY(0);
}

/* PAGE SECTION */

.page-section {
    margin: 1rem 0 2rem;
}
.page-section:first-child {
    margin-top: 0;
}
.page-section:last-child {
    margin-bottom: 0;
}

.page-section > .page-section__heading--sticky {
    position: sticky;
    top: -5px;
}

.page-section__heading {
    margin-top: 0;

    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.2rem;

    background-image:
        url("../images/ramecek_top.png"),
        linear-gradient(var(--col-paper) 50%, transparent 80%);
    background-position: -16px center;
    background-repeat: no-repeat;
    background-size: cover;

    color: white;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 2rem;
    padding-right: calc(
        min(max(1rem, (100vw * 10 / 11) - (658px * 10 / 11)), 100px)
    );

    height: 40px;
    line-height: 35px;
    padding-top: 5px;
    box-sizing: border-box;
}

/* MENU */

#menu {
    width: 100vw;
    max-width: var(--main-width);

    padding: 0 var(--background-unusable-side);
    box-sizing: border-box;

    margin: auto;
}

#menu a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.web_menu__inner-layout {
    padding-bottom: 0.5rem;

    display: flex;
    flex-wrap: wrap;
    align-items: start;
}

@media screen and (min-width: 1000px) {
    #menu a {
        margin-top: -1.3rem;
    }
    #menu a:hover {
        background: radial-gradient(
            circle at center,
            #bbb 60%,
            #e5e2e2 67%,
            transparent 69%
        );
    }
}

@media screen and (max-width: 999px) {
    .web_menu__inner-layout {
        padding-top: 0;
        align-items: center;
        gap: 0 0.5rem;
        padding: 0.5rem;
    }
    #menu a:after {
        font-size: 0.8em;
        content: attr(data-name);
        color: black;
    }
    #menu a img {
        width: 2rem;
        height: auto;
    }
}

#menu #seda_lista {
    order: -1;
    width: calc(100% - 2px);
    display: flex;
    justify-content: end;
    background-color: var(--col-paper--highlight);
    font-weight: bold;
    height: 1.5rem;
    line-height: 1.5rem;
    padding: 0 1rem;
    text-wrap: nowrap;
}
#menu #seda_lista:after {
    content: attr(data-page-name);
}
