/* ====================================================================
 * sfc-ui.css — Eigenes Mini-Framework (Ersatz für UIkit)
 * --------------------------------------------------------------------
 * Reimplementiert die im Projekt verwendeten uk-* Utility-Klassen,
 * damit das HTML stabil bleibt, aber keine UIkit-Abhängigkeit mehr
 * besteht. Wird VOR style.css geladen — style.css (Theme/Marke)
 * überschreibt Farben & Feinschliff.
 *
 * Breakpoints: @s = 640px, @m = 960px (wie UIkit)
 * ==================================================================== */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }

/* ---------- Container ---------- */
.uk-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
@media (min-width: 640px)  { .uk-container { padding: 0 30px; } }
@media (min-width: 960px)  { .uk-container { padding: 0 40px; } }
.uk-container-small { max-width: 900px; }
.uk-container.uk-container-small { max-width: 900px; }

/* ---------- Section ---------- */
.uk-section        { padding: 50px 0; }
.uk-section-small  { padding: 30px 0; }
.uk-section-xsmall { padding: 18px 0; }
@media (min-width: 960px) {
    .uk-section { padding: 70px 0; }
}

/* ---------- Grid (flexbox) ----------
   WICHTIG: Das Markup nutzt `uk-grid` als ATTRIBUT (UIkit fügte die Klasse
   früher per JS hinzu). Daher matchen wir sowohl .uk-grid als auch [uk-grid]. */
.uk-grid, [uk-grid] {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 0 -30px;
    padding: 0;
    list-style: none;
    row-gap: 30px;
}
.uk-grid > *, [uk-grid] > * {
    padding-left: 30px;
    box-sizing: border-box;
    margin-top: 0;
}
.uk-grid-small  { margin-left: -15px; row-gap: 15px; }
.uk-grid-small > * { padding-left: 15px; }
.uk-grid-medium { margin-left: -30px; row-gap: 30px; }
.uk-grid-medium > * { padding-left: 30px; }

/* grid-match: Karten gleich hoch */
.uk-grid-match > * { display: flex; }
.uk-grid-match > * > * { width: 100%; }

/* ---------- Breiten ---------- */
.uk-width-1-1 { width: 100%; }
[class*="uk-child-width"] > * { width: 100%; }

/* Basis (mobil): volle Breite — Spalten erst ab Breakpoint */
@media (min-width: 640px) {
    .uk-child-width-1-2\@s > * { width: 50%; }
    .uk-child-width-1-3\@s > * { width: 33.333%; }
    .uk-child-width-1-4\@s > * { width: 25%; }
    .uk-width-1-2\@s { width: 50%; }
    .uk-width-1-3\@s { width: 33.333%; }
    .uk-width-2-3\@s { width: 66.666%; }
    .uk-width-1-4\@s { width: 25%; }
    .uk-width-3-4\@s { width: 75%; }
}
@media (min-width: 960px) {
    .uk-child-width-1-2\@m > * { width: 50%; }
    .uk-child-width-1-3\@m > * { width: 33.333%; }
    .uk-child-width-1-4\@m > * { width: 25%; }
    .uk-width-1-2\@m { width: 50%; }
    .uk-width-1-3\@m { width: 33.333%; }
    .uk-width-2-3\@m { width: 66.666%; }
}
/* nicht-responsive Breiten */
.uk-child-width-1-2 > * { width: 50%; }
.uk-child-width-1-3 > * { width: 33.333%; }

/* ---------- Flex ---------- */
.uk-flex        { display: flex; }
.uk-inline      { display: inline-block; position: relative; }
.uk-flex-center { justify-content: center; }
.uk-flex-middle { align-items: center; }
.uk-flex-between { justify-content: space-between; }
.uk-flex-1      { flex: 1; }
.uk-flex-wrap   { flex-wrap: wrap; }

/* ---------- Spacing ---------- */
.uk-margin              { margin-bottom: 20px; }
.uk-margin-small        { margin-bottom: 15px; }
.uk-margin-medium       { margin-bottom: 30px; }
.uk-margin-top          { margin-top: 20px; }
.uk-margin-bottom       { margin-bottom: 20px; }
.uk-margin-small-top    { margin-top: 10px; }
.uk-margin-small-bottom { margin-bottom: 10px; }
.uk-margin-small-left   { margin-left: 10px; }
.uk-margin-small-right  { margin-right: 10px; }
.uk-margin-medium-top    { margin-top: 30px; }
.uk-margin-medium-bottom { margin-bottom: 30px; }
.uk-margin-large-top    { margin-top: 40px; }
.uk-margin-large-bottom { margin-bottom: 40px; }
@media (min-width: 960px) {
    .uk-margin-large-top    { margin-top: 70px; }
    .uk-margin-large-bottom { margin-bottom: 70px; }
}
.uk-padding-small { padding: 15px; }

/* ---------- Text ---------- */
.uk-text-center    { text-align: center; }
.uk-text-left      { text-align: left; }
.uk-text-right     { text-align: right; }
.uk-text-small     { font-size: 0.875rem; }
.uk-text-large     { font-size: 1.25rem; }
.uk-text-muted     { color: #8a8a96; }
.uk-text-secondary { color: inherit; }
.uk-text-bold      { font-weight: 700; }

/* ---------- Buttons (Layout; Farben/Theme kommen aus style.css) ---------- */
.uk-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    margin: 0;
    border: none;
    overflow: visible;
    font: inherit;
    color: inherit;
    text-transform: none;
    padding: 0 24px;
    line-height: 1.2;
    min-height: 44px;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border-radius: 999px;
    vertical-align: middle;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .15s;
    white-space: nowrap;
}
.uk-button:disabled { opacity: 0.6; cursor: not-allowed; }
.uk-button-small { min-height: 34px; font-size: 0.82rem; padding: 0 16px; }
.uk-button-link {
    display: inline; background: none; border: none; padding: 0;
    min-height: 0; line-height: 1.4; border-radius: 0; text-decoration: none;
}
.uk-button-link:hover { text-decoration: underline; }
.uk-button-text {
    display: inline; background: none; border: none; padding: 0;
    min-height: 0; line-height: 1.4; border-radius: 0;
}
.uk-width-1-1.uk-button, .uk-button.uk-width-1-1 { display: flex; width: 100%; }

/* ---------- Forms ---------- */
.uk-input, .uk-textarea, .uk-select {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #e0d8cb;
    background: #fff;
    color: #2B2B36;
    font: inherit;
    padding: 0 12px;
    height: 44px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
}
.uk-textarea { height: auto; padding: 10px 12px; line-height: 1.5; }
.uk-input:focus, .uk-textarea:focus, .uk-select:focus { outline: none; }
.uk-form-label { display: block; font-size: 0.875rem; font-weight: 700; margin-bottom: 5px; color: #5C5C68; }
.uk-form-stacked .uk-form-label { display: block; }
.uk-checkbox {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; vertical-align: middle;
    border: 1px solid #c9bfae; border-radius: 5px; background: #fff;
    cursor: pointer; margin: 0 6px 0 0; position: relative;
}
.uk-checkbox:checked { background: var(--c-koralle, #FF6B5C); border-color: var(--c-koralle, #FF6B5C); }
.uk-checkbox:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---------- Cards ---------- */
.uk-card { box-sizing: border-box; }
.uk-card-default { background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(43,43,54,0.07); }
.uk-card-body   { padding: 24px; }
.uk-card-header { padding: 16px 24px; border-bottom: 1px solid #f0e6d9; }
.uk-card-footer { padding: 16px 24px; border-top: 1px solid #f0e6d9; }
.uk-card-title  { font-size: 1.4rem; font-weight: 800; margin: 0 0 12px; }
.uk-card-media-top img { border-radius: 16px 16px 0 0; display: block; width: 100%; }

/* ---------- Alerts ---------- */
.uk-alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 16px; background: #f3eee7; }
.uk-alert-success { background: #DCF3EA; color: #2E9670; }
.uk-alert-danger  { background: #FFE7E3; color: #E8503F; }
.uk-alert-warning { background: #FFF0CE; color: #8A6A12; }
.uk-alert-primary { background: #DCF3EA; color: #2E9670; }

/* ---------- Visibility ---------- */
@media (max-width: 959px) { .uk-visible\@m { display: none !important; } }
@media (min-width: 960px) { .uk-hidden\@m  { display: none !important; } }

/* ---------- Misc ---------- */
.uk-light { color: #fff; }
/* Normale Links im hellen Kontext weiß — aber NICHT Buttons (sonst weiß auf weiß) */
.uk-light a:not(.uk-button) { color: #fff; }
.uk-height-medium { min-height: 300px; }
.uk-background-muted { background: #fff; }
.uk-logo { display: inline-block; line-height: 1; }
.uk-active > a { font-weight: 800; }

/* ---------- Navbar ---------- */
.uk-navbar-container {
    background: #fff;
    display: flex; justify-content: space-between; align-items: center;
    min-height: 70px;
}
.uk-navbar {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 70px; flex: 1;
}
.uk-navbar-left, .uk-navbar-right { display: flex; align-items: center; }
.uk-navbar-item { display: flex; align-items: center; }
.uk-navbar-nav {
    display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 4px;
}
.uk-navbar-nav > li { position: relative; }
.uk-navbar-nav > li > a {
    display: flex; align-items: center; height: 70px; padding: 0 14px;
    text-decoration: none; color: #2B2B36; font-weight: 700;
}
.uk-navbar-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; color: #2B2B36; text-decoration: none;
}
.uk-navbar-toggle-icon, span[uk-navbar-toggle-icon] {
    display: inline-block; width: 22px; height: 2px; background: currentColor; position: relative;
}
.uk-navbar-toggle-icon::before, .uk-navbar-toggle-icon::after,
span[uk-navbar-toggle-icon]::before, span[uk-navbar-toggle-icon]::after {
    content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor;
}
.uk-navbar-toggle-icon::before, span[uk-navbar-toggle-icon]::before { top: -7px; }
.uk-navbar-toggle-icon::after,  span[uk-navbar-toggle-icon]::after  { top: 7px; }

/* Dropdown (Desktop) — via JS .sfc-open umgeschaltet */
.uk-navbar-dropdown {
    display: none; position: absolute; top: 100%; left: 0; z-index: 980;
    min-width: 200px; background: #fff; border-radius: 14px;
    box-shadow: 0 8px 30px rgba(43,43,54,0.12); padding: 14px 18px;
}
.uk-navbar-dropdown.sfc-open { display: block; }
.uk-navbar-dropdown-nav { list-style: none; margin: 0; padding: 0; }
.uk-navbar-dropdown-nav > li { margin: 4px 0; }
.uk-navbar-dropdown-nav > li > a { text-decoration: none; color: #2B2B36; font-weight: 600; }
.uk-navbar-dropdown-nav > li > a:hover { color: var(--c-koralle-dark, #E8503F); }
.uk-navbar-parent-icon::after { content: " ▾"; font-size: 0.8em; }

/* ---------- Offcanvas (Mobile-Menü) ---------- */
.uk-offcanvas { display: none; position: fixed; inset: 0; z-index: 1010; }
.uk-offcanvas.sfc-open { display: block; }
.uk-offcanvas::before {
    content: ""; position: absolute; inset: 0; background: rgba(43,43,54,0.5);
}
.uk-offcanvas-bar {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 270px; max-width: 80vw; background: #2B2B36; color: #fff;
    padding: 24px 22px; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease;
}
.uk-offcanvas.sfc-open .uk-offcanvas-bar { transform: translateX(0); }
.uk-offcanvas-bar a, .uk-offcanvas-bar .uk-text-secondary { color: #fff; text-decoration: none; }
.uk-offcanvas-bar .uk-nav { list-style: none; margin: 0; padding: 0; }
.uk-offcanvas-bar .uk-nav > li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.uk-offcanvas-bar .uk-nav > li > a,
.uk-offcanvas-bar .uk-nav > li > div { display: block; font-weight: 700; }
.uk-offcanvas-bar .uk-navbar-dropdown-nav { padding-left: 14px; }
.uk-offcanvas-bar .uk-navbar-dropdown-nav > li { border: none; padding: 6px 0; }
.uk-offcanvas-close {
    position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
    background: none; border: none; color: #fff; cursor: pointer; font-size: 1.4rem;
}
.uk-offcanvas-close::before { content: "✕"; }

/* ---------- Icons (vom JS-Renderer befüllt) ---------- */
.sfc-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.sfc-icon svg { display: block; }

/* ---------- Toast (Ersatz für UIkit.notification) ---------- */
.sfc-toast-wrap {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 2000; display: flex; flex-direction: column; gap: 8px; width: auto; max-width: 92vw;
}
.sfc-toast {
    background: #2B2B36; color: #fff; padding: 12px 18px; border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2); font-size: 0.92rem; font-weight: 600;
    animation: sfc-toast-in .2s ease;
}
.sfc-toast.ok    { background: #2E9670; }
.sfc-toast.error { background: #E8503F; }
.sfc-toast.warn  { background: #8A6A12; }
@keyframes sfc-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
