
html {
  /* Optional: Defines the root element's box-sizing. */
  box-sizing: border-box;
}

*, 
*::before, 
*::after {
  /* Crucial: Applies border-box to every element and pseudo-element. */
  box-sizing: inherit;
}

@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* Improves loading performance */
  src: url('SpecialElite-Regular.ttf') format('truetype');
}

.werk-home {
display: none !important;
}

html, body {
   
    overflow-x: hidden; 
}

.special-elite-regular {
  font-family: "Special Elite", system-ui;
  font-weight: 400;
  font-style: normal;
 
}

body {
    
  font-family: "Special Elite", system-ui;

  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


h1 {
    
  color: #000;
      font-weight: 400;
    font-size: 2rem;
    text-align: right;
    margin: 0;

}

h2{
      font-weight: 400;
    font-size: 2rem;
     text-transform: uppercase;
    margin: 0;
}

h3{
    
      font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

h4{
     font-weight: 400;
 text-transform: uppercase;
font-size: 1.5rem;
}


p {
      font-weight: 400;
    margin-top: 0.5rem;
    font-size: 1rem;
}
header{
    background-color: #fff;
    position: fixed;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    height: 100px;
    justify-content: space-between;
    z-index: 100; /* Ensure header is above other content */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    padding-right: 1rem; 
    transition: transform 0.2s ease-out; 
    transform: translateY(0);
}

.header-hidden {
    /* Move the header up by 100% of its height */
    /* If the header is 100px tall, this moves it up -100px */
    transform: translateY(-100%); 
}

.nav{
    display: flex;
    align-items: center;     /* This centers the text vertically */
    justify-content: center;  /* This centers the text horizontally */
    gap: 1rem;
}





/* Styles for the hamburger button */
.menu-toggle {
    color: #000;
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 100px; /* Align with header height */
    padding: 0 1rem;
    z-index: 101; /* Ensure it's above the nav */
}

/* === Mobile Styles  === */
@media (max-width: 1200px) {
    
    header {
        height: 60px;
        align-items: center; /* Vertically align logo and button */
    }

    .logo h1, .menu-toggle {
        line-height: 1.5; /* Reset line-height if using align-items: center */
    }

   .logo h1{
    font-size: 1.5rem;
    height: 60px;
    padding: 1rem;
    text-align: left;
   }


    .menu-toggle {
        display: block; /* Show the button on small screens */
    }

    /* Hide the navigation by default on mobile */
    .nav {
        display: none;
        flex-direction: column; /* Stack links vertically */
        position: absolute; /* Take it out of the normal flow */
        top: 60px; /* Place it right below the header */
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 1rem 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        align-items: flex-start; /* Align links to the left */
        gap: 0;
    }

    .nav .link {
        padding: 0.8rem 1rem; /* More space for touch */
        width: 100%;
        box-sizing: border-box;
    }

    /* CLASS TOGGLED BY JAVASCRIPT */
    .nav-open {
        display: flex; /* Show the menu when this class is added */
    }
}

.jahr {
    max-width: none;
}


.block{
    width: 100%;
    height: 100px;
}

.block-50{
    width: 100%;
    height: 50px;
}




.home-text{
padding-top: 33vh;
}

.logo{
    display: flex;
    align-items: center;     /* This centers the text vertically */
    justify-content: center;  /* This centers the text horizontally */
    padding-left: 2rem;
 
}

.link{

        font-weight: 400;
        padding: 1rem;
        text-align: right;
        margin: 0;
        
        text-decoration: underline;
        color: black;
    
}


.home {
    z-index: 101;
    position: fixed;
    left: 0;
    top: 0;
 
    background-image: url('../media/home.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

}

.full{
    width: 100%;
    height: 100vh;
}
.main {
    /* 1. Use CSS Grid for a robust 2-column layout */
    display: grid;
    grid-template-columns: 1fr 2fr; /* Label gets 1 part, content gets 3 */
    gap: 5rem; /* Adds space between the label and the box */

    /* 2. Use a responsive width */
    width: 80vw; /* Takes up 90% of the screen on mobile */
    max-width: 600px; /* But won't get wider than 800px on desktop */
    margin: 2rem auto; /* Centers it and adds vertical space */
}


.main-vita {
    /* 1. Use CSS Grid for a robust 2-column layout */
    display: grid;
    grid-template-columns: 20% 80%; /* Label gets 1 part, content gets 3 */
    gap: 5rem; /* Adds space between the label and the box */

    /* 2. Use a responsive width */
    width: 80vw; /* Takes up 90% of the screen on mobile */
    max-width: 900px; /* But won't get wider than 800px on desktop */
    margin: 2rem auto; /* Centers it and adds vertical space */
}





.center{


    display: flex;
      align-items: center;
    justify-content: center;  /* This centers the text horizontally */
}

/* This is the label ("Titel:") */
.etikett {
    text-align: left;
  
    padding-top: 0.5rem;
}

.akte {

      border: 2px solid #000;
    border-radius: 0.25rem;
  

}

.akte-vita{
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    border: 2px solid #000;
    border-radius: 0.25rem;
}

/* Make the two child divs split 50/50 */
.akte-vita > * {
    flex: 1 1 50%;

}

.news-item{
    margin: auto;
    display: flex;
    flex-direction: row;
    border-bottom: #000 2px solid;
   
}

.akte .news-item:last-child {
    border-bottom: none;
}

.news-img{
     flex: 2;
     border-right: #000 2px solid;
}

.news-text{
    flex: 1;
    display: flex;
    flex-direction: column;

  
}

@media (max-width: 600px) {
    .news-item {
        flex-direction: column;
    }

    .news-img {
        border-right: none;
        border-bottom: #000 2px solid;
        flex: none;
    }

    .news-text {
        flex: none;
    }
}




.akte-werk{
    
    margin: auto;
    display: flex;
    flex-direction: row;
    border: 2px solid #000;
    border-radius: 0.25rem;
}


.akte-werk > * {

    flex: 1 5 auto;
}

/* Target the first direct child inside .akte-werk */
.akte-werk > *:first-child {
    flex: 0 0 300px !important; 
    /* max-width: 300px; */
}



.dashed{
border: 2px dashed #000;
}

.clear {
    border: none;
    text-decoration: none;
}

.grey{
    opacity: 0.5;
}

.titel {
 
    padding: 1rem;
    text-align: right;
    width: auto;
    border-bottom: 2px solid #000;
}

/* --- Using the simplified styles from section 2 --- */
.meta{
    display: flex;
    border-bottom: 2px solid #000;
    
}


.meta-footer {
    display: flex;
   justify-content: space-between;
    border-bottom: 2px solid #fff;
}

.av-1 {

    width: 50%;
    padding: 1rem;
    border-right: 2px solid #000;

    /* Add these lines */
    display: flex;
    align-items: center;     /* This centers the text vertically */
    justify-content: flex-start;
}

.av-2 {
    width: 50%;
    padding: 1rem;
    text-align: right;
}


.av-1-auto {

    width: auto;
    padding: 1rem;
    border-right: 2px solid #000;

    /* Add these lines */
    display: flex;
    flex-wrap: wrap;
    align-items: center;     /* This centers the text vertically */
    justify-content: flex-start;
}

.av-2-auto {
    width: auto;
    padding: 1rem;
    text-align: right;
}

.av-3 {
    width:100%;
    padding: 1rem;
    text-align: right;
}

.vita{
   
    border-right: #000 2px solid;
}


.werk {
    flex: 2;
    border-right: #000 2px solid;
    display: flex;
    flex-direction: column;


}

/* Initially hide the container for the remaining images */
.media-hidden {
    display: none;
}

/* Hide images beyond the limit */

/* Hide artworks beyond the display limit */
.artwork-hidden {
    display: none;
}

.show-more-link {
    cursor: pointer;
}

/* Add a class that JavaScript will toggle to show them */
.media-hidden.is-visible {
    display: grid; /* Assuming you want them to display as part of the grid */
    /* Or, if the images are already flowing in the media grid: */
    display: contents; /* Allows the children to participate directly in the parent grid */
}


/* Initially hide the artwork containers beyond the 6th one */
.main.breit.center.artwork-hidden {
    display: none;
}


.display{
    grid-template-columns: 2fr 1fr !important;
    gap:0;
 
}

.media {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    /* Set a hard height for the rows so Safari can't expand them */
    grid-auto-rows: 50px; 
    gap: 0.5rem;
    max-width: 1200px;
    grid-auto-flow: dense;
}

/* The Wrapper - This defines the size */
.img-wrapper {
    cursor: pointer;
    grid-column: span 4;
    grid-row: span 3;
    position: relative; /* Useful for absolute positioning children if needed */
    overflow: hidden;   /* Prevents images from bleeding out */
    display: flex;      /* Ensures the child fills the space */
}

/* The Content - This fills the wrapper */
.img-wrapper img, 
.img-wrapper video {

    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-object-fit: cover;
    display: block;
    
    /* Crucial for Safari: tells it to ignore the image's original height */
    flex-shrink: 0;
    min-width: 0;
    min-height: 0;
}

/* 2. Unified Hover Effect */
.img-wrapper:hover {
    transform: translateY(-0.25rem);
    transition: all ease-in-out 0.25s;
}
/* grid43 variant */
.media.grid43 {
    padding: 1rem;
    flex: 5;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* ensure rows behave predictably inside flex parents */
    grid-auto-rows: minmax(0, 1fr);
    gap: 0.5rem;
    max-width: 1200px;

    /* If parent doesn't provide a definite height, provide a sensible fallback.
       Safari requires a definite height (or min-height) for 1fr rows to compute size. */
    height: 100%;
    min-height: 300px;

    min-width: 0;
    min-height: 0;
}

/* 4. Support for grid43 variant */
.media.grid43 img,
.media.grid43 video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    -webkit-object-fit: contain;
    -webkit-object-position: center;
    grid-column: span 1;
    grid-row: span 1;
}

/* Helpful extra for flex parents (common Safari bug): ensure the flex child can shrink */
.akte-werk, .media, .media.grid43 {
    min-height: 0;
    min-width: 0;
}
.left{
    text-align: left;
    display: flex;
    align-items: center;     /* This centers the text vertically */
    justify-content: flex-start;
    padding-left: 0;

}


.right{
    display: flex;
    align-items: center;     /* This centers the text vertically */
    justify-content: flex-end;
    padding: 2rem;
   

}
.breit{



    /* 2. Use a responsive width */
    width: 80vw; /* Takes up 90% of the screen on mobile */
   max-width: 900px;
}

/* --- End simplified styles --- */


.beschreibung {
    color: #000;
    margin: 0;
    padding: 1rem; /* Add padding here instead of globally */
    text-indent: 2rem;
    flex-grow: 1;
 /* CRITICAL FIXES START HERE */
    word-wrap: break-word;       /* */
    overflow-wrap: break-word;    /* */
    word-break: break-word;      /* Forces breaks in long words */
    hyphens: auto;               /* Optional: adds hyphens where it breaks */
    min-width: 0;
}

.liste {
    line-height: 1.2;
    margin: 0;
    padding: 1rem; /* Add padding here instead of globally */
    
}

.text{
    font-size: 1.5rem;
    margin: 0;
    padding: 5rem; /* Add padding here instead of globally */
    padding-bottom: 2rem;


}


.footer {
  
    background-color: #000;
    color: #fff;
    font-size: 1.5rem;
    width: 100%; /* Takes up 90% of the screen on mobile */
    padding: 2rem 0;
    margin: auto; /* Centers it and adds vertical space */
}

.footer .akte{
    border-color: #fff;
    width: 70%;
    
    margin: auto;
}

.footer .link{
    padding: 0rem;
    color: #fff;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-decoration: underline;

    
}

.footer-D1 {
    margin: 0;
    width: auto;
    padding: 1rem;
    padding-right: 5rem;
    border-right: 2px solid #fff;

    /* Add these lines */
    display: flex;
    
    align-items: flex-start;     /* This centers the text vertically */
    justify-content: flex-start;
}

.footer-D2 {
    margin: 0;
    width: auto;
    padding: 1rem;


    /* Add these lines */
    display: flex;
    flex-direction: column;
    align-items: end;     /* This centers the text vertically */
    justify-content: center;;
}

.footer-D3 {
    margin: 0;
    width: auto;
    padding: 1rem;
    padding-right: 2rem;
  

    /* Add these lines */
    display: flex;
    
    align-items: flex-start;     /* This centers the text vertically */
    justify-content: flex-start;
}


img{
    box-sizing: border-box;
  
}



input{

   font-family: "Special Elite", system-ui;
   font-size: 1rem;
   border: none;
}

textarea{
    font-family: "Special Elite", system-ui;
    font-size: 1rem;
    border: none;
    resize: vertical;
}

.save {
  font-family: "Special Elite", system-ui;
  font-size: 1.5rem;
    display: block;
    text-align: center;
    font-size: 1rem;
    padding: 1rem 2rem;
    border: 2px solid #000;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
    margin: auto;
}

/* --- New CSS for the Custom Cursor Textbox (add to main.css) --- */

.cursor-textbox {
    /* Positioning and initial state */
    position: fixed; /* Crucial: ensures it stays relative to the viewport */
    top: 0;
    left: 0;
    pointer-events: none; /* Crucial: allows clicks to pass through to elements underneath */
    opacity: 0; /* Start invisible */
    transition: 
        opacity 0.2s ease-in-out,
        /* Delay the visibility:hidden until the opacity transition finishes */
        visibility 0s 0.2s;
    z-index: 9999; /* Ensure it's always on top */

    /* Styling */
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    color: #000;
    border: #000 2px solid;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    
    /* Using your theme font */
    font-family: "Special Elite", system-ui; 

    /* Offset it slightly so it doesn't cover the cursor exactly */
    transform: translate(15px, 15px);
}

.box{
  padding: 1rem 2rem;
    background-color: #fff;
    color: #000;
    border: #000 2px solid;
    border-radius: 0.75rem;
    font-size: 0.9rem;
        margin: 0 6rem 2rem 6rem;
    min-width: 230px;
    text-align: center;

}

/* State for visibility */
.cursor-textbox.visible {
 opacity: 1;
    visibility: visible;
    /* Remove any delay on visibility when making it visible */
    transition-delay: 0s;
}



.contact-form{
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1rem;
    padding:10%;
}

.contact-form input{
    padding: 1rem;
    border: #000 2px solid;
    border-radius: 0.25rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #000;
    opacity: 1;
}

.contact-form textarea{
    padding: 1rem;
    border: #000 2px solid;
    border-radius: 0.25rem;
}

.contact-form button{
    border: #000 2px solid;
    border-radius: 0.25rem;
    background-color: #000;
    width: 8rem;
    color: #fff;
 font-family: "Special Elite", system-ui;
     font-size: 1rem;
     padding: 0.5rem;
 
}

#exhibition-list{

        display: flex;
    gap: 2rem;
    flex-direction: column;
}

#artworks-list{

        display: flex;
    gap: 2rem;
    flex-direction: column;
}

#press-list{

        display: flex;
    gap: 2rem;
    flex-direction: column;
}


/* 3. Add a Media Query for mobile */
@media (max-width: 600px) {

.werk-home {
display:flex !important;
}
    .img-wrapper  {

    grid-column: span 8;
    grid-row: span 2 !important;

}

h2{
    padding-left:5%;
}


    .main, .main-vita, .main .breit .center {
        /* Stack the label and content vertically on small screens */
        grid-template-columns: 1fr;
        gap: 0.5rem; /* Reduce the gap */
        width: 90% !important; /* Use almost full width */
    }

    .breit {
          
        width: auto; /* Use almost full width */
    }

    .etikett {
        /* Adjust alignment for stacked layout */
        text-align: left;
        padding-top: 0;
        font-weight: bold;
    }

    .akte-werk {
        flex-direction: column;
    }

    .akte-werk .werk {
      
        border-right: none;
        border-bottom: 2px solid #000;
        
    }

    .akte-werk .werk .kaufen-link {

        border-top: 2px solid #000;
        justify-content: flex-end;
    }

    .text {
        font-size: 1rem;
        padding: 2rem 1rem; /* Reduce padding on mobile */
    }

    .footer .akte {
       
        width: 90% !important; /* Adjust footer width on mobile */
    }

    .footer .footer-D1, .footer-D2, .footer-D3 {
        font-size: 1rem;
        padding-right: 1rem;
    }
 .footer .link{
    font-size: 1rem;
 }
  
}

@media (max-width:483px) {
    .vita-titel{

        order: 1;
    }

      .vita{ order: 2px;
border:none;}

}


/* --- Slider Layout --- */
#artwork-slider-container {
 flex-direction: column; /* Stack buttons and content */
        width: 100vw;
        margin-left: calc(-50vw + 50%); /* Center container to ignore parent padding */
        position: relative;
        
}

#artwork-slides {
        margin: auto;
    position: relative;
    flex-grow: 1;
    max-width: 1200px;
    
}

.slider-nav-btn {
    cursor: pointer;
position: absolute;
        top: 25%; /* Position over the image area */
        z-index: 10;
        margin: 0;
        font-size: 3rem;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
}

.slider-nav-btn-main {
position: absolute;
font-family: "Special Elite", system-ui;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    padding: 0 10px;
   
    margin: 0;
}

.slider-nav-btn:first-child {
        left: 10px;
    }

    .slider-nav-btn:last-child {
        right: 10px;
    }


    .slider-nav-btn-main:first-child {
        left: -60px;
    }

    .slider-nav-btn-main:last-child {
        right: -60px;
    }


/* --- Individual Slide Styling --- */
.artwork-slide {
    background-color: transparent;
}

.slide-image {
    padding-top: 1rem;
    width: 100%;
    height: 60vh; /* Controlled by CSS now */
    object-fit: contain;
    position: relative;
    left: 2rem;
    z-index: -1;
}

#image-slides {
position: relative;
    flex-grow: 1;
    display: flex;
    justify-content: flex-end; /* Keep images pushed to the right */
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.inner-image-slide {
    width: 100%;
    display: none; /* Controlled by JS */
}
.inner-image-slide img, 
.inner-image-slide video {
    display: block;
    margin-left: auto; /* Push media to the right */
    margin-right: 0;   /* Hard align right */
    max-width: 100%;
    max-height: 50vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.slide-info-box {
    height: fit-content;
    background-color: white;
    word-break: break-all;
}

.main.slider {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end; /* Strictly align everything to the right */
    align-items: center;
    height: auto; /* Allow growth based on content */
    min-height: 40vh;
    max-height: 50vh;
    width: 80vw;
    max-width: 900px;
    margin: 2rem auto;
    position: relative;
    gap: 1rem;
}

/* --- Mobile Adjustments --- */
@media (max-width: 600px) {

    .inner-image-slide img, 
.inner-image-slide video {
margin: auto !important;
        max-width: 70vw;
        height: 80vh;
}


.main.slider {

        width: 95vw !important;
        gap: 0.5rem;
        margin: 1rem auto;
    }
.slider-nav-btn-main {
        font-size: 2rem;
        padding: 5px;
    }

    /* Handle Landscape on Mobile */
    @media (orientation: landscape) {
        .main.slider {
            height: 80vh;
        }
        .inner-image-slide img {
            max-height: 70vh;
        }

    }

    .slider-nav-btn-main:first-child {
        left: 10px;
    }

    .slider-nav-btn-main:last-child {
        right: 10px;
    }



    #artwork-slider-container {
    
      height: 40vh;
    }

    .slide-image {
   left: 0 !important; /* Reset the 2rem offset from your current CSS */
        width: 100vw !important;
        height: auto !important;
        max-height: 50vh;
        object-fit: cover;
    }

    .slider-nav-btn {
        font-size: 3rem; /* Smaller arrows */
    }

    .slide-info-box {
        box-sizing: border-box;
       
                position: absolute;
        left: 15vw;
                width: 70vw;

}

    .display.artwork-slide {
     grid-template-columns: 1fr !important; /* Stack image and text */
        margin: 0 !important;
        width: 100% !important;
    }
}


/* Lightbox background */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    user-select: none;
}

/* Image styling */
.lightbox-content {
    max-width: 85%;
    max-height: 80%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
  
}

/* Controls */
.close {
    position: absolute;
    top: 10%;
    right: 5%;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

.prev, .next {   font-family: "Special Elite", system-ui;
    position: absolute;
    top: 50%;
    background: transparent;
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 16px;
    margin-top: -50px;
    transition: 0.3s;
}

.prev { left:5%; }
.next { right: 5%; }

.prev:hover, .next:hover { color: #bbb; }

.pub-img {
  cursor: pointer;
}