/* Split service introduction. Page-specific photos are supplied by the existing template. */
.main__content .block.block_is_main:has(> .block__inner h1) {
    display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    position: relative; isolation: isolate; overflow: hidden;
    padding: 0; border: 0; border-radius: 16px; background: #12263f;
    color: #eff5fc;
}
.main__content .block.block_is_main:has(> .block__inner h1)::after {
    content: ""; display: block; grid-column: 2; grid-row: 1;
    background: #e4ebee var(--service-photo, url("../../uploads/workbench-repair.webp")) center / cover no-repeat;
    pointer-events: none;
}
.main__content .block.block_is_main:has(h1) > .block__inner {
    grid-column: 1; grid-row: 1; align-self: center;
    width: auto; max-width: none; min-width: 0; box-sizing: border-box;
    padding: clamp(18px, 2.2vw, 36px); background: transparent; overflow-wrap: anywhere;
}
.main__content .block_is_main:has(h1) :is(.block__title,.block__subtitle,.block__text,.block__cols) {
    width: auto; max-width: 100%; color: #e4edf7; text-shadow: none;
}
.main__content .block_is_main:has(h1) .block__cols { display: flex; flex-wrap: wrap; gap: 8px; }
.main__content .block_is_main:has(h1) .block__col { width: auto; max-width: 100%; }
.main__content .block_is_main:has(h1) :is(h1,h1 b,.block__text p,.block__text li,.block__price-title,.block__price-price) { color: #f4f8fc; text-shadow: none; }
.main__content .block_is_main h1 { font-size: clamp(24px, 2.35vw, 37px); line-height: 1.25; margin: 0 0 14px; }
.main__content .block_is_main .block__text a:not([class]) { color: #a8ddff; }
.main__content .win-intro { position: relative; isolation: isolate; }
@media (max-width: 780px) {
    .main__content .block.block_is_main:has(> .block__inner h1) { grid-template-columns: minmax(0,1fr); }
    .main__content .block.block_is_main:has(> .block__inner h1)::after {
        position: absolute; inset: 0; z-index: -1; opacity: .26; grid-area: auto;
    }
    .main__content .win-intro img { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; opacity: .28; }
}

/* Introductions on public pages with their own layouts. Keep artwork out of the text and focus order. */
.feature-hardware { --feature-art: url("../../uploads/service-photos/hardware.webp"); }
.feature-repair { --feature-art: url("../../uploads/workbench-repair.webp"); }
.feature-browser { --feature-art: url("../../uploads/service-photos/browser.webp"); }
.feature-computer { --feature-art: url("../../uploads/windows-laptop.webp"); }
.feature-tv { --feature-art: url("../../uploads/service-photos/television.webp"); }
body .service-feature {
    position: relative; isolation: isolate; box-sizing: border-box;
    min-width: 0; max-width: 100%; padding: 22px calc(34% + 18px) 22px 22px;
    border-radius: 16px; background: #12263f; color: #f4f8fc;
    overflow-wrap: anywhere;
}
body .service-feature::before {
    content: ""; position: absolute; z-index: -1; inset: 0 0 0 66%;
    border-radius: 0 16px 16px 0; pointer-events: none;
    background: #233c52 var(--feature-art) center / cover no-repeat;
}
body .service-feature h1 { color: #fff; line-height: 1.25; }
body .service-feature :is(.sp-banner__text,.neo-product,.header-text) { min-width: 0; }
body .service-feature .neo-product { flex-wrap: wrap; }
body .service-feature .post-meta { color: #e4edf7; }
@media (max-width: 780px) {
    body .service-feature { padding: 18px; }
    body .service-feature::before { inset: 0; border-radius: inherit; opacity: .25; }
}
/* Pan the crop once; preserve the photo opacity and the position of the content. */
@keyframes service-photo-pan {
    from { background-position: 46% 48%; }
    to { background-position: 54% 52%; }
}
@keyframes service-image-pan {
    from { object-position: 46% 48%; }
    to { object-position: 54% 52%; }
}
@media (prefers-reduced-motion: no-preference) {
    .main__content .block.block_is_main:has(> .block__inner h1)::after,
    body .service-feature::before { animation: service-photo-pan 10s ease-in-out both; }
    .main__content .win-intro img { animation: service-image-pan 10s ease-in-out both; }
}


/* Full content is the fallback when JavaScript or native dialogs are unavailable. */
.main__content .block.block_is_main:has(> .block__inner h1), .main__content .win-intro {
    grid-template-columns: minmax(0,3fr) minmax(0,2fr);
}
.main__content .service-card-copy { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.main__content .service-card-copy h1 { margin: 0 0 10px; font-size: clamp(21px,2vw,30px); line-height: 1.23; }
.service-card-copy .service-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; margin: 0; line-height: 1.5; color: #e4edf7; }
.main__content .service-card-copy .service-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.service-controls :is(a,button), .service-dialog button { font: inherit; font-size: 14px; font-weight: 700; line-height: 1.25; border-radius: 7px; padding: 9px 12px; cursor: pointer; }
.main__content .service-controls a { background: white; color: #102540 !important; text-decoration: none; }
.service-controls button { color: white; background: transparent; border: 1px solid #aebed0; }
.service-card-copy [hidden] { display: none !important; }
.main__content .block.block_is_main:has(> .service-card-copy) > .service-card-copy,
.main__content .win-intro .service-card-copy { padding: 18px; box-sizing: border-box; }
.main__content :is(.win-intro,.block_is_main):has(> .service-card-copy) { min-height: 304px; }
.service-dialog { box-sizing: border-box; width: min(92vw,640px); max-height: 85vh; max-height: 85dvh; overflow: auto; border: 0; border-radius: 14px; padding: 0 22px 22px; color: #162d44; background: white; }
.service-dialog::backdrop { background: rgb(9 24 40 / .72); }
.service-dialog header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; background: white; border-bottom: 1px solid #cfdae4; }
.service-dialog h2 { margin: 0; font-size: 21px; }
.service-dialog button { background: #ebf2f7; border: 0; color: #162d44; }
.service-dialog .service-original { padding-top: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.service-dialog :is(img,iframe,table) { max-width: 100%; }
.service-dialog .block__cols { display: flex; flex-wrap: wrap; gap: 8px; }
@media(max-width:780px) {
    .main__content .block.block_is_main:has(> .block__inner h1), .main__content .win-intro { grid-template-columns: minmax(0,1fr); }
    .main__content :is(.win-intro,.block_is_main):has(> .service-card-copy) { min-height: 272px; }
}

/* Locally hosted Unsplash covers share the crop and motion of the Windows introduction. */
.main__content .block.block_is_main:has(> .service-cover)::after { display: none; }
.main__content .block_is_main > .service-cover {
    position: absolute; inset: 0 0 0 auto; display: block; pointer-events: none;
    width: 40%; height: 100%; max-width: none; object-fit: cover;
}
@media (max-width: 780px) {
    .main__content .block_is_main > .service-cover { inset: 0; width: 100%; z-index: -1; opacity: .26; }
}
@media (prefers-reduced-motion: no-preference) {
    .main__content .block_is_main > .service-cover { animation: service-image-pan 10s ease-in-out both; }
}
.main__content .service-card-copy :is(.service-excerpt,.block__subtitle,.block__text p,.block__text li),
.main__content .win-intro-copy > .service-original p { font-size: 15px; line-height: 1.45; }
.main__content .service-excerpt { -webkit-line-clamp: 6; }
.main__content :is(.service-controls,.win-actions) a:is(:hover,:focus-visible),
.service-dialog button:is(:hover,:focus-visible) { background-color: #d6eaff; color: #102540; }
.main__content .service-controls button:is(:hover,:focus-visible) { background-color: #304e70; border-color: #c8e4ff; }
.main__content .service-card-copy .block__button-wrapper a:is(:hover,:focus-visible) { filter: brightness(.9); }
:is(.service-card-copy,.service-dialog) :is(a,button):focus-visible { outline: 3px solid #ffce69; outline-offset: 2px; }

/* Keep the photo inside its column while slowly zooming in and out. */
@keyframes service-cover-drift {
    0%, 100% { transform: scale(1); clip-path: inset(0); }
    50% { transform: scale(1.10); clip-path: inset(4.5455%); }
}
@media (prefers-reduced-motion: no-preference) {
    .main__content .block_is_main > .service-cover,
    .main__content .win-intro img { animation: service-cover-drift 10s ease-in-out infinite; }
}

.main__content .block.reinstall-hero:has(> .block__inner h1) {
    background: linear-gradient(148deg, #102446 4%, #17477a 43%, #136370 82%, #105968);
    border: 1px solid #295578;
}
.main__content .reinstall-hero.block_is_main :is(h1,h1 b,.service-excerpt,.block__subtitle,.block__text,.block__text p,.block__price-title,.block__price-price) { color: #f4f8ff; }
.main__content .reinstall-hero .service-controls a { background: #e4f0fb; }
.main__content .reinstall-hero .service-controls button { color: #fff; }
.main__content .reinstall-hero .service-controls :is(a,button):is(:hover,:focus-visible) { background: #c8e2f8; color: #123351; }
.reinstall-words { display: grid; margin: 0 0 12px; color: #ad263a; font-size: 19px; font-weight: 700; line-height: 1.45; }
.reinstall-words span { grid-area: 1 / 1; width: max-content; opacity: 0; }
.reinstall-words span:nth-child(1) { color: #a8ddff; }
.reinstall-words span:nth-child(2) { color: #ffbec8; }
.reinstall-words span:nth-child(3) { color: #a2efd1; }
.reinstall-words span:nth-child(4) { color: #e1c2ff; }
.reinstall-words span.current-word, .reinstall-words:not(:has(.current-word)) span:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    .reinstall-words span { transition: opacity .22s ease; }
}
.main__content .block.block_is_main:has(> .service-cover),
.main__content .win-intro { background: linear-gradient(115deg,#11253f,#193954 59%,#20455c); }
@media (max-width: 780px) {
    .main__content .block.reinstall-hero > .service-cover { opacity: .16; }
}
.service-next-photo {
    position: absolute; z-index: 1; inset: 0 0 0 auto; width: 40%; overflow: hidden;
    padding: 0; border: 0; background: transparent; cursor: pointer;
}
.service-next-photo:focus-visible { outline: 3px solid #ffce69; outline-offset: -4px; }
.main__content .service-next-photo > img {
    position: absolute; inset: 0; z-index: auto; display: block; width: 100%; height: 100%;
    object-fit: cover; animation: none; pointer-events: none;
}
.service-next-photo::after {
    content: '›'; position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px;
    border-radius: 50%; background: #12263fbf; color: white; font: 24px/26px sans-serif;
}
@media (max-width: 780px) {
    .service-next-photo { inset: 0; width: 100%; z-index: 0; }
    .main__content :is(.win-intro,.block_is_main):has(> .service-next-photo) > :is(.win-intro-copy,.block__inner) {
        position: relative; z-index: 1; pointer-events: none;
    }
    .main__content .service-card-copy :is(a,button,input,select,textarea) { pointer-events: auto; }
}

.main__content .block.reinstall-plain:has(> .block__inner h1) {
    background: #fff;
    border-color: #c3dbea;
}
.main__content .reinstall-plain.block_is_main :is(h1,h1 b,.service-excerpt,.block__subtitle,.block__text,.block__text p,.block__text li,.block__price-title,.block__price-price) { color: #14334b; }
.main__content .reinstall-plain .service-controls button { color: #173e60; }
.main__content .reinstall-plain .block__text a:not([class]) { color: #15558c; }
.reinstall-plain .reinstall-words span:nth-child(1) { color: #0b5ba1; }
.reinstall-plain .reinstall-words span:nth-child(2) { color: #ac3540; }
.reinstall-plain .reinstall-words span:nth-child(3) { color: #15634c; }
.reinstall-plain .reinstall-words span:nth-child(4) { color: #703a93; }

@keyframes service-blue-drift {
    0%, 100% { background-position: 0% 35%; }
    50% { background-position: 100% 65%; }
}
@media (min-width: 781px) and (hover: hover) and (pointer: fine) {
    .main__content .block.block_is_main:not(.reinstall-plain):has(> .block__inner h1),
    .main__content .win-intro {
        background-image: linear-gradient(112deg, #102544 6%, #174576 25%, #08627b 38%, #245397 50%, #122b50 68%, #125466 90%);
        background-size: 225% 155%;
    }
    @media (prefers-reduced-motion: no-preference) {
        .main__content .block.block_is_main:not(.reinstall-plain):has(> .block__inner h1),
        .main__content .win-intro {
            animation: service-blue-drift 20s ease-in-out -3s infinite;
        }
    }
}

@media (hover: hover) and (pointer: fine) {
    body :is(.header__phone-link,.call-button,.it-button_online,.service-controls a,.win-actions a) {
        transition: background-color .28s ease, color .28s ease, border-color .28s ease,
                    box-shadow .28s ease, filter .28s ease, translate .28s ease;
    }
    body :is(.header__phone-link,.call-button,.it-button_online,.service-controls a,.win-actions a):is(:hover,:focus-visible) {
        box-shadow: 0 4px 12px rgb(9 48 79 / .22);
        filter: brightness(1.04);
    }
    @media (prefers-reduced-motion: no-preference) {
        body :is(.header__phone-link,.call-button,.it-button_online,.service-controls a,.win-actions a):hover {
            translate: 0 -1px;
        }
    }
}
