/* ============================================================
   Finanzservice Huber - Design System
   Palette: Beige, Ocker, Pastelltöne | Akzent: Braun
   ============================================================ */
:root {
    --c-beige: #f7f2ea;
    --c-beige-dark: #efe6d8;
    --c-ocker: #d9a441;
    --c-ocker-light: #e8c98a;
    --c-pastell-sage: #b9c9ae;
    --c-pastell-rose: #eccfc8;
    --c-pastell-blau: #c3d3da;
    --c-braun: #6f4e37;
    --c-braun-dark: #57392a;
    --c-text: #40342b;
    --c-text-muted: #85766a;
    --shadow-soft: 0 .5rem 1.25rem rgba(87, 57, 42, .10);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-beige);
    color: var(--c-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, .brand-font {
    color: var(--c-braun);
    font-weight: 600;
}

/* ---------- Navbar ---------- */
.navbar-huber {
    position: relative;
    background-color: #fffdf9;
    box-shadow: var(--shadow-soft);
}
.navbar-toggler {
    border: none;
    box-shadow: none !important;
    padding: .5rem;
}
.navbar-toggler:focus { outline: none; }

/* --- Mobile MenÃ¼: aufklappendes Panel im Seitenfluss --- */
@media (max-width: 767.98px) {
    .navbar-huber .navbar-collapse {
        --bs-collapse-transition-duration: .3s;
        background: #fffdf9;
        padding: .5rem 1.5rem 1.5rem;
        border-radius: 0 0 1.25rem 1.25rem;
        box-shadow: 0 1rem 2rem rgba(87, 57, 42, .14);
    }
    .navbar-huber .nav-link {
        font-size: 1.1rem;
        font-weight: 500;
        text-align: center;
        padding: .9rem .25rem !important;
        border-bottom: 1px solid rgba(111, 78, 55, .08);
    }
    .navbar-huber .nav-item:last-of-type .nav-link { border-bottom: none; }
    /* Hover-Unterstrich im mobilen MenÃ¼ deaktivieren */
    .navbar-huber .nav-link::after { content: none; }
    .navbar-huber .btn-cTA {
        width: 100%;
        margin: 1rem 0 0 !important;
        padding: .8rem 1.5rem !important;
        font-size: 1.05rem;
        border-radius: var(--bs-btn-border-radius);
    }
}
.navbar-huber .nav-link {
    color: var(--c-text);
    font-weight: 500;
    position: relative;
    transition: color .3s ease;
}
.navbar-huber .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: .2rem;
    width: 0;
    height: 2px;
    background: var(--c-ocker);
    border-radius: 1px;
    transition: width .35s cubic-bezier(.22, .61, .36, 1), left .35s cubic-bezier(.22, .61, .36, 1);
}
.navbar-huber .nav-link:hover::after,
.navbar-huber .nav-link.active::after {
    left: 12%;
    width: 76%;
}
.navbar-huber .nav-link:hover,
.navbar-huber .nav-link.active {
    color: var(--c-ocker);
}
.navbar-huber .btn-cTA { margin-left: .75rem; }

/* ---------- Buttons ---------- */
.btn-cTA {
    background-color: var(--c-braun);
    border-color: var(--c-braun);
    color: #fff;
    transition: background-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.btn-cTA:hover, .btn-cTA:focus {
    background-color: var(--c-braun-dark);
    border-color: var(--c-braun-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1.1rem rgba(87, 57, 42, .25);
}
.btn-outline-cTA {
    border: 1px solid var(--c-braun);
    color: var(--c-braun);
    background: transparent;
    transition: background-color .3s ease, color .3s ease, transform .3s ease;
}
.btn-outline-cTA:hover {
    background-color: var(--c-braun);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--c-beige-dark) 0%, #fdfaf4 55%, var(--c-ocker-light) 130%);
    padding: 4.5rem 0;
}
.hero img.logo-hero {
    max-height: 300px;
    width: auto;
    max-width: min(100%, 55vw);
}
/* Kleine Smartphones (< 576 px): kompakt, viewport-relativ */
@media (max-width: 575.98px) {
    .hero img.logo-hero {
        max-height: 36vw;
        max-width: min(100%, 60vw);
    }
}
/* Groeßere Smartphones (576-767 px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero img.logo-hero {
        max-height: min(30vw, 190px);
        max-width: min(100%, 48vw);
    }
}
/* Tablets (768-991 px): zweispaltig, Logo schmaler */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero img.logo-hero {
        max-height: min(24vw, 210px);
        max-width: min(100%, 34vw);
    }
    .hero { padding: 3rem 0; }
}
/* Kleine Laptops (992-1199 px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero img.logo-hero {
        max-height: min(26vw, 260px);
    }
}
/* Grosse Screens (>= 1400 px) */
@media (min-width: 1400px) {
    .hero img.logo-hero {
        max-height: 340px;
    }
}
.section-pad { padding: 4rem 0; }

.bg-section-alt { background-color: var(--c-beige-dark); }

/* ---------- Karten ---------- */
.card-huber {
    background: #fffdf9;
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-soft);
    height: 100%;
}
/* Hover-Effekt nur auf klickbaren Karten (a.card-huber.card-link) */
a.card-huber.card-link {
    text-decoration: none;
    color: inherit;
    transition: transform .25s cubic-bezier(.22, .61, .36, 1), box-shadow .25s ease;
}
a.card-huber.card-link:hover,
a.card-huber.card-link:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 .9rem 2rem rgba(87, 57, 42, .16);
}
.card-huber .card-icon {
    font-size: 1.9rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
}
.icon-ocker { background: rgba(217,164,65,.22); }
.icon-sage  { background: rgba(185,201,174,.35); }
.icon-rose  { background: rgba(236,207,200,.45); }
.icon-blau  { background: rgba(195,211,218,.45); }

.chip {
    display: inline-block;
    background: rgba(217,164,65,.18);
    color: var(--c-braun);
    border-radius: 2rem;
    padding: .3rem .9rem;
    font-size: .9rem;
    font-weight: 500;
    margin: .15rem .1rem;
}

/* ---------- Footer ---------- */
.footer-huber {
    background-color: var(--c-braun);
    color: #f1e6dc;
    flex-shrink: 0;
}
.footer-huber a,
.footer-huber a:link,
.footer-huber a:visited,
.footer-huber a:active,
.footer-huber .nav-link,
.footer-huber p a {
    color: #f1e6dc !important;
    text-decoration: none;
}
.footer-huber a:hover,
.footer-huber a:focus-visible {
    color: var(--c-ocker-light) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-huber .footer-head {
    color: var(--c-ocker-light);
    font-weight: 600;
    margin-bottom: .5rem;
}

/* ---------- Formular ---------- */
.form-control:focus, .form-check-input:focus {
    border-color: var(--c-ocker);
    box-shadow: 0 0 0 .2rem rgba(217,164,65,.25);
}
.form-label.required::after {
    content: " *";
    color: var(--c-ocker);
}

/* ---------- Cookie-Banner (schwebendes Fenster) ---------- */
.cookie-banner {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    left: auto;
    z-index: 1080;
    width: min(420px, calc(100vw - 2.5rem));
    max-height: min(560px, calc(100vh - 2.5rem));
    overflow-y: auto;
    background: #fffdf9;
    border-radius: 1.25rem;
    box-shadow: 0 1.25rem 3rem rgba(87, 57, 42, .22), 0 0 0 1px rgba(111, 78, 55, .06);
    opacity: 0;
    transform: translateY(24px) scale(.97);
    transition:
        opacity .45s cubic-bezier(.22, .61, .36, 1),
        transform .45s cubic-bezier(.22, .61, .36, 1);
}
.cookie-banner.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.cookie-banner::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 1.25rem 1.25rem 0 0;
    background: linear-gradient(90deg, var(--c-ocker) 0%, var(--c-pastell-sage) 100%);
}
.cookie-banner h2 { color: var(--c-braun); }
.cookie-banner .form-check-input:checked {
    background-color: var(--c-braun);
    border-color: var(--c-braun);
}
.cookie-banner .form-switch .form-check-input:disabled {
    background-color: var(--c-beige-dark);
}
@media (max-width: 575.98px) {
    .cookie-banner {
        right: .75rem;
        bottom: .75rem;
        width: calc(100vw - 1.5rem);
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-banner { transition: none; transform: none; }
}


/* ---------- Ueber mich: Foto-Platzhalter ---------- */
.photo-placeholder {
    width: min(100%, 320px);
    aspect-ratio: 3 / 4;
    border-radius: 1.25rem;
    background: linear-gradient(160deg, var(--c-beige-dark) 0%, #fdfaf4 60%, rgba(232,201,138,.45) 100%);
    box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(111,78,55,.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: var(--c-text-muted);
    font-size: .95rem;
    overflow: hidden;
}
.photo-placeholder i { font-size: 2.6rem; color: var(--c-ocker); }
/* Wenn ein echtes Foto eingesetzt wird: <img class="photo-filled"> */
img.photo-filled {
    width: min(100%, 320px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-soft);
}

/* ---------- Ueber mich: Timeline ---------- */
.timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 3.5rem;
}
.timeline::before {
    content: "";
    position: absolute;
    top: .5rem;
    bottom: .5rem;
    left: 1.4rem;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--c-ocker) 0%, var(--c-pastell-sage) 100%);
}
.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-icon {
    position: absolute;
    left: -3.5rem;
    top: 0;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    background: #fffdf9;
    border: 3px solid var(--c-ocker);
    color: var(--c-braun);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: var(--shadow-soft);
    z-index: 1;
}
.timeline-year {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-braun-dark);
    background: rgba(217,164,65,.18);
    border-radius: 2rem;
    padding: .2rem .75rem;
    margin-bottom: .6rem;
}
@media (min-width: 992px) {
    .timeline { padding: 0; max-width: 900px; margin-inline: auto; }
    .timeline::before { left: 50%; transform: translateX(-50%); }
    .timeline-item { width: 50%; padding-right: 3rem; }
    .timeline-item:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 3rem; }
    .timeline-item:nth-child(odd) .timeline-card { text-align: right; }
    .timeline-item:nth-child(odd) .timeline-icon { left: auto; right: -1.45rem; }
    .timeline-item:nth-child(even) .timeline-icon { left: -1.45rem; }
}
/* ============================================================
   Animationen - flÃ¼ssiges Ein-/Ausblenden
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity .8s cubic-bezier(.22, .61, .36, 1),
        transform .8s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}
.reveal.reveal-left  { transform: translateX(-32px); }
.reveal.reveal-right { transform: translateX(32px); }
.reveal.reveal-zoom  { transform: scale(.94); }

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    html { scroll-behavior: auto; }
}

@keyframes huber-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}
.hero [data-hero] {
    opacity: 0;
    animation: huber-fade-up .9s cubic-bezier(.22, .61, .36, 1) forwards;
    animation-delay: var(--hero-delay, 0s);
}
.text-muted-huber { color: var(--c-text-muted) !important; }
.divider-ocker {
    width: 70px;
    height: 4px;
    background: var(--c-ocker);
    border-radius: 2px;
    margin-bottom: 1.5rem;
}
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; pointer-events: none; } /* Honeypot */

/* Skip-Link für Barrierefreiheit */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--c-braun);
    color: #fff !important;
    padding: .75rem 1.25rem;
    z-index: 9999;
    border-radius: 0 0 .5rem .5rem;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.25);
    transition: top .2s ease-in-out;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--c-ocker);
}

/* ---------- Step-Wizard Styles ---------- */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 2.5rem;
}
.wizard-progress::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--c-beige-dark);
    transform: translateY(-50%);
    z-index: 1;
}
.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: var(--c-ocker);
    transform: translateY(-50%);
    z-index: 2;
    transition: width .4s cubic-bezier(.22, .61, .36, 1);
}
.wizard-step-node {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
}
.wizard-step-circle {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--c-beige-dark);
    color: var(--c-text-muted);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .35s ease;
}
.wizard-step-node.active .wizard-step-circle {
    background: var(--c-ocker);
    border-color: var(--c-ocker);
    color: #fff;
    box-shadow: 0 0 0 .3rem rgba(217, 164, 65, .25);
}
.wizard-step-node.completed .wizard-step-circle {
    background: var(--c-braun);
    border-color: var(--c-braun);
    color: #fff;
}
.wizard-step-title {
    font-size: .8rem;
    font-weight: 600;
    color: var(--c-text-muted);
    text-align: center;
    transition: color .3s ease;
}
.wizard-step-node.active .wizard-step-title {
    color: var(--c-braun);
}
.wizard-pane {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .35s ease, transform .35s ease;
}
.wizard-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.topic-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.topic-option {
    position: relative;
    border: 2px solid var(--c-beige-dark);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all .25s ease;
}
.topic-option:hover {
    border-color: var(--c-ocker-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}
.topic-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.topic-option.selected {
    border-color: var(--c-ocker);
    background: #fdfbf7;
    box-shadow: 0 0 0 .2rem rgba(217, 164, 65, .18);
}
.topic-icon {
    font-size: 1.6rem;
    color: var(--c-braun);
    margin-bottom: .5rem;
}
.topic-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--c-text);
}
.wizard-summary-box {
    background: var(--c-beige);
    border-radius: .75rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--c-ocker);
}

.wizard-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    white-space: normal;
    text-align: center;
    min-height: 48px;
    padding-top: .65rem;
    padding-bottom: .65rem;
}

@media (max-width: 575.98px) {
    .wizard-actions {
        flex-direction: column-reverse;
        gap: .75rem !important;
    }
    .wizard-actions .btn {
        width: 100%;
        min-height: 46px;
        font-size: 1rem;
    }
    .wizard-actions .btn-prev {
        order: 2;
    }
    .wizard-actions .btn-next,
    .wizard-actions .btn-submit {
        order: 1;
    }
}

@media (max-width: 767.98px) {
    .hero { padding: 3rem 0; }
    .navbar-huber .btn-cTA { margin: .5rem 0 0; }
}

/* ---------- Admin (Footer-Link & Audit-Tabelle) ---------- */
.footer-admin-link a {
    color: rgba(255,255,255,.22);
    font-size: .75rem;
    transition: color .3s ease;
}
.footer-admin-link a:hover,
.footer-admin-link a:focus {
    color: rgba(255,255,255,.6);
}

.audit-table td { vertical-align: top; }
.audit-badge { font-weight: 500; }
.audit-info { background: var(--c-pastell-blau); color: var(--c-text); }
.audit-warning { background: var(--c-ocker-light); color: var(--c-text); }
.audit-error { background: var(--c-pastell-rose); color: var(--c-braun-dark); }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------- Admin: Media Upload & Image Cropper ---------- */
.dropzone-huber {
    border: 2px dashed rgba(111, 78, 55, .28);
    border-radius: 1.25rem;
    background: #fffdf9;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all .25s ease;
}
.dropzone-huber:hover, .dropzone-huber.dragover {
    border-color: var(--c-ocker);
    background: #fdfbf7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.dropzone-icon {
    font-size: 3rem;
    color: var(--c-ocker);
    margin-bottom: 1rem;
    display: inline-block;
}
.cropper-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    background: #2b231d;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    user-select: none;
    touch-action: none;
}
.cropper-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
    display: block;
}
.cropper-canvas:active {
    cursor: grabbing;
}
.cropper-overlay-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(217, 164, 65, .7);
    border-radius: 1.25rem;
}
.cropper-overlay-grid::before, .cropper-overlay-grid::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.cropper-overlay-grid::before {
    top: 33.33%;
    bottom: 33.33%;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(255, 255, 255, .35);
    border-bottom: 1px dashed rgba(255, 255, 255, .35);
}
.cropper-overlay-grid::after {
    left: 33.33%;
    right: 33.33%;
    top: 0;
    bottom: 0;
    border-left: 1px dashed rgba(255, 255, 255, .35);
    border-right: 1px dashed rgba(255, 255, 255, .35);
}
.cropper-toolbar {
    background: var(--c-beige);
    border-radius: .85rem;
    padding: .75rem 1rem;
}
