/* General Setup */
:root {
    --petrol-color: #005F6B;
    --petrol-hover-color: #008C9E;
    --background-color: #f8f9fa;
    --text-color: #005F6B;
    --light-text-color: #fff;
    --font-family: 'Montserrat', sans-serif;
}

/* Smooth Scrolling for Anchor Links */
html {
    scroll-behavior: smooth;
}
/*test*/
.expandable-container {
  display: center;
  flex-direction: column;
  align-items: flex-start;
}

.expandable-text {
  /* Anfangszustand: unsichtbar und keine Höhe */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.7s ease-in-out, opacity 0.7s ease-in-out;
}

/* Zustand, wenn der Text expandiert ist */
.expandable-text.expanded {
  max-height: 2500px; /* Groß genug, um den gesamten Text zu zeigen */
  opacity: 1;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border-radius: 5px;
    background-color: var(--petrol-color);
    color: var(--light-text-color);
    padding: 0.5rem 0.75rem;
    line-height: 1;
}

.logo:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: var(--petrol-hover-color);
    box-shadow: 0 4px 12px rgba(0, 95, 107, 0.2);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--petrol-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--petrol-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main Content and Sections */
main {
    padding-top: 70px; /* Adjust for fixed header height */
    overflow-x: hidden; /* Prevents horizontal scroll from pseudo-elements */
}

section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
}

section:nth-of-type(odd) {
    background-color: #fff;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--petrol-color);
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--petrol-color);
    border-radius: 2px;
}

p {
    max-width: auto;
    font-size: 1.1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--petrol-color);
    margin-top: 0;
}


/* Home Section Specifics */
#home {
    min-height: 100vh;
    justify-content: flex; /* Aligns content to the top */
    padding-top: 20rem; /* Pushes content below header */
    background-image: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0)), url('robert.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.home-content {
    color: var(--light-text-color);
    width: 100%;
    text-align: center;
}

.home-content p {
    max-width: none;
}

.home-content h1 {
    margin-bottom: 0;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

#home .subtitle {
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Button Styling */
.expand-button {
    background-color: var(--petrol-color);
    color: var(--light-text-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 95, 107, 0.2);
    align-items: center;
    justify-content: center;
    
}

.btn {
    background-color: var(--petrol-color);
    color: var(--light-text-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 95, 107, 0.2);
    
}

.expand-button:hover {
    background-color: var(--petrol-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 95, 107, 0.3);
    letter-spacing: 1.5px;
}

.btn:hover {
    background-color: var(--petrol-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 95, 107, 0.3);
    letter-spacing: 1.5px;
}

/* More Button & Expandable Content */
.expand-button-more {
    background-color: transparent;
    color: var(--petrol-color);
    border: 2px solid var(--petrol-color);
    padding: 0.5rem 1.25rem;
    margin-top: 1.5rem;
    box-shadow: none;
}

.btn-more:hover {
    background-color: var(--petrol-color);
    color: var(--light-text-color);
    box-shadow: 0 2px 8px rgba(0, 95, 107, 0.2);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.expandable-content.active {
    max-height: 500px; /* Adjust as needed for content */
}

/* Footer */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background-color: var(--petrol-color);
    color: var(--light-text-color);
    font-size: 0.7rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--light-text-color);
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.15) translateY(-2px);
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: filter 0.3s ease;
}

.social-links a:hover svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding-top: 100px; /* Taller header */
    }

    nav {
        flex-direction: column;
        padding: 0.5rem 1rem;
    }

    .nav-links {
        padding: 0.5rem 0;
        gap: 1.5rem;
        width: 100%;
        justify-content: center;
    }

    .nav-links a {
        font-size: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }

    #home {
        /* Fix for mobile parallax bug */
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    #home {
        padding-top: 8rem;
    }
    h1 {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    section {
        padding: 4rem 1rem;
    }
}