/* CSM Vrchlabí layout – matched to https://csm-vrchlabi.cz/ (see reference/original-home.html) */

.csm-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Montserrat, sans-serif;
    background-color: #9d9c9c;
}

@media (min-width: 769px) {
    .csm-page {
        flex-direction: row;
    }
}

/* Sidebar: max 14.375rem (230px) – matches original aside max-width */
.csm-sidebar {
    display: none;
    flex: 0 0 14.375rem;
    width: 14.375rem;
    max-width: 14.375rem;
    background-color: #c8d400;
    position: relative;
}

@media (min-width: 769px) {
    .csm-sidebar {
        display: block;
    }
}

/* Vrchlabí label – background image like original aside .title */
.csm-sidebar__title {
    display: none;
    background: url('/img/side-vrchlabi.svg') no-repeat 100% center;
    background-size: contain;
    position: fixed;
    top: 2.5vh;
    left: 52px;
    height: 95vh;
    width: 25%;
    max-width: 14.375rem;
    pointer-events: none;
    z-index: 1;
}

@media (min-width: 769px) {
    .csm-sidebar__title {
        display: block;
    }
}

@media (min-width: 1024px) {
    .csm-sidebar__title {
        width: 16.666%;
    }
}

.csm-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .csm-main {
        padding-bottom: 3.125rem;
    }
}

/* Header */
.csm-header {
    flex-shrink: 0;
}

.csm-top-gap {
    position: relative;
    height: var(--csm-top-gap, 7.5rem);
    background: #fff;
    overflow: visible;
    z-index: 2;
}

.csm-logo {
    display: block;
    text-decoration: none;
    line-height: 0;
}

/* Absolute offsets from original .top-gap :before / :after (logo overlaps into hero) */
.csm-logo__mark,
.csm-logo__text {
    position: absolute;
    left: 110px;
    display: block;
    object-fit: contain;
    object-position: left top;
}

.csm-logo__mark {
    top: 69px;
    width: 21.875rem;
    height: 10rem;
    max-width: 21.875rem;
}

.csm-logo__text {
    top: 190px;
    width: 34.375rem;
    height: 1.875rem;
    max-width: 34.375rem;
}

.csm-nav {
    display: flex;
    flex-direction: column;
    height: 350px;
    background: url('/img/header-img.jpg') no-repeat 44% center;
    background-size: cover;
}

.csm-header.is-home .csm-nav {
    height: calc(100vh - var(--csm-top-gap, 7.5rem));
}

.csm-nav__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 33.75rem;
    display: block;
}

.csm-nav__list > li {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 3.125rem;
    height: 3.125rem;
    margin: 0 0.5rem;
    background: #fff;
    vertical-align: top;
}

.csm-nav__action {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.csm-nav-item {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0.3125rem;
    outline: none;
    font-size: 0;
    line-height: 0;
    /* Hide link label text; SVG icons use currentColor and need a real color below */
    color: transparent;
}

.csm-nav-item svg {
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    color: #1a171b;
    flex-shrink: 0;
}

.csm-nav-item.active {
    background-color: #c8d400;
}

/* ≤1216px (widescreen in Bulma) */
@media screen and (max-width: 1216px) {
    .csm-page {
        --csm-top-gap: 120px;
    }

    .csm-logo__mark {
        left: 90px;
        top: 76px;
        width: 18.75rem;
        max-width: 18.75rem;
        height: 10rem;
    }

    .csm-logo__text {
        left: 90px;
        top: 170px;
        width: 27.5rem;
        max-width: 27.5rem;
    }

    .csm-nav__list {
        padding-left: 25rem;
    }

    .csm-nav__list > li {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ≤1024px */
@media screen and (max-width: 1024px) {
    .csm-page {
        --csm-top-gap: 90px;
    }

    .csm-logo__mark {
        left: 50px;
        top: 52px;
        width: 16.25rem;
        max-width: 16.25rem;
        height: 10rem;
    }

    .csm-logo__text {
        left: 50px;
        top: 140px;
        width: 25rem;
        max-width: 25rem;
    }

    .csm-nav__list {
        padding-left: 21.25rem;
    }

    .csm-nav__list > li {
        margin: 0 0.3125rem;
    }
}

/* ≤768px – mobile bottom nav */
@media screen and (max-width: 768px) {
    .csm-page {
        --csm-top-gap: 50px;
    }

    .csm-logo__mark {
        left: 10px;
        top: 21px;
        width: 12.5rem;
        max-width: 12.5rem;
        height: 10rem;
    }

    .csm-logo__text {
        left: 10px;
        top: 80px;
        width: 17.5rem;
        max-width: 17.5rem;
    }

    .csm-header.is-home .csm-nav,
    .csm-nav {
        height: auto;
        min-height: 12rem;
        background-position: center;
    }

    .csm-nav__list {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 3.125rem;
        padding: 0;
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #707070;
        border-top: 2px solid #575757;
        z-index: 100;
    }

    .csm-nav__list > li {
        width: 3.125rem;
        height: 3.125rem;
        margin: 0 0.5rem;
        background: #e5e3de;
    }

    .csm-nav__action {
        min-height: 10rem;
        padding: 1rem;
    }
}

/* Footer – four editable content-area columns */
.csm-footer__inner {
    padding: 2.5rem 1rem;
}

@media (min-width: 1024px) {
    .csm-footer__inner {
        padding: 3.5rem 6.875rem;
    }
}

.csm-footer__columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    font-size: 0.875rem;
}

@media (min-width: 1024px) {
    .csm-footer__columns {
        font-size: 1rem;
    }
}

.csm-footer-col {
    flex: 1 1 10rem;
    min-width: 0;
    max-width: 14rem;
}

.csm-footer-col .flex.flex-col.gap-6 {
    gap: 0.25rem;
}

.csm-footer-col p {
    margin: 0;
    color: #fff;
    font-size: inherit;
    line-height: 1.5;
}

.csm-footer-col a {
    color: #fff;
    font-size: inherit;
    line-height: 1.5;
    text-decoration: none;
}

.csm-footer-col a:hover {
    text-decoration: underline;
}
