/* Optional print-sheet mode. Active only when body has .print-portfolio */

#pdf-master-container {
  display: none;
}

@media print {
  body.print-portfolio #site-content {
    display: none !important;
  }

  body.print-portfolio #pdf-master-container {
    display: block !important;
  }

  body.print-portfolio {
    margin: 0;
    padding: 0;
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: 17in 11in landscape;
    margin: 0;
  }

  .pdf-page {
    width: 17in;
    height: 11in;
    page-break-after: always;
    position: relative;
    padding: 0.8in 1in;
    box-sizing: border-box;
    background: #fff;
    overflow: hidden;
  }

  .pdf-header {
    position: absolute;
    top: 0.5in;
    left: 1in;
    right: 1in;
    display: flex;
    justify-content: space-between;
    font-size: 14pt;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pdf-footer-tag {
    position: absolute;
    bottom: 0.4in;
    right: 1in;
    font-size: 10pt;
    color: #888;
    text-transform: uppercase;
  }

  .p1-hero {
    width: 100%;
    height: 8.5in;
    object-fit: cover;
    margin-top: 0.4in;
  }

  .p1-box {
    position: absolute;
    bottom: 1.5in;
    left: 1in;
    background: rgba(30, 30, 30, 0.9);
    padding: 35px 50px;
    color: #fff;
  }

  .p1-box h1 {
    font-size: 44pt;
    margin: 0;
    text-transform: uppercase;
  }

  .p1-box p {
    font-size: 16pt;
    margin: 5px 0 0;
    font-weight: 300;
    opacity: 0.9;
  }

  .p2-grid {
    display: flex;
    gap: 0.8in;
    margin-top: 1in;
    height: 8in;
    align-items: stretch;
  }

  .p2-text {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .p2-feat {
    font-size: 3.2vw;
    font-weight: 700;
    border-left: 12px solid #000;
    padding-left: 35px;
    margin-bottom: 30px;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .p2-brief {
    font-size: 1.7vw;
    line-height: 1.6;
    color: #333;
    text-align: justify;
  }

  .p2-visual {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .p2-visual img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 1px solid #eee;
  }

  .p3-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-top: 0.5in;
  }

  .p3-top-section {
    flex-shrink: 0;
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .p3-h4 {
    font-size: 26pt;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 15px;
  }

  .p3-criteria-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-bottom: 2px solid #000;
    padding-bottom: 25px;
  }

  .p3-meta-box {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .p3-meta-group {
    border-left: 1px solid #ccc;
    padding-left: 12px;
  }

  .p3-meta-title {
    font-size: 9pt;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
  }

  .p3-meta-list {
    list-style: disc;
    margin: 0;
    padding-left: 16px;
  }

  .p3-meta-list li {
    font-size: 10pt;
    line-height: 1.25;
    margin-bottom: 3px;
  }

  .p3-item {
    font-size: 11pt;
    border-left: 1px solid #ccc;
    padding-left: 12px;
    line-height: 1.3;
  }

  .p3-gallery-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    padding-bottom: 0.5in;
  }

  .p3-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
  }

  .p3-gallery.is-sparse {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .p3-gallery img {
    width: 100%;
    max-height: 3.8in;
    object-fit: contain;
    background: #fafafa;
    border: 1px solid #eee;
  }
}
