/* ==============================
   Photo-modal - content photos (MOBILE-FIRST)
============================== */
#photo-modal {
  border: none;
  background: rgba(0, 0, 0, 0.95);
  width: calc(100vw - 2rem);     /* MOBILE: almost full screen */
  max-width: 100vw;
  height: auto;                  /* let content size naturally */
  max-height: calc(100vh - 2rem);
  padding: 1rem;                 /* MOBILE: small padding */
  margin: auto;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;
}

#photo-modal .modal-content {
  background: rgba(0, 0, 0, 0.95);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;              /* MOBILE: small */
  height: 100%;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

#photo-modal img {
  max-width: 92vw;               /* MOBILE: use the screen */
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 16px;
  border: 2px solid #CD7F32;
  background-color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

/* Caption */
#photo-modal figcaption {
  position: static;              /* MOBILE: avoid overlay collisions */
  transform: none;
  margin-top: 0.75rem;
  color: #CD7F32;
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  max-width: 90%;
  text-align: center;
}

/* Close button — finger-friendly */
#photo-modal .close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.2rem;
  line-height: 1;
  cursor: url(../images/paw-cursor.png), pointer;
  padding: 0.25rem 0.5rem;
}

#photo-modal .close:hover { color: white; }

/* Backdrop */
#photo-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

/* Smooth image open */
#photo-modal[open] img {
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ==============================
   Desktop – restore your original roomy look
============================== */
@media (min-width: 900px) {
  #photo-modal {
    width: 60vw;
    height: 100%;
    padding: 50px;
  }

  #photo-modal .modal-content {
    padding: 30px 60px;
  }

  #photo-modal img {
    max-width: 85vw;
    max-height: 85vh;
  }

  #photo-modal figcaption {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    font-size: 1rem;
  }

  #photo-modal .close {
    top: 18px;
    right: 18px;
    font-size: 2rem;
    padding: 0;
  }
}

/* Featured-image trigger button (keep) */
.featured-image button {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  display: inline-block;
}
