/*
 * Service detail layout (resources/views/front/pages/custom-page/sections/service-detail-layout.blade.php).
 * Editors write plain CKEditor content; these rules give each block its look.
 */
.svc-page {
    --svc-red: #CB0000;
    --svc-red-dark: #9E0000;
    --svc-navy: #2A3040;
    --svc-grey: #F0F0F0;
    --svc-line: #e3e3e3;
    --svc-text: #212529;
    --svc-muted: #3a3f47;
}

.svc-main {
    display: flex;
    flex-direction: column;
    gap: 56px;
    color: var(--svc-text);
    font-size: 16px;
    line-height: 1.7;
    min-width: 0;
}

/* Prose: CKEditor output inside any block */
.svc-prose > * { margin-top: 0; }
.svc-prose p,
.svc-prose ul,
.svc-prose ol { margin: 0 0 16px; text-align: left !important; }
.svc-prose > :last-child,
.svc-prose > :last-child > :last-child { margin-bottom: 0; }
.svc-prose a { color: var(--svc-red); font-weight: 600; }
.svc-prose a:hover { color: var(--svc-red-dark); }
.svc-page .svc-main h2 {
    margin: 0 0 20px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--svc-text);
}
.svc-page .svc-main h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--svc-text);
}

/* Buttons */
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.svc-page .svc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 28px;
    border: 2px solid transparent;
    border-radius: 100px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color .2s, color .2s, border-color .2s;
}
.svc-page .svc-btn:before { content: none; }
.svc-page .svc-btn--primary { background: var(--svc-red); color: #fff; }
.svc-page .svc-btn--primary:hover { background: #8e0000; color: #fff; }
.svc-page .svc-btn--outline { background: #fff; color: var(--svc-navy); border-color: var(--svc-navy); }
.svc-page .svc-btn--outline:hover { background: var(--svc-navy); color: #fff; }
.svc-page .svc-btn--dark { background: var(--svc-navy); color: #fff; }
.svc-page .svc-btn--dark:hover { background: #1b2030; color: #fff; }
.svc-page .svc-btn--light { background: #fff; color: var(--svc-red); font-weight: 800; }
.svc-page .svc-btn--light:hover { background: #ffe9e9; color: var(--svc-red-dark); }
.svc-page .svc-btn--outline-light { background: transparent; color: #fff; border-color: #fff; }
.svc-page .svc-btn--outline-light:hover { background: #fff; color: var(--svc-red); }
.svc-page .svc-btn--block { display: flex; width: 100%; font-size: 15px; min-height: 44px; padding: 10px 20px; }

/* Hero */
.svc-hero { display: flex; flex-direction: column; gap: 20px; }
.svc-page .svc-main .svc-h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--svc-text);
}
.svc-lead { font-size: 18px; color: var(--svc-muted); max-width: 640px; }
.svc-lead p { margin: 0 0 12px; }
.svc-lead > :last-child { margin-bottom: 0; }
.svc-trust {
    background: var(--svc-grey);
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--svc-navy);
    line-height: 1.5;
}
.svc-trust p { margin: 0; }
/* Every item has its own leading dot, so a wrapped line never starts with a stray separator */
.svc-trust ul { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.svc-trust li { display: inline-flex; align-items: center; }
.svc-trust li:before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--svc-red);
}

/* Overview: Content field with its photo */
.svc-overview::after { content: ""; display: table; clear: both; }
.svc-overview img {
    float: right !important;
    width: 42% !important;
    max-width: 360px;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 4px 0 16px 32px !important;
}
.svc-overview h2 { font-size: 24px !important; }

/* Sections */
.svc-section { display: flex; flex-direction: column; }

/* Checklist: bulleted list -> check cards */
.svc-checklist ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    padding: 0;
    list-style: none;
    margin-bottom: 20px;
}
.svc-checklist li {
    position: relative;
    padding: 16px 16px 16px 46px;
    border: 1px solid var(--svc-line);
    line-height: 1.6;
}
.svc-checklist li:before {
    content: "";
    position: absolute;
    left: 14px;
    top: 19px;
    width: 22px;
    height: 22px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23CB0000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.svc-checklist ul + p { font-weight: 600; }

/* Callout */
.svc-callout {
    background: var(--svc-grey);
    border-top: 4px solid var(--svc-navy);
    padding: 32px;
}
.svc-icon-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.svc-icon-heading svg { flex-shrink: 0; }
.svc-page .svc-main .svc-icon-heading h2 { margin: 0; }
.svc-page .svc-main .svc-callout h2 { font-size: 26px; }

/* Cards: H3 + paragraph pairs */
.svc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 0 16px;
}
.svc-card {
    padding: 22px;
    border: 1px solid var(--svc-line);
    border-top: 3px solid var(--svc-red);
}
.svc-card p { font-size: 15px; margin: 0; }

/* Dark band */
.svc-band {
    background: var(--svc-navy);
    color: #e4e6eb;
    padding: 40px 36px;
}
.svc-page .svc-main .svc-band h2 { color: #fff; font-size: 28px; }
.svc-band strong,
.svc-band b { color: #fff; }
.svc-band a:not(.svc-btn) { color: #fff; font-weight: 700; text-decoration: underline; }
.svc-band a:not(.svc-btn):hover { color: #ffd6d6; }
.svc-band .svc-actions { margin-top: 8px; }

/* Numbered steps */
.svc-steps ol { list-style: none; padding: 0; margin: 0; counter-reset: svc-step; }
.svc-steps ol > li {
    counter-increment: svc-step;
    position: relative;
    min-height: 40px;
    padding: 16px 0 16px 58px;
    border-bottom: 1px solid var(--svc-line);
}
.svc-steps ol > li:last-child { border-bottom: 0; }
.svc-steps ol > li:before {
    content: counter(svc-step);
    position: absolute;
    left: 0;
    top: 14px;
    width: 40px;
    height: 40px;
    border-radius: 100px;
    background: var(--svc-red);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reasons: bulleted list -> grey cards, bold text is the title */
.svc-reasons > ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    padding: 0;
    list-style: none;
}
.svc-reasons > ul > li {
    background: var(--svc-grey);
    padding: 22px;
    font-size: 15px;
}
.svc-reasons > ul > li > strong:first-child,
.svc-reasons > ul > li > b:first-child {
    display: block;
    font-size: 17px;
    margin-bottom: 6px;
}

/* Reviews: one blockquote per review */
.svc-reviews {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 4px;
}
.svc-reviews blockquote {
    margin: 0;
    padding: 20px;
    border: 1px solid var(--svc-line);
    font-size: 15px;
}
.svc-reviews blockquote:before {
    content: "\2605\2605\2605\2605\2605";
    display: block;
    color: var(--svc-red);
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.svc-reviews blockquote p { margin: 0 0 8px; }
.svc-reviews blockquote p:last-child { margin: 0; font-weight: 700; }
.svc-reviews blockquote p:only-child { font-weight: 400; }

/* Areas: list of links -> chips */
.svc-areas ul { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.svc-areas li { margin: 0; }
.svc-page .svc-areas li a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--svc-navy);
    border-radius: 100px;
    color: var(--svc-navy);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.svc-page .svc-areas li a:hover { background: var(--svc-navy); color: #fff; }

/* FAQ */
.svc-faq__list { border-top: 2px solid var(--svc-navy); }
.svc-faq__item { padding: 20px 0; border-bottom: 1px solid var(--svc-line); }
.svc-faq__item p { margin: 0 0 8px; }
.svc-faq__item > :last-child,
.svc-faq__item .svc-prose > :last-child { margin-bottom: 0; }

/* Closing CTA */
.svc-cta {
    background: var(--svc-red);
    color: #fff;
    padding: 40px 36px;
    scroll-margin-top: 120px;
}
.svc-page .svc-main .svc-cta h2,
.svc-cta strong,
.svc-cta b { color: #fff; }
.svc-cta a:not(.svc-btn) { color: #fff; font-weight: 700; text-decoration: underline; }
.svc-cta a:not(.svc-btn):hover { color: #ffe0e0; }
.svc-cta .svc-actions { margin-top: 8px; }

/* Sidebar (heading size matches the legacy template's .heading-2) */
.svc-page .svc-sidebar .heading-2 {
    font-size: 1.2em;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 16px;
    color: #212529;
}
.svc-page .svc-sidebar p { margin: 0; }

/* Sidebar: the theme turns every box link into a red pill; scope that back */
.svc-sidebar__buttons { display: flex; flex-direction: column; gap: 12px; max-width: 280px; }
.svc-page .white-box-pull__box-detail .svc-btn { padding: 10px 20px; font-weight: 700; }
.svc-related { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }
/* Each link is a full-width tap target at least 44px tall */
.svc-page .white-box-pull__box-detail .svc-related a {
    display: flex;
    align-items: center;
    min-height: 44px;
    background: none;
    padding: 8px 0;
    border-radius: 0;
    color: var(--svc-red);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    box-sizing: border-box;
}
.svc-page .white-box-pull__box-detail .svc-related a:before { content: none; }
.svc-page .white-box-pull__box-detail .svc-related a:hover { color: var(--svc-red-dark); background: none; text-decoration: underline; }

/* Gallery (same as the legacy template) */
.svc-gallery { padding-left: 0; display: flex; flex-wrap: wrap; list-style: none; gap: 6px; }
.svc-gallery li { height: 25vh; flex-grow: 1; }
.svc-gallery li img { height: 100%; min-width: 100%; object-fit: cover; }

@media (min-width: 992px) {
    /* Room between the card's left edge and the content (the back arrow used to sit here) */
    .svc-main { padding-left: 45px; }
}

@media (max-width: 991px) {
    .svc-main { margin-bottom: 48px; }
    /* Room between the card's red top border and the H1 */
    .svc-hero { padding-top: 28px; }
}

@media (max-width: 767px) {
    .svc-main { gap: 44px; }
    .svc-page .svc-main .svc-h1 { font-size: 30px; }
    .svc-page .svc-main h2 { font-size: 24px; }
    .svc-page .svc-main .svc-callout h2,
    .svc-page .svc-main .svc-band h2 { font-size: 22px; }
    .svc-lead { font-size: 17px; }
    /* Trust strip: one item per line on phones */
    .svc-trust ul { flex-direction: column; gap: 6px; }
    .svc-overview img {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: none;
        margin: 0 0 16px !important;
    }
    .svc-callout,
    .svc-band,
    .svc-cta { padding: 28px 20px; }
    .svc-actions .svc-btn { flex: 1 1 100%; }
    .svc-gallery li { height: 18vh; }
}
