@import url('./shared.css');

:root {
    --bg: #f3f4f6;
    --surface: #ffffff;
    --surface-soft: #f8f9fb;
    --text: #161b22;
    --muted: #5c6773;
    --line: #dde2e8;
    --green: #84bc22;
    --green-dark: #6ea117;
    --green-soft: #f1f8df;
}

html, body {
    background:
        radial-gradient(circle at 12% 8%, rgba(132, 188, 34, 0.2), transparent 36%),
        radial-gradient(circle at 92% 90%, rgba(110, 161, 23, 0.16), transparent 34%),
        linear-gradient(180deg, #f7f8fb 0%, #edf0f4 100%);
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

.page-wrapper {
    min-height: calc(100vh - 66px);
    display: grid;
    place-items: center;
    padding: 22px 14px;
}

.tutorial-card {
    width: 100%;
    max-width: 1660px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 22px 52px rgba(13, 34, 61, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: auto;
    min-height: 620px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 22px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(7px);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.card-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header__title {
    font-size: 15px;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.card-header__overview-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent, #5f8f14);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--accent, #5f8f14);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.card-header__overview-link:hover,
.card-header__overview-link:focus {
    background: var(--accent, #5f8f14);
    color: #fff;
    outline: none;
}

.btn--finish {
    text-decoration: none;
    background: linear-gradient(135deg, #f97316 0%, #dc580a 100%);
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.35);
}

.btn--finish:hover,
.btn--finish:focus {
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.5);
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.datev-logo svg { display: block; }
.brand-logo { display:block; height:36px; width:auto; }

.card-content {
    flex: 1;
    position: relative;
    min-height: 620px;
    display: block;
}

.slide { display: none; width: 100%; }
.slide.active {
    display: flex;
    min-height: 620px;
    align-items: stretch;
    animation: slideFadeIn 280ms ease;
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide__left {
    flex: 1 1 56%;
    background:
        linear-gradient(150deg, #ffffff 0%, #f4f7fb 60%, #eef4df 100%);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 26px;
    overflow: hidden;
    position: relative;
}

.slide__left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.34), transparent 26%),
        radial-gradient(circle at 90% 85%, rgba(132, 188, 34, 0.18), transparent 28%);
    pointer-events: none;
}

.image-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.image-carousel__controls {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 22, 31, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 8px 12px;
    backdrop-filter: blur(4px);
}

.image-carousel__btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.image-carousel__btn:hover,
.image-carousel__btn:focus {
    background: rgba(255, 255, 255, 0.36);
    outline: none;
    transform: translateY(-1px);
}

.image-carousel__counter {
    color: #fff;
    font-size: 14px;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 600;
    min-width: 58px;
    text-align: center;
}

.slide__right {
    flex: 1 1 44%;
    min-width: 0;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    padding: 48px 52px 118px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.step-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--green-soft);
    border: 1px solid #d6e5b1;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    max-width: 100%;
    flex-wrap: wrap;
    overflow-wrap: break-word;
    hyphens: auto;
}

.step-indicator strong {
    color: var(--text);
    font-weight: 800;
}

.step-indicator__chapter {
    color: var(--green-dark);
    font-weight: 700;
}

h1 {
    font-size: clamp(33px, 3.2vw, 50px);
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--text);
    margin-bottom: 22px;
    overflow-wrap: break-word;
    hyphens: auto;
}

p {
    font-size: 21px;
    line-height: 1.62;
    color: var(--muted);
    margin-bottom: 14px;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 400;
    overflow-wrap: break-word;
    hyphens: auto;
}

.slide-text-content {
    display: grid;
    gap: 4px;
}

.card-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, #ffffff 100%);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
    min-height: 70px;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(5px);
}

.btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 17px;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.16s ease, filter 0.16s ease;
    padding: 0;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(95, 143, 20, 0.34);
}

.btn:hover,
.btn:focus {
    outline: none;
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 30px rgba(95, 143, 20, 0.38);
}

.btn__label {
    padding: 18px 24px;
}

.btn__icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.btn--next .btn__label { padding: 18px 18px 18px 26px; }
.btn--back .btn__label { padding: 18px 26px 18px 18px; }
.btn--dash {
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.btn-skip-wrap {
    display: flex;
    align-items: center;
}

.btn--skip {
    background: linear-gradient(135deg, #687580 0%, #4a5563 100%);
    box-shadow: 0 10px 26px rgba(60, 70, 90, 0.22);
}

.btn--skip .btn__label {
    padding: 18px 24px;
}

.btn--skip:hover,
.btn--skip:focus {
    box-shadow: 0 14px 30px rgba(60, 70, 90, 0.30);
}

.slide-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 20px;
    line-height: 1.58;
    color: var(--text);
    margin-bottom: 12px;
    cursor: pointer;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-weight: 700;
    overflow-wrap: break-word;
    hyphens: auto;
}

.slide-checkbox input[type='checkbox'] {
    width: 22px;
    height: 22px;
    margin-top: 4px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--green-dark);
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #d6dfd2;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 24px rgba(38, 64, 33, 0.16);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 340px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 2px dashed #9db887;
    color: #58733f;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    font-size: 20px;
    font-weight: 700;
    background: rgba(241, 248, 223, 0.58);
}

.slide-color-rot {
    color: #b42318;
}

.slide-color-gelb {
    color: #8a6d00;
}

.slide-color-gruen {
    color: #1f7a2f;
}

.slide-color-rot input[type='checkbox'] {
    accent-color: #b42318;
}

.slide-color-gelb input[type='checkbox'] {
    accent-color: #8a6d00;
}

.slide-color-gruen input[type='checkbox'] {
    accent-color: #1f7a2f;
}

@media (min-width: 1700px) {
    .tutorial-card {
        max-width: 1860px;
        min-height: 700px;
    }

    .card-content,
    .slide.active {
        min-height: 700px;
    }

    .slide__right {
        padding: 56px 64px 126px;
    }

    h1 {
        font-size: clamp(40px, 2.5vw, 56px);
    }

    p,
    .slide-checkbox {
        font-size: 22px;
    }
}

@media (min-width: 2300px) {
    .tutorial-card {
        max-width: 2140px;
    }

    .slide__left {
        flex-basis: 60%;
    }

    .slide__right {
        flex-basis: 40%;
        padding: 64px 76px 130px;
    }
}

@media (max-width: 1220px) {
    .slide__right {
        padding: 36px 34px 108px;
    }

    p,
    .slide-checkbox {
        font-size: 19px;
    }
}

@media (max-width: 980px) {
    .slide.active {
        flex-direction: column;
        min-height: 0;
    }

    .slide__left,
    .slide__right {
        flex: 1 1 auto;
        width: 100%;
    }

    .slide__left {
        min-height: 300px;
        padding: 18px;
    }

    .slide__right {
        padding: 24px 18px 96px;
    }

    h1 {
        font-size: clamp(30px, 8.8vw, 42px);
    }

    p {
        font-size: 18px;
    }

    .slide-checkbox {
        font-size: 18px;
    }

    .card-nav {
        min-height: 74px;
    }

    .btn {
        font-size: 16px;
    }

    .btn__icon {
        width: 50px;
        height: 50px;
    }

    .btn__label,
    .btn--next .btn__label,
    .btn--back .btn__label {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

@media (max-width: 560px) {
    .card-header {
        padding: 10px 12px;
    }

    .card-header__title {
        font-size: 13px;
    }

    .brand-logo {
        height: 30px;
    }

    .page-wrapper {
        padding: 10px;
    }

    .tutorial-card {
        border-radius: 14px;
        min-height: 540px;
    }

    .slide__right {
        padding: 18px 12px 92px;
    }

    .step-indicator {
        font-size: 12px;
        padding: 5px 10px;
    }

    p,
    .slide-checkbox {
        font-size: 17px;
        line-height: 1.54;
    }

    .image-carousel__controls {
        gap: 7px;
        padding: 6px 9px;
    }

    .image-carousel__btn {
        width: 34px;
        height: 34px;
    }
}
