/* ==========================================================================
   Casadeer — category page (/services/{slug} and /services/{slug}/{sub})
   Main category: steps bar, subcategory card grid, about panel. Subcategory: article + side image.
   ========================================================================== */

.cd-catpage {
    --cd-cat-green: #00502D;          /* brand green */
    --cd-cat-ivory: #FFF9E8;          /* brand ivory */
    --cd-cat-text: #1A1E1D;
    --cd-cat-muted: #4A4F4D;
    --cd-cat-line: #E3E6E4;
    --cd-cat-font: 'Inter', Helvetica, sans-serif;

    padding-top: 20px;
    padding-bottom: 72px;
    font-family: var(--cd-cat-font);
}

/* ---------- Breadcrumb ---------- */
.cd-catpage__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: var(--cd-cat-font);
    font-size: 14px;
    font-weight: 600;
}

.cd-catpage__crumbs a,
.cd-catpage__crumbs [aria-current] {
    color: var(--cd-cat-green);
    text-decoration: none;
}

.cd-catpage__crumbs a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cd-catpage__crumbs span[aria-hidden] {
    color: var(--cd-cat-muted);
    font-weight: 400;
}

/* ---------- Steps bar (main category): green band, 3 steps side by side ---------- */
.cd-stepbar {
    margin: 0 0 36px;
    padding: 24px 20px;
    border-radius: 6px;
    background-color: var(--cd-cat-green);
    color: var(--cd-cat-ivory);
}

@media (min-width: 768px) {
    .cd-stepbar {
        padding: 28px 32px;
    }
}

.cd-stepbar__title {
    margin: 0 0 20px;
    color: var(--cd-cat-ivory);
    font-family: var(--cd-cat-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.cd-stepbar__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .cd-stepbar__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;
    }
}

.cd-stepbar__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.cd-stepbar__item::before,
.cd-stepbar__item::marker {
    content: none;
}

.cd-stepbar__num {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--cd-cat-ivory);
    color: var(--cd-cat-green);
    font-size: 16px;
    font-weight: 700;
}

.cd-stepbar__name {
    margin: 4px 0 4px;
    color: #FFFFFF;
    font-family: var(--cd-cat-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.cd-catpage .cd-stepbar__text {
    margin: 0;
    padding: 0;
    text-indent: 0;
    color: rgba(255, 249, 232, 0.85);
    font-family: var(--cd-cat-font);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Subcategory cards grid (main category) ---------- */
.cd-subgrid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

@media (min-width: 576px) {
    .cd-subgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .cd-subgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .cd-subgrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

/* desktop: 5 compact cards per row */
@media (min-width: 1200px) {
    .cd-subgrid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }

    .cd-subgrid__body {
        padding: 12px 14px 14px;
    }

    .cd-subgrid__title {
        font-size: 15px;
    }

    .cd-catpage .cd-subgrid__text {
        font-size: 13px;
    }

    .cd-subgrid__btn {
        font-size: 14px;
    }
}

.cd-subgrid__card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--cd-cat-line);
    border-radius: 8px;
    background-color: #FFFFFF;
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.cd-subgrid__card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cd-subgrid__photo {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--cd-cat-ivory);
}

.cd-subgrid__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cd-subgrid__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--cd-cat-green);
    font-size: 40px;
}

.cd-subgrid__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.cd-subgrid__title {
    margin: 0 0 6px;
    font-family: var(--cd-cat-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.cd-subgrid__title a {
    color: var(--cd-cat-text);
    text-decoration: none;
}

.cd-subgrid__title a:hover {
    color: var(--cd-cat-green);
}

.cd-catpage .cd-subgrid__text {
    margin: 0 0 14px;
    padding: 0;
    text-indent: 0;
    color: var(--cd-cat-muted);
    font-family: var(--cd-cat-font);
    font-size: 14px;
    line-height: 1.55;
}

.cd-subgrid__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--cd-cat-green);
    font-family: var(--cd-cat-font);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.cd-subgrid__btn svg {
    transition: transform 200ms ease;
}

.cd-subgrid__btn:hover,
.cd-subgrid__btn:focus {
    color: var(--cd-cat-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cd-subgrid__btn:hover svg {
    transform: translateX(3px);
}

.cd-catpage__empty {
    color: var(--cd-cat-muted);
    font-size: 16px;
}

/* ---------- About this category: ivory panel, optional wide image, text in 2 columns ---------- */
.cd-about {
    margin-top: 56px;
    padding: 28px 20px;
    border-radius: 8px;
    background-color: var(--cd-cat-ivory);
    font-family: var(--cd-cat-font);
}

@media (min-width: 768px) {
    .cd-about {
        padding: 40px 44px;
    }
}

.cd-about__head {
    margin-bottom: 24px;
}

.cd-about__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--cd-cat-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cd-about__title {
    margin: 0;
    color: var(--cd-cat-green);
    font-family: var(--cd-cat-font);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

@media (min-width: 768px) {
    .cd-about__title {
        font-size: 30px;
    }
}

.cd-about__media {
    margin-bottom: 28px;
}

.cd-about__media img {
    display: block;
    width: 100%;
    max-height: 340px;
    object-fit: cover;
    border-radius: 8px;
}

.cd-about__text {
    color: var(--cd-cat-text);
    font-size: 16px;
    line-height: 1.7;
}

@media (min-width: 992px) {
    .cd-about__text {
        column-count: 2;
        column-gap: 48px;
    }
}

.cd-about__text h2,
.cd-about__text h3,
.cd-about__text h4 {
    margin: 22px 0 8px;
    color: var(--cd-cat-green);
    font-family: var(--cd-cat-font);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    break-after: avoid;
}

.cd-about__text > :first-child {
    margin-top: 0;
}

.cd-catpage .cd-about__text p {
    margin: 0 0 14px;
    padding: 0;
    text-indent: 0;
    color: var(--cd-cat-text);
    font-size: 16px;
    line-height: 1.7;
}

.cd-about__text ul,
.cd-about__text ol {
    margin: 0 0 14px;
    padding-left: 22px;
    break-inside: avoid;
}

.cd-catpage .cd-about__text ul > li {
    list-style: disc outside;
}

.cd-catpage .cd-about__text ol > li {
    list-style: decimal outside;
}

.cd-about__text li {
    display: list-item;
    margin-bottom: 6px;
}

.cd-about__text li::before {
    content: none;
}

.cd-about__text a {
    color: var(--cd-cat-green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cd-about__text img {
    max-width: 100%;
    height: auto;
}

/* ---------- Subcategory page: article content (left) + side image (right), TaskRabbit-style ---------- */
.cd-subabout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin: 8px 0 56px;
    font-family: 'Inter', Helvetica, sans-serif;
}

@media (min-width: 992px) {
    .cd-subabout {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 64px;
    }

    .cd-subabout__media {
        position: sticky;
        top: 100px;
        margin-top: 60px;   /* lines up with the first paragraph, under the title */
    }
}

.cd-subabout--text-only {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 860px;
}

.cd-subabout__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.cd-subabout__text {
    color: #1A1E1D;
    font-size: 17px;
    line-height: 1.75;
}

.cd-subabout__text .cd-subabout__title,
.cd-subabout__text h2 {
    margin: 36px 0 18px;
    color: #1A1E1D;
    font-family: 'Inter', Helvetica, sans-serif;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.cd-subabout__text .cd-subabout__title {
    margin-top: 0;
    font-weight: 700;
}

@media (min-width: 768px) {
    .cd-subabout__text .cd-subabout__title,
    .cd-subabout__text h2 {
        font-size: 32px;
    }
}

.cd-subabout__text h3,
.cd-subabout__text h4 {
    margin: 32px 0 14px;
    color: #1A1E1D;
    font-family: 'Inter', Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .cd-subabout__text h3 {
        font-size: 26px;
    }
}

.cd-subabout__text p {
    margin: 0 0 18px;
    padding: 0;
    color: #1A1E1D;
    font-size: 17px;
    line-height: 1.75;
}

.cd-subabout__text ul,
.cd-subabout__text ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.cd-subabout__text ul {
    list-style: disc;
}

.cd-subabout__text ol {
    list-style: decimal;
}

.cd-subabout__text li {
    display: list-item;
    margin: 0 0 6px;
    padding: 0;
    color: #1A1E1D;
    font-size: 17px;
    line-height: 1.6;
}

.cd-subabout__text li::before {
    content: none;   /* theme adds custom markers */
}

.cd-subabout__text strong,
.cd-subabout__text b {
    font-weight: 700;
}

.cd-subabout__text a {
    color: #00502D;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.cd-subabout__text a:hover {
    color: #003B21;
    text-decoration-thickness: 2px;
}

.cd-subabout__text img {
    max-width: 100%;
    height: auto;
}

/* the theme removes list markers globally (li { list-style: none }) — restore them in the article */
.cd-subabout .cd-subabout__text ul > li {
    list-style: disc outside;
}

.cd-subabout .cd-subabout__text ol > li {
    list-style: decimal outside;
}

.cd-subabout .cd-subabout__text li::marker {
    color: #1A1E1D;
}

/* descriptions pasted as plain <div> blocks (no <p>) still get paragraph spacing */
.cd-about__text > div,
.cd-subabout__text > div {
    margin: 0 0 14px;
}

/* ---------- Subcategory page: green "How Casadeer works" band ---------- */
.cd-howsub {
    margin: 16px 0 0;
    padding: 32px 20px 76px;           /* extra bottom room: the book-now card overlaps it */
    background: var(--cd-cat-green);
    border-radius: 24px;
    font-family: var(--cd-cat-font);
}

.cd-howsub .cd-howsub__title {
    margin: 0 0 15px;
    color: #fff;
    font-family: var(--cd-cat-font);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.cd-howsub__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.cd-howsub .cd-howsub__item {
    margin: 0;
    list-style: none;
    text-align: center;
}

/* the theme numbers every "ol li" with a ::before counter — the circle badge already shows it */
.cd-howsub .cd-howsub__item::before {
    content: none;
    counter-increment: none;
    margin: 0;
}

.cd-howsub__badge {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 9px;
    padding: 8px;
    background: var(--cd-cat-ivory);
    border-radius: 50%;
}

.cd-howsub__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* step number sits on the circle's edge */
.cd-howsub__num {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2px solid var(--cd-cat-green);
    border-radius: 50%;
    color: var(--cd-cat-green);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.cd-howsub .cd-howsub__name {
    margin: 0 0 5px;
    color: #fff;
    font-family: var(--cd-cat-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.cd-howsub__text {
    max-width: 220px;
    margin: 0 auto;
    color: var(--cd-cat-ivory);
    font-size: 11.5px;
    line-height: 1.6;
    opacity: .9;
}

@media (min-width: 768px) {
    .cd-howsub {
        padding: 40px 32px 92px;
    }

    .cd-howsub__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }
}

/* ---------- Subcategory page: white "book now" card, photo left, overlapping the green band ---------- */
.cd-readysub {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    max-width: 1000px;
    margin: -46px auto 19px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .12);
    font-family: var(--cd-cat-font);
}

.cd-readysub__media img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.cd-readysub__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 26px 22px 29px;
}

.cd-readysub .cd-readysub__title {
    margin: 0 0 10px;
    color: var(--cd-cat-text);
    font-family: var(--cd-cat-font);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.cd-readysub__text {
    margin: 0 0 19px;
    color: var(--cd-cat-muted);
    font-size: 17px;
    line-height: 1.6;
}

.cd-readysub__btn,
.cd-readysub__btn:visited {
    display: inline-block;
    padding: 10px 26px;
    background: var(--cd-cat-green);
    border-radius: 999px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.cd-readysub__btn:hover,
.cd-readysub__btn:focus-visible {
    background: #003B21;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .cd-readysub {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        margin-top: -56px;
    }

    /* wider crop keeps the card short (about 20% less than the photo's own ratio) */
    .cd-readysub__media img {
        aspect-ratio: 5 / 3;
        min-height: 256px;
    }

    .cd-readysub__body {
        padding: 32px 38px;
    }

    .cd-readysub .cd-readysub__title {
        font-size: 32px;
    }
}
