/* ------------------------------------------------------------------
   Portfolio detail pages — layout and typography carried over from the
   old theme (clipped titles, swipebox gallery grid, sub-gallery
   overlays), living under the new machinery header.
------------------------------------------------------------------- */

@font-face {
  font-family: 'BrandonGrotesque-Bold';
  src: url('../fonts/BrandonGrotesque-Bold.eot?#iefix') format('embedded-opentype'),
       url('../fonts/BrandonGrotesque-Bold.otf') format('opentype'),
       url('../fonts/BrandonGrotesque-Bold.woff') format('woff'),
       url('../fonts/BrandonGrotesque-Bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MatchwoodWF';
  src: url('../fonts/MatchwoodWF.eot?#iefix') format('embedded-opentype'),
       url('../fonts/MatchwoodWF.woff') format('woff'),
       url('../fonts/MatchwoodWF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'AgencyFBBlack';
  src: url('../fonts/AgencyFBBlack.eot?#iefix') format('embedded-opentype'),
       url('../fonts/AgencyFBBlack.woff') format('woff'),
       url('../fonts/AgencyFBBlack.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ---- page shell (body padding already clears the fixed header) ---- */

.portfolio-detail {
  padding: 2vw 4vw 4vw;
  color: #e8d9c6;
  font-family: 'MatchwoodWF', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.portfolio-detail h1,
.portfolio-detail h2,
.portfolio-detail h3 {
  font-family: 'AgencyFBBlack', 'Arial Narrow', sans-serif;
  color: #e8d9c6;
  text-align: center;
}

.portfolio-detail h1 {
  font-size: 7vw;
  line-height: 7vw;
  text-transform: uppercase;
}

.portfolio-detail p {
  font-size: 1.2vw;
  line-height: 1.6vw;
  margin-bottom: 1vw;
}

.portfolio-detail a { color: #e8d9c6; }

.portfolio-detail .entry-content { padding: 2vw 0; }

.portfolio-detail iframe { max-width: 100%; }

.clear { clear: both; }

/* ---- clipped metal-texture titles ---- */

#clipped-title1 {
  background: url(../img/texturez_4123x.jpg);
  background-size: 100% auto;
  background-position: center center;
  color: #e8d9c6;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

#clipped-title1 h2,
#clipped-title1 h1 {
  -webkit-transition: text-shadow 1s ease;
  text-shadow: 0 0 1px rgba(0, 0, 0, .1);
  margin: 0;
  padding: 0;
}

/* ---- body copy columns ---- */

.two-columns { column-count: 2; column-gap: 2vw; }

/* ---- minimal grid columns (replaces old bootstrap dependency) ---- */

@media (min-width: 768px) {
  .col-sm-3 { width: 25%; float: left; }
  .col-sm-9 { width: 75%; float: left; }
}

/* ---- masonry-style gallery grid ---- */

ul.grid {
  -webkit-column-count: 3;
  -moz-column-count: 3;
  column-count: 3;
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid-item {
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
  vertical-align: top;
  position: relative;
  margin-top: 0;
  font-size: 0;
}

.grid-item img {
  display: inline-block;
  vertical-align: top;
  width: 100%;
  height: auto;
  margin-bottom: 1vw;
}

.grid-item a { text-decoration: none; }
.grid-item a .photo-caption { opacity: 0; }
.grid-item a:hover .photo-caption { opacity: 1; z-index: 99; }
.grid-item a:hover .photo-white {
  opacity: .15;
  background-color: #000;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 98;
}

.photo-caption {
  position: absolute;
  top: 38%;
  width: 100%;
  text-align: center;
  font-size: 1.4vw;
  line-height: 2vw;
  font-weight: 400;
  color: #fff;
  pointer-events: none;
}

.view-larger { font-weight: 100; font-size: 1.4vw; }

/* ---- sub-gallery full-screen overlays ---- */

.sub-gallery { padding: 3vw; }

.overlay {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 999999;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.94);
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.5s;
}

.overlay-content {
  position: relative;
  top: 7vw;
  width: 100%;
  text-align: center;
  margin-top: 30px;
  padding-bottom: 10vw;
}

.overlay-content h3 { font-size: 5vw; line-height: 6vw; margin-bottom: 2vw; }

.overlay a {
  padding: 8px;
  text-decoration: none;
  font-size: 36px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.overlay a:hover,
.overlay a:focus { color: #f1f1f1; }

.overlay .closebtn {
  position: absolute;
  top: 0;
  left: 10px;
  font-size: 50px;
  z-index: 2;
}

/* ---- custom gallery modal ---- */

#rf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999999; /* above the sub-gallery overlays and the header */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s;
}

#rf-lightbox.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.rfl-figure {
  margin: 0;
  max-width: 86vw;
  text-align: center;
}

.rfl-img {
  max-width: 86vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border: 2px solid #6b5a3e; /* brass trim */
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rfl-img.rfl-loaded {
  opacity: 1;
}

.rfl-caption {
  color: #f2d896;
  font-family: 'MatchwoodWF', Georgia, serif;
  font-size: 1.1vw;
  line-height: 1.5;
  padding: 0.8vw 2vw 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

#rf-lightbox button {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  transition: filter 0.25s ease;
}

#rf-lightbox button:hover {
  filter: brightness(1.4);
}

.rfl-close {
  position: absolute;
  top: 14px;
  left: 18px;
  z-index: 2;
  font-size: 46px;
  line-height: 1;
  color: #e8d9c6;
}

.rfl-prev,
.rfl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  height: 50px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 2;
}

.rfl-prev { left: 2vw;  background-image: url(../img/arrow-left.png); }
.rfl-next { right: 2vw; background-image: url(../img/arrow-right.png); }

/* ---- mobile ---- */

@media (max-width: 767px) {
  .portfolio-detail { padding: 6vw 4vw; }
  .rfl-img { max-width: 94vw; max-height: 72vh; }
  .rfl-figure { max-width: 94vw; }
  .rfl-caption { font-size: 3.8vw; padding-top: 2.5vw; }
  .rfl-prev, .rfl-next { width: 46px; height: 37px; bottom: 4vh; top: auto; transform: none; }
  .rfl-prev { left: 6vw; }
  .rfl-next { right: 6vw; }
  .portfolio-detail h1 { font-size: 12vw; line-height: 12vw; }
  .portfolio-detail p { font-size: 4vw; line-height: 6vw; margin-bottom: 5vw; }
  .portfolio-detail .entry-content { padding: 4vw 0; }
  .two-columns { column-count: 1; }
  ul.grid { column-count: 1; }
  .grid-item { width: 100%; }
  .photo-caption { font-size: 4vw; line-height: 5vw; }
  .overlay .closebtn { font-size: 40px; top: 15px; left: 15px; }
}
