/*
 * KRENEXIS — v4 honest photographic backgrounds + portfolio and blog fixes.
 * Real Unsplash photographs licensed for commercial use, acquired as WP
 * media IDs 89-92. Original Krenexis lockup is used as a decorative overlay;
 * these are branded stock mockups, not photographs of Krenexis premises.
 * Scoped to hero backgrounds, CTA, homepage process and portfolio, journal.
 * Other page content / form / team / pricing / ASK KRENEXIS unchanged.
 */
:root { --k-v4-navy:#1C4859; --k-v4-teal:#11808C; --k-v4-cyan:#0BD9D9; }
.k-hero-photo.k-hero-stock-photo{
  position:absolute!important;inset:0!important;width:100%;height:100%;
  overflow:hidden;background:var(--k-v4-navy)!important;opacity:1!important;
}
.k-hero-photo.k-hero-stock-photo>img{
  width:100%;height:100%;object-fit:cover;object-position:center 52%;
  display:block!important;position:absolute;inset:0;
  filter:saturate(.85);transform:none;
}
.k-hero-photo.k-hero-stock-photo:after{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(90deg,rgba(5,18,30,.88) 0%,rgba(7,27,43,.70) 36%,rgba(9,42,56,.36) 70%,rgba(4,21,29,.28) 100%),linear-gradient(0deg,rgba(4,13,24,.65),transparent 65%)!important
}
/* Authentic official logo, gently blended like a window/wall vinyl overlay. */
.k-photo-logo-sign,.kp2-photo-logo-sign{
  position:absolute;z-index:3;pointer-events:none;
  display:block;width:clamp(115px,14vw,220px);height:clamp(76px,9vw,147px);
  background:url("../img/Krenexis-Official-Logo-Transparent.png") center/contain no-repeat;
  opacity:.78;filter:drop-shadow(0 9px 11px rgba(0,0,0,.50));
  transform:perspective(800px) rotateY(-9deg) rotateZ(-2deg);
}
.k-hero-photo.k-hero-stock-photo .k-photo-logo-sign{right:7%;top:19%;opacity:.61}
body[class] .kp2-hero-image.kp2-real-workspace-hero{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  background:var(--k-v4-navy)!important;opacity:1!important;
  display:block!important;overflow:hidden!important;isolation:isolate;
}
body[class] .kp2-hero-image.kp2-real-workspace-hero>img{
  position:absolute!important;inset:0!important;
  display:block!important;width:100%!important;height:100%!important;
  max-width:none!important;
  object-fit:cover!important;object-position:center center!important;
  filter:saturate(.80)!important;opacity:1!important;
}
body[class] .kp2-hero-image.kp2-real-workspace-hero:after{
  content:"";position:absolute;inset:0!important;z-index:2;
  background:linear-gradient(90deg,rgba(5,16,28,.89) 0%,rgba(7,28,42,.73) 38%,rgba(5,24,37,.41) 75%,rgba(2,15,23,.31) 100%),linear-gradient(0deg,rgba(6,15,26,.62),transparent 57%)!important
}
.kp2-hero-image.kp2-real-workspace-hero .kp2-photo-logo-sign{
  right:8%;top:18%;z-index:3;opacity:.68;
}
/* Explicitly requested: no extra office-logo mockup on Portfolio / Contact. */
body.page-portfolio .kp2-hero-image .kp2-photo-logo-sign,
body.page-contact .kp2-hero-image .kp2-photo-logo-sign{display:none!important}
/* Brand/photo areas are decorative and should never trap clicks or cover text. */
.k-photo-logo-sign,.kp2-photo-logo-sign{user-select:none}
.k-hero .k-hero-content,.kp2-hero .kp2-hero-grid{position:relative}
.k-story-img.k-story-photo-real{position:relative;background:var(--k-v4-navy);overflow:hidden}
.k-story-img.k-story-photo-real>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center;filter:brightness(.79) saturate(.9)}
.k-story-img.k-story-photo-real:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(2,20,30,.48),transparent 75%);pointer-events:none}
.k-story-img.k-story-photo-real .k-photo-logo-sign{bottom:6%;right:7%;top:auto;width:34%;height:25%;opacity:.68;z-index:3}
.k-contact-bg.k-contact-bg-real{opacity:1!important;overflow:hidden;background:var(--k-v4-navy);isolation:isolate}
.k-contact-bg.k-contact-bg-real>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 48%;filter:saturate(.84)}
.k-contact-bg.k-contact-bg-real:after{content:"";position:absolute;inset:0;z-index:2;background:linear-gradient(90deg,rgba(4,18,28,.91) 0%,rgba(3,21,32,.77) 45%,rgba(5,34,47,.45) 100%),linear-gradient(0deg,rgba(2,13,20,.53),transparent 65%)}
.k-contact-bg.k-contact-bg-real .k-photo-logo-sign{right:8%;top:24%;z-index:3;opacity:.63}
.k-contact>.k-topline,.k-contact>h2,.k-contact>p,.k-contact>.k-action-row{position:relative;z-index:1}
/* Existing Blog index ONLY: consistent inset and no truncated kicker. */
body.blog .kp2-journal-hero .kp2-container,
body.page-id-14 .kp2-journal-hero .kp2-container{
  width:100%!important;max-width:1360px!important;min-width:0!important;
  box-sizing:border-box!important;margin-inline:auto!important;
  padding-left:clamp(24px,5vw,78px)!important;
  padding-right:clamp(24px,5vw,78px)!important;
}
body.blog .kp2-journal-hero .kp2-section-line,
body.page-id-14 .kp2-journal-hero .kp2-section-line{
  display:flex!important;flex-wrap:wrap!important;justify-content:space-between!important;
  gap:12px 30px!important;width:100%!important;max-width:100%!important;
  overflow:visible!important;box-sizing:border-box!important;
}
body.blog .kp2-journal-hero .kp2-section-line>span,
body.page-id-14 .kp2-journal-hero .kp2-section-line>span{
  max-width:100%!important;min-width:0!important;flex:0 1 auto;
  letter-spacing:.09em!important;overflow-wrap:normal;white-space:normal!important;
}
body.blog .kp2-journal-hero h1,body.page-id-14 .kp2-journal-hero h1{
  max-width:100%;min-width:0;overflow-wrap:normal
}
/* Selected Work 01 - MRI: show ONLY the top website hero from the real
 * tablet-mounted image, without fabricating or stretching website content.
 * Source website screen approximately x=300..1060, hero y=80..430. */
body.page-portfolio .kp2-project:first-child .kp2-project-media{
  aspect-ratio:1.65 / 1!important;
}
body.page-portfolio .kp2-project:first-child .kp2-project-media>img{
  position:absolute!important;
  left:50%!important;top:0!important;
  width:181%!important;max-width:none!important;height:auto!important;
  object-fit:unset!important;object-position:initial!important;
  transform:translateX(-50%)!important;filter:none!important;
}
body.page-portfolio .kp2-project:first-child:hover .kp2-project-media>img{
  transform:translateX(-50%)!important;
}
/* Selected Work 04 - BMM Logistics: show the COMPLETE original angled
 * multi-page mockup, instead of cropping into a single truck screen. */
body.page-portfolio .kp2-project:nth-child(4) .kp2-project-media>img{
  position:absolute!important;left:0!important;top:50px!important;
  width:100%!important;max-width:100%!important;
  height:calc(100% - 50px)!important;
  object-fit:contain!important;object-position:center center!important;
  transform:none!important;filter:none!important;
}
/* Selected Work 03 - Chiniot: fit the entire upper website hero,
 * including the full bedroom image on the right. */
body.page-portfolio .kp2-project:nth-child(3) .kp2-project-media{
  aspect-ratio:2.28 / 1!important;
}
body.page-portfolio .kp2-project:nth-child(3) .kp2-project-media>img{
  left:50%!important;top:0!important;
  width:181%!important;max-width:none!important;height:auto!important;
  object-fit:unset!important;object-position:initial!important;
  transform:translateX(-50%)!important;
}
/* Existing labels remain inside the browser header, never on the website. */
body.page-portfolio .kp2-project-media:before{z-index:7!important}
body.page-portfolio .kp2-project-foot{clear:both}
@media(max-width:900px){
  .k-hero-photo.k-hero-stock-photo .k-photo-logo-sign{right:3%;top:17%;opacity:.42}
  body[class] .kp2-hero-image.kp2-real-workspace-hero .kp2-photo-logo-sign{right:3%;top:17%;width:130px;opacity:.52}
}
@media(max-width:640px){
  body.blog .kp2-journal-hero .kp2-container,body.page-id-14 .kp2-journal-hero .kp2-container{
    padding-left:22px!important;padding-right:22px!important
  }
  body.blog .kp2-journal-hero .kp2-section-line,body.page-id-14 .kp2-journal-hero .kp2-section-line{
    justify-content:flex-start!important;flex-direction:column;align-items:flex-start
  }
  .k-hero-photo.k-hero-stock-photo>img{object-position:65% center}
  .k-hero-photo.k-hero-stock-photo .k-photo-logo-sign{width:110px;top:20%;opacity:.38}
  body[class] .kp2-hero-image.kp2-real-workspace-hero>img{object-position:65% center!important}
  body[class] .kp2-hero-image.kp2-real-workspace-hero .kp2-photo-logo-sign{opacity:.45}
  body.page-portfolio .kp2-project:first-child .kp2-project-media{aspect-ratio:1.65 / 1!important}
  body.page-portfolio .kp2-project:first-child .kp2-project-media>img{
    left:50%!important;top:0!important;width:181%!important;
    height:auto!important;transform:translateX(-50%)!important;
  }
  body.page-portfolio .kp2-project:nth-child(4) .kp2-project-media>img{
    top:40px!important;height:calc(100% - 40px)!important;
    left:0!important;width:100%!important;object-fit:contain!important;
  }
  body.page-portfolio .kp2-project:nth-child(3) .kp2-project-media{aspect-ratio:2.28 / 1!important}
  body.page-portfolio .kp2-project:nth-child(3) .kp2-project-media>img{
    left:50%!important;top:0!important;width:181%!important;
    height:auto!important;transform:translateX(-50%)!important;
  }
}
