/* Shared mobile seminar and registration layout. Desktop tables stay intact. */
.se-course-actions { display: none; }

@media (max-width: 991px) {
    /* The existing anchor handler already animates scrolling once. */
    :root { scroll-behavior: auto; }
    body {
        background: #fff linear-gradient(#d7d7d7, #fff 330px) repeat-x;
    }

    #title {
        height: auto;
        min-height: 50px;
        line-height: normal;
        background: linear-gradient(110deg, #ffc600, #ffe36c);
    }

    #title h1 {
        height: auto;
        min-height: 50px;
        padding: 16px 18px;
        font-size: clamp(20px, 4vw, 28px);
        line-height: 1.3;
        overflow: visible;
        overflow-wrap: anywhere;
    }

    #breadcrumb { height: auto; min-height: 34px; overflow: visible; }
    #breadcrumb ul { display: flex; flex-wrap: wrap; }
    #breadcrumb ul li { float: none; }
    #breadcrumb ul li a,
    #breadcrumb ul li a.home {
        height: auto;
        min-height: 30px;
        padding-top: 5px;
        padding-bottom: 5px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .side-main { flex-direction: column; }
    #main { font-size: 16px; line-height: 1.55; }
    #main #content { margin: 20px 16px; }
    #main #content p,
    #main #content ul,
    #main #content ol { line-height: 1.55; }
    #main #content h1,
    #main #content h2 { font-size: 20px; line-height: 1.35; }
    #main #content h3 { font-size: 18px; line-height: 1.4; }
    #main #content { overflow-wrap: anywhere; }

    #content:has(#termine) > .se-course-actions {
        display: flex;
        gap: 10px;
        margin-bottom: 24px;
    }

    #main #content .se-course-actions a {
        display: flex;
        flex: 1 1 0;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 48px;
        padding: 10px 8px;
        border: 1px solid #174f78;
        border-radius: 4px;
        background: #174f78;
        color: #fff;
        font-size: 15px;
        line-height: 1.4;
        text-align: center;
        text-decoration: none;
    }

    #main #content .se-course-actions a.se-course-actions__details { display: none; }
    #main #content:has(#se-seminar-details) .se-course-actions a.se-course-actions__details {
        display: flex;
        background: #fff;
        color: #174f78;
    }
    #content .se-course-actions a:focus-visible,
    #termine .buchenbutton:focus-visible,
    #se_selectCity:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
    #se-seminar-details,
    #termine { scroll-margin-top: 16px; }

    #main table.se-seminar-details { font-size: 16px; }
    #main table.se-seminar-details td { line-height: 1.5; overflow-wrap: anywhere; }

    #se_selectCityForm label { display: block; width: 100%; margin-bottom: 6px; }
    #se_selectCity {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
        padding: 8px;
        font: inherit;
        font-size: 16px;
    }

    #termine .sort_note { display: none; }
    #main #termine table.termine {
        display: block;
        width: 100% !important;
        margin: 0;
        border: 0;
        background: transparent;
        overflow: visible;
        font-size: 16px;
    }

    /* Keep column headers available to assistive technology. */
    #termine table.termine thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    #termine table.termine tbody { display: block; }
    #main #termine table.termine tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 16px;
        height: auto;
        margin-bottom: 16px;
        padding: 16px;
        border: 1px solid #b7c4cc;
        border-radius: 5px;
        background: #fff;
    }

    #main #termine table.termine tbody td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    #termine td[data-label]::before {
        display: block;
        content: attr(data-label);
        color: #52616b;
        font-size: 13px;
        font-weight: 600;
    }
    #termine .se-date-name,
    #termine .se-date-booking,
    #termine .se_noresults td { grid-column: 1 / -1; }
    #main #termine .buchenbutton {
        display: block;
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
        border: 0;
        border-radius: 4px;
        background: #174f78;
        color: #fff;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }
    #main #termine .buchenbutton:hover { background: #103b5b; }

    #main .se-registration { font-size: 16px; }
    #main .se-registration input[type="text"],
    #main .se-registration input[type="email"],
    #main .se-registration input[type="tel"],
    #main .se-registration input[type="date"],
    #main .se-registration input[type="number"],
    #main .se-registration select,
    #main .se-registration textarea,
    #main .se-registration button { font-size: 16px; }
}

@media (max-width: 767px) {
    #main table.se-seminar-details,
    #main table.se-seminar-details tbody { display: block; width: 100%; }
    #main table.se-seminar-details thead { display: table; width: 100%; }
    #main table.se-seminar-details tbody tr { display: block; }
    #main table.se-seminar-details tbody td {
        display: block;
        width: 100%;
        padding: 8px 12px;
        border: 0;
    }
    #main table.se-seminar-details tbody td:first-child { font-weight: 700; padding-bottom: 0; }
    #main table.se-seminar-details tbody td:last-child { padding-bottom: 12px; border-bottom: 1px solid #b7c4cc; }
}
