.chatbot-backdrop {
    position: fixed;
    inset: 0;
    /* Fullscreen so clicks outside modal are detected */
    z-index: 30000 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Align modal to bottom-right corner */
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 30px;
    box-sizing: border-box;
}


.chatbot-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.chatbot-modal {
    width: 465px;
    max-width: 95vw;
    height: 752px;
    max-height: 90vh;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.5);
    transform: translateY(30px) scale(0.97);
    transform-origin: bottom right;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-main);
    position: relative;
}

.chatbot-backdrop.active .chatbot-modal {
    transform: translateY(0) scale(1);
}

.chat-bg-orb {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(115, 46, 51, 0.4) 0%, rgba(15, 20, 35, 0.1) 40%, rgba(255, 255, 255, 0) 70%);
    filter: blur(40px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: orbFloat 6s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% {
        transform: translate(-50%, -40%) scale(1);
    }

    100% {
        transform: translate(-50%, -60%) scale(1.1);
    }
}


/* Albert character image — appears to the left of the modal */
.albert-character {
    height: 500px;
    width: auto;
    object-fit: contain;
    object-position: bottom;
    align-self: flex-end;
    margin-right: -20px;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s,
        opacity 0.35s ease 0.1s;
    pointer-events: none;
    filter: drop-shadow(0px 4px 3px rgba(0, 0, 0, 0.3));
}

.chatbot-backdrop.active .albert-character {
    transform: translateY(0);
    opacity: 1;
}

/* --- Header --- */
.chat-header {
    background: transparent;
    padding: 1.5rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.chat-albert-title {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 500;
    color: #4A4A5A;
    margin: 0;
    line-height: 1;
}

.chat-sparkle-icon {
    width: 18.5px;
    height: 18.5px;
    filter: invert(18%) sepia(35%) saturate(2710%) hue-rotate(318deg) brightness(97%) contrast(87%);
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    color: #4A4A5A;
    font-size: 0.9rem;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-main);
}


.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* --- Scrollable body --- */
.chat-body {
    position: relative;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1rem 2rem 2rem;
    gap: 1.667rem;
    background: transparent;
    border-radius: 16px;
    overscroll-behavior: contain;
    z-index: 1;
}

.chat-body::-webkit-scrollbar {
    width: 4px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* --- Intro --- */
.chat-intro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    align-self: flex-start;
    margin-top: 2rem;
}

.chat-intro-heading {
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 2.2rem;
    /* Made smaller from 2.8rem */
    line-height: 1.2;
    font-weight: 700;
    color: #0F1423;
    /* Darker for legibility */
    margin: 0;
}

.chat-intro-text {
    font-size: 16px;
    line-height: 1.6;
    font-family: var(--font-main);
    font-weight: 400;
    color: #1A1A1A;
    /* Darker for legibility */
    margin: 0;
}

.chat-divider {
    display: none;
}

/* --- Suggestion pills --- */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1rem;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 20, 35, 0.1);
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 1rem;
    font-family: var(--font-main);
    font-weight: 500;
    color: #0F1423;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.sugg-icon {
    font-size: 1.2rem;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sugg-text {
    flex: 1;
    text-align: left;
}

/* --- Chat history --- */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.8;
    animation: msgFadeIn 0.25s ease;
}



@keyframes msgFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing indicator (three bouncing dots) */
.typing-indicator {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 12px 16px;
}

.typing-indicator span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(15, 20, 35, 0.4);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

.service-text {
    font-size: 1rem !important;
}

.read-more {
    font-size: 1rem !important;
}

.msg-user {
    background: #0D0F14;
    color: #E5DDD3;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.msg-albert {
    background: rgba(255, 255, 255, 0.65);
    color: #0F1423;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(15, 20, 35, 0.12);
}

/* --- Input area --- */
.chat-input-area {
    padding: 1rem 2rem 2rem;
    flex-shrink: 0;
    z-index: 2;
}

@keyframes bluePulseBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.chat-input-pill {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    /* Fully opaque so nothing shines through */
    border-radius: 999px;
    padding: 8px 8px 8px 1.5rem;
    position: relative;
    border: 1px solid rgba(192, 214, 237, 0.5);
    /* Static subtle border */
}

/* Subtle outer glow that doesn't bleed inwards */
.chat-input-pill::before {
    content: '';
    position: absolute;
    inset: -3px;
    /* Slightly wider spread to be visible */
    background: linear-gradient(90deg, #C0D6ED, rgba(192, 214, 237, 0.3), #C0D6ED);
    background-size: 200% 100%;
    animation: bluePulseBorder 6s linear infinite;
    filter: blur(5px);
    /* Slightly stronger blur */
    opacity: 0.7;
    /* 15% stronger intensity */
    border-radius: 999px;
    z-index: -1;
    /* Keeps it behind the input */
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.667rem 0 0.667rem 0;
    /* removed left padding since orb is gone */
    font-size: 1.1rem;
    font-family: var(--font-main);
    color: #0F1423;
    outline: none;
}

#chat-input::placeholder {
    color: rgba(58, 61, 74, 0.4);
}

#chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #3A3D4A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.1s ease;
}

#chat-send-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

#chat-send-btn:active {
    transform: scale(0.95);
}

#chat-send-btn svg {
    transform: translateX(1px);
    width: 18px;
    height: 18px;
}

/* --- SHARED LIGHT MODE STYLES (Used on all pages) --- */

/* --- FORCED GLASSMORPHISM FOR BOTH MODES --- */
/* We remove the background color overrides so the glass stays visible */
[data-theme="light"] .chatbot-modal,
[data-theme="dark"] .chatbot-modal {
    background: rgba(244, 241, 238, 0.85) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] .chat-header,
[data-theme="dark"] .chat-header {
    background: transparent !important;
}

[data-theme="light"] .chat-body,
[data-theme="dark"] .chat-body {
    background: transparent !important;
}

/* Colors for messages */
.msg-user {
    background: #0D0F14 !important;
    color: #E5DDD3 !important;
}

.msg-albert {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #3A3D4A !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Ensure text stays visible in dark mode since background is light glass */
[data-theme="dark"] .chat-intro-heading,
[data-theme="dark"] .chat-intro-text,
[data-theme="dark"] .chat-albert-title,
[data-theme="dark"] .chat-close-btn,
[data-theme="dark"] #chat-input,
[data-theme="dark"] .suggestion-chip {
    color: #3A3D4A !important;
}

/* Extra aesthetic tweaks */
[data-theme="dark"] .lang-switch {
    background: rgba(244, 241, 238, 0.8);
}

[data-theme="dark"] .fixed-controls-actions {
    background: transparent;
}

[data-theme="dark"] .lang-switch button,
[data-theme="dark"] .fixed-controls-actions button {
    color: #1A1A1A;
}

[data-theme="dark"] .lang-switch button.active {
    background: #1A1A1A;
    color: #F4F1EE;
}

[data-theme="dark"] .fixed-controls-actions button {
    background: rgba(244, 241, 238, 0.85);
    margin-right: 0;
}

.custom-select-trigger:not(.has-value) .placeholder {
    color: rgba(15, 20, 35, 0.65);
}

[data-theme="dark"] .custom-select-trigger:not(.has-value) .placeholder {
    color: rgba(244, 241, 238, 0.65);
}

/* ================================
   RESPONSIVE (MEDIA QUERIES)
================================ */

@media (max-width: 1300px) {
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-bottom>.col-span-2:empty {
        display: none;
    }

    /* --- HOW I DO IT SECTION (1300px) --- */
    .how-i-do-it .cards-container {
        row-gap: 200px;
        /* Noch mehr Abstand zwischen den Reihen */
        align-items: start;
        /* Verhindert, dass die Karten sich nach unten strecken */
    }

    .how-i-do-it .card {
        height: max-content;
        /* Höhe richtet sich nur nach dem eigenen Text */
    }

    .how-i-do-it .cards-container>.col-span-1:nth-child(3) {
        display: none;
        /* Versteckt die leere Lücke */
    }

    .card-1 {
        grid-column: 1;
        grid-row: 1;
        --base-y: 0px !important;
        margin-top: 0;
    }

    .card-2 {
        grid-column: 3;
        grid-row: 1;
        --base-y: 0px !important;
        margin-top: 80px;
        /* Versetzt Karte 2 nach unten */
    }

    .card-3 {
        grid-column: 1;
        grid-row: 2;
        --base-y: 0px !important;
        margin-top: 0;
        /* Startet direkt in der 2. Reihe, hat durch die hohe erste Reihe 80px Puffer */
    }

    .card-4 {
        grid-column: 3;
        grid-row: 2;
        --base-y: 0px !important;
        margin-top: 80px;
        /* Wieder 80px versetzt nach unten */
    }

    /* Text über die gesamte Spalte */
    .hero-notice {
        justify-self: stretch !important;
        /* Statt 250px fest auf 80px vom Boden */
    }

    .hero-notice .notice-text {
        max-width: 100%;
    }

    /* Bild mit normalem Abstand daneben */
    .hero-hello-image {
        height: 450px;
        width: auto;
        margin-right: -10;
    }

    .service-left {
        padding-top: 0;
        position: absolute !important;
        bottom: 0 !important;
        top: auto !important;
        align-self: flex-end !important;
    }

    .main-logo {
        margin-top: -55px;
        max-width: 440px;
    }

    /* What I Do Section: Image above Details in Col 3 */
    .what-i-do .grid-5 {
        align-items: flex-end;
        align-content: flex-end;
        height: auto;
        min-height: 700px;
        row-gap: 0;
        /* Allows content to grow naturally while maintaining minimum space */
    }

    .what-i-do {
        padding-bottom: 10vh !important;
    }

    .what-i-do .grid-5>.col-span-1:nth-child(3) {
        display: none;
    }

    .service-image-container {
        display: none !important;
    }

    .what-i-do .service-image {
        width: 100%;
        height: 80%;
        object-fit: cover;
        object-position: center;
        border-radius: 5px;
    }

    .service-details {
        grid-column: 3;
        grid-row: 2;
        margin-top: 0;
        margin-bottom: 100px;
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: start;
        justify-content: end;
    }

    .hero-notice {
        justify-self: end !important;
        width: 80%;
    }

    .service-left {
        position: sticky !important;
        top: 50vh;
        transform: translateY(-50%);
        margin-top: 0;
        align-self: start;
        height: 420px;
        /* Fixed height stops translateY from recalculating */
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        padding-top: 0;
    }

    .service-list li {
        font-size: 2.4rem;
        text-align: right;
    }

    /* --- CONTACT SECTION (1300px) --- */
    .contact .grid-5 {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 40px !important;
    }

    .contact-intro {
        grid-column: 1 !important;
        width: 100% !important;
        align-self: start !important;
        margin-top: 0 !important;
    }

    .contact-image-container {
        display: none !important;
    }

    .contact-form-container {
        grid-column: 3 !important;
        width: 100% !important;
        align-self: start !important;
        margin-top: 0 !important;
    }

    .contact {
        padding-bottom: 8vh;
    }

    /* Form formatting like mobile */
    .form-text {
        white-space: normal !important;
        font-size: 1.6rem !important;
        font-weight: 600 !important;
    }

    .form-line {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .mad-libs-form input,
    .mad-libs-form textarea {
        max-width: 100% !important;
    }

    /* --- PHILOSOPHY SECTION (1024px - 1300px) --- */
    @media (min-width: 1025px) {
        .philosophy-content {
            grid-column: 1 / 4 !important;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            width: 100%;
        }

        .philosophy-title {
            grid-column: 1;
            grid-row: 1 / 10;
            font-size: 3.333rem;
            margin-top: 0;
            align-self: start;
        }

        .philosophy-label,
        .philosophy-text-columns {
            grid-column: 3;
            width: 100%;
        }

        .philosophy-body {
            column-count: 1;
            margin-bottom: 1.333rem;
        }

        .philosophy-label {
            margin-bottom: 0px;
        }

        .philosophy-blog-link {
            display: flex;
            justify-content: flex-end;
            width: 100%;
        }

        .philosophy-blog-link .nav-btn {
            margin: 0 !important;
            width: fit-content !important;
        }

        .philosophy .grid-5>.col-span-1,
        .philosophy-image-container {
            display: none !important;
        }
    }

    /* --- PHILOSOPHY SECTION (Unter 1024px) --- */
    @media (max-width: 1024px) {
        .philosophy {
            margin-top: 10vw;
            padding-bottom: 10vw;
        }

        .philosophy .grid-5 {
            grid-template-rows: min-content min-content auto;
            row-gap: 0;
        }

        .philosophy .grid-5>.col-span-1 {
            display: none !important;
        }

        .philosophy-content {
            display: contents;
        }

        .philosophy-title {
            grid-column: 1;
            grid-row: 1;
            font-size: 2.8rem;
            margin-top: 0;
            margin-bottom: 30px;
            align-self: start;
            text-align: left;
        }

        .philosophy-label {
            grid-column: 1;
            grid-row: 2;
            margin-bottom: 30px;
            align-self: start;
        }

        .philosophy-image-container {
            grid-column: 3;
            grid-row: 1 / 3;
            display: block !important;
            justify-self: center;
            align-self: end;
            margin-top: -300px;
            margin-bottom: 30px;
            position: relative;
            width: 100%;
            max-width: 250px;
        }

        .philosophy-image-container::before {
            content: "";
            position: absolute;
            top: -40px;
            left: -30px;
            width: 110px;
            height: 110px;
            background-image: url('../Ressourcen/Icons/Square.svg');
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            opacity: 0.6;
            z-index: -1;
        }

        [data-theme="dark"] .philosophy-image-container::before {
            background-image: url('../Ressourcen/Icons/Square-Dark.svg');
        }

        .philosophy-image {
            width: 100%;
            display: block;
        }

        .philosophy-text-columns {
            grid-column: 1 / 4;
            grid-row: 3;
            display: block;
            width: 100%;
        }

        .philosophy-text-columns::before {
            display: none !important;
        }

        .philosophy-body {
            column-count: 2;
            column-gap: 33.33%;
            margin-bottom: -10px;
            text-align: justify;
        }

        .philosophy-blog-link {
            display: flex;
            justify-content: flex-end;
            width: 100%;
            margin-top: 2rem;
        }

        .philosophy-blog-link .nav-btn {
            margin: 0 !important;
            width: fit-content !important;
        }

        .fixed-footer a {
            font-size: 1.067rem;
        }
    }

}

@media (max-width: 1200px) {
    .grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .what-i-do .grid-5 {
        height: auto;
    }

    .hero-hello-image {
        display: none;
    }

    .service-image-container {
        height: 50%;
        align-self: end;
    }

}

@media (max-width: 1024px) {

    .service-left {
        top: 50vh;
        transform: translateY(-50%);
        margin-top: 0;
        height: 420px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .contact-circle {
        width: 140px;
        height: 140px;
    }

    .main-logo {
        max-width: 370px;
        margin-top: -30px;
    }

    .service-list li {
        font-size: 2.16rem;
        /* 10% smaller than 2.4rem */
    }

    .card-title {
        font-size: 1.6rem;
        /* 10% kleiner als 2rem */
    }



    .container {
        padding: 40px;
    }

    .hero-notice {
        justify-self: end !important;
        width: 100%;
    }

    .how-i-do-it {
        padding-bottom: 20vh;
        padding-top: 30vh;
    }

    .service-left {
        width: 100%;
    }

    .philosophy {
        padding-top: 0px;
    }

    .philosophy-text-columns::before {
        right: -10px !important;
    }

}


@media (max-width: 768px) {

    .container {
        padding: 30px !important;
    }

    .philosophy-title {
        grid-column: 1;
        grid-row: auto;
        order: 1;
        font-size: 2.5rem;
        margin-top: 100px;
    }

    .philosophy-label {
        grid-column: 1;
        grid-row: auto;
        order: 2;
        margin-bottom: 2rem;
    }

    .philosophy-image-container {
        grid-column: 1;
        grid-row: auto;
        order: 3;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 3rem !important;
        margin-top: 0 !important;
    }

    .philosophy-image-container::before {
        display: none !important;
    }

    .philosophy-image {
        width: 90% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }

    .philosophy-text-columns {
        grid-column: 1;
        grid-row: auto;
        order: 4;
        display: block;
    }

    .philosophy-body {
        column-count: 1;
    }

    .philosophy-blog-link {
        justify-content: flex-start;
    }

    .philosophy .grid-5 {
        grid-template-rows: none;
    }

    .grid-5 {
        grid-template-columns: 1fr;
    }

    .col-span-1,
    .col-span-2,
    .col-span-3,
    .col-span-4,
    .col-span-5 {
        grid-column: span 1;
    }

    .main-title {
        font-size: 3.5rem;
    }

    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.667rem;
        padding-top: 10vh;
        height: auto !important;
        padding-bottom: 0px;
        /* Allow height to grow with content */
    }

    .main-logo {
        max-width: none !important;
        width: 85vw !important;
        height: auto;
        margin-left: 50%;
        transform: translateX(-50%);
    }

    img.back-wortmarke {
        transform: none !important;
        margin: 150px auto 0 !important;
        width: 85vw !important;
    }

    .hero-content {
        margin-top: 100px;
        width: 100%;
        order: 1;
    }

    .contact-circle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        margin: 4rem auto !important;
        /* Symmetric vertical margin */
        width: 120px !important;
        height: 120px !important;
        order: 2;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
    }

    .hero-bottom {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        top: 0;
        margin-top: 0;
        width: 100%;
        order: 3;
        gap: 0;
        height: auto !important;
        /* Override 100vh from desktop */
    }

    .hero-bottom>div:not(.hero-notice) {
        display: none !important;
        /* Hide empty columns to prevent ghost spacing */
    }

    .hero-notice {
        display: flex;
        flex-direction: column;
        text-align: left;
        align-self: flex-start !important;
        margin-top: 0 !important;
        margin-bottom: 2.5rem !important;
        /* Safe spacing to prevent overlap with the accordion below */
    }

    .hero-philosophy {
        display: none;
    }

    .hero-services-wrapper {
        display: flex;
        flex-direction: column;
    }

    .hero {
        order: 1;
    }

    .notice-text {
        font-size: 1rem;
        /* 16px */
        word-wrap: break-word;
        hyphens: auto;
    }

    .what-i-do {
        order: 2;
        padding: 0 !important;
        margin: 0 !important;
    }

    .what-i-do .grid-5 {
        min-height: 0 !important;
        height: auto !important;
    }

    .hero-services-wrapper+div {
        display: none !important;
        /* Hide the 10vh spacer on mobile */
    }

    .how-i-do-it {
        padding-top: 0 !important;
        margin-top: 6rem !important;
        padding-bottom: 0 !important;
    }

    .sticky-sidebar-overlay {
        order: 3;
        position: relative !important;
        height: auto !important;
    }

    .service-left {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        margin-top: 3.5rem !important;
        /* Pushes the accordion down from the Hero notice */
        min-height: auto;
        transform: none !important;
        /* Reset tablet query translateY(-50%) to stop vertical overlaps */
        top: auto !important;
        /* Reset tablet query top: 50vh */
    }

    .service-details {
        opacity: 0;
        pointer-events: none;
        text-align: left;
        margin-top: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        max-height: 0;
        min-height: 0 !important;
        /* CRITICAL: Override desktop min-height so max-height can collapse */
        overflow: hidden;
        transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-10px);
    }

    .service-list li.active .service-details {
        opacity: 1;
        pointer-events: auto;
        margin-top: 1rem;
        padding-bottom: 1rem;
        max-height: 500px;
        /* More realistic height for smoother timing */
        transform: translateY(0);
    }

    .service-details .service-title {
        display: none;
        /* Hide title because the list item already says UX/UI/etc */
    }

    .service-details .service-text {
        font-size: 1rem;
        line-height: 1.5;
        text-transform: none;
        /* Reset uppercase from li */
        font-family: var(--font-main);
        font-weight: 300;
        color: var(--text-color);
        margin-bottom: 2rem;
    }

    .service-details .btn-outline {
        font-size: 1rem;
        padding: 0 2rem;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .service-list li {
        border-top: 2px solid var(--text-color);
        border-bottom: none !important;
        text-align: left !important;
        padding: 1rem 0;
        font-size: 2rem;
        color: var(--text-color) !important;
    }

    .service-list li:first-child {
        border-top: none;
    }

    .service-list li:last-child {
        border-bottom: none !important;
    }

    /* Simplify on smaller screens */
    .what-i-do .flex-between {
        flex-direction: column;
    }

    .cards-container.grid-5 {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 1rem !important;
    }

    .card {
        margin-top: 0 !important;
        margin-bottom: 0;
        transform: none !important;
        --base-y: 0 !important;
        border: 2.5px solid var(--text-color) !important;
        padding: 2.5rem 2rem;
        position: relative;
        width: 100%;
        background: transparent !important;
        box-shadow: none !important;
    }

    .card::after {
        display: none;
        /* Remove desktop-style offset border/bg */
    }

    .card::before {
        display: none !important;
        /* Hide big outline numbers on mobile */
    }

    .card-step {
        display: block !important;
        font-size: 1.2rem;
        text-transform: uppercase;
        font-weight: 800;
        opacity: 1;
    }

    /* Squiggly shapes: centered inside card boxes, behind text */
    .card-step::before {
        width: 160px !important;
        height: 160px !important;
        bottom: auto !important;
        left: 50% !important;
        top: 50% !important;
        opacity: 0.8 !important;
        z-index: -1 !important;
    }

    .card-1 .card-step::before {
        --shape-x: calc(-50% + 10px) !important;
        --shape-y: -45% !important;
        --shape-rot: 20deg !important;
    }

    .card-2 .card-step::before {
        --shape-x: calc(-50% - 15px) !important;
        --shape-y: -55% !important;
        --shape-rot: -30deg !important;
    }

    .card-3 .card-step::before {
        --shape-x: calc(-50% + 20px) !important;
        --shape-y: -40% !important;
        --shape-rot: 45deg !important;
    }

    .card-4 .card-step::before {
        --shape-x: calc(-50% - 5px) !important;
        --shape-y: -50% !important;
        --shape-rot: -15deg !important;
    }

    .card-title {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }

    .card-text {
        font-size: 1.067rem;
        line-height: 1.6;
        text-align: left !important;
    }



    .philosophy .grid-5 {
        display: flex !important;
        flex-direction: column;
    }

    .philosophy-content {
        display: block !important;
        width: 100% !important;
        grid-column: auto !important;
        margin-bottom: 3rem;
        margin-top: 0 !important;
    }

    .philosophy-image-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        grid-column: auto !important;
        margin-bottom: 0;
        margin-top: 7rem !important;
        order: -1;
    }

    .philosophy-image-container::before {
        display: none !important;
    }

    .philosophy-image {
        width: 90% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }

    .philosophy-text-columns::before {
        right: -10px !important;
        /* Packt die Square Form weiter nach links */
    }

    .philosophy-title {
        font-size: 2.7rem;
        /* Reduced size */
        word-wrap: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        width: 100% !important;
        margin-bottom: 2rem !important;
        margin-top: 2rem;
    }

    .philosophy-label {
        margin-bottom: 1rem !important;
    }

    .philosophy-body {
        column-count: 1 !important;
        width: 100% !important;
    }

    .philosophy-blog-link {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        margin-top: 1rem;
    }

    .hero-hello-image {
        display: none;
    }

    .fixed-footer {
        display: none !important;
    }

    .scroll-indicator {
        display: none !important;
    }

    .mobile-site-footer {
        display: block !important;
        background-color: #C0D6ED !important;
        /* Ensure it's blue */
    }

    .contact {
        padding-top: 0 !important;
        margin-top: -4rem !important;
        padding-bottom: 0;
        position: relative;
        z-index: 10;
        /* Pull up to reduce gap to philosophy */
    }

    .contact .grid-5 {
        display: flex !important;
        flex-direction: column;
        gap: 60px !important;
        padding-top: 5rem;
    }

    .contact-image-container {
        order: -1;
        margin-bottom: 0 !important;
        display: flex !important;
        margin-top: 5vh;
    }

    .contact-title {
        font-size: 2.8rem;
    }

    .contact-intro {
        width: 100% !important;
        grid-column: auto !important;
        margin-bottom: 2rem !important;
    }

    .contact-form-container {
        width: 100% !important;
        grid-column: auto !important;
        margin-bottom: 7rem;
    }

    .contact-intro p {
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word;
        hyphens: auto;
    }

    .mad-libs-form {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .form-line {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .mad-libs-form input,
    .mad-libs-form textarea {
        max-width: 100% !important;
    }

    .form-text {
        white-space: normal !important;
        font-size: 1.6rem !important;
        font-weight: 600 !important;
    }

    [data-theme="dark"] .nav-logo-mobile img {
        filter: brightness(0) saturate(100%) invert(98%) sepia(5%) saturate(301%) hue-rotate(338deg) brightness(101%) contrast(92%) !important;
    }

    [data-theme="dark"] .home-page .nav-links {
        background-color: rgba(13, 15, 20, 0.95) !important;
    }

}

/* Hide mobile site footer on larger screens */
@media (min-width: 769px) {
    .mobile-site-footer {
        display: none !important;
    }
}

/* --- VIEWPORT HEIGHT ADJUSTMENTS (max-height: 730px) --- */
@media (max-height: 730px) {

    /* Main Logo und Scroll-Animation im Hero verstecken */
    .main-logo,
    .scroll-indicator {
        display: none !important;
    }

    /* Navbar-Logo (Wortmarke) permanent einblenden, außer auf Mobilgeräten */
    @media (min-width: 769px) {
        .nav-logo {
            opacity: 1 !important;
            pointer-events: auto !important;
        }
    }
}

/* --- Inline Links in Albert Chat Messages --- */
.chat-link {
    color: #7B1C2A;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.chat-link:hover {
    color: #5e151f;
    text-decoration-color: #5e151f;
}

[data-theme="dark"] .chat-link {
    color: #7B1C2A;
}

[data-theme="dark"] .chat-link:hover {
    color: #5e151f;
}

.chat-msg p {
    margin: 0 0 10px 0;
}

.chat-msg p:last-child {
    margin-bottom: 0;
}

.chat-msg ul,
.chat-msg ol {
    margin: 0 0 10px 0;
    padding-left: 20px;
}

@keyframes headingReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.chat-intro-heading.animate-reveal {
    animation: headingReveal 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.greeting-word-wrapper {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 2px;
}

.greeting-word {
    display: inline-block;
}

.greeting-word .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: letterFadeInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.greeting-word .letter.out {
    opacity: 1;
    transform: translateY(0);
    animation: letterFadeOutUp 0.4s ease-in forwards;
}

@keyframes letterFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes letterFadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* --- Lead Collection Buttons --- */
.lead-confirm-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.lead-btn-confirm,
.lead-btn-revise {
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.lead-btn-confirm {
    background: #0F1423;
    color: #FFFFFF;
}

.lead-btn-confirm:hover:not(:disabled) {
    background: #1A223A;
    transform: translateY(-2px);
}

.lead-btn-revise {
    background: rgba(15, 20, 35, 0.08);
    color: #0F1423;
}

.lead-btn-revise:hover:not(:disabled) {
    background: rgba(15, 20, 35, 0.15);
    transform: translateY(-2px);
}

.lead-btn-confirm:disabled,
.lead-btn-revise:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lead-btn-sent {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-family: var(--font-main);
    font-weight: 500;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    margin-top: 15px;
}