html {
    scroll-behavior: smooth;
}

/*  Page background  */
.box {
    background: #f0f4f9;
    padding: 2rem;
    border-radius: 12px;
}

/*  Brand colours  */
:root {
    --build-colour:  #295ca8;
    --create-colour: #e8426e;
    --grow-colour:   #2a9d5c;
    --enjoy-colour:  #e07b1a;
}

/*  Hide HR divider rows (were 3,6,9,12 — now 4,7,10,13)  */
.widget-row:nth-of-type(4),
.widget-row:nth-of-type(7),
.widget-row:nth-of-type(10),
.widget-row:nth-of-type(13) {
    display: none;
}

/*  Fix text colour and size  */
.widget-row p,
.widget-row li,
.widget-row .editor p,
.widget-row .widget-content p,
.case-study-card-build p {
    color: #1a1a1a !important;
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
}

/* ── Section navigation buttons (row 1) ─────────────── */
.widget-row:nth-of-type(1) {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 2rem;
}

.casestudy-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.casestudy-nav__btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s ease;
}

.casestudy-nav__btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* ── Scroll offset for section anchors ──────────────── */
#build-section,
#create-section,
#grow-section,
#enjoy-section {
    scroll-margin-top: 250px;
}

.casestudy-nav__btn--build  { background: var(--build-colour); }
.casestudy-nav__btn--create { background: var(--create-colour); }
.casestudy-nav__btn--grow   { background: var(--grow-colour); }
.casestudy-nav__btn--enjoy  { background: var(--enjoy-colour); }

.casestudy-nav__btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    text-transform: uppercase;
}

.casestudy-nav__btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}


/*
   BUILD — row 2 (heading) + row 3 (content + image)
*/

/* BUILD heading row */
.widget-row:nth-of-type(2) {
    background: #fff;
    border-top: 5px solid var(--build-colour);
    border-left: 1px solid #d0dff5;
    border-right: 1px solid #d0dff5;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(41, 92, 168, 0.08);
    padding: 3.5rem 2.5rem 0 0.5rem;
    margin-bottom: 0;
    position: relative;
}

/* BUILD badge */
.widget-row:nth-of-type(2)::before {
    content: 'BUILD';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: var(--build-colour);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
}

/* BUILD heading text */
.widget-row:nth-of-type(2) .widget__heading {
    color: var(--build-colour) !important;
    font-size: 1.8rem;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Remove empty editor gap in heading row */
.widget-row:nth-of-type(2) .editor {
    display: none;
}

/* BUILD content + image row */
.widget-row:nth-of-type(3) {
    background: #fff;
    border-left: 1px solid #d0dff5;
    border-right: 1px solid #d0dff5;
    border-bottom: 1px solid #d0dff5;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(41, 92, 168, 0.08);
    padding: 1.5rem 2.5rem 2.5rem;
    margin-bottom: 2rem;
}

/* BUILD image full height */
.widget-row:nth-of-type(3) .widget-width--30 {
    display: flex;
    flex-direction: column;
}

.widget-row:nth-of-type(3) .widget-image,
.widget-row:nth-of-type(3) .widget--image {
    flex-direction: column;
    display: flex;
    flex: 1;
}

.widget-row:nth-of-type(3) .widget-image img {
    flex: 1;
    height: 100% !important;
    min-height: 400px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
}


/*
   CREATE — row 5 (heading) + row 6 (content + image)
*/

/* CREATE heading row */
.widget-row:nth-of-type(5) {
    background: #fff;
    border-top: 5px solid var(--create-colour);
    border-left: 1px solid #fae0e6;
    border-right: 1px solid #fae0e6;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(232, 66, 110, 0.08);
    padding: 3.5rem 2.5rem 0.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
    position: relative;
}

/* CREATE badge */
.widget-row:nth-of-type(5)::before {
    content: 'CREATE';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: var(--create-colour);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
}

/* CREATE heading text */
.widget-row:nth-of-type(5) .widget__heading {
    color: var(--create-colour) !important;
    font-size: 1.8rem;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Remove empty editor gap */
.widget-row:nth-of-type(5) .editor {
    display: none;
}

/* CREATE content + image row */
.widget-row:nth-of-type(6) {
    background: #fff;
    border-left: 1px solid #fae0e6;
    border-right: 1px solid #fae0e6;
    border-bottom: 1px solid #fae0e6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(232, 66, 110, 0.08);
    padding: 1.5rem 2.5rem 2.5rem;
    margin-bottom: 2rem;
}

.widget-row:nth-of-type(6) .widget--image,
.widget-row:nth-of-type(6) .widget-image {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.widget-row:nth-of-type(6) .widget-image img {
    flex: 1;
    height: 100% !important;
    min-height: 400px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
}


/*
   GROW — row 8 (heading) + row 9 (content + image)
*/

/* GROW heading row */
.widget-row:nth-of-type(8) {
    background: #fff;
    border-top: 5px solid var(--grow-colour);
    border-left: 1px solid #d4f0e2;
    border-right: 1px solid #d4f0e2;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(42, 157, 92, 0.08);
    padding: 3.5rem 2.5rem 0.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
    position: relative;
}

/* GROW badge */
.widget-row:nth-of-type(8)::before {
    content: 'GROW';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: var(--grow-colour);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
}

/* GROW heading text */
.widget-row:nth-of-type(8) .widget__heading {
    color: var(--grow-colour) !important;
    font-size: 1.8rem;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Remove empty editor gap */
.widget-row:nth-of-type(8) .editor {
    display: none;
}

/* GROW content + image row */
.widget-row:nth-of-type(9) {
    background: #fff;
    border-left: 1px solid #d4f0e2;
    border-right: 1px solid #d4f0e2;
    border-bottom: 1px solid #d4f0e2;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(42, 157, 92, 0.08);
    padding: 1.5rem 2.5rem 2.5rem;
    margin-bottom: 2rem;
}

.widget-row:nth-of-type(9) .widget--image,
.widget-row:nth-of-type(9) .widget-image {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.widget-row:nth-of-type(9) .widget-image img {
    flex: 1;
    height: 100% !important;
    min-height: 400px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
}


/*
   ENJOY — row 11 (heading) + row 12 (content + image)
*/

/* ENJOY heading row */
.widget-row:nth-of-type(11) {
    background: #fff;
    border-top: 5px solid var(--enjoy-colour);
    border-left: 1px solid #faebd4;
    border-right: 1px solid #faebd4;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 20px rgba(224, 123, 26, 0.08);
    padding: 3.5rem 2.5rem 0.5rem;
    margin-top: 2rem;
    margin-bottom: 0;
    position: relative;
}

/* ENJOY badge */
.widget-row:nth-of-type(11)::before {
    content: 'ENJOY';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: var(--enjoy-colour);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
}

/* ENJOY heading text */
.widget-row:nth-of-type(11) .widget__heading {
    color: var(--enjoy-colour) !important;
    font-size: 1.8rem;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2;
}

/* Remove empty editor gap */
.widget-row:nth-of-type(11) .editor {
    display: none;
}

/* ENJOY content + image row */
.widget-row:nth-of-type(12) {
    background: #fff;
    border-left: 1px solid #faebd4;
    border-right: 1px solid #faebd4;
    border-bottom: 1px solid #faebd4;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(224, 123, 26, 0.08);
    padding: 1.5rem 2.5rem 2.5rem;
    margin-bottom: 2rem;
}

.widget-row:nth-of-type(12) .widget--image,
.widget-row:nth-of-type(12) .widget-image {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.widget-row:nth-of-type(12) .widget-image img {
    flex: 1;
    height: 100% !important;
    min-height: 400px;
    width: 100%;
    object-fit: cover;
    object-position: top center;
}

/*  All images consistent  */
.widget-row img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    width: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/*  Responsive  */
@media screen and (max-width: 768px) {
    .box {
        padding: 1rem;
    }

    .casestudy-nav {
        gap: 0.6rem;
    }

    
    #build-section,
    #create-section,
    #grow-section,
    #enjoy-section {
        scroll-margin-top: 120px;
    }


    .widget-row:nth-of-type(2),
    .widget-row:nth-of-type(3),
    .widget-row:nth-of-type(5),
    .widget-row:nth-of-type(6),
    .widget-row:nth-of-type(8),
    .widget-row:nth-of-type(9),
    .widget-row:nth-of-type(11),
    .widget-row:nth-of-type(12) {
        padding: 1.5rem 1rem;
    }

    /* Keep badge space on heading rows */
    .widget-row:nth-of-type(2),
    .widget-row:nth-of-type(5),
    .widget-row:nth-of-type(8),
    .widget-row:nth-of-type(11) {
        padding-top: 3.5rem;
    }

    .widget-row img {
        height: 220px;
        margin-bottom: 1rem;
    }

    .widget-row:nth-of-type(2) .widget__heading,
    .widget-row:nth-of-type(5) .widget__heading,
    .widget-row:nth-of-type(8) .widget__heading,
    .widget-row:nth-of-type(11) .widget__heading {
        font-size: 1.4rem;
    }

    /* Stack image below text on mobile */
    .widget-row:nth-of-type(3) .widget-width--30,
    .widget-row:nth-of-type(6) .widget-width--29,
    .widget-row:nth-of-type(9) .widget-width--30,
    .widget-row:nth-of-type(12) .widget-width--30 {
        width: 100% !important;
        margin-top: 1rem;
    }
}