/* The pages filled from archeobase.ch: the training videos (Pages/VideoTraining.cshtml, styled by archeobase.ch's own
   lib/archeobase/video_formation.css) and the documentation (Pages/Documentation.cshtml). */

/* Dark band behind the fixed header, which is transparent until the page scrolls. */
.documentation-hero,
.resources-unavailable {
    background: linear-gradient(281.18deg, rgba(22, 44, 77, .98) .85%, rgba(43, 72, 114, .95) 50%, rgba(32, 57, 94, .98) 90.77%);
    color: var(--white-color);
}

/* ---------- Training videos ---------- */

.video-training .formation-hero {
    padding-top: 130px;
}

    .video-training .formation-hero-left img {
        width: 100%;
        height: auto;
    }

.video-training .video_layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

@media (max-width: 900px) {
    .video-training .formation-hero {
        padding-top: 110px;
    }

    /* The video first, then the list of videos. */
    .video-training .video_layout {
        flex-direction: column-reverse;
        padding: 24px 16px 60px;
    }

    .video-training #menu_container {
        width: 100%;
        min-width: 0;
        max-height: 420px;
    }

    .video-training .video_side {
        padding: 0;
    }
}

/* ---------- Documentation ---------- */

.documentation-hero {
    padding: 140px 0 48px;
}

.documentation-hero-intro {
    font-size: var(--fs-lead);
    font-weight: 300;
    margin: 16px 0 0;
    max-width: 760px;
}

.doc-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 56px;
    padding: 56px 0 96px;
}

.doc-menu {
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-right: 8px;
}

.doc-menu-section + .doc-menu-section {
    margin-top: 28px;
}

.doc-menu-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--primary-color);
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.doc-menu-subtitle {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: #667;
    margin: 14px 0 4px;
}

.doc-menu-item {
    display: block;
    padding: 6px 0 6px 12px;
    border-left: 3px solid transparent;
    color: #334;
    font-size: var(--fs-base);
    line-height: 1.4;
    text-decoration: none;
}

    .doc-menu-item:hover {
        color: var(--secondary-color);
    }

    .doc-menu-item.active {
        border-left-color: var(--secondary-color);
        color: var(--primary-color);
        font-weight: 600;
    }

.doc-page-title {
    font-size: var(--fs-3xl);
    color: var(--primary-color);
    margin-bottom: 32px;
}

.doc-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 48px;
}

    .doc-video iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 8px;
    }

/* The text as written in the application's editor (TinyMCE). */
.doc-page-content {
    color: var(--text-color);
    font-size: var(--fs-base);
    line-height: 1.7;
}

    .doc-page-content h2 {
        font-size: var(--fs-2xl);
        color: var(--primary-color);
        border-bottom: 1px solid #ddd;
        padding-bottom: 8px;
        margin: 56px 0 24px;
    }

    .doc-page-content h3 {
        font-size: var(--fs-lg);
        margin: 40px 0 20px;
    }

    .doc-page-content img {
        max-width: 100%;
        height: auto;
        box-shadow: 1px 2px 12px #aaa;
    }

    .doc-page-content table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    /* Anchors of the page's own table of contents land below the fixed header. */
    .doc-page-content [id] {
        scroll-margin-top: 110px;
    }

    .doc-page-content .link_doc {
        color: #0b7cc1;
    }

    .doc-page-content .doc_shortcut {
        display: inline-block;
        padding: 10px;
        margin: 10px;
        background-color: #efefef;
        border: 1px solid #aaa;
    }

        .doc-page-content .doc_shortcut p {
            margin-bottom: 3px;
        }

@media (max-width: 991px) {
    .documentation-hero {
        padding: 110px 0 32px;
    }

    /* The page first, then the menu. */
    .doc-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding: 32px 0 64px;
    }

    .doc-page {
        order: -1;
    }

    .doc-menu {
        position: static;
        max-height: none;
    }
}

/* ---------- archeobase.ch unreachable ---------- */

.resources-unavailable {
    padding: 160px 0 100px;
    text-align: center;
}

    .resources-unavailable h1 {
        font-size: var(--fs-4xl);
        margin: 16px 0;
    }

    .resources-unavailable p {
        font-size: var(--fs-md);
        font-weight: 300;
        margin-bottom: 32px;
    }
