/* =========================================================================
   SG Schlierbach – Theme-Stylesheet
   =========================================================================
   ALLE FARBEN STEHEN IM BLOCK DARUNTER. Wer die Vereinsfarben aendern will,
   aendert nur diese Zeilen – sonst nichts.
   ========================================================================= */

:root {
    /* --- Vereinsfarben ---------------------------------------------------- */
    --sgs-primary:      #c8102e;   /* Akzent: Links, Buttons, Balken           */
    --sgs-primary-dark: #9b0c23;   /* Akzent bei Hover                         */
    --sgs-ink:          #182029;   /* Fliesstext und Fussbereich               */
    --sgs-ink-soft:     #5a6672;   /* Nebentext, Bildlegenden                  */
    --sgs-paper:        #ffffff;   /* Seitenhintergrund                        */
    --sgs-sand:         #f4f2ee;   /* abgesetzte Flaechen, Karten              */
    --sgs-line:         #e0dcd5;   /* Trennlinien, Rahmen                      */

    /* --- Schrift ---------------------------------------------------------- */
    --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font-body);

    /* --- Groessen --------------------------------------------------------- */
    --step--1: 0.875rem;
    --step-0:  1.0625rem;
    --step-1:  1.3125rem;
    --step-2:  1.625rem;
    --step-3:  2.125rem;
    --step-4:  clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

    --wrap: 1140px;
    --gap: 1.5rem;
    --radius: 6px;
    --header-h: 76px;
}

/* =========================================================================
   Grundlagen
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.sgs {
    margin: 0;
    background: var(--sgs-paper);
    color: var(--sgs-ink);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
}

img, video, iframe { max-width: 100%; }
img { height: auto; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.section { padding-block: 3.5rem; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--sgs-primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--sgs-primary);
    outline-offset: 2px;
}

/* =========================================================================
   Typografie
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 2.5rem 0 0.75rem;
    font-weight: 800;
}
h1 { font-size: var(--step-4); margin-top: 0; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5, h6 { font-size: var(--step-0); text-transform: uppercase; letter-spacing: 0.08em; }

/* Der rote Strich ueber Abschnittstiteln – das wiederkehrende Motiv. */
.section h2::before,
.page-title::before {
    content: "";
    display: block;
    width: 46px;
    height: 4px;
    background: var(--sgs-primary);
    margin-bottom: 0.9rem;
}

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: var(--step-1);
    color: var(--sgs-ink-soft);
    line-height: 1.5;
}

.eyebrow {
    display: inline-block;
    font-size: var(--step--1);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sgs-primary);
}

a {
    color: var(--sgs-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { color: var(--sgs-primary-dark); }

hr {
    border: 0;
    border-top: 1px solid var(--sgs-line);
    margin: 2.5rem 0;
}

blockquote {
    margin: 1.75rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 4px solid var(--sgs-primary);
    font-size: var(--step-1);
    color: var(--sgs-ink-soft);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: var(--step--1);
}
th, td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--sgs-line);
}
th {
    background: var(--sgs-sand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================================
   Kopfbereich
   ========================================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--sgs-paper);
    border-bottom: 1px solid var(--sgs-line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 48px; width: auto; }

/* --- Menue-Knopf (nur mobil sichtbar) --- */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: 0;
    padding: 0.5rem;
    margin-right: -0.5rem;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    color: var(--sgs-ink);
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--sgs-ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

/* --- Navigation --- */
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: block;
    color: var(--sgs-ink);
    text-decoration: none;
    font-weight: 600;
}
.site-nav a:hover { color: var(--sgs-primary); }

.site-nav .nav-selected > a,
.site-nav .nav-path-selected > a { color: var(--sgs-primary); }

/* Mobil: Navigation klappt unter dem Kopfbereich auf */
@media (max-width: 899px) {
    .site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--sgs-paper);
        border-bottom: 1px solid var(--sgs-line);
        box-shadow: 0 12px 24px rgba(24, 32, 41, 0.08);
        padding: 0.5rem 1.25rem 1.5rem;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .site-nav.is-open { display: block; }

    .site-nav > ul > li { border-bottom: 1px solid var(--sgs-line); }
    .site-nav a { padding: 0.85rem 0; }
    .site-nav ul ul { padding-left: 1rem; }
    .site-nav ul ul a {
        padding: 0.55rem 0;
        font-weight: 500;
        color: var(--sgs-ink-soft);
    }
}

/* Desktop: waagerechte Leiste mit Aufklappmenue */
@media (min-width: 900px) {
    .nav-toggle { display: none; }

    .site-nav > ul {
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }
    .site-nav > ul > li { position: relative; }
    .site-nav > ul > li > a {
        padding: 0.6rem 0.7rem;
        font-size: var(--step--1);
        text-transform: uppercase;
        letter-spacing: 0.06em;
        white-space: nowrap;
    }

    .site-nav ul ul {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        background: var(--sgs-paper);
        border: 1px solid var(--sgs-line);
        border-radius: var(--radius);
        box-shadow: 0 14px 30px rgba(24, 32, 41, 0.12);
        padding: 0.4rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .site-nav li:hover > ul,
    .site-nav li:focus-within > ul {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .site-nav ul ul a {
        padding: 0.5rem 0.7rem;
        border-radius: 4px;
        font-weight: 500;
    }
    .site-nav ul ul a:hover { background: var(--sgs-sand); }
}

/* =========================================================================
   Hero
   ========================================================================= */

.hero { position: relative; background: var(--sgs-ink); }

.hero__media img {
    display: block;
    width: 100%;
    height: clamp(260px, 46vw, 560px);
    object-fit: cover;
}

.hero__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding-block: 2.5rem 2rem;
    background: linear-gradient(to top, rgba(24, 32, 41, 0.85), rgba(24, 32, 41, 0));
    color: #fff;
}
.hero__panel .wrap { border-left: 5px solid var(--sgs-primary); padding-left: 1.25rem; }
.hero__panel h1, .hero__panel h2 { color: #fff; margin: 0 0 0.4rem; }
.hero__panel h1::before, .hero__panel h2::before { display: none; }
.hero__panel p { color: rgba(255, 255, 255, 0.88); margin: 0; }
.hero__panel a { color: #fff; }

/* =========================================================================
   Inhaltsbausteine
   ========================================================================= */

.area-inhalt > .ccm-block-wrapper { margin-bottom: 1.25rem; }

.card {
    background: var(--sgs-sand);
    border: 1px solid var(--sgs-line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* Zwei Spalten fuer den Bereich mit den Trainingsplaenen o. ae. */
.with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 900px) {
    .with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
    .with-sidebar--left { grid-template-columns: 320px minmax(0, 1fr); }
    .with-sidebar--left .with-sidebar__main { order: 2; }
    .with-sidebar--left .with-sidebar__aside { order: 1; }
}
.with-sidebar__aside {
    background: var(--sgs-sand);
    border-radius: var(--radius);
    padding: 1.5rem;
    align-self: start;
}
.with-sidebar__aside h2,
.with-sidebar__aside h3 { margin-top: 0; font-size: var(--step-1); }
.with-sidebar__aside h2::before { display: none; }

/* =========================================================================
   Schaltflaechen und Formulare
   (deckt auch die Klassen ab, die die Concrete-Standardbausteine ausgeben)
   ========================================================================= */

.btn,
.button,
input[type="submit"] {
    display: inline-block;
    background: var(--sgs-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn:hover,
.button:hover,
input[type="submit"]:hover {
    background: var(--sgs-primary-dark);
    color: #fff;
}
.btn-secondary,
.btn-outline {
    background: transparent;
    color: var(--sgs-primary);
    box-shadow: inset 0 0 0 2px var(--sgs-primary);
}
.btn-secondary:hover,
.btn-outline:hover { background: var(--sgs-primary); color: #fff; }

label, .form-label {
    display: block;
    font-weight: 600;
    font-size: var(--step--1);
    margin-bottom: 0.35rem;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="password"],
select, textarea,
.form-control, .form-select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--sgs-line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    color: var(--sgs-ink);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--sgs-primary);
    outline: 2px solid rgba(200, 16, 46, 0.18);
    outline-offset: 0;
}
textarea { min-height: 160px; resize: vertical; }

.form-group, .mb-3 { margin-bottom: 1.1rem; }
.form-check input { width: auto; margin-right: 0.5rem; }

/* =========================================================================
   Fussbereich
   ========================================================================= */

.site-footer {
    background: var(--sgs-ink);
    color: rgba(255, 255, 255, 0.78);
    margin-top: 4rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sgs-primary); text-decoration: underline; }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3rem;
}
@media (min-width: 760px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-head {
    margin: 0 0 1rem;
    font-size: var(--step--1);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #fff;
}
.footer-head::before { display: none; }

.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav ul ul { display: none; }

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding-block: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: var(--step--1);
}
.footer-legal p { margin: 0; }

/* =========================================================================
   Bearbeitungsmodus und Bewegungsreduktion
   ========================================================================= */

.ccm-toolbar-visible .site-header { position: static; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================================
   Optional: eigene Schrift selbst hosten (DSGVO-freundlich, ohne Google)
   -------------------------------------------------------------------------
   Schriftdateien nach themes/sgs/fonts/ legen, dann diesen Block einkommen-
   tieren und oben --font-display auf "Barlow Condensed" umstellen.

   @font-face {
       font-family: "Barlow Condensed";
       src: url("../fonts/barlow-condensed-700.woff2") format("woff2");
       font-weight: 700;
       font-display: swap;
   }
   ========================================================================= */
