.selected-mother-info {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.selected-mother-info.active {
  opacity: 1;
  visibility: visible;
}

.selected-mother-container {
  background: #ffffff;
  border-radius: 1rem;
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.selected-mother-info.active .selected-mother-container {
  transform: scale(1);
}

.close-mother-info {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary-1);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.close-mother-info:hover {
  background: var(--primary-3);
}

.selected-mother-image-wrapper {
  width: 100%;
  height: 25rem;
  overflow: hidden;
  background: var(--neutral-light);
  border-radius: 1rem 1rem 0 0;
}

.selected-mother-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.selected-mother-content {
  padding: 2rem;
}

#selected-mother-details h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  color: var(--neutral-dark);
  margin: 0 0 1rem 0;
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

#selected-mother-details .mother-dates {
  font-family: var(--font-body);
  font-size: var(--fs-h6);
  font-weight: var(--fw-medium);
  color: var(--primary-1);
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 0.125rem solid var(--neutral-light);
  display: block;
}

#selected-mother-details .mother-poem {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: #495057;
  font-style: italic;
  margin: 0;
}

.instructions {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--primary-1);
}

.instructions p {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

@media (max-width: 1024px) {
  .selected-mother-image-wrapper {
    height: 22rem;
  }

  .selected-mother-content {
    padding: 1.75rem;
    text-align: center;
  }

  .instructions {
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 900px) {
  .selected-mother-image-wrapper {
    height: 21rem;
  }

  .selected-mother-content {
    padding: 1.6rem;
    text-align: center;
  }

  .instructions {
    padding: 2.25rem 1.4rem;
  }
}

@media (max-width: 768px) {
  .selected-mother-info {
    padding: 1.5rem;
  }

  .selected-mother-image-wrapper {
    height: 20rem;
  }

  .selected-mother-content {
    padding: 1.5rem;
    text-align: center;
  }

  .close-mother-info {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.125rem;
  }

  .instructions {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .selected-mother-info {
    padding: 1rem;
    align-items: center;
  }

  .selected-mother-container {
    border-radius: 0.5rem;
    max-height: 85vh;
    height: auto;
    margin: 0;
  }

  .selected-mother-image-wrapper {
    height: 12rem;
    border-radius: 0.5rem 0.5rem 0 0;
    flex-shrink: 0;
  }

  .selected-mother-image-wrapper img {
    object-fit: contain;
  }

  .selected-mother-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
  }

  #selected-mother-details h3 {
    font-size: 1.125rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
  }

  #selected-mother-details .mother-dates {
    font-size: 0.8125rem;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
  }

  #selected-mother-details .mother-poem {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .close-mother-info {
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    background: var(--primary-1);
  }

  .close-mother-info:hover {
    background: var(--primary-3);
  }

  .instructions {
    padding: 1.25rem 1rem;
    flex-shrink: 0;
  }

  .instructions p {
    font-size: 0.75rem;
    letter-spacing: 0.05rem;
    line-height: 1.3;
  }
}
