.grid {
    display: grid;
  }
  
  .image-grid-3-m4 {
    grid-template-rows: repeat(17, 1fr);
    grid-template-columns: repeat(14, 1fr);
      gap: 1.5rem;
  }


/* Schwefel-Struktur von Plattencover */
  .image-0 {
    grid-column: 2 / span 5;
  grid-row: 12 / span 3;
  }

/* Recording Situation */
  .image-1 {
    grid-column: 8 / span 6;
    grid-row: 3 / span 3;
  }

/* Recording Map*/
  .image-2 {
    grid-column: 4 / span 5;
    grid-row: 5 / span 2;
  }

/* Recording Map 2*/  
  .image-3 {
    grid-column: 8 / span 5;
    grid-row: 10 / span 2;
  }

/* Wald Atmosphäre*/  
.image-4 {
  grid-column: 8 / span 6;
  grid-row: 14 / span 3;
}

/* MT IO Atmosphäre*/  
.image-5 {
  grid-column: 1 / span 5;
    grid-row: 2 / span 3;
}

/* Tatami Room*/  
.image-6 {
  grid-column: 4 / span 6;
  grid-row: 8 / span 3;
}

  
  img {
    object-fit:contain;
    height: 100%;
    width: 100%;
  }
  



  /* Platzhalter
Position 1
grid-column: 1 / span 5;
    grid-row: 2 / span 3;



Position 7


    */

/* Mobile styles */
@media screen and (max-width: 768px) {
  body {
    margin: 0;
    padding: 1rem;
  }

  div {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .grid {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
  }

  .image-grid-3-m4 {
    grid-template-rows: repeat(8, minmax(150px, auto));
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
    margin-bottom: 0;
  }

  /* Adjusted image positions to reduce space after image 5 */
  .image-0 {
    grid-column: 1 / span 2;
    grid-row: 4 / span 3;
  }

  .image-1 {
    grid-column: 3 / span 2;
    grid-row: 2 / span 3;
  }

  .image-2 {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
  }

  .image-3 {
    grid-column: 3 / span 2;
    grid-row: 4 / span 2;
  }

  .image-4 {
    grid-column: 3 / span 2;
    grid-row: 5 / span 2;
  }

  .image-5 {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
  }

  .image-6 {
    grid-column: 1 / span 2;
    grid-row: 4 / span 2;
  }

  /* Target the about section */
  div:has(h2:contains("about")) {
    margin-top: -10rem;
    margin-bottom: 2rem;
  }

  div:last-of-type {
    margin-top: -30rem;
    margin-bottom: 5rem;
  }

  /* Ensure paragraph has proper spacing */
  div p {
    margin-bottom: 1rem;
  }

  p {
    margin-bottom: 0.5rem;
  }

  .musikfonds-logo {
    display: block;
    max-width: 150px;
    height: auto;
    margin: 5rem auto 1rem;
  }
}

/* Add specific iOS fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS-specific styles */
  .image-grid-3-m4 {
    -webkit-transform: translateZ(0); /* Force GPU acceleration */
  }
}

/* Smaller screens */
@media screen and (max-width: 480px) {
  div {
    max-width: 95%;
  }

  iframe {
    width: 95vw; /* Even wider on very small screens */
    height: 500px;
  }

  .image-grid-3-m4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }

  .image-0, .image-1, .image-2, .image-3, .image-4, .image-5, .image-6 {
    grid-column: 1 / span 4;
    grid-row: auto;
  }
}

.musikfonds-logo {
  max-width: 200px;
  height: auto;
  margin: 1rem 0 5rem;
}

/* Base styles for the Instagram link */
h2 a {
    color: #333333; /* Match the color of other h2 elements */
    font-family: NotoSansDisplay, 'NotoSansDisplay', sans-serif;
    font-weight: 200;
    font-size: 110%;
    font-variant: small-caps;
}



/* Update the last-of-type margin to target the Instagram div instead */
div:last-of-type {
    margin-bottom: 4rem;
    margin-top: 4rem;
}
    

@media screen and (max-width: 768px) {
    /* Update mobile margins for last section */
    div:last-of-type {
        margin-top: -10rem; /* Remove negative margin for last section  */
        margin-bottom: 5rem;
    }
}

h2 a {
  margin-bottom: 5rem;
}

