/* Privia Page Header 1 - optional hero extras
 *
 * These rules ONLY style markup that appears when the matching (optional) ACF
 * fields are filled in, so pages that do not use them render exactly as before.
 *
 *  .ph1-hero-btns  wrapper that puts the theme button and the secondary text
 *                  link on one row
 *  .ph1-doc-link   the secondary text link (lavender, small icon, no underline)
 *  .ph1-flow-bg    four blurred light beams drifting across a dark hero
 *
 * Ported from the page-scoped hero styles of Penetration Test (page-id-259); the
 * declarations are unchanged, only the scope prefix and the class names differ.
 *
 * VERSION LIVES IN THE FILE NAME (the theme strips ?ver= from every asset).
 * 1.1.0: optional full-bleed hero layout (.ph1-hero-full).
 */

/* --- Button + secondary link on one row --- */
.service-hero-wrapper.hero-service-detail .ph1-hero-btns{
    display:flex; flex-wrap:wrap; gap:28px; align-items:center;
    position:relative; z-index:10;
}
.ph1-doc-link{
    display:inline-flex; align-items:center; gap:8px;
    color:#dbdaff; font-size:14px; font-weight:700; letter-spacing:-.16px; line-height:160%;
    text-decoration-line:none !important;
    white-space:nowrap; transition:color .2s ease-in-out;
}
.ph1-doc-link:hover{ color:#fff; text-decoration-line:none !important; }
.ph1-doc-link svg{ flex:none; }

/* --- Light beams (same effect as the Penetration Test hero, brand colours) --- */
.service-hero-wrapper.hero-service-detail .ph1-flow-bg{
    position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:2;
}
.ph1-flow-bg .ph1-beam{
    position:absolute; top:-15%; height:130%; width:260px;
    filter:blur(70px); will-change:transform;
}
.ph1-flow-bg .ph1-beam--1{
    background:linear-gradient(to bottom, transparent 0%, rgba(134,219,255,0) 10%, rgba(134,219,255,.55) 50%, rgba(134,219,255,0) 90%, transparent 100%);
    transform:rotate(14deg); opacity:.85; animation:ph1-beam-drift-1 28s linear infinite;
}
.ph1-flow-bg .ph1-beam--2{
    background:linear-gradient(to bottom, transparent 0%, rgba(167,139,250,0) 10%, rgba(167,139,250,.5) 50%, rgba(167,139,250,0) 90%, transparent 100%);
    transform:rotate(14deg); opacity:.7; animation:ph1-beam-drift-2 36s linear infinite; width:320px;
}
.ph1-flow-bg .ph1-beam--3{
    background:linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0) 10%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 90%, transparent 100%);
    transform:rotate(14deg); opacity:.75; animation:ph1-beam-drift-3 44s linear infinite; width:200px;
}
.ph1-flow-bg .ph1-beam--4{
    background:linear-gradient(to bottom, transparent 0%, rgba(219,218,255,0) 15%, rgba(219,218,255,.5) 50%, rgba(219,218,255,0) 85%, transparent 100%);
    transform:rotate(14deg); opacity:.7; animation:ph1-beam-drift-4 52s linear infinite; width:280px;
}
@keyframes ph1-beam-drift-1{ 0%{transform:translateX(-15vw) rotate(14deg)} 100%{transform:translateX(115vw) rotate(14deg)} }
@keyframes ph1-beam-drift-2{ 0%{transform:translateX(110vw) rotate(14deg)} 100%{transform:translateX(-20vw) rotate(14deg)} }
@keyframes ph1-beam-drift-3{ 0%{transform:translateX(-10vw) rotate(14deg)} 100%{transform:translateX(110vw) rotate(14deg)} }
@keyframes ph1-beam-drift-4{ 0%{transform:translateX(105vw) rotate(14deg)} 100%{transform:translateX(-15vw) rotate(14deg)} }
@media (prefers-reduced-motion: reduce){
    .ph1-flow-bg .ph1-beam{ animation:none !important }
}

/* ==========================================================================
   FULL-PAGE HERO (optional) - kicks in when the "Full-Page Hero Layout" field is on
   and adds the .ph1-hero-full class to the section.
   LEFT = brand navy->purple background + purple glow + text.
   RIGHT = image; its left edge blends softly into the background via a mask (no card/hard edge).
   On mobile the layout turns vertical: top ~60% photo, bottom part text on the brand background.
   Rules are ported 1:1 from the Penetration Test page (page-id-259); the only difference
   is the scope: this class instead of the page ID.
   ========================================================================== */
/* ============================================================================
   HERO (SPLIT — pmap.io/careers style, in brand colours):
   LEFT = brand navy->purple background + "spotlit" purple glow + text.
   RIGHT = image; its left edge fades out via mask and blends SOFTLY into the background (NO card/hard
   edge, NO stretch). The theme hero bg (service-detail-hero-bg.webp, 100% 100%
   stretch = source of the "break") is fully overridden.
   Image: sizma-testi.png (absolute URL, in the theme markup). A hi-res file uploaded to the same URL
   is picked up automatically. This page only. */
.service-hero-wrapper.hero-service-detail.ph1-hero-full{
    position:relative !important;
    overflow:hidden;
    min-height:100vh !important;
    height:auto !important;
    max-height:none !important;
    /* fully override the theme hero bg (webp/stretch): purple glow + brand navy->purple background */
    background:
        radial-gradient(72% 85% at 24% 34%, rgba(122,37,202,.40) 0%, rgba(122,37,202,0) 55%),  /* light/glow (brand purple) */
        linear-gradient(115deg, #08112c 0%, #0d1f45 46%, #2b1a5c 100%) !important;               /* brand navy->purple background */
    background-size:auto, cover !important;
    background-position:center, center !important;
    background-repeat:no-repeat !important;
}
/* RIGHT image: FULL HEIGHT (via inset), covers the right side, left edge blends into the background
   via mask. Theme rules (height:356px / max-height:300px / height:auto / max-height:inherit)
   + any inline styles are firmly overridden with !important. */
.service-hero-wrapper.hero-service-detail.ph1-hero-full img.service-detail-hero-right{
    position:absolute !important;
    top:0 !important; bottom:0 !important; right:0 !important; left:auto !important;
    z-index:1 !important;
    width:60% !important; height:100% !important;
    min-width:0 !important; min-height:0 !important;
    max-width:none !important; max-height:none !important;
    margin:0 !important; border-radius:0 !important;
    /* 40%: the hooded "Privia SECURITY" figure melts softly into the background at the left mask edge;
       the "ACCESS GRANTED" monitors stay in the SHARP area on the right. */
    object-fit:cover !important; object-position:40% 50% !important;
    -webkit-mask-image:linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 24%, #000 48%);
            mask-image:linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 24%, #000 48%);
    /* Prevent saving/opening the image via right-click + downloading it by dragging:
       pointer-events:none -> the right-click context menu on the image does not offer "Save/Open image/Copy address"
       (the click goes to the wrapper below). (Not full protection; still accessible via network/source.) */
    pointer-events:none !important;
    -webkit-user-select:none !important; user-select:none !important;
    -webkit-user-drag:none !important; -khtml-user-drag:none !important;
}
/* top scrim: keep the fixed nav readable over the image */
.service-hero-wrapper.hero-service-detail.ph1-hero-full::after{
    content:""; position:absolute; top:0; left:0; right:0; height:200px; z-index:2;
    background:linear-gradient(180deg, rgba(6,10,24,.65) 0%, rgba(6,10,24,0) 100%);
    pointer-events:none;
}


/* CONTAINER must be STATIC: otherwise the containing block of the absolute image becomes the container
   and height:100% = text height -> the image becomes a "band" (this bug happened on red-team).
   Once static, the image's containing block is the HERO -> it fills the full height. */
.service-hero-wrapper.hero-service-detail.ph1-hero-full .service-hero-container{
    position:static !important;
    width:100% !important;
    justify-content:flex-start !important;
    align-items:center !important;
}
/* bring the text ABOVE the image (z1) and the light beams (z2) */
.service-hero-wrapper.hero-service-detail.ph1-hero-full .service-detail-hero-left{
    position:relative !important; z-index:3 !important;
    max-width:600px !important;
}
/* MOBILE (<=1024): FULL-SCREEN HERO (as on desktop). The image covers the WHOLE hero as a background
   (NOT a band); a dark vertical gradient on top (denser at the bottom) -> text stays readable;
   text (badge/title/description/button) at the bottom. z-index: img(1) < overlay(2) < text(5)
   -> otherwise the absolute image covers the static text (bug that occurred). */
@media (max-width:1024px){
    /* Top ~60% PHOTO, bottom edge blends into the BRAND BACKGROUND via mask; bottom part purple-navy
       gradient + glow (desktop background colour) -> text sits on this coloured background. The photo is NOT
       standalone: photo -> corporate colour TRANSITION (vertical counterpart of the desktop hero). */
    .service-hero-wrapper.hero-service-detail.ph1-hero-full{
        min-height:92vh !important; overflow:hidden !important;
        background:
            radial-gradient(90% 60% at 22% 30%, rgba(122,37,202,.55) 0%, rgba(122,37,202,0) 58%),
            radial-gradient(80% 50% at 85% 88%, rgba(105,144,232,.30) 0%, rgba(105,144,232,0) 55%),
            linear-gradient(160deg, #08112c 0%, #14103f 45%, #2b1a5c 100%) !important;
        background-size:cover !important; background-position:center !important; background-repeat:no-repeat !important;
    }
    .service-hero-wrapper.hero-service-detail.ph1-hero-full img.service-detail-hero-right{
        position:absolute !important; top:0 !important; left:0 !important; right:0 !important; bottom:auto !important;
        width:100% !important; height:60% !important;
        object-fit:cover !important; object-position:50% 32% !important;
        -webkit-mask-image:linear-gradient(180deg, #000 0%, #000 58%, transparent 100%) !important;
                mask-image:linear-gradient(180deg, #000 0%, #000 58%, transparent 100%) !important;
        border-radius:0 !important; z-index:1 !important;
    }
    /* top nav scrim + soft darkening from photo to background (transparent middle, dense bottom) */
    .service-hero-wrapper.hero-service-detail.ph1-hero-full::after{
        top:0 !important; left:0 !important; right:0 !important; bottom:0 !important; height:auto !important; z-index:2 !important;
        background:linear-gradient(180deg, rgba(8,17,44,.5) 0%, rgba(8,17,44,.1) 22%, rgba(8,17,44,0) 42%, rgba(20,16,63,.55) 60%, rgba(12,15,58,.9) 82%, rgba(8,17,44,.98) 100%) !important;
    }
    .service-hero-wrapper.hero-service-detail.ph1-hero-full::before{ display:none !important; }
    .service-hero-wrapper.hero-service-detail.ph1-hero-full .service-hero-container{ min-height:92vh !important; position:relative !important; z-index:4 !important; }
    .ph1-hero-full .service-detail-hero-left{
        position:relative !important; z-index:5 !important;
        justify-content:flex-end !important; padding-bottom:7vh !important; max-width:100% !important;
    }
    .ph1-hero-full .service-detail-hero-title,
    .ph1-hero-full .service-detail-hero-description{ text-shadow:0 2px 14px rgba(0,0,0,.5) !important; }
}
