/* Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: var(--color-dark);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 10vw, 12rem);
    color: var(--color-text-light);
    text-shadow: var(--shadow-large);
    text-align: center;
    width: 90%;
    z-index: 1;
    opacity: 0;
}

.hero-section h1 span {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* About-Me Section */
.about-me-section {
    display: flex;
    flex-direction: column; /* Elemente werden vertikal angeordnet */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem; /* Raumabstand an den Rändern */
    overflow: hidden;
}

.about-me-content {
    max-width: 1800px;
    width: 100%;
    display: flex; /* Flexible Anordnung für Desktop */
    flex-direction: column;
    align-items: center;
    position: relative;
}

.about-me-text {
    z-index: 1; /* Text soll über Polaroid-Bild liegen */
    flex: 1; /* Nimmt den restlichen Platz ein */
    padding-right: 2rem; /* Raumabstand zum Polaroid-Bild */
}

.about-me-headline {
    font-size: clamp(4rem, 5vw, 6rem); /* Responsives Schriftgrößen-Skalieren */
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-weight: 900; /* Extra bold */
}

.category-carousel {
    position: relative;
    height: 12rem;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.category-item {
    position: absolute;
    top: -4rem; /* Adjusted for new height */
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 8rem; /* Larger font size */
    font-weight: bold;
    color: var(--color-accent);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation-duration: 8s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    text-align: center; /* Ensure text is centered */
}


.category-item.anim1 {
    animation-name: cycle1;
}

.category-item.anim2 {
    animation-name: cycle2;
}

.category-item.anim3 {
    animation-name: cycle3;
}

.category-item.anim4 {
    animation-name: cycle4;
}

@keyframes cycle1 {
    0%, 20% { top: 0; opacity: 1; }
    25%, 45% { top: 2.5rem; opacity: 0; }
    50%, 100% { top: 2.5rem; opacity: 0; }
}

@keyframes cycle2 {
    0%, 20% { top: -2.5rem; opacity: 0; }
    25%, 45% { top: 0; opacity: 1; }
    50%, 100% { top: 2.5rem; opacity: 0; }
}

@keyframes cycle3 {
    0%, 45% { top: -2.5rem; opacity: 0; }
    50%, 70% { top: 0; opacity: 1; }
    75%, 100% { top: 2.5rem; opacity: 0; }
}

@keyframes cycle4 {
    0%, 70% { top: -2.5rem; opacity: 0; }
    75%, 95% { top: 0; opacity: 1; }
    100% { top: 2.5rem; opacity: 0; }
}

.polaroid {
    max-width: 300px;
    box-shadow: var(--shadow-large);
    transition: transform var(--transition-medium);
    align-self: flex-end; /* Polaroid am rechten Rand ausrichten */
}

.polaroid img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Photography Section */
.photography-section {
    position: relative;
    height: 150vh;
    background-color: var(--color-light);
    overflow: visible;
}

.photography-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(8rem, 15vw, 12rem);
    color: var(--color-primary);
    z-index: 1;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.overlapping-images {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 2;
    transform: none;
}

.image-container {
    position: absolute;
    background: var(--color-white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: all var(--transition-medium);
    width: calc(18vw - 2rem);
    height: 40vh;
    opacity: 0;
    transform-origin: center center;
    will-change: transform;
}

.image-container.visible {
    opacity: 1;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.image-left {
    transform: translateX(-20%) translateY(-5%) rotate(-5deg);
    z-index: 2;
}

.image-center {
    transform: translateY(5%);
    z-index: 3;
}

.image-right {
    transform: translateX(20%) translateY(-5%) rotate(5deg);
    z-index: 2;
}

/* Gallery Section */
.gallery-section {
    position: relative;
    background-color: var(--color-light);
    overflow: hidden;
}

.scroll_container {
    height: 400vh; /* Volle Bildschirmhöhe */
    z-index: 10;
}

.sticky_wrap {
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh; /* Passt die Höhe an */
    z-index: 10;
}

.horizontal_scroll {
    position: absolute;
    top: 0;
    height: 100%;
    width: 400vw; /* Gesamtbreite für alle 4 Items */
    transform: translateY(0); /* Entfernt die vorherige Transformation */
    display: flex;
    justify-content: space-between; /* Diese Regel könnte geändert oder entfernt werden, da alle Items bereits den Raum voll ausfüllen */
}

.gallery-item {
    height: 100%; /* Füllt die volle Höhe aus */
    width: 100vw; /* Breite eines Viewports */
    display: flex; /* Aktiviert Flexbox für Zentrierung */
    justify-content: center; /* Zentriert horizontal */
    align-items: center; /* Zentriert vertikal */
}

.gallery-image-container {
    width: 80%; /* Flexibel anpassbar, z. B. 80% des übergeordneten Containers */
    height: 70vh; /* Höhe als Anteil der Viewport-Höhe */
    margin: auto; /* Zusätzliche Absicherung der Zentrierung */
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    transition: transform var(--transition-medium);
    cursor: pointer;
}

.gallery-image-container:hover {
    transform: scale(1.02);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-image-container:hover .gallery-image {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--color-text-light);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-medium);
}

.gallery-image-container:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast);
    font-weight: 500;
}

.project-link:hover {
    background-color: var(--color-accent);
}

/* Videography */
.videography-section {
    padding: 4rem 2rem; /* Abstand oben/unten + seitlich */
    background-color: var(--color-white);
    text-align: center;
  }
  
  .videography-container {
    max-width: 960px;
    margin: 0 auto;
  }
  
  .videography-headline {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--color-primary);
    margin-bottom: 2rem;
    font-weight: 700;
  }
  
  /* Video-Wrapper mit 16:9 Format */
  .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Seitenverhältnis */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
  }
  
  .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

/* Contact Form */
.contact-section {
    padding: 8rem var(--container-padding);
    background-color: var(--color-light);
    z-index: 11;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--color-light);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Fehlermeldungen */
.error-message {
    color: var(--color-error);
    font-weight: bold;
    margin-top: 1rem;
}

/* Erfolgsnachricht */
.success-message {
    color: var(--color-success);
    font-weight: bold;
    margin-top: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        white-space: normal; /* Allow text wrapping on very small screens */
        hyphens: auto; /* Enable hyphenation if needed */
    }
    
    .about-me-content {
        flex-direction: column; /* Elemente werden gestapelt */
        justify-content: center;
        align-items: center;
    }

    .about-me-text {
        padding-right: 0; /* Raumabstand entfernen */
    }

    .about-me-headline {
        font-size: clamp(2.5rem, 8vw, 4rem); /* Kleinere Schriftgröße für Mobile */
        margin-bottom: 1rem;
    }

    .category-carousel {
        position: static; /* Reset der Positionierung */
        transform: none;
        height: 3rem; /* Etwas kleineres Karussell für Mobile */
    }

    .category-item {
        font-size: 2rem; /* Kleinere Schriftgröße für Mobile */
    }

    .polaroid {
        position: static; /* Reset der Positionierung */
        transform: none;
        max-width: 250px;
        margin-top: 1rem;
        align-self: center; /* Polaroid zentrieren */
    }

    .photography-section {
        height: 200vh;
    }

    .overlapping-images {
        padding: 1rem;
    }

    .image-container {
        width: 80vw;
        height: 50vh;
    }

    .gallery-item {
        padding: 1rem;
    }

    .gallery-image-container {
        width: 90%;
        height: 50vh;
    }

    .project-overlay {
        opacity: 1;
        transform: translateY(0);
        padding: 1rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .gallery-background-title {
        font-size: clamp(4rem, 10vw, 6rem);
    }    

    .image-left,
    .image-center,
    .image-right {
        width: calc(90vw - 4rem);
        height: 60vh;
    }
    
    .photography-title {
        font-size: clamp(5rem, 12vw, 8rem);
    }
}