/* GLOBAL */
html, body {
    margin: 0;
    padding: 0;
    background-color: #495fba;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    scroll-behavior: smooth;
    animation: fadeIn 0.5s ease-in;
    overflow-x: hidden; /* DIESE ZEILE HINZUFÜGEN */
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Smooth hover transitions */
h1, h2, p, a {
    color: #ffffff;
    transition: color 0.25s ease;
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 4px;
}

/* STARTSEITE: Name mittig */
.start-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    text-align: center;
    margin-top: clamp(120px, 20vh, 180px);
    color: #ffffff;
}

/* Scroll-Hinweis */
.scroll-hint {
    text-align: center;
    font-weight: 300;
    font-size: clamp(0.5rem, 1vw, 1rem);
    margin-top: 8px;
    letter-spacing: 1px;
    opacity: 0.9;
}

.scroll-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.scroll-arrow {
    font-size: 1rem;
    margin-top: -5px;
    color: #ffffff;
    opacity: 0.9;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.bounce {
    animation: bounce 1.4s infinite ease-in-out;
}

/* PROJEKTE LISTE */
.projects {
    display: flex;
    flex-direction: column;
    gap: clamp(60px, 12vh, 140px);
    padding: clamp(60px, 12vh, 120px) 10%;
}

/* Projektkarten */
.project-card {
    width: 100%;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
    display: block;
    position: relative;
    transition: transform 0.25s ease;
}

/* leichte asymmetrische Versetzung */
.project-card:nth-child(odd) {
    --shift: -60px;
    transform: translateX(var(--shift));
}

.project-card:nth-child(even) {
    --shift: 60px;
    transform: translateX(var(--shift));
}

.project-card:hover {
    transform: translateX(var(--shift)) scale(1.04);
}

/* Projekt-Titel über Bild */
.project-title {
    margin: 0;
    position: relative;
    z-index: 2;
    font-size: clamp(1.2rem, 4.5vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0,0,0,0.7);
}

/* Rolle im Bild */
.project-role {
    position: absolute;
    bottom: -30px;
    right: 10px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    font-weight: 400;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0,0,0,0.7);
}

/* Bilder */
.project-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    border: none;
    border-radius: 8px;
}

/* Back Button */
.back-button {
    display: inline-block;
    margin: 20px 40px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: rgba(255,255,255,1);
}

/* Projektseite Galerie */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    padding: 0 40px;
    margin-top: 40px;
}

.gallery img,
.gallery video {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery img:hover,
.gallery video:hover {
    transform: scale(1.05);
}

/* Mitwirkende */
.mitwirkende {
    margin-top: 4rem;
    line-height: 1.6;
}

.mitwirkende p {
    margin: 0.3rem 0;
}

.mitwirkende strong {
    text-transform: uppercase;
}

/* Instagram-Wrapper: nebeneinander auf Desktop, untereinander auf Mobile */
.insta-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 60px);
    padding: 0 clamp(20px, 6vw, 100px);
    margin-top: 60px;
}

.instagram-media {
    max-width: 350px !important;
    width: 100% !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    mix-blend-mode: difference;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.15s ease, height 0.15s ease;
}

/* Lightbox Grundstruktur */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.lightbox.active {
    display: flex;
}

.lightbox-img,
.lightbox-video {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox img,
.lightbox video {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Navigationspfeile */
.lightbox .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    padding: 1rem;
    user-select: none;
    transition: color 0.3s ease;
}

.lightbox .arrow:hover {
    color: #495fba;
}

.lightbox .arrow.left {
    left: 5%;
}

.lightbox .arrow.right {
    right: 5%;
}

.lightbox .close {
    position: absolute;
    top: 3%;
    right: 5%;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox .close:hover {
    color: #495fba;
}

/* Medienreihe für Projektseiten (z. B. Spotify Wrapped x Ski Aggu) */
.media-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin: 60px auto;
    flex-wrap: wrap;
    max-width: 1300px;
    padding: 0 20px;
}

/* Quadratische Kacheln */
.media-row img,
.media-row video {
    aspect-ratio: 1 / 1;
    width: 30%;
    max-width: 400px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.media-row img:hover,
.media-row video:hover {
    transform: scale(1.04);
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    /* Remove horizontal shift on mobile */
    .project-card:nth-child(odd),
    .project-card:nth-child(even) {
        transform: translateX(0) !important;
    }
    
    .project-card:hover {
        transform: translateX(0) scale(1.02) !important;
    }
    
    /* Stack gallery images */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
        gap: 15px;
    }
    
    /* Hide custom cursor on mobile/touch devices */
    .custom-cursor {
        display: none;
    }
    
    /* Better lightbox arrows on mobile */
    .lightbox .arrow {
        font-size: 2rem;
        padding: 0.5rem;
    }
    
    .lightbox .arrow.left {
        left: 2%;
    }
    
    .lightbox .arrow.right {
        right: 2%;
    }

    /* Back button mobile */
    .back-button {
        margin: 20px 20px;
    }

    /* Media row mobile */
    .media-row {
        flex-direction: column;
        align-items: center;
    }

    .media-row img,
    .media-row video {
        width: 80%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* Follow Me Section */
.follow-section {
    text-align: center;
    margin: 120px auto 60px;
    padding: 0 20px;
}

.follow-text {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 1px;
    opacity: 0.9;
}

.instagram-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.instagram-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.instagram-button svg {
    transition: transform 0.3s ease;
}

.instagram-button:hover svg {
    transform: scale(1.1);
}

/* Footer verbessert */
.footer {
    color: rgba(255,255,255,0.6);
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 0px;
    margin-top: 100px;
}

.footer a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: rgba(255,255,255,1);
}

.footer .divider {
    color: rgba(255,255,255,0.6);
}