body, html {
    margin: 0;
    padding: 0;
    font-family: 'Yu Gothic', sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Header styling */
header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px 5px 20px;
    box-sizing: border-box;
    background-color: white;
    z-index: 10;
}

header .logo img {
    height: 40px;
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'Yu Gothic', sans-serif;
    color: #E86032;
}

header nav ul li a:hover {
    color: #BDDCF5;
}

.menu-icon {
    display: none;
    width: 25px; 
    cursor: pointer;
    align-items: flex-end;
}

header nav ul.nav-menu {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Grid layout for the main content */
.grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr) 0.2fr repeat(3, 1fr) 0.2fr;
    grid-template-rows: auto auto;
    padding-top: 120px;
    gap: 20px;
    margin: 20px;
    align-items: start;
}

.project-info {
    grid-column: 1 / 2; /* Place it in the first column */
    grid-row: 1 / 2; /* Place it in the first row */
    color: #E86032; /* Set the color */
    align-self: end; /* Align to the bottom of the grid cell */
    justify-self: end; /* Align to the left within the grid cell */
    font-family: 'Polysans', sans-serif; /* Apply Polysans font */
    margin: 0; /* Remove any additional margins */
    padding: 0; /* Remove any padding */
    position: relative; /* Ensure it's positioned within the grid */
    z-index: 1; /* Ensure it stays on top if overlapping occurs */
}

.rotated-content {
    transform: rotate(-90deg); /* Rotate the content */
    transform-origin: left bottom; /* Set the correct origin to avoid jumping */
    text-align: left; /* Align text inside the rotated element */
    color: #E86032; /* Set text color */
    position: absolute; /* Position it relative to .project-info */
    bottom: 0; /* Stick to the bottom of the parent container */
    left: 0; /* Stick to the left of the parent container */
}

.project-info h1, .project-info h2 {
    margin: 0;
}

.project-info h1 {
    font-family: 'Polysans', sans-serif;
    font-weight: 600; /* Ensures the font is bold */
}

.project-info h2 {
    font-family: 'helvetica neue', sans-serif;
    font-style: italic;
    font-weight: 300;
    white-space: nowrap;          /* keine Zeilenumbrüche */
    overflow: hidden;             /* Überlauf ausblenden */
    text-overflow: ellipsis;      /* … anzeigen, wenn zu lang */
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
    display: inline-block; 
}

.slideshow-container {
    grid-column: 2 / span 7;
    grid-row: 1 / 1;
    position: relative;
}

.slideshow-container img {
    width: 100%;
    height: auto;
}

.text-section {
    grid-column: 10 / span 3; /* Start at column 10 and span 3 columns */
    grid-row: 1 / 3;
    color: #E86032;
    font-size: 16px;
    line-height: 1.5;
    max-width: 400px; 
    overflow: visible;
}

.text-section p {
    margin: 0;
}

#moreInfo {
    display: none; /* Initially hidden */
    margin-top: 20px;
    color: #E86032;
    font-size: 14px;
    line-height: 1.5;
}

/* Styling for project text in Yu Gothic */
.yu-gothic-pr6n {
    font-family: 'Yu Gothic', sans-serif;
}

.bold-text {
    font-weight: 600; /* Bold */
}

.thin-text {
    font-weight: 300; /* Thin */
}

.toggle-text {
    display: inline-block;
    margin-top: 20px;
    cursor: pointer;
    color: #E86032;
    font-size: 14px;
    text-transform: lowercase;
    font-family: 'Yu Gothic', sans-serif;
    font-style: italic;
    font-weight: 300;
}

.toggle-text .arrow {
    font-style: normal; /* Ensures the arrow is not italic */
}

#collapseText .arrow {
    font-style: normal; /* Ensures the arrow is not italic */
}


/* Position the dots container */
.dots-container {
    grid-column: 2 / span 7; /* Align to the same columns as the slideshow */
    grid-row: 2/ span 1; /* Place it in the second row */
    display: flex;
    justify-content: center; /* Center the dots horizontally */
    align-items: center; /* Center vertically if needed */
    flex-shrink: 0;
    margin-top: 10px; /* Optional: Add spacing between the slideshow and dots */
}

.dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: rgba(232, 96, 50, 0.2);;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 0 0 auto;        /* Prevent stretch/shrink */
}

.dot.active {
    background-color: rgba(232, 96, 50, 1); /* Fully opaque color for active dots */
    opacity: 1;
}

.dot:hover {
    background-color: rgba(232, 96, 50, 0.8); /* Slightly less transparent color for hover effect */
}


/* Photo credit styling */
.photo-credit {
    position: absolute;
    bottom: -15px;
    right: 0px;
    color: #E86032;
    font-size: 12px;
    font-weight: 300;
    opacity: 0.8; /* Slight transparency for subtlety */
}

/* Arrows for slideshow */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 48%; /* Center vertically */
    transform: translateY(-50%); /* Adjust for perfect vertical centering */
    width: auto; /* Allow the arrows to take their natural width */
    height: auto; /* Allow the arrows to take their natural height */
    padding: 15px; /* Add some padding for a larger clickable area */
    color: transparent;
    font-weight: bold;
    font-size: 18px;
    transition: color 0.3s ease;
    background-color: transparent;
    user-select: none;
    display: none; /* Initially hidden */
}

.prev {
    left: 10px; /* Position the left arrow near the left edge */
}

.next {
    right: 10px; /* Position the right arrow near the right edge */
}

.slideshow-container:hover .prev, .slideshow-container:hover .next {
    color: #E86032;
    display: block; /* Ensure arrows are visible on hover */
}


.slideshow-container:hover .prev, .slideshow-container:hover .next {
    color: #E86032;
    display: flex; /* Ensure arrows are visible on hover */
}

/* Info toggle section */
#moreInfo {
    display: none;
    margin-top: 20px;
}

@font-face {
    font-family: 'Yu Gothic';
    src: local('Yu Gothic'), local('Yu Gothic Regular'), local('游ゴシック');
    font-weight: normal;
    font-style: normal;
}

/* Responsive design */
@media screen and (max-width: 900px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 0.35fr 0.5fr 0.1fr repeat(5, 0.5fr);
        gap: 20px;
        margin: 20px;
        align-items: start;
    }

    header {
        padding: 20px 20px 0px 20px;
    }

    .project-info .rotated-content {
    width: max-content;           /* oder: inline-size: max-content; */
    /* wichtig, weil Layout VOR Rotation passiert */
}

    .project-info { 
    grid-column: 1 / -1; /* Span all 4 columns */ 
    grid-row: 1; /* Place it in the first row */ 
    text-align: right; /* Align text to the right */ 
    justify-self: end; /* Align the container itself to the end */ 
    transform: none; /* Reset any rotation */ align-self: end; /* Center vertically within the row */ 
    padding: 0; /* Ensure no extra padding affects alignment */ 
    } 
    
    .rotated-content { 
    transform: none; /* Remove rotation for small screens */ 
    text-align: right; /* Align inner content to the right */ 
    position: relative; /* Ensure proper positioning */ 
    }

    .slideshow-container {
        grid-column: 1 / span 4;
        grid-row: 2 / span 1;
    }

    .dots-container {
        grid-column: 2 / span 2; /* Align to the same columns as the slideshow */
        grid-row: 3/ span 1; /* Place it in the second row */
        justify-content: center;
        align-self: center;
        flex-shrink: 0;
    }

    .dot {
        height: 10px;
        width: 10px;
    }

    .text-section {
        grid-column: 1 / 4;
        grid-row-start: 4;
        grid-row-end: 9;
        max-width: auto;
    }
}

@media screen and (max-width: 650px){
    .menu-icon {
        display: block; /* Show the menu icon */
    }

    header nav ul.nav-menu {
        display: none; /* Hide the navigation links */
        flex-direction: column;
        position: absolute;
        top: 65px; /* Adjust to align below header */
        right: 20px;
        text-align: right;
        background-color: rgb(255, 255, 255); /* Same background as the page */
        border-radius: 0px;
        padding: 5px 0px 0px 5px;
    }

    header nav ul.nav-menu.show {
        display: flex; /* Show the navigation links when menu is open */
    }

    header nav ul.nav-menu li {
        margin: 2px 0; /* Adds vertical space */
    }

    header nav ul li a {
        font-size: 12px;
        padding-bottom: 10px;
    }
}

@media screen and (max-width: 500px){    
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 0.4fr 0.5fr 0.1fr repeat(5, 0.5fr);
    }
}
