/* =========================================================
   Photos Page Styles
   This file only controls photos.html.
   ========================================================= */

/* Page background and global font setup */
.photos-page {
  min-height: 100vh;
  margin: 0;
  padding: 40px 0;

  font-family: "Inter", sans-serif;
  color: #111111;

  background:
    radial-gradient(circle at top left, rgba(230, 57, 70, 0.08), transparent 28%),
    linear-gradient(135deg, #f4f0ea 0%, #ffffff 45%, #f6f6f6 100%);
}

/* Wide white page container */
.photos-container {
  width: 90%;
  max-width: 1450px;
  margin: 0 auto;
  padding: 34px;

  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

/* Back button on the top-left */
.back-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 48px;
  padding: 12px 18px;

  color: #111111;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;

  background-color: #ffffff;
  border: 1px solid #dedede;
  border-radius: 999px;

  transition: all 0.25s ease;
}

.back-home-button:hover {
  color: #e63946;
  border-color: #e63946;
  transform: translateY(-2px);
}

/* Heading area */
.photos-header {
  margin-bottom: 50px;
  text-align: center;
}

.photos-header h1 {
  margin: 0;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -3px;
}

.photos-header p {
  max-width: 520px;
  margin: 22px auto 0;

  color: #555555;
  font-size: 18px;
  line-height: 1.6;
}

/* =========================================================
   Gallery Layout
   flex-wrap allows multiple photos on the same line.
   The mixed width classes create a less repetitive layout.
   ========================================================= */
.photos-gallery {
  width: 100%;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;

  gap: 28px;
}

/* =========================================================
   Each Photo Block
   The <figure> is the frame. The <img> is cropped inside it.
   ========================================================= */
.photo-item {
  position: relative;
  overflow: hidden;

  margin: 0;
  border-radius: 22px;

  background-color: #f4f4f4;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.10);

  cursor: pointer;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Image inside each frame */
.photo-item img {
  width: 100%;
  height: 100%;

  display: block;

  /* Prevents ugly stretching and crops the image instead */
  object-fit: cover;
  object-position: center;

  transition: transform 0.35s ease;
}

/* Hover movement */
.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.16);
}

/* Slight image zoom on hover */
.photo-item:hover img {
  transform: scale(1.05);
}

/* Hover text banner */
.photo-item figcaption {
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  padding: 18px 20px;

  color: #ffffff;
  font-size: 16px;
  font-weight: 600;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72),
    rgba(0, 0, 0, 0.10)
  );

  opacity: 0;
  transform: translateY(100%);

  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Show banner on hover */
.photo-item:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* Helps stop casual dragging/saving of images */
.photo-item img,
.image-modal img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   Width Options
   Use one width class on every .photo-item.
   Example: class="photo-item photo-40 photo-medium crop-center"
   ========================================================= */
.photo-25 {
  width: 25%;
}

.photo-30 {
  width: 30%;
}

.photo-35 {
  width: 35%;
}

.photo-40 {
  width: 40%;
}

.photo-45 {
  width: 45%;
}

.photo-50 {
  width: 50%;
}

.photo-55 {
  width: 55%;
}

.photo-60 {
  width: 60%;
}

.photo-70 {
  width: 70%;
}

.photo-80 {
  width: 80%;
}

.photo-90 {
  width: 90%;
}

.photo-100 {
  width: 100%;
}

/* =========================================================
   Height Options
   Use one height class on every .photo-item.
   ========================================================= */
.photo-short {
  height: 280px;
}

.photo-medium {
  height: 380px;
}

.photo-tall {
  height: 500px;
}

.photo-hero {
  height: 560px;
}

/* =========================================================
   Crop Position Options
   Use these when the crop cuts off the wrong part of a photo.
   ========================================================= */
.crop-center img {
  object-position: center;
}

.crop-top img {
  object-position: top;
}

.crop-bottom img {
  object-position: bottom;
}

.crop-left img {
  object-position: left;
}

.crop-right img {
  object-position: right;
}

.crop-top-center img {
  object-position: center top;
}

.crop-bottom-center img {
  object-position: center bottom;
}

.crop-left-center img {
  object-position: left center;
}

.crop-right-center img {
  object-position: right center;
}

/* =========================================================
   Full Image Zoom Modal
   This appears when you click a photo.
   ========================================================= */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 40px;

  background-color: rgba(0, 0, 0, 0.86);
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 92vw;
  max-height: 88vh;

  object-fit: contain;

  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 32px;

  width: 44px;
  height: 44px;

  border: none;
  border-radius: 50%;

  color: #111111;
  background-color: #ffffff;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;
}

.modal-close:hover {
  color: #e63946;
}

/* =========================================================
   Tablet Layout
   ========================================================= */
@media (max-width: 1000px) {
  .photos-container {
    width: 92%;
    padding: 28px;
  }

  .photo-25,
  .photo-30,
  .photo-35,
  .photo-40,
  .photo-45,
  .photo-50,
  .photo-55,
  .photo-60 {
    width: calc(50% - 18px);
  }

  .photo-70,
  .photo-80,
  .photo-90,
  .photo-100 {
    width: 100%;
  }

  .photo-short,
  .photo-medium,
  .photo-tall,
  .photo-hero {
    height: 340px;
  }
}

/* ================================
   Photos Page Footer
================================ */

.site-footer {
  width: 100%;
  margin-top: 70px;
  padding-top: 28px;

  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: #777;

  border-top: 1px solid #e5e5e5;
}

/* =========================================================
   Mobile Layout
   ========================================================= */
@media (max-width: 700px) {
  .photos-page {
    padding: 18px 0;
  }

  .photos-container {
    width: 92%;
    padding: 20px;
    border-radius: 22px;
  }

  .back-home-button {
    margin-bottom: 34px;
  }

  .photos-header {
    margin-bottom: 36px;
    text-align: left;
  }

  .photos-header h1 {
    letter-spacing: -1.8px;
  }

  .photos-header p {
    margin-left: 0;
  }

  .photos-gallery {
    gap: 22px;
  }

  .photo-item,
  .photo-25,
  .photo-30,
  .photo-35,
  .photo-40,
  .photo-45,
  .photo-50,
  .photo-55,
  .photo-60,
  .photo-70,
  .photo-80,
  .photo-90,
  .photo-100 {
    width: 100%;
  }

  .photo-short,
  .photo-medium,
  .photo-tall,
  .photo-hero {
    height: 320px;
  }

  .image-modal {
    padding: 20px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
  }
}
