/* ============================================================================
   PAGE BACKGROUND AND SPACING
   ============================================================================ */

.m15-portfolio-page .page_content_wrap {
  padding-top: 48px !important;
  background-color: #050505 !important;
  background-image:
    linear-gradient(180deg, #050505 0, rgba(5, 5, 5, 0) 240px),
    radial-gradient(1100px circle at 90% 180px, rgba(255, 77, 46, .14), transparent 65%) !important;
}


/* ============================================================================
   HEADER BLOCK
   ============================================================================ */

.m15-portfolio-page .m15-pf-head {
  max-width: 1180px;
  margin: 0 auto 64px;
  padding: 0 max(20px, 5%);
  text-align: center;
}

.m15-portfolio-page .m15-pf-eyebrow {
  margin: 0 0 10px;
  color: #ff4d2e;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1.3;
  text-transform: uppercase;
}

.m15-portfolio-page .m15-pf-title {
  margin: 0;
  color: #fff;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.m15-portfolio-page .m15-pf-sub {
  margin: 20px 0 0;
  color: #cfcfcf;
  font-size: 18px;
  line-height: 1.5;
}


/* ============================================================================
   GRID (2 COLUMNS)
   ============================================================================ */

.m15-portfolio-page .sc_portfolio {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 max(20px, 5%);
}

.m15-portfolio-page .sc_portfolio .sc_portfolio_columns_wrap {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin: 0 !important;
}

/* Column wrappers: remove the theme's float and width, the grid controls them */
.m15-portfolio-page .sc_portfolio .sc_portfolio_columns_wrap > [class*="trx_addons_column-"] {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================================================
   CARD
   ============================================================================ */

.m15-portfolio-page .sc_portfolio_item {
  position: relative;
  border-radius: 16px;
  background: #111;
  overflow: hidden;
  cursor: pointer;
}

.m15-portfolio-page .sc_portfolio_item img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 17 / 10;
  object-fit: cover;
  transition: transform .5s ease;
}

.m15-portfolio-page .sc_portfolio_item:hover img {
  transform: scale(1.04);
}

/* Hide the theme's default hover mask */
.m15-portfolio-page .sc_portfolio_item .mask {
  display: none !important;
}


/* ============================================================================
   CAPTION TILE
   ============================================================================ */

.m15-portfolio-page .m15-pf-cap {
  position: absolute !important;
  top: auto !important;
  right: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 3;
  width: auto !important;
  max-width: calc(100% - 24px);
  margin: 0 !important;
  padding: 22px 30px !important;
  border-radius: 0 18px 0 0 !important;
  background: #0a0a0c !important;
  color: #ff4d2e;
  font-size: 15px;
  line-height: 1.4;
  transition: opacity .3s ease, transform .3s ease;
}

/* Title */
.m15-portfolio-page .m15-pf-cap .m15-pf-name {
  margin: 0 0 4px !important;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.m15-portfolio-page .m15-pf-cap .m15-pf-name a {
  color: inherit !important;
  text-decoration: none !important;
}

/* Subtitle (category): everything in the tile that is not the title */
.m15-portfolio-page .m15-pf-cap :is(span, a, div, p):not(.m15-pf-name):not(.m15-pf-name *) {
  color: #ff4d2e !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

/* Devices with a mouse: caption appears on hover or keyboard focus.
   Touch screens always show it. */
@media (hover: hover) {
  .m15-portfolio-page .m15-pf-cap {
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
  }

  .m15-portfolio-page .sc_portfolio_item:hover .m15-pf-cap,
  .m15-portfolio-page .sc_portfolio_item:focus-within .m15-pf-cap {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}


/* ============================================================================
   REVEAL ANIMATION (PAGE OPEN AND SCROLL)
   ============================================================================ */

.m15-portfolio-page .m15-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--m15-d, 0ms);
  will-change: opacity, transform;
}

.m15-portfolio-page .m15-reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Respect the device's "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  .m15-portfolio-page .m15-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* ---- 7.1 Tablet (max-width 1023px): still 2 columns, smaller ---- */
@media (max-width: 1023px) {
  .m15-portfolio-page .m15-pf-head {
    margin-bottom: 48px;
  }

  .m15-portfolio-page .m15-pf-eyebrow {
    font-size: 13px;
  }

  .m15-portfolio-page .m15-pf-title {
    font-size: 42px;
  }

  .m15-portfolio-page .m15-pf-sub {
    margin-top: 16px;
    font-size: 17px;
  }

  .m15-portfolio-page .sc_portfolio .sc_portfolio_columns_wrap {
    gap: 20px;
  }

  .m15-portfolio-page .m15-pf-cap {
    padding: 18px 22px !important;
    border-radius: 0 16px 0 0 !important;
  }

  .m15-portfolio-page .m15-pf-cap .m15-pf-name {
    font-size: 20px !important;
  }

  .m15-portfolio-page .m15-pf-cap :is(span, a, div, p):not(.m15-pf-name):not(.m15-pf-name *) {
    font-size: 14px !important;
  }
}

/* ---- 7.2 Mobile (max-width 639px): 1 column ---- */
@media (max-width: 639px) {
  .m15-portfolio-page .m15-pf-head {
    margin-bottom: 36px;
  }

  .m15-portfolio-page .m15-pf-eyebrow {
    font-size: 12px;
  }

  .m15-portfolio-page .m15-pf-title {
    font-size: 30px;
  }

  .m15-portfolio-page .m15-pf-sub {
    font-size: 16px;
  }

  .m15-portfolio-page .sc_portfolio .sc_portfolio_columns_wrap {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .m15-portfolio-page .sc_portfolio_item img {
    aspect-ratio: 3 / 2;
  }

  .m15-portfolio-page .m15-pf-cap {
    padding: 14px 20px !important;
    border-radius: 0 14px 0 0 !important;
  }

  .m15-portfolio-page .m15-pf-cap .m15-pf-name {
    font-size: 18px !important;
  }

  .m15-portfolio-page .m15-pf-cap :is(span, a, div, p):not(.m15-pf-name):not(.m15-pf-name *) {
    font-size: 13px !important;
  }
}