/*ALLGEMEIN*/
:root {
    --color-main: #0E2841;
    --color-background: #f5f5f5;
    --color-text: #0E2841;
    --color-text-2: #f5f5f5;
    --color-accent-1: #f5f5f5;
    --color-accent-2: #d6d6d6;
    --color-accent-3: #00ffff;
    --color-accent-4: #b700ff;
    font-size: 14pt;
}

@media (max-width: 1024px) {
    :root {
        font-size: 10pt;
    }
}

@media (max-width: 450px) {
    :root {
        font-size: 8pt;
    }
}

* {
    margin: 0;
    padding: 0;
}

body {
    background: var(--color-background);
    font-family: Montserrat, sans-serif;
    color: var(--color-text);
    line-height: 1.7;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

a {
    text-decoration: none;
    color: var(--color-text);
    transition: ease-in-out 0.3s;
}

/*CURSOR-ANIMATION*/
.cursor-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -10;
    overflow: hidden;
}

.cursor-dot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.dot-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(0, 166, 207, 0.3) 0%,
            rgba(0, 166, 207, 0.1) 50%,
            rgba(0, 166, 207, 0.3) 100%);
    pointer-events: none;
    transform-origin: left center;
}

/* SCROLL-ANIMATION */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/*NAVIGATION*/

.navigation * {
    background: transparent;
}

.navigation a {
    color: var(--color-text-2);
}

.navigation {
    z-index: 100;
    position: fixed;
    top: 2rem;
    left: 5vw;
    right: 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    width: auto;
    margin: 0 auto;
    padding: 0.5rem 1rem;

    border-radius: 1rem;
    background: rgba(0, 37, 59, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.75);

    transform: translateY(0);
    /* Explicit start state */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
    will-change: transform, opacity;
}

#links-toggle,
#mobile-nav-toggle {
    display: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--color-text-2);
}

.mobile-menu {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 8rem;
    left: 5vw;
    right: 5vw;
    width: 90vw;
    padding: 1rem;
    box-sizing: border-box;
    z-index: 99;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(0, 37, 59, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateY(0);
    /* Explicit start state */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.navigation.nav-hidden,
.mobile-menu.nav-hidden,
.sub-nav-list.nav-hidden {
    transform: translateY(-250px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    /* Slower, smoother hiding */
}

.mobile-menu a {
    display: block;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--color-text-2);
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu a.mobile-sub-link {
    margin-left: 1.5rem;
    font-size: 0.95em;
    border-left: 2px solid var(--color-accent-2);
    border-radius: 0 0.5rem 0.5rem 0;
}

@media (max-width: 1024px) {
    .nav-list {
        display: none !important;
    }

    .sub-nav-list {
        display: none !important;
    }

    #mobile-nav-toggle {
        display: block;
    }

    #mobile-nav-checkbox:checked~.mobile-menu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 425px) {
    .mobile-menu {
        top: 9rem;
    }
}


/* The .nav-hidden styles are now combined above for better synchronization */

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 0.5vw;
}

.logo img {
    display: block;
    width: 40px;
    border-radius: 0;
    box-shadow: none;
    padding: 0.2vw;
}

.navigation ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    gap: 2vw;
    font-weight: 500;
}


.sub-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: .25rem;

}

#sub-nav-toggle {
    border: 0;
    cursor: pointer;
    padding: .25rem .35rem;
    border-radius: .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-2);
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

#kontakt {
    border: 1px solid var(--color-accent-1);
    border-radius: .6rem;
    margin-right: 1rem;
}

.sub-nav-list {
    position: fixed;
    top: 7rem;
    left: var(--dropdown-left, 50%);
    /* Dynamic position via JS */
    min-width: 220px;

    list-style: none;
    margin: 0;
    padding: .5rem;

    border-radius: 1rem;
    background: rgba(0, 37, 59, 0.5);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.75);

    /* hidden default */
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0);
    /* Explicit start state */
    transition: opacity .18s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 200;
}

/* Overlay for clicking outside to close */
.sub-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 199;
    display: none;
    cursor: default;
}

/* Sichtbar, wenn Checkbox gecheckt */
#sub-nav-checkbox:checked~.sub-nav-overlay {
    display: block;
}

#sub-nav-checkbox:checked~.sub-nav-list {
    opacity: 1;
    margin-top: 0;
    pointer-events: auto;
}

/* Links im Dropdown */
.sub-nav-list li a {
    display: block;
    padding: .6rem .8rem;
    border-radius: .8rem;
    color: var(--color-text-2);
}

.sub-nav-list li a:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Styles für Top-Level Navigation Items */
.navigation ul li {
    display: flex;
    align-items: center;
}

/* Hover für Top-Level Links & Button */
.nav-list>li>a,
#sub-nav-toggle {
    border-radius: .6rem;
    padding: .25rem .5rem;
    transition: background 0.3s ease;
}

.nav-list>li>a:hover,
#sub-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Pfeil drehen wenn Checkbox gecheckt */
#sub-nav-toggle .material-symbols-outlined {
    transition: transform .18s ease;
}

#sub-nav-checkbox:checked~.header .navigation #sub-nav-toggle .material-symbols-outlined {
    transform: rotate(180deg);
}



/* FOOTER */
.site-footer {
    background-color: var(--color-main);
    color: var(--color-text-2);
    padding: 2rem 5vw 2rem;
    font-size: 0.75rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, rgb(0, 200, 207), rgb(123, 0, 142));
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 8rem;
}

.footer-logo img {
    height: 100px;
    width: auto;
    margin-bottom: 1rem;
    box-shadow: none;
    border-radius: 0;
}

.footer-tagline {
    color: var(--color-text-2);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--color-accent-1);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--color-accent-2);
    transform: translateY(-3px);
}

.footer-links-column h3,
.footer-contact-column h3 {
    color: var(--color-text-2);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.footer-links-column h3::after,
.footer-contact-column h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, rgb(0, 200, 207), rgb(123, 0, 142));
}

.footer-links-column ul {
    list-style: none;
    padding: 0;
}

.footer-links-column li {
    margin-bottom: 0.8rem;
}

.footer-links-column a {
    color: var(--color-text-2);
    text-decoration: none;
    padding: .25rem .5rem;
    border-radius: .6rem;
    transition: color 0.3s ease, background 0.3s ease;
}

.footer-links-column a:hover {
    color: var(--color-accent-1);
    background: rgba(255, 255, 255, 0.12);
}

.footer-contact-column p {
    color: var(--color-text-2);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.footer-contact-column a {
    color: var(--color-text-2);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-column a:hover {
    color: var(--color-accent-1);
}

.icon-small {
    font-size: 1.2rem;
    color: var(--color-accent-1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--color-text-2);
    font-size: 0.85rem;
}

.legal-links {
    display: flex;
    gap: 2rem;
}

.legal-links a {
    color: var(--color-text-2);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--color-accent-1);
}

@media (max-width: 1024px) {
    .footer-links {
        display: flex;
        gap: 3rem;
    }
}

@media (max-width: 667px) {

    .site-footer {
        padding: 0rem 5vw 2rem;
    }

    .footer-content {
        display: none;
    }

    .footer-links-column {
        display: none;
    }

    .footer-contact-column {
        display: none;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .legal-links {
        gap: 1.5rem;
    }
}

/* MAIN */

main section {
    position: relative;
    overflow: hidden;
}

main .hero-image {
    position: relative;
}

main .hero-wrapper {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 400px;
    /* Ensures headline is below nav on small screens */
    overflow: hidden;
}

main .hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

main .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

main .hero-headline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    text-align: center;
    color: var(--color-background);
    /* Better contrast on image */
    margin-top: 4vw;
}


main .section-one {
    display: flex;
    flex-direction: column;
    margin: 2vw;
    align-items: center;
    margin-bottom: 4vw;
}

main .section-one .section-headline {
    margin-bottom: 2vw;

}

main .section-one h3 {
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(14, 40, 65, .18);
}



/* Slider Container */
.section-projects {
    position: relative;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.projects {
    margin: 0 10vw;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.projects::-webkit-scrollbar {
    display: none;
}

.projects img {
    height: 30vh;
    width: auto;
    /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 1rem;
    transition: all 0.3s ease;
    display: block;
    /* Remove bottom space */
}

.prj1,
.prj2,
.prj3,
.prj4,
.prj5,
.prj6 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1vw;
}

.projectlink {
    display: block;
    flex: 0 0 calc((100% - 6rem) / 4);
    text-decoration: none;
    color: inherit;
    border-radius: 1rem;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    overflow: hidden;
}

.projectlink img {
    transition: all 0.5s ease;
}

.projectlink:hover img {
    filter: grayscale(100%);
}

.kurz {
    position: relative;
    overflow: hidden;
}

.kurz img {
    width: 100%;
    display: block;
}

.kurz p {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    webkit-backdrop-filter: blur(2px);
    border-radius: 0 0 8px 8px;
}

/* SLIDER ARROWS */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-main);
    color: var(--color-text-2);
    border: 1px solid var(--color-accent-2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background: var(--color-text-2);
    color: var(--color-main);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 4vw;
}

.slider-arrow.next {
    right: 4vw;
}

@media (max-width: 1400px) {
    .projectlink {
        flex: 0 0 calc((100% - 2rem) / 2);
        /* 2 items on tablet */
    }

    .kurz p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .projectlink {
        flex: 0 0 calc((100% - 4rem));
        scroll-snap-align: center;
        padding: 0 2rem;
    }

    .kurz p {
        font-size: 1rem;
    }

    .slider-arrow {
        display: none;
    }
}

/* MODAL STYLES */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.modal-hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

#modal-content {
    background: var(--color-background);
    width: 80%;
    max-height: 90vh;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.close-modal:hover {
    background: var(--color-accent-3);
    color: var(--color-main);
    transform: rotate(90deg);
}

#modal-body {
    overflow-y: auto;
    max-height: 100%;
}

.modal-header-img {
    width: 100%;
    height: 350px;
    position: relative;
}

.modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-text {
    padding: 2.5rem;
}

.modal-short {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-main);
    border-bottom: 2px solid var(--color-accent-2);
    padding-bottom: 1rem;
    line-height: 1.4;
}

.modal-desc {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.8;
}

.modal-desc h4 {
    margin-bottom: 0.5rem;
    color: var(--color-main);
}

@media (max-width: 768px) {
    #modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header-img {
        height: 250px;
    }

    .modal-text {
        padding: 1.5rem;
    }

    .close-modal {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}

.ref-list {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    list-style-type: none;
}


.ref-list li {
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    padding-left: 0.5rem;
}

.ref-list li::before {
    content: "•";
    color: var(--color-main);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}