/* Additional responsive styles for landing page */
/* Fix for iOS Safari 100vh issue */
.landing-page {
  height: 100vh; /* Fallback */
  height: calc(var(--vh, 1vh) * 100);
}

/* Ensure CD and Book images are responsive */
.cd-disc img,
.interactive-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Improved responsiveness for tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .cd-container {
    top: 40%;
    max-width: 220px;
  }

  .book-container {
    top: 75%;
    max-width: 220px;
  }

  .cd-title h2,
  .book-title h2 {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  /* Ensure elements don't overflow */
  .landing-page {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  /* Adjust CD and Book containers for smaller screens */
  .cd-container {
    top: 32%;
    width: 90%;
    max-width: 180px;
    margin: 0 auto;
    transform: translateY(-50%);
  }

  .cd-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
  }

  .cd-shadow {
    width: calc(100% + 30px);
    left: -15px;
  }

  .book-container {
    top: 72%;
    width: 90%;
    max-width: 180px;
    margin: 0 auto;
    transform: translateY(-50%);
  }

  .interactive-book {
    width: 160px;
    height: 240px;
  }

  .interactive-book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .book-shadow {
    width: calc(100% + 30px);
    left: -15px;
  }

  /* Make sure the visit button is properly positioned */
  .visit-button-container {
    position: fixed;
    bottom: 15%;
    width: 100%;
    text-align: center;
  }

  .visit-button {
    white-space: nowrap;
    display: inline-block;
    max-width: 80%;
  }

  /* Adjust text sizing for CD and Book titles */
  .cd-title h2,
  .book-title h2 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .cd-title p,
  .book-title p {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
  }

  .cd-release,
  .book-author {
    font-size: 0.75rem;
  }

  .cd-details span {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    margin: 0.15rem;
  }

  /* Signature positioning */
  .signature {
    position: fixed;
    bottom: 5%;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
  }

  /* Ensure the background image looks good on mobile */
  .landing-backdrop {
    background-size: cover;
    background-position: center center;
  }

  /* Adjust Imigongo patterns for mobile */
  .imigongo {
    opacity: 0.4;
  }
}

/* Extra small devices */
@media (max-width: 320px) {
  .artist-name {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }

  .cd-container {
    top: 30%;
  }

  .cd {
    width: 140px;
    height: 140px;
  }

  .book-container {
    top: 70%;
  }

  .interactive-book {
    width: 130px;
    height: 195px;
  }

  .cd-title,
  .book-title {
    width: 140px;
  }

  .cd-title h2,
  .book-title h2 {
    font-size: 1rem;
  }

  .visit-button {
    padding: 8px 25px;
    font-size: 0.75rem;
  }

  .visit-button-container {
    bottom: 12%;
  }

  .signature {
    bottom: 4%;
  }
}

/* Fix for iPhone X and newer with notches */
@media (max-width: 812px) and (min-height: 375px) {
  .visit-button-container {
    bottom: 18%;
  }

  .signature {
    bottom: 8%;
  }
}

/* Fix for landscape mode on mobile */
@media (max-height: 450px) and (orientation: landscape) {
  .landing-header {
    top: 2%;
  }

  .artist-name {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  .cd-container {
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
  }

  .book-container {
    top: 50%;
    left: 75%;
    transform: translate(-50%, -50%);
  }

  .cd-title,
  .book-title {
    position: absolute;
    width: 100%;
    top: 105%;
  }

  .visit-button-container {
    bottom: 10%;
  }
}

/* Responsive centering for Tonzi name and signature on small screens */
@media (max-width: 768px) {
  /* Center the artist name at the top */
  .landing-header {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    text-align: center;
    width: 100%;
  }

  .artist-name {
    text-align: center;
    margin: 0 auto;
  }

  /* Center the signature at the bottom */
  .landing-page .signature {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .artist-name {
    font-size: 2.5rem;
  }

  .landing-page .signature {
    bottom: 10px !important;
  }
}
