@import url('https://fonts.googleapis.com/css2?family=Aldrich&family=Cherry+Bomb+One&family=Story+Script&display=swap');

html {
    background-color: black;
    color: white;
    scroll-behavior: smooth;
    scrollbar-width: none;
}


body {
    width: 100%;
    padding: 0;
    margin: 0;
}


header {
    padding: 0;
    margin: 0;
}


.cover {
    margin: 0;
    width: 100%;
    height: 100dvh;
    background-image: url('https://wallpaperaccess.com/full/6785195.jpg');
    background-size: cover;
    background-position: top;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;

}


.title {
    color: white;
    margin: 0;
    font-size: clamp(50px, 15vw, 300px);
    font-family: "Cherry Bomb One";
    user-select: none;

    --x: 50%;
    --yStart: 0dvh;
    --yEnd: 20dvh;

    animation: stick linear both;
    animation-timeline: view();
    animation-range: entry 100% exit 100%;
}


#impressum-title {
    font-size: clamp(50px, 9vw, 300px);
}

.lebenserwartung .title {
    font-size: clamp(50px, 6vw, 300px);
}

.hunde .title {
    font-size: clamp(50px, 12vw, 300px);
}

@keyframes stick {
    from {
        transform: translateX(var(--x)) translateY(var(--yStart));
    }

    to {
        transform: translateX(var(--x)) translateY(var(--yEnd));
    }
}

nav {
    height: 20px;
    color: white;
    margin-bottom: 50px;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

nav ul a {
    font-family: "Aldrich";
    text-decoration: none;
    color: white;
    display: inline-block;
    position: relative;
    line-height: 1.1;
    font-size: 20px;
}

nav ul a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 2px;
    background-color: white;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

nav:has(a:not(.active):hover) a.active::after {
    transform: scaleX(0);
}

nav ul a:hover::after {
    transform: scaleX(1);
}

nav ul a.active::after {
    transform: scaleX(1)
}

.container {
    margin-bottom: 50px;
    display: flex;
    min-height: 30vw;
    animation: fadeIn linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
}


section#list.container {
    height: max-content !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(200px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-container {
    height: 60dvw;
    margin-left: auto;
    margin-right: auto;
}

.container .img.links {
    width: 30dvh;
    height: 30dvw;
    aspect-ratio: 1;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 0 50px 50px 0px;
}

.container .img.rechts {
    width: 30dvh;
    width: 30dvw;
    aspect-ratio: 1;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 50px 0 0 50px;
}

.container #introduction-img {
    background-position: 80%;
    background-image: url("https://cdn.pixabay.com/photo/2015/03/27/13/16/maine-coon-694730_1280.jpg");
}

.container #rassen-img {
    background-position: left;
    background-image: url("https://cdn.pixabay.com/photo/2024/10/04/14/12/cheetah-9096513_1280.jpg");
}

.container #rassen2-img {
    background-position: center;
    background-image: url("https://cdn.pixabay.com/photo/2024/12/09/10/02/cat-9254773_1280.jpg");
    height: 30vw !important;
}

.container #lebenserwartung-img {
    background-position: center;
    background-image: url("https://cdn.pixabay.com/photo/2015/02/15/02/55/kitten-636863_1280.jpg");
}

.container #hund-img {
    background-position: center;
    background-image: url("https://cdn.pixabay.com/photo/2017/08/07/18/57/dog-2606759_1280.jpg");
    filter: contrast(130%);
}

.container #bodylangue-img {
    background-position: 70%;
    background-image: url("https://cdn.pixabay.com/photo/2017/11/09/21/41/cat-2934720_1280.jpg");
}

.container #behaviour-img {
    background-position: center;
    background-image: url("https://cdn.pixabay.com/photo/2016/09/07/16/19/pile-1651945_1280.jpg");
}

.container #instinct-img {
    background-position: center;
    background-image: url("https://cdn.pixabay.com/photo/2023/07/22/05/50/wolf-8142720_1280.png");
}

.container #friendship-img {
    background-position: center;
    background-size: 230%;
    background-image: url("https://cdn.pixabay.com/photo/2021/01/02/23/55/dog-5883275_1280.jpg");
}

.container .headline {
    color: white;
    font-family: "Aldrich";
    text-align: center;
    width: 100%;
    font-size: 4rem;

    clip-path: inset(0 100% 0 0);

    animation: reveal-text linear both;
    animation-timeline: view();
    animation-range: contain 0% contain 80%;
}

@keyframes reveal-text {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

.container .text {
    padding-left: 50px;
    padding-right: 50px;
    color: white;
    text-align: left;
    font-family: "Story Script";
    font-size: 1.5rem;
}

.querverweis {
    font-family: "Story Script";
    text-decoration: none;
    color: white;
    display: inline-block;
    position: relative;
    font-size: 1em;
    background-color: transparent;
    padding: 0;
    border: 0;
    cursor: pointer;
}

.querverweis::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    width: 100%;
    height: 2px;
    background-color: rgb(100, 100, 100);

    transform-origin: center;
    transition: background-color 0.3s ease;
}

.querverweis:hover::after {
    background-color: white;
}

footer {
    display: flex;
    width: calc(100% - 100px);
    justify-content: space-between;
    border-top: 3px solid white;
    margin-top: 200px;
    padding: 50px;
    align-items: center;
}

footer h1 {
    color: white;
    margin: 0;
    font-size: clamp(20px, 5vw, 100px);
    font-family: "Cherry Bomb One";

}

.impressum main {
    padding-top: 5dvh;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    font-family: "Story Script";
    font-size: 1.2rem;
    min-height: 50dvh;
}

.impressum p {
    margin: 0;
}

#rechner .headline {
    color: white;
    font-family: "Aldrich";
    text-align: center;
    width: 100%;
    font-size: 4rem;

    clip-path: inset(0 100% 0 0);

    animation: reveal-text linear both;
    animation-timeline: view();
    animation-range: contain 0% contain 90%;
}

#rechner {
    width: min(90%, 600px);
    margin: 80px auto;
    padding: 40px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}


#rechner input {
    width: 100%;
    max-width: 350px;
    padding: 16px 20px;
    box-sizing: border-box;

    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;

    color: white;
    font-size: 18px;
    font-family: inherit;

    outline: none;
    transition: 0.3s ease;
}

#rechner input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

#rechner input:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

#rechner button {
    width: 100%;
    max-width: 350px;
    padding: 16px 25px;

    background: white;
    color: black;
    border: none;
    border-radius: 50px;

    font-size: 18px;
    font-weight: bold;
    font-family: inherit;

    cursor: pointer;
    transition: 0.3s ease;
}

#rechner button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

#rechner button:active {
    transform: scale(0.97);
}

#rechner #output {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    min-height: 24px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #777;
    border-radius: 50px;
    transition: 0.3s;
}


.slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.switch input:checked+.slider {
    background: white;
}

.switch input:checked+.slider::before {
    background: black;
}

.switch input:checked+.slider::before {
    transform: translateX(25px);
}

#toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
}

#toggle-container p {
    width: 200px;
    text-align: center;
    font-family: Aldrich;
    transition: opacity 0.3s ease-in-out;
}


#toggle-container p:last-child {
    opacity: 0.5;
}

#toggle-container:has(#direction:checked) p:first-child {
    opacity: 0.5;
}

#toggle-container:has(#direction:checked) p:last-child {
    opacity: 1;
}

#rechner #output {
    font-family: Aldrich;
}

.forum .beitrag {
    width: calc(100% - 100px);
    padding: 50px;
}

.forum .beitrag .text {
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.168);
    max-width: 100%;
    border-radius: 25px;
}

.forum .beitrag h1 {
    font-family: "Aldrich";
}

#write {
    display: none;
}

#write #name {
    font-size: 35px;
    font-family: "Aldrich";
    background-color: transparent;
    border: none;
    color: white;
}

#write #message {
    width: 100%;
    font-size: 1.5rem;
    font-family: "Story Script";
    background-color: transparent;
    border: none;
    color: white;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

#write #name:focus,
#write #message:focus {
    outline: none;
    border: 0;
}

.red-star {
    color: red;
    cursor: default;
    user-select: none;
}

#write #agb {
    margin-top: 12px;
    border: none;
    cursor: pointer;
    accent-color: black;
    transition: all 0.2s ease-in-out;
}

#write #agb:hover {
    opacity: 0.5;
}

#write #agb:checked {
    background: black;
    border-color: black;
}

#write #agb:checked:hover {
    opacity: 1;
    accent-color: rgb(127.5, 127.5, 127.5);
}

#write label[for="agb"] {
    cursor: pointer;
}

#write #submitBtn {
    padding: 12px;
    background-color: white;
    color: black;
    font-family: "Aldrich";
    border-radius: 12px;
    margin-top: 20px;
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

#write #agb:not(:checked)~#submitBtn {
    opacity: 0.5;
    cursor: not-allowed;
}

.forum .beitrag p {
    font-family: "Story Script";
    font-size: 1.5rem;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.168);
    max-width: 100%;
    border-radius: 15px;
    margin-bottom: 5px;
}

.forum .beitrag p.date {
    font-family: "Story Script";
    font-size: 1rem;
    padding: 0px 20px;
    background-color: transparent;
    margin-bottom: 5px;
}

.forum #writeBtn {
    display: flex;
    position: fixed;
    bottom: 50px;
    right: 0px;
    background-color: black;
    padding: 20px;
    clip-path: inset(0 calc(100% - 90px) 0 0);
    transform: translateX(calc(100% - 90px));
    transition: all 1s ease;
    border-radius: 50px 0 0 50px;
    cursor: pointer;
    user-select: none;
}

.forum #writeBtn:hover {
    clip-path: inset(0 0 0 0);
    transform: translateX(0);

}

.forum #writeBtn:active {
    background-color: lightblue;
}


.forum #writeIcon {
    filter: invert();
    width: 50px;
    margin-right: 20px;
    transform: translateY(-5px);
}

.forum #writeBtn p {
    font-family: "Aldrich";
    font-size: 1.8rem;
    margin-top: auto;
    margin-bottom: auto;
}



#name::placeholder {
    font-style: italic;
    opacity: 0.5 !important;
}

#message::placeholder {
    font-style: italic;
    opacity: 0.5 !important;
}

#modal {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);

    width: min(500px, 80vw);
    max-height: 80vh;
    overflow-y: auto;

    padding: 30px;
    border: none;
    border-radius: 20px;

    background: black;
    color: white;
    box-shadow: 0 10px 40px #0005;
}

#modal::backdrop {
    background: #0008;
    backdrop-filter: blur(5px);
}

#modal button {
    margin-top: 20px;
    background-color: black;
    color: white;
    padding: 12px;
    border-radius: 12px;
    border: 3px solid white;
    transition: all 0.5s;
}

#modal button:hover {
    background-color: white;
    color: black;
}

#modal h1 {
    font-family: "Story Script";
    font-size: 3rem;
}

#modal h2 {
    font-family: "Story Script";
    font-size: 2rem;
}

#modal p {
    font-family: "Aldrich";
    font-size: 1rem;
}

#modal ul {
    font-family: "Aldrich";
    font-size: 1rem;
}

/* Öffnungsanimation */
#modal:popover-open {
    animation: appear 0.25s ease-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}


@media (width <=1000px) {

    .cover {
        margin: 0;
        width: 100%;
        height: 100dvh;
        background-image: url('https://cdn.pixabay.com/photo/2023/06/05/13/56/cat-8042342_1280.jpg');
        background-size: cover;
        background-position: top;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 50px;
        filter: contrast(1.123);

    }


    .title {
        color: white;
        margin: 0;
        font-size: clamp(50px, 15vw, 300px);
        font-family: "Cherry Bomb One";
        user-select: none;

        --x: 0%;
        --yStart: -40dvh;
        --yEnd: -20dvh;

        animation: stick linear both;
        animation-timeline: view();
        animation-range: entry 100% exit 100%;
    }

    .hunde .title::before {
        content: "Katzen ";
        color: white;
        margin: 0;
        font-family: "Cherry Bomb One";
        user-select: none;

        animation: stick linear both;
        animation-timeline: view();
        animation-range: entry 100% exit 100%;

        font-size: clamp(50px, 12vw, 300px);
    }

    nav {
        height: auto;
    }

    nav ul {
        flex-direction: column;
        justify-content: left;
        gap: 20px;
    }



    .container {
        display: flex;
        flex-direction: column;

        min-height: 30vw;
        height: auto;
        width: 100%;

        flex-shrink: 0;
        overflow: visible;
        animation: none;
        margin-top: 100px;
    }

    .text-container {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        width: 100%;
        min-height: max-content;
        height: auto;
    }

    .container .headline {
        animation: none;
        clip-path: inset(0 0 0 0);
        font-size: clamp(0px, 10dvw, 4rem);
    }

    .container .text {
        padding-left: 50px;
        padding-right: 50px;
        color: white;
        text-align: left;
        font-family: "Story Script";
        font-size: clamp(0px, 4dvw, 1.5rem);
    }


    .container .img.links,
    .container .img.rechts {
        height: 30dvh;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .container:has(div.img.rechts) {
        flex-direction: column-reverse;
    }


    .container #introduction-img {
        background-position-y: 40%;
    }

    .container #rassen-img {
        background-position: left;
    }

    .container #rassen2-img {
        background-position: center;
        height: 30dvh !important;
    }

    .container #lebenserwartung-img {
        background-position-y: top;
    }

    .container #hund-img {
        background-position: center;
    }

    .container #bodylangue-img {
        background-position: 70%;
    }

    .container #behaviour-img {
        background-position: center;
    }

    .container #instinct-img {
        background-position: center;
    }

    .container #friendship-img {
        background-position: center;
        background-size: 230%;
    }
}

@media (min-width: 500px) and (max-width: 1000px) {
    nav ul {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 20px;
    }

}

@media (max-width: 580px) {
    #rechner .headline {
        font-size: clamp(0px, 10dvw, 5rem);
        animation: none;

        clip-path: inset(0);
    }

    #toggle-container {
        flex-direction: column;
    }

    .lebenserwartung .title {
        font-size: clamp(0px, 10vw, 50px);
    }

    .forum .beitrag p {

        overflow-wrap: anywhere;
        word-break: break-word;
        min-width: 0;
    }


    .impressum nav ul li:not(:has(a[href="index.html"]), :has(a[href="impressum.html"])) {
        display: none;
    }
}