/* -------------------------------------------------------
   Single Portfolio
------------------------------------------------------- */

body.single-portfolio {
  background: #fff;
}

.trabaho-portfolio-single {
  width: 100%;
  overflow: hidden;
}

.trabaho-portfolio-single-entry {
  margin: 0;
  padding: 0;
}

/* Title block */
.trabaho-portfolio-single-hero {
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: clamp(120px, 18vh, 220px) clamp(22px, 5vw, 80px) clamp(56px, 8vw, 110px);
  background: #fff;
}

.trabaho-portfolio-single-hero-inner {
  width: min(100%, 1480px);
}

.trabaho-portfolio-single-title {
  margin: 0;
  color: #111;
  font-size: clamp(46px, 9vw, 150px);
  line-height: 0.88;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

/* Video */
.trabaho-portfolio-single-video-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0;
  background: #000;
}

.trabaho-portfolio-single-video {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
}

.trabaho-portfolio-single-video iframe,
.trabaho-portfolio-single-video video,
.trabaho-portfolio-single-video embed,
.trabaho-portfolio-single-video object {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.trabaho-portfolio-video-fallback {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #fff;
  text-align: center;
}

/* Gallery */
.trabaho-portfolio-single-gallery {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(12px, 2vw, 28px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  background: #fff;
}

.trabaho-portfolio-gallery-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #f1f1f1;
}

.trabaho-portfolio-gallery-frame a {
  display: block;
  width: 100%;
  height: 100%;
}

.trabaho-portfolio-gallery-frame.is-full {
  grid-column: 1 / -1;
  min-height: 92vh;
}

.trabaho-portfolio-gallery-frame.is-left {
  grid-column: 1 / span 7;
  min-height: 72vh;
}

.trabaho-portfolio-gallery-frame.is-right {
  grid-column: 8 / span 5;
  min-height: 72vh;
}

.trabaho-portfolio-gallery-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.001);
  transition: transform 0.9s ease, opacity 0.9s ease;
}

.trabaho-portfolio-gallery-frame:hover .trabaho-portfolio-gallery-image {
  transform: scale(1.035);
}

/* Gutenberg content */
.trabaho-portfolio-single-content {
  width: min(100% - 44px, 920px);
  margin: 0 auto;
  padding: clamp(70px, 10vw, 140px) 0;
  color: #111;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.45;
  text-align: center;
}

.trabaho-portfolio-single-content > *:first-child {
  margin-top: 0;
}

.trabaho-portfolio-single-content > *:last-child {
  margin-bottom: 0;
}

/* Remove default WP gallery styling if anything leaks */
.trabaho-portfolio-single .gallery {
  margin: 0 !important;
}

/* Responsive */
@media (max-width: 900px) {
  .trabaho-portfolio-single-hero {
    min-height: 42vh;
  }

  .trabaho-portfolio-gallery-frame.is-full,
  .trabaho-portfolio-gallery-frame.is-left,
  .trabaho-portfolio-gallery-frame.is-right {
    grid-column: 1 / -1;
    min-height: 68vh;
  }

  .trabaho-portfolio-single-video {
    min-height: 64vh;
  }
}

@media (max-width: 560px) {
  .trabaho-portfolio-single-hero {
    min-height: 34vh;
    padding-top: 110px;
  }

  .trabaho-portfolio-single-title {
    font-size: clamp(42px, 16vw, 82px);
  }

  .trabaho-portfolio-single-gallery {
    padding: 10px;
    gap: 10px;
  }

  .trabaho-portfolio-gallery-frame.is-full,
  .trabaho-portfolio-gallery-frame.is-left,
  .trabaho-portfolio-gallery-frame.is-right {
    min-height: 56vh;
  }

  .trabaho-portfolio-single-content {
    width: min(100% - 36px, 760px);
    font-size: 18px;
  }
}
.trabaho-portfolio-gallery-frame {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.trabaho-portfolio-gallery-frame.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* -------------------------------------------------------
   Single Portfolio Navigation
------------------------------------------------------- */

.trabaho-portfolio-project-nav {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: clamp(48px, 7vw, 96px) clamp(22px, 5vw, 80px);
  background: #111;
  color: #fff;
}

.trabaho-portfolio-project-nav-inner {
  width: min(100%, 1480px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 72px);
}

.trabaho-portfolio-project-nav-item {
  display: flex;
  min-height: clamp(180px, 24vw, 340px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 64px);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.02)
    );
  transition:
    transform 0.35s ease,
    background-color 0.35s ease,
    border-color 0.35s ease;
}

.trabaho-portfolio-project-nav-item:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.42);
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.trabaho-portfolio-project-nav-item.is-previous {
  align-items: flex-start;
  text-align: left;
}

.trabaho-portfolio-project-nav-item.is-next {
  align-items: flex-end;
  text-align: right;
}

.trabaho-portfolio-project-nav-item.is-empty {
  visibility: hidden;
}

.trabaho-portfolio-project-nav-direction {
  display: block;
  margin-bottom: 18px;
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.58;
}

.trabaho-portfolio-project-nav-title {
  display: block;
  max-width: 720px;
  font-size: clamp(32px, 5vw, 86px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .trabaho-portfolio-project-nav-inner {
    grid-template-columns: 1fr;
  }

  .trabaho-portfolio-project-nav-item {
    min-height: 180px;
  }

  .trabaho-portfolio-project-nav-item.is-next {
    align-items: flex-start;
    text-align: left;
  }

  .trabaho-portfolio-project-nav-item.is-empty {
    display: none;
  }
}