/* CSS-Reset (minimal) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body als Wrapper */
body {
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: #ffffff;
    position: relative;
    height: 100vh; /* Höhe des Viewports */
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto; /* Änderung von hidden zu auto */
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Für Safari */
}

/* Neues Element für den Hintergrund */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(30deg, #2e2e2e, #181818);
    z-index: -2;
}

/* Hintergrundbild-Fix */
.microskope-bg {
    position: fixed;  /* Änderung von absolute zu fixed */
    left: calc(15% - 600px);
    top: 50%; /* Zentrierung wie wrapper */
    transform: translateY(-50%); /* Vertikale Zentrierung */
    height: 1440px;
    width: 2560px;  
    background: url('images/micro_fk_web.png') no-repeat center;
    background-size: cover;
    z-index: 0;   
}

.wrapper {
    position: absolute;
    left: 15%;
    top: 50%;        /* Änderung von 190px zu 50% */
    transform: translateY(-50%); /* Vertikale Zentrierung */
    padding: 100px;
    z-index: 1;
}

/* Header */
header h1 {
    font-weight: bold;
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 40px;
    color: #9e9e9e;
}

header h1 .highlight {
    color: #f5f5f5;
}

header p {
    font-weight: 200;
    font-size: 1.375rem;
    line-height: 1.4;
    margin-bottom: 40px;
    color: #d9d9d9;
}

p {
    width: 500px;
    font-weight: 200;
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 40px;
    color: #d9d9d9;
}

/*----------------Allgemeine CTA-Button-Grundlage----------------*/
.cta-buttons .button {
    display: inline-block;
    padding: 6px 30px 8px 30px; 
    margin-top: 20px;
    margin-right: 50px;
    text-decoration: none;
    font-size: 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 30px; /* Abgerundete Ecken */
}

/* Variante: About Me – weißer Rahmen, weißer Text */
.cta-buttons .button-about {
    border: 1px solid #FFFFFF;
    background-color: transparent;
    color: #FFFFFF;
}
.cta-buttons .button-about:hover {
    background-color: #FFFFFF;
    color: #000000;
}

/* Variante: Portfolio – gelber Rahmen, gelber Text */
.cta-buttons .button-portfolio {
    border: 1px solid #E7C547;
    background-color: transparent;
    color: #E7C547;
}
.cta-buttons .button-portfolio:hover {
    background-color: #E7C547;
    color: #000000;
}

/*----------------Footer-Icons----------------*/
footer {
    position: absolute;
    left: 100px;
    bottom: -55px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #d9d9d9;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.footer-icon img {
    width: 24px;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    margin-right: 10px;
}

.footer-icon:hover {
    opacity: 1;
}

.footer-icon span {
    font-size: 1rem;
    font-weight: 200;
    color: #d9d9d9;
}

.footer-icon:hover img {
    filter: grayscale(0%);
}

.footer-icon:hover span {
    color: #f5f5f5;
}


/* ---------------- ABOUT ME ----------------*/
/* Desktop Styles für About Me */
.about-content {
    display: flex;
    height: auto;
    gap: 100px;
    align-items: center;
}
  
/* Fester Textbereich */
.text-container {
    width: 500px;
}
  
/* Bildcontainer mit fester Größe */
.image-container {
    flex: 0 0 690px;
    height: 690px;
    position: relative;
}
  
/* Responsives Bild */
.about-portrait {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Back Button Styling */
.back-button {
    display: inline-block;
    padding: 6px 30px 8px 30px; 
    text-decoration: none;
    font-size: 1.5rem;
    border: 1px solid #FFFFFF;
    background-color: transparent;
    color: #FFFFFF;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 30px;
    margin-bottom: -50px; /* Schiebt den Button ans Ende des Containers */
}

.back-button:hover {
    background-color: #FFFFFF;
    color: #000000;
}
 

/*----------------Modal Styles / Passwort Fenster----------------*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(30deg, #2e2e2e, #181818);
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h2 {
    color: #f5f5f5;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    color: #9e9e9e;
    margin-bottom: 30px;
    font-size: 1rem;
    width: 100%;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
}

.modal-content input:focus {
    border-color: #E7C547;
}

.modal-content button {
    background-color: transparent;
    border: 1px solid #E7C547;
    color: #E7C547;
    padding: 10px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.modal-content button:hover {
    background-color: #E7C547;
    color: #000000;
}

.close-btn {
    position: absolute;
    right: 25px;
    top: 15px;
    color: #E7C547;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1000; /* Stellt sicher, dass das Kreuz klickbar ist */
}

.close-btn:hover {
    color: #f5d565;
}

.modal-content {
    position: relative;  /* Für absolute Positionierung des close-btn */
}

.error-modal {
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.error-modal h2 {
    color: #f5d565;
}

.success-modal {
    border: 1px solid rgba(231, 197, 71, 0.2);
}

.success-modal h2 {
    color: #E7C547;
}

/*----------------Responsivität: Anpassungen für kleinere Bildschirme----------------*/
@media (max-width: 600px) {
    
    body {
        position: static;
        overflow-y: scroll;
        height: auto;
        min-height: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* About-Seiten spezifische Anpassungen */
    body:has(.about-content) {
        position: static;
        overflow-y: scroll;
        height: auto;
        touch-action: pan-y pinch-zoom;
    }

    .about-content {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        touch-action: pan-y pinch-zoom;
        padding-bottom: 60px;
        min-height: 100%;
    }

    /* Wrapper Anpassung für About-Seite */
    body:has(.about-content) .wrapper {
        position: relative;
        min-height: auto;
        height: auto;
        overflow-y: visible;
    }

    .image-container {
        order: -1; /* Ändert die Reihenfolge - Bild erscheint zuerst */
        width: 100%;
        height: auto;
        flex: none;
        margin: 0;
        padding: 20px 20px 0 20px; /* Padding oben und an den Seiten */
        aspect-ratio: 1 / 1; /* Quadratisches Format erzwingen */
    }
    
    .about-portrait {
        width: 100%;
        height: auto;
        content: url('images/Fabian-Kinsky_quad.png'); /* Ändert das Bild */
        object-fit: contain;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
    }
    
    .text-container {
        order: 2; /* Text erscheint nach dem Bild */
        width: 100%;
        padding: 0 20px;
    }
    
    /* Header Styles */
    header h1 {
        font-size: 2rem;
        width: 100%;
        padding: 0 20px;
        text-align: left;
    }
    
    header p {
        font-size: 1rem;
        width: 100%;
        padding: 0 20px;
        text-align: left;
    }

    /* Wrapper Anpassung - Grundstyle für beide Seiten */
    .wrapper {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        padding: 20px;
        margin: 0;
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }

    /* Spezifische Anpassung nur für Index-Seite */
    body:not(:has(.about-content)) .wrapper {
        position: fixed; /* Änderung von absolute zu fixed */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 500px;
        min-height: auto;
        height: auto;
        justify-content: center; /* Vertikale Zentrierung */
    }

    /* Hintergrundbild */
    .microskope-bg {
        display: none;
    }

    /* Text Anpassungen */
    p {
        width: 100%;
    }
 
    /* Button-Container */
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding: 0 20px;
    }

    .cta-buttons .button {
        margin: 0;
        width: 100%;
        text-align: center;
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    footer {
        position: relative;  /* Änderung von absolute zu relative */
        left: 0;            /* Reset der absoluten Positionierung */
        bottom: 0;          /* Reset der absoluten Positionierung */
        margin-top: 30px;
        width: auto;        /* Lässt den Footer sich an den Content anpassen */
    }

    .footer-icon {
        padding: 0 20px;    /* Gleicher Einzug wie Buttons und Text */
    }

    .text-container {
        width: 100%;
        padding: 0 20px;
    }

    .about-portrait {
        width: 100%;
        height: 100%;
        content: url('images/Fabian-Kinsky_quad.png'); /* Ändert das Bild */
        object-fit: cover;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Back Button Anpassung */
    .back-button {
        margin: 10px -20px;    /* Abstand oben und unten */
        display: inline-block;
    }
}

/* Zusätzliche Anpassungen für sehr kleine Geräte */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .cta-buttons .button {
        font-size: 0.8rem;
        width: 90%;
    }

    /* Spezifische Anpassung für Index-Seite auf sehr kleinen Geräten */
    body:not(:has(.about-content)) .wrapper {
        width: 95%;
    }
}