
/* === FLEX GALLERY STYLING === */

#gallery {
    padding: 0.9rem 0 0 0;
    margin: 0 auto 1.6rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    box-sizing: border-box;
}

#gallery li {
    list-style: none;
    flex: 1 1 205px;
    max-width: 255px; /* Prevents items from getting too wide */
    box-sizing: border-box;
	padding-top: 0;
}

/* === PHOTO STYLING === */

.centre-figure {
  float: none;
  margin: 0.75rem auto 0.5rem auto;
  width: 100%;
  text-align: center;
}

.large-frame img {
  display: block;
  width: 100%;
  max-width: 800px;
  height: auto;
}

.small-frame {
  display: block;
  width: 100%;
  max-width: 267px; /* includes 12px for frame! */
  height: auto;
}

.left-figure {
/*
  margin: 0.75rem 2rem 0.5rem 0;
*/
  float: left;
  margin: 0.75rem 2rem 1rem 0;
}

.right-figure {
/*
  margin: 1rem 0 0.5rem 2rem;
*/
  float: right;
  margin: 1.75rem 0rem 1rem 2rem;
}


.photo-figure {
  display: block;
}

figcaption {
  margin: 1.2rem auto 0.2rem auto;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.1rem;
  padding-top: 0;
  font-family: 'Libre Franklin';
  font-style: italic;
  overflow-wrap: normal;
  overflow: visible;
  line-height: 1.25;
}

#gallery .photo-thumb p {
  margin-top: 0.5rem;
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.1rem;
  padding-top: 0.25rem;
}

.photo-frame {
  position: relative;
  display: inline-block;
  border: 6px solid var(--soul-gold);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-frame .clipped-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* === CORNERS === */

.photo-frame .corner {
  position: absolute;
  width: 36px;
  height: 36px;
  z-index: 2;
}

/* All arms share background color */
.photo-frame .corner::before,
.photo-frame .corner::after {
  content: "";
  position: absolute;
  background: var(--corner-cream);
}

/* === TOP LEFT === */
.corner-tl {
  top: -9px;
  left: -9px;
}
.corner-tl::before {
  width: 36px;
  height: 13.5px;
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 13.5px) 100%, 0 100%);
}
.corner-tl::after {
  width: 13.5px;
  height: 36px;
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13.5px), 0 100%);
}

/* === TOP RIGHT === */
.corner-tr {
  top: -9px;
  right: -9px;
}
.corner-tr::before {
  width: 36px;
  height: 13.5px;
  top: 0;
  right: 0;
  clip-path: polygon(100% 0, 0 0, calc(13.5px) 100%, 100% 100%);
}
.corner-tr::after {
  width: 13.5px;
  height: 36px;
  top: 0;
  right: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 calc(100% - 13.5px), 0 0);
}

/* === BOTTOM RIGHT === */
.corner-br {
  bottom: -9px;
  right: -9px;
}
.corner-br::before {
  width: 36px;
  height: 13.5px;
  bottom: 0;
  right: 0;
  clip-path: polygon(100% 100%, 0 100%, calc(13.5px) 0, 100% 0);
}
.corner-br::after {
  width: 13.5px;
  height: 36px;
  bottom: 0;
  right: 0;
  clip-path: polygon(100% 100%, 0 100%, 0 calc(13.5px), 100% 0);
}

/* === BOTTOM LEFT === */
.corner-bl {
  bottom: -9px;
  left: -9px;
}
.corner-bl::before {
  width: 36px;
  height: 13.5px;
  bottom: 0;
  left: 0;
  clip-path: polygon(0 100%, 100% 100%, calc(100% - 13.5px) 0, 0 0);
}
.corner-bl::after {
  width: 13.5px;
  height: 36px;
  bottom: 0;
  left: 0;
  clip-path: polygon(0 100%, 0 0, 100% 13.5px, 100% 100%);
}

/* === GROOVES === */

.groove {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 4;
  pointer-events: none;
}

.groove::before,
.groove::after {
  content: "";
  position: absolute;
  background: rgba(0, 0, 0, 0.12);
  opacity: 0.4;
}

.groove::before {
  height: 1px;
  width: 18px;
  top: 0;
  left: 0;
}

.groove::after {
  width: 1px;
  height: 18px;
  top: 0;
  left: 0;
}

.corner-tl .groove {
  top: 6px;
  left: 6px;
}
.corner-tr .groove {
  top: 6px;
  right: 6px;
  transform: rotate(90deg);
}
.corner-br .groove {
  bottom: 6px;
  right: 6px;
  transform: rotate(180deg);
}
.corner-bl .groove {
  bottom: 6px;
  left: 6px;
  transform: rotate(270deg);
}


/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 34.5rem) {
  .photo-figure {
    float: none;
    margin: 1rem auto;
    display: block;
	text-align: center;
  }
  .main-content .photo-figure {
    float: none;
    margin: 2rem auto 1rem auto;
    display: block;
  }
  .left-figure {
    float: none;
    display: block;
  }
  .right-figure {
    float: none;
    display: block;
  }
}

@media (max-height: 420px) {
  .photo-frame .clipped-image {
	width: 100%;
	height: 80vh;
	object-fit: cover;
	display: block;
  }
  .large-frame {
	max-height: calc(80vh + 20px);
  }
}

@media (max-height: 320px) {
  .left-figure, .right-figure {
	max-height: 100%;
	max-width: 80vh;
  }
  .small-frame {
	max-height: 100%;
	max-width: 80vh;
  }
  .small-frame {
	max-height: 100%;
	max-width: calc(80vh + 20px);
  }
}

@media (max-width: 8.125rem) {
  .corner {
      display: none;
  }
}
