/*********************************************************************
/* General stuff */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  overflow-y: scroll;
}

header {
  position: fixed;
  width: 100%;
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  top: 0;
  left: 0;
  z-index: 1000;
}

h2 {
  text-align: center;
}

section {
  padding: 5rem 1rem 1rem;
  margin-top: 1rem;
}

/*********************************************************************
/* Navigation */
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  -webkit-text-size-adjust: 100%;
}

nav ul li {
  margin: 0 1.5rem;
}

nav ul li a {
  color: rgb(100, 100, 100);
  text-decoration: none;
  font-weight: 500;
  font-size: 22px;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

nav ul li a:hover {
  color: #000;
}

nav ul li a.active {
  color: #000 !important;
  border-bottom: none;
}

@media screen and (max-width: 1200px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    nav ul li a {
        font-size: 16px !important;
        font-weight: 600 !important;
    }
    nav ul li {
        margin: 0 0.8rem !important; 
    }
    header {
        width: 100vw !important;
        min-width: 100vw !important;
        left: 0 !important;
    }
}

/* Interactive 3x3 Circle Grid ************************************** */ 
.central-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 400px; 
    padding: 50px 0;
    /* Verhindert, dass Text markiert wird, während man mit den Kreisen spielt */
    user-select: none;
    -webkit-user-select: none;
}

.circle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
}

.circle {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #000;
    border-radius: 50%;
    cursor: pointer;
    
    /* FIX: Entfernt die blauen Boxen auf Mobile & Desktop */
    outline: none;
    -webkit-tap-highlight-color: transparent;
    
    /* Smartphone-Animation */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    will-change: transform;
    
    /* WICHTIG: Stellt sicher, dass das Element Events empfängt */
    pointer-events: auto;
    touch-action: none;
}

.circle.active {
    background-color: #333;
    transform: scale(0.9) !important;
    outline: none;
}

/*********************************************************************
/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.lightbox-content {
  text-align: center;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-content p {
  color: white;
  margin-top: 10px;
  font-size: 16px;
}

/*********************************************************************
/* Icons bottom */
.icons {
  display: flex;
  justify-content: center;   
  align-items: center;       
  gap: 1.2rem;               
  margin-top: 5rem;
}

.icon-item img {
  max-width: 36px;   
  height: auto;
}

@media (max-width: 480px) {
  .icon-item img { max-width: 28px; }
}

/*********************************************************************
/* Gallery (Studio.html) */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  justify-items: center;
  margin: 0 auto 15px;
  max-width: 1200px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 355px;
}

.gallery-item img {
  width: 100%;
  height: 425px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 2px;
}

@media (max-width: 1200px) {
  .gallery { grid-template-columns: 1fr !important; }
}

/*********************************************************************
/* Lab / Accordion Styling */

.accordion {
    width: 100%;
}

.accordion-item {
    margin-bottom: 3rem;
    width: 100%;
}

/* Header */
.accordion-header {
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    text-align: center;
    display: block;
    width: 100%;
    user-select: none;
}

/* Active header */
.accordion-item.active .accordion-header {
    color: #000;
    margin-bottom: 2rem;
}

/* Content Container */
.accordion-content {
    display: grid;
    grid-template-rows: 0fr; /* Standardmäßig geschlossen */
    opacity: 0;
    overflow: hidden;
    transition: 
        grid-template-rows 0.5s ease, 
        opacity 0.3s ease;
    
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Active content state */
.accordion-item.active .accordion-content {
    grid-template-rows: 1fr; /* Öffnet das Grid auf die volle Inhaltshöhe */
    opacity: 1;
}

/* Innerer Wrapper - Zwingend erforderlich für die Grid-Animation */
.accordion-content > div {
    min-height: 0;
}

/* Paragraph styling */
.accordion-content p {
    text-align: justify;
    hyphens: auto;
    color: #333;
    line-height: 1.6;
    margin-bottom: 2rem;
}


/*********************************************************************
/* Legal stuff */ 
.legal-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  font-size: 0.7rem;
  color: rgb(150, 150, 150);
}

.legal-links a {
    color: rgb(150, 150, 150);
    text-decoration: none;
    cursor: pointer;
}

.legal-links a:hover { text-decoration: underline; }
