* {
    box-sizing: border-box;
    font-family: sans-serif;
    color: var(--style-color);
}

a {
    color:var(--style-color);
    text-decoration: none;
}

main a {
    color:var(--style-color);
    text-decoration: underline;
}

hr {
    border: 0;
    border-top: 1px solid var(--style-color)
}

body {
    background: #111;
    padding: 0;
    margin:0;
}

#body2 {
    margin: 0 auto;
    padding: 59px 0 0;
    max-width: 960px;
}

#komin, #komin2 {
    margin: 0 auto;
    max-width: 960px;
    height: 800px;
    position: absolute; /* or absolute if you want it scroll with content */
    inset: 0; /* covers full viewport */
    mask: url('/res/komin.svg') 0 5px no-repeat;
    -webkit-mask: url('/res/komin.svg') 0 5px no-repeat;
    z-index: -1;
    pointer-events: none; /* so it doesn’t block clicks */
    background-color: var(--style-color);
}

#komin2 {
    z-index: 0;
    opacity: 0.15;
}

#admin_menu {
    position: absolute;
    top: 0;
    left: 0;
}

.header {
    max-width: 960px;
    margin: 0 0 0 auto;
    padding: 0;
    text-align: center ;
    width: 100%;
    position: relative;
}

#nadpis {
    margin: -50px 0 10px -20px;
    color: #eee;
    font-size: clamp(1.5rem, 10vw, 4rem);
}

#klystyr {
    position: absolute;
    height: 550px;
    left: -100px;
    color: #eee;
    font-size: 1.6em;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.content {
    background:  #ccc;
    max-width: 960px;
    margin: 0 0 0 auto;
}

.footer {
    position: fixed;
    bottom: 0;
    background: #ccc;
    max-width: 960px;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2em;
}

.footer span {
    margin: 0 15px;
    white-space:nowrap;
}

.footer a {
    white-space:nowrap;
}

#menu_button {
    font-size: clamp(1.5rem, 10vw, 4rem);
    border: 1px solid white;
    border-radius: 5px;
    background-color: #1f1a17cc;
    color: white;
    position: absolute;
    top: 2px;
    right: 2px;
    padding: 0 1.5vw;
    user-select: none;
    z-index: 10;
}

#menu_toggle:checked ~ #menu {
    opacity: 1;
    pointer-events: auto;
}

#menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    align-content: flex-start;
    pointer-events: none;

    position: fixed;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: 99;

    padding: 0;
    width: 100%;
    height: 100%;
}

#menu_close {
    inset: 0;
    position: absolute;
    background: rgba(0 0 0  /0.8);
    z-index: -1;
}

#menu a {
    background-color: var(--style-color);
    display: flex;
    justify-content: center;
    flex: 150px;
    flex-wrap: wrap;
    height: 50px;
    color: #eee;
    padding: 5px;
    margin: 1px;
    border-radius: 5px;
}

#menu i {
    color: #eee;
}

.social_icon {
    width: 18px;
    margin: 0 5px;
}

main {
    min-height: 750px;
    width: 100%;
    padding: 5px;
}

main img, iframe {
    max-width: 100%;
    margin: 0;
    padding: 0;
    z-index: 0;
    position: relative;
}

input {
    background-color: #ccc;
}

textarea {
    width: 100%;
    min-width: 400px;
    min-height: 600px;
    background-color: #ccc;
}

#edit_form {
    position: absolute;
    left: 0px;
    top: 25px;
    z-index: 99;
}

table {
    margin: 0 auto;
    border-collapse: collapse;
    table-layout: fixed;
    padding: 50px;

}

tr:not(:last-child) td {
    border-bottom: 1px solid var(--style-color-trans);
}

td:not(:last-child),
th:not(:last-child) {
    border-right: 1px solid var(--style-color-trans);
}

table td {
    border: none; /* remove default borders */
    padding: 3px;
}

table td:first-child,
table th:first-child {
    padding-left: 1em; /* adjust as needed */
}

table td:last-child,
table th:last-child {
    padding-right: 1em; /* adjust as needed */
}

ul {
    display: table;
    margin: 0 auto;
}

.log {
    position: absolute;
    background-color:#eee;
    width: 100%;
    left: 0;
    color: black;
    margin: 0 auto;
    z-index: 999;
}

.log * {
    color: black;
}

.sidebar {
    position: fixed;      /* stay next to the viewport */
    top: 97px;           /* align with main content top */
    height: 700px;        /* adjust as needed */
    color: white;
    padding: 10px;
    z-index: 1;           /* above #komin but below menus if needed */
    width: clamp(100px, calc((100vw - 980px)/2), 300px);
    text-align: center;
}

.sidebar img {
    max-width: 100%;
    margin: 0 0 10px 0;

}

.sidebar .small_banner {
    max-width: 51%;
}

.sidebar.left {
    left: 0;
    top: 69px;
}
.sidebar.right {
    right: 0;
}

@media (max-width: 1200px) {
    .sidebar { display: none; } /* hide on small screens */
}

@media only screen and (min-width: 960px) {

    #body2 {
        padding: 100px 0;
    }

    .header {
        max-width: 800px;
    }

    .content {
        max-width: 800px;
    }

    .footer {
        max-width: 800px;
        padding: 10px;
    }

    #web_logo {
        display: block;
    }

    #nadpis {
        margin: -69px 0 10px -69px;
        text-align: left;
        color: #eee;
        font-size: 3em;
    }

    #menu #menu_close {
        display: none;
    }

    #menu_button {
        display: none;
    }

    #menu {
        position: unset;
        transform: unset;
        margin: 0 auto;
        opacity: 1;
        pointer-events: auto;
    }

    #menu a {
        height: unset;
    }
}