/* ==========================================================
   R.U.N. HOME
   Ergänzung zu site.css
   - erhält den charakteristischen 600px-Kreis
   - übernimmt Typografie/Farben grundsätzlich aus site.css
   - skaliert den kompletten Kreis responsiv
   - verwendet die gemeinsame SimpleModal-Optik
   ========================================================== */


/* ==========================================================
   1. HOME-SEITE
   ========================================================== */

.main_wrapper {
    width: 100%;
    max-width: 800px;
    min-height: 100vh;

    margin: 0 auto;
    padding: 0;
}

.header {
    width: 100%;
    height: 20px;
}

.content {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    width: 100%;
    min-height: 600px;

    margin: 0;
    padding: 0;
}

/*
 * Die beiden alten Randspalten bleiben im HTML bestehen,
 * dienen auf Desktop aber nur noch zur Zentrierung des Kreises.
 */
.content > .content_left,
.content > .content_right {
    flex: 1 1 100px;

    width: auto;
    max-width: 100px;
    min-width: 0;
    min-height: 600px;

    margin: 0;
    padding: 0;
}


/* ==========================================================
   2. DER CHARAKTERISTISCHE R.U.N.-KREIS
   ========================================================== */

.content_mid {
    position: relative;

    flex: 0 0 600px;

    width: 600px;
    height: 600px;

    margin: 0;
    padding: 0;

    color: #fff;

    background-image: url("../images/logo600.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 600px 600px;
}


/*
 * Die Home-Seite übernimmt die Schriftfamilie aus site.css.
 * Innerhalb des blauen Kreises wird lediglich die Farbe angepasst.
 */

.content_mid h1,
.content_mid h2,
.content_mid h3,
.content_mid h4,
.content_mid p,
.content_mid a,
.content_mid a:link,
.content_mid a:visited {
    color: #fff;
}

.content_mid h3 {
    margin: 0;

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.content_mid p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.content_mid a {
    text-decoration: none;
}

.content_mid a:hover,
.content_mid a:focus-visible {
    color: #fff;
    text-decoration: none;
}

.content_mid a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
    border-radius: 4px;
}


/* ==========================================================
   3. TERMIN IM OBEREN BEREICH
   ========================================================== */

.row_termin {
    clear: both;

    width: 600px;
    height: 225px;
}

.column_7 {
    float: left;

    width: 115px;
    min-height: 225px;
}

.column_8 {
    float: left;

    width: 370px;
    min-height: 190px;
}

.row_11 {
    clear: both;

    width: 100%;
    min-height: 50px;
}

.termin {
    clear: both;

    width: 100%;
    height: 125px;

    text-align: center;
}

.row_15 {
    clear: both;

    width: 100%;
    min-height: 45px;
}

.row_16 {
    clear: both;

    width: 100%;
    min-height: 113px;

    text-align: center;
}

.column_9 {
    float: left;

    width: 115px;
    min-height: 225px;
}


/* ==========================================================
   4. IDEE & NUTZEN
   ========================================================== */

.row_idee {
    clear: both;

    width: 600px;
    height: 180px;
}

.row_13 {
    clear: both;

    width: 100%;
    height: 115px;
}

.row_14 {
    clear: both;

    width: 100%;
    height: 65px;
}

.column_10 {
    float: left;

    width: 420px;
    min-height: 65px;
}

.idee {
    display: flex;
    align-items: flex-start;

    float: left;

    width: 180px;
    min-height: 65px;
}


/* ==========================================================
   5. MITGLIEDER
   ========================================================== */

.row_mitglieder {
    clear: both;

    width: 600px;
    height: 80px;
}

.mitglieder {
    float: left;

    width: 300px;
    min-height: 80px;
}

.column_14 {
    float: left;

    width: 90px;
    min-height: 80px;
}

.mitglieder_text {
    display: flex;
    align-items: flex-start;

    float: left;

    width: 210px;
    min-height: 80px;
}

.column_13 {
    float: left;

    width: 300px;
    min-height: 80px;
}


/* ==========================================================
   6. EVENTS
   ========================================================== */

.row_event {
    clear: both;

    width: 600px;
    height: 115px;
}

.column_4 {
    float: left;

    width: 300px;
    min-height: 115px;
}

.event {
    float: left;

    width: 203px;
    min-height: 115px;
}

.event_text {
    display: flex;
    align-items: flex-start;

    width: 186px;
    min-height: 58px;
}

.column_6 {
    float: left;

    width: 97px;
    min-height: 115px;
}


/* ==========================================================
   7. HOME-LINKS / MARKIERUNGSPUNKT
   ========================================================== */

.idee h3,
.mitglieder_text h3,
.event_text h3 {
    display: flex;
    align-items: center;

    min-height: 24px;

    transition:
        opacity var(--run-transition),
        transform var(--run-transition);
}

.idee:hover h3,
.mitglieder_text:hover h3,
.event:hover h3 {
    opacity: 0.82;
    transform: translateX(2px);
}

.home_rund_hell {
    flex: 0 0 auto;

    width: 12px;
    height: 12px;

    margin-right: 7px;
}


/* ==========================================================
   8. EVENT-TEXT AUF HOME
   ========================================================== */

h3.heading {
    margin: 0;

    color: #fff;

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

h4.heading {
    min-height: 6px;

    margin: 0.4em 0 0.4em 10px;

    color: #fff;

    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

p.paragraph {
    min-height: 16px;

    margin: 0.35em 0;

    color: #fff;

    font-size: 0.95rem;
    line-height: 1.5;
}


/* ==========================================================
   9. FOOTER
   ========================================================== */

.footer {
    clear: both;

    width: 100%;
    height: auto;
}


/* ==========================================================
   10. EVENT-POPUP
   Die visuelle Modal-Basis kommt aus site.css.
   Hier werden nur die Home/Event-Inhalte strukturiert.
   ========================================================== */

.event_popup_wrapper {
    width: 100%;
    max-width: 720px;
    min-height: 0;

    margin: 0 auto;
    padding: 8px;
}

.event_popup_titel {
    width: 100%;
    min-height: 0;

    margin-bottom: 18px;
}

.event_popup_row_2 {
    width: 100%;
    min-height: 0;

    margin-bottom: 10px;
}

.event_popup_row_3 {
    display: grid;
    grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
    align-items: start;

    width: 100%;
    min-height: 0;

    gap: 12px;

    margin-bottom: 8px;
}

.event_popup_col_1,
.event_popup_col_2 {
    float: none;

    width: auto;
    min-width: 0;
    min-height: 0;
}

.event_popup_col_2 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;

    gap: 4px 8px;
}

.event_popup_col_2_1,
.event_popup_col_2_2,
.event_popup_col_2_3,
.event_popup_col_2_4 {
    float: none;

    width: auto;
    min-height: 0;
}

.event_popup_ort,
.event_popup_row_5,
.event_popup_row_6 {
    clear: both;

    width: 100%;
    min-height: 0;

    margin-top: 10px;
}

.event_popup_row_6 {
    margin-top: 18px;
}


/*
 * Alte Clearfix-Pseudoelemente aus reset.css dürfen in Grid/Flex
 * nicht als zusätzliche Elemente auftauchen.
 */
.event_popup_row_3::before,
.event_popup_row_3::after,
.event_popup_col_2::before,
.event_popup_col_2::after {
    display: none !important;
    content: none !important;
}


/* Popup-Typografie passend zum Rest der Website */

#simplemodal-container .event_popup_wrapper,
#simplemodal-container .event_popup_wrapper p,
#simplemodal-container .event_popup_wrapper a,
#simplemodal-container .event_popup_wrapper h3,
#simplemodal-container .event_popup_wrapper h4 {
    color: var(--run-text);
}

#simplemodal-container h3.heading_popup {
    margin: 0;

    color: var(--run-blue);

    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
}

#simplemodal-container p.event_popup {
    min-height: 0;

    margin: 0.2em 0;

    color: var(--run-text);

    font-size: 0.95rem;
    line-height: 1.55;
}

#simplemodal-container .event_popup_col_1 p.event_popup {
    color: var(--run-text-muted);
    font-weight: 600;
}


/* ==========================================================
   11. SIMPLEMODAL
   Immer im sichtbaren Viewport zentrieren.
   ========================================================== */

#simplemodal-overlay {
    position: fixed !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background: rgba(15, 23, 42, 0.55) !important;
}

#simplemodal-container {
    position: fixed !important;

    top: 50% !important;
    left: 50% !important;

    width: min(760px, calc(100vw - 32px)) !important;
    height: auto !important;
    max-height: calc(100svh - 32px);

    margin: 0 !important;
    padding: 18px;

    overflow: auto;

    color: var(--run-text);
    background: #fff;

    border: 0;
    border-radius: var(--run-radius-lg);

    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.24);

    transform: translate(-50%, -50%);
}


/* ==========================================================
   12. TABLET
   ========================================================== */

@media screen and (max-width: 800px) {

    .main_wrapper {
        max-width: 100%;
    }

    .content > .content_left,
    .content > .content_right {
        display: none;
    }

    .content {
        width: 100%;
    }
}


/* ==========================================================
   13. MOBILE
   Kreis gross und sauber im Viewport zentriert
   ========================================================== */

@media screen and (max-width: 620px) {

    .content {
        position: relative;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 100%;
        height: 100svh;
        min-height: 100svh;

        margin: 0;
        padding: 0;

        overflow: hidden;
    }

    .content_mid {
        position: relative;

        top: auto;
        left: auto;

        flex: 0 0 600px;

        width: 600px;
        height: 600px;

        margin: 0;

        /*
         * Bewusst kleiner als der Viewport.
         * So bleiben auch die seitlich positionierten Texte sichtbar.
         */
        transform:
            scale(
                min(
                    calc(78vw / 600),
                    calc(78svh / 600)
                )
            );

        transform-origin: center center;

        background-size: 600px 600px;
    }
}


/* ==========================================================
   14. POPUP MOBILE
   ========================================================== */

@media screen and (max-width: 600px) {

    #simplemodal-container {
        width: calc(100vw - 24px) !important;
        max-height: calc(100svh - 24px);

        padding: 14px;
        border-radius: var(--run-radius);
    }

    .event_popup_wrapper {
        width: 100%;
        max-width: none;

        padding: 4px;
    }

    .event_popup_row_3 {
        grid-template-columns: 1fr;

        gap: 2px;

        margin-bottom: 12px;
    }

    .event_popup_col_2 {
        display: block;
    }

    .event_popup_col_1,
    .event_popup_col_2,
    .event_popup_col_2_1,
    .event_popup_col_2_2,
    .event_popup_col_2_3,
    .event_popup_col_2_4 {
        float: none;

        width: 100%;
        height: auto;
        min-height: 0;
    }

    .event_popup_ort,
    .event_popup_row_5,
    .event_popup_row_6 {
        height: auto;
        min-height: 0;
    }
}

/* ==========================================================
   16. REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .idee h3,
    .mitglieder_text h3,
    .event_text h3 {
        transition: none;
    }

    .idee:hover h3,
    .mitglieder_text:hover h3,
    .event:hover h3 {
        transform: none;
    }
}

.content > .content_left,
.content > .content_right {
    flex: 1 1 100px;

    width: auto;
    max-width: 100px;
    min-width: 0;
    min-height: 600px;

    margin: 0;
    padding: 0;

    /* Home: keine Card-/Content-Darstellung aus site.css */
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

@media screen and (max-width: 620px) {

    body .main_wrapper .content .content_mid {
        width: 600px !important;
        height: 600px !important;
        min-width: 600px !important;
        min-height: 600px !important;
        max-width: none !important;
        max-height: none !important;

        flex: 0 0 600px !important;

        transform: scale(0.6) !important;
        transform-origin: center center !important;

        background-size: 600px 600px !important;
    }
}

/* ==========================================================
   MOBILE – HOME NAVIGATION GRÖSSER
   ========================================================== */

@media screen and (max-width: 620px) {

    .row_idee .idee h3,
    .row_mitglieder .mitglieder_text h3,
    .row_event .event_text h3 {
        font-size: 1.3rem;
        font-weight: 600;
        line-height: 1.25;
    }

    /* Punkt vor den Links ebenfalls etwas grösser */
    .row_idee .home_rund_hell,
    .row_mitglieder .home_rund_hell,
    .row_event .home_rund_hell {
        width: 15px;
        height: 15px;
        margin-right: 9px;
    }
}