/* =========================================================
   KUANTUM SERVIS V0.7 — UNIFIED PAGE SYSTEM + LEGACY CONTENT REDESIGN
   - One consistent page heading system.
   - Heading sits cleanly under the theme header and uses smaller type.
   - Legacy/source copy is preserved, but its presentation is modernized.
   - One alignment grid across new modules and preserved Avia content.
   - Header/footer remain theme-controlled.
========================================================= */

:root{
    --ks-max:1440px;
    --ks-gutter:clamp(22px,3vw,50px);
    --ks-band-a:#073665;
    --ks-band-b:#0b5f94;
    --ks-band-c:#1381b6;
}

/* ---------- one alignment rule ---------- */
.ks-container,
.ks-modernized-source .container,
.ks-modernized-source .portfolio-page-wrapper{
    width:min(var(--ks-max),calc(100% - (var(--ks-gutter) * 2)))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
}
.ks-modernized-source .container{padding-left:0!important;padding-right:0!important}
.ks-section>.ks-container,
.ks-contact-cta>.ks-container,
.ks-quick-finder>.ks-container,
.ks-finder>.ks-container{max-width:var(--ks-max)!important}

/* ---------- PAGE HEADING: same system everywhere ---------- */
body.ks-v2-page #main,
body.ks-v2-page .container_wrap_first,
body.ks-v2-page .template-page.content,
body.ks-v2-page .entry-content-wrapper{
    margin-top:0!important;
    padding-top:0!important;
}
body.ks-v2-page .container_wrap_first{border-top:0!important}

.ks-page-band{
    position:relative;
    isolation:isolate;
    clear:both;
    width:100vw;
    margin:0 0 54px calc(50% - 50vw)!important;
    overflow:hidden;
    border:0!important;
    border-radius:0 0 30px 30px;
    background:
        radial-gradient(circle at 88% 26%,rgba(93,201,242,.19),transparent 25%),
        linear-gradient(112deg,var(--ks-band-a) 0%,var(--ks-band-b) 64%,var(--ks-band-c) 100%)!important;
    box-shadow:0 18px 46px rgba(5,42,80,.11);
}
.ks-page-band::before{
    content:"";
    position:absolute;
    right:-100px;
    top:-190px;
    width:470px;
    height:470px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:50%;
    box-shadow:0 0 0 52px rgba(255,255,255,.025),0 0 0 104px rgba(255,255,255,.018);
    z-index:-1;
}
.ks-page-band__inner{
    min-height:286px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:52px!important;
    padding-top:70px!important;
    padding-bottom:54px!important;
}
.ks-page-band__copy{max-width:1080px!important;padding-top:4px}
.ks-page-band .ks-eyebrow{
    margin-bottom:15px!important;
    color:#8bd7ff!important;
    font-size:10px!important;
    font-weight:850!important;
    letter-spacing:2.7px!important;
}
.ks-page-band h1{
    max-width:1080px!important;
    margin:0!important;
    color:#fff!important;
    font-size:clamp(40px,3.6vw,58px)!important;
    line-height:1.01!important;
    letter-spacing:-1.45px!important;
    font-weight:760!important;
}
.ks-page-band p{
    max-width:880px!important;
    margin:18px 0 0!important;
    color:rgba(255,255,255,.84)!important;
    font-size:15px!important;
    line-height:1.7!important;
}
.ks-page-band__accent{
    width:150px;
    height:92px;
    flex:0 0 150px;
    position:relative;
    opacity:.75;
}
.ks-page-band__accent i{
    position:absolute;
    right:0;
    display:block;
    height:2px;
    border-radius:3px;
    background:linear-gradient(90deg,rgba(255,255,255,0),rgba(128,221,255,.86));
    transform:rotate(-18deg);
    transform-origin:right center;
}
.ks-page-band__accent i:nth-child(1){top:17px;width:118px}
.ks-page-band__accent i:nth-child(2){top:43px;width:82px}
.ks-page-band__accent i:nth-child(3){top:69px;width:48px}

/* Previous page-hero components, if any remain, visually join the same system. */
body.ks-v2-page .ks-page-hero{
    width:100vw!important;
    margin:0 0 54px calc(50% - 50vw)!important;
    border-radius:0 0 30px 30px!important;
    border:0!important;
    background:linear-gradient(112deg,var(--ks-band-a),var(--ks-band-b) 66%,var(--ks-band-c))!important;
    box-shadow:0 18px 46px rgba(5,42,80,.11)!important;
}
body.ks-v2-page .ks-page-hero>.ks-container{padding-top:70px!important;padding-bottom:54px!important}
body.ks-v2-page .ks-page-hero h1{color:#fff!important;font-size:clamp(40px,3.6vw,58px)!important;line-height:1.01!important}
body.ks-v2-page .ks-page-hero p{color:rgba(255,255,255,.84)!important;font-size:15px!important}
body.ks-v2-page .ks-page-hero .ks-eyebrow{color:#8bd7ff!important}
body.ks-v2-page .ks-page-hero::after{display:none!important}

/* ---------- preserved content: keep the words, replace the old visual system ---------- */
.ks-modernized-source{
    width:100%;
    overflow:hidden;
    background:#fff;
}
.ks-modernized-source .ks-preserved-source{
    width:100%!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
}
.ks-modernized-source .avia-section,
.ks-modernized-source .main_color,
.ks-modernized-source .alternate_color{
    border:0!important;
    box-shadow:none!important;
}
.ks-modernized-source .avia-section{
    padding-top:62px!important;
    padding-bottom:62px!important;
    background-color:#fff!important;
}
.ks-modernized-source .avia-section:nth-of-type(even){background-color:#f7fafc!important}
.ks-modernized-source .avia-section + .avia-section{border-top:1px solid #edf2f5!important}
.ks-modernized-source .content,
.ks-modernized-source .sidebar{padding-top:0!important;padding-bottom:0!important}
.ks-modernized-source .entry-content-wrapper{margin:0!important;padding:0!important}
.ks-modernized-source .flex_column{box-sizing:border-box}
.ks-modernized-source img{
    max-width:100%;
    height:auto;
    border-radius:18px!important;
}
.ks-modernized-source .avia-image-container img,
.ks-modernized-source .av-image-caption-overlay,
.ks-modernized-source .avia_image{
    border-radius:18px!important;
}
.ks-modernized-source .avia-image-container{
    overflow:hidden;
    border-radius:18px!important;
    box-shadow:0 18px 42px rgba(7,54,101,.09);
}
.ks-modernized-source h1,
.ks-modernized-source h2,
.ks-modernized-source h3,
.ks-modernized-source h4,
.ks-modernized-source .av-special-heading-tag{
    font-family:inherit!important;
    color:#073665!important;
    text-transform:none!important;
    letter-spacing:-.02em!important;
}
.ks-modernized-source h1,.ks-modernized-source .av-special-heading-tag.av-special-heading-h1{font-size:clamp(36px,3.1vw,50px)!important;line-height:1.04!important}
.ks-modernized-source h2{font-size:clamp(30px,2.6vw,42px)!important;line-height:1.08!important}
.ks-modernized-source h3{font-size:clamp(23px,2vw,31px)!important;line-height:1.13!important}
.ks-modernized-source p,
.ks-modernized-source li,
.ks-modernized-source .avia_textblock{
    color:#526a7d!important;
    font-family:inherit!important;
    font-size:15px!important;
    line-height:1.78!important;
}
.ks-modernized-source strong{color:#18384f}
.ks-modernized-source .av-subheading{color:#73899a!important;font-family:inherit!important}
.ks-modernized-source .avia-button,
.ks-modernized-source a.avia-button,
.ks-modernized-source .button{
    border:1px solid #073665!important;
    border-radius:10px!important;
    background:#073665!important;
    color:#fff!important;
    box-shadow:none!important;
    font-family:inherit!important;
    font-weight:750!important;
    transition:.2s ease!important;
}
.ks-modernized-source .avia-button:hover,
.ks-modernized-source a.avia-button:hover,
.ks-modernized-source .button:hover{background:#0d74d8!important;border-color:#0d74d8!important;transform:translateY(-1px)}

/* old internal title/breadcrumb pieces should not compete with the new unified heading */
.ks-modernized-source .anabaslikalt,
.ks-modernized-source .title_container,
.ks-modernized-source .breadcrumb,
.ks-modernized-source .breadcrumb-trail{display:none!important}

/* Keep useful intro copy near the top, but turn the old intro row into a clean content strip. */
.ks-modernized-source--service-detail .avia-section:first-of-type,
.ks-modernized-source--project .avia-section:first-of-type{
    padding-top:42px!important;
    padding-bottom:42px!important;
    background:#fff!important;
}
.ks-modernized-source--service-detail .avia-section:first-of-type .flex_column,
.ks-modernized-source--project .avia-section:first-of-type .flex_column{
    padding-top:0!important;
    padding-bottom:0!important;
}

/* Corporate: the old giant hero was presentation, not copy. New band is the hero now. */
.ks-modernized-source--corporate .ks-preserved-source--corporate .avia-section:first-of-type{
    display:none!important;
}
.ks-modernized-source--corporate .avia-section:nth-of-type(2){padding-top:66px!important}
.ks-modernized-source--corporate #baslik,
.ks-modernized-source--corporate .modern-centered{
    max-width:1120px;
    margin-left:auto!important;
    margin-right:auto!important;
    text-align:left!important;
}
.ks-modernized-source--corporate #baslik .av-special-heading-tag,
.ks-modernized-source--corporate .modern-centered .av-special-heading-tag{
    color:#073665!important;
    font-size:clamp(30px,2.7vw,43px)!important;
}
.ks-modernized-source--corporate .mask-outline{
    max-width:1180px;
    min-height:220px;
    margin:24px auto 30px!important;
    display:flex;
    align-items:center;
    padding:34px 46px!important;
    overflow:hidden;
    border-radius:20px!important;
    background-color:#073665!important;
    background-size:cover!important;
    box-shadow:0 18px 42px rgba(7,54,101,.10);
}
.ks-modernized-source--corporate .mask-outline h1{
    margin:0!important;
    color:#fff!important;
    font-size:clamp(54px,8vw,110px)!important;
    line-height:.9!important;
}

/* Service/training/consultancy details: turn inherited layouts into coherent editorial sections. */
.ks-modernized-source--service-detail .av_two_fifth,
.ks-modernized-source--service-detail .av_three_fifth,
.ks-modernized-source--service-detail .av_one_half,
.ks-modernized-source--service-detail .av_one_third,
.ks-modernized-source--service-detail .av_two_third{
    box-sizing:border-box;
}
.ks-modernized-source--service-detail .avia-section:nth-of-type(odd) .flex_column:first-child img{
    box-shadow:0 18px 44px rgba(7,54,101,.10);
}
.ks-modernized-source--service-detail .iconbox,
.ks-modernized-source--service-detail .av-icon-box,
.ks-modernized-source--service-detail .avia-icon-list-container{
    border-radius:16px!important;
}

/* Projects index: override the old 80%-width/5-column template with a modern project gallery. */
.ks-modernized-source--projects .portfolio-page-wrapper{
    padding:66px 0!important;
    background:#fff!important;
}
.ks-modernized-source--projects .portfolio-filter-form{
    gap:12px!important;
    margin-bottom:30px!important;
    padding:18px!important;
    border:1px solid #dce7ef!important;
    border-radius:14px!important;
    background:#f7fafc!important;
}
.ks-modernized-source--projects .portfolio-filter-form button[type="submit"]{
    top:0!important;
    border-radius:9px!important;
    background:#073665!important;
}
.ks-modernized-source--projects .portfolio-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:20px!important;
}
.ks-modernized-source--projects .portfolio-item{
    overflow:hidden!important;
    border:1px solid #dce7ef!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 10px 28px rgba(7,54,101,.06)!important;
    transition:.2s ease!important;
}
.ks-modernized-source--projects .portfolio-item:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(7,54,101,.10)!important}
.ks-modernized-source--projects .portfolio-thumbnail img{width:100%!important;aspect-ratio:16/10;object-fit:cover!important;border-radius:0!important}
.ks-modernized-source--projects .portfolio-info{padding:18px 20px 22px!important}
.ks-modernized-source--projects .portfolio-title{text-align:left!important;text-transform:none!important;color:#073665!important;font-size:18px!important}
.ks-modernized-source--projects .portfolio-summary{color:#687d8e!important;font-size:13px!important}

/* Project detail fallback */
.ks-project-story{background:#fff!important}
.ks-project-story__grid,
.ks-service-story__grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);gap:54px;align-items:center}
.ks-project-story__media,
.ks-service-story__media{overflow:hidden;border-radius:20px;box-shadow:0 18px 42px rgba(7,54,101,.09)}
.ks-project-story__media img,
.ks-service-story__media img{display:block;width:100%;height:100%;max-height:560px;object-fit:cover}
.ks-project-story__copy h2,.ks-service-story__copy h2{margin:0 0 18px!important}
.ks-project-story__copy p{font-size:15px;line-height:1.8;color:#526a7d}

/* Feedback/contact/career source forms keep the old copy but get the same modern form surface. */
.ks-modernized-source--feedback .wpcf7,
.ks-modernized-source--career .wpcf7,
.ks-modernized-source--contact .wpcf7,
.ks-modernized-source--service-application .wpcf7{
    max-width:1180px;
    margin:0 auto;
    padding:34px!important;
    border:1px solid #dce7ef!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 14px 36px rgba(7,54,101,.065)!important;
}
.ks-modernized-source input[type="text"],
.ks-modernized-source input[type="email"],
.ks-modernized-source input[type="tel"],
.ks-modernized-source select,
.ks-modernized-source textarea{
    border:1px solid #cedae4!important;
    border-radius:10px!important;
    background:#fbfdff!important;
    box-shadow:none!important;
}

/* Keep standalone CTA aligned with the exact same site grid. */
.ks-contact-cta__inner{
    width:min(var(--ks-max),calc(100% - (var(--ks-gutter) * 2)))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

@media(max-width:980px){
    .ks-page-band{margin-bottom:42px!important;border-radius:0 0 24px 24px}
    .ks-page-band__inner{min-height:250px!important;padding-top:58px!important;padding-bottom:46px!important}
    .ks-page-band__accent{display:none}
    .ks-page-band h1{font-size:clamp(38px,6vw,52px)!important}
    .ks-modernized-source .avia-section{padding-top:50px!important;padding-bottom:50px!important}
    .ks-modernized-source--projects .portfolio-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .ks-project-story__grid,.ks-service-story__grid{grid-template-columns:1fr;gap:30px}
}

@media(max-width:767px){
    :root{--ks-gutter:18px}
    .ks-page-band{margin-bottom:34px!important;border-radius:0 0 20px 20px}
    .ks-page-band__inner{min-height:220px!important;padding-top:46px!important;padding-bottom:40px!important}
    .ks-page-band .ks-eyebrow{font-size:9px!important;letter-spacing:2.2px!important}
    .ks-page-band h1{font-size:clamp(33px,9.4vw,44px)!important;line-height:1.03!important;letter-spacing:-.8px!important}
    .ks-page-band p{margin-top:14px!important;font-size:13px!important;line-height:1.62!important}
    .ks-modernized-source .avia-section{padding-top:38px!important;padding-bottom:38px!important}
    .ks-modernized-source p,.ks-modernized-source li,.ks-modernized-source .avia_textblock{font-size:14px!important}
    .ks-modernized-source img,.ks-modernized-source .avia-image-container{border-radius:14px!important}
    .ks-modernized-source--corporate .mask-outline{min-height:160px;padding:28px 22px!important;border-radius:16px!important}
    .ks-modernized-source--projects .portfolio-page-wrapper{padding:44px 0!important}
    .ks-modernized-source--projects .portfolio-grid{grid-template-columns:1fr!important}
    .ks-modernized-source--feedback .wpcf7,
    .ks-modernized-source--career .wpcf7,
    .ks-modernized-source--contact .wpcf7,
    .ks-modernized-source--service-application .wpcf7{padding:22px!important;border-radius:14px!important}
}
