/* =====================================================================
   Dream Clean Services - Global styles
   Tokens, resets, base, header, nav, footer, buttons.
   ===================================================================== */

/* Load Manrope (body + hero + intro + services) and Sora (main nav + footer). */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap');

/* ---------- 1. Design tokens ---------- */

:root {
    /* Brand */
    --brand:        #4CAF50;   /* primary green */
    --brand-dark:   #43a047;   /* hover / active */

    /* Neutrals */
    --charcoal:     #1a1a1a;   /* headers, dark sections */
    --black:        #000000;   /* deepest black */
    --ink:          #2a2a2a;   /* body text */
    --muted:        #6b6b6b;   /* secondary text, meta */
    --grey:         #f5f5f5;   /* soft section background */
    --grey-line:    #e0e0e0;   /* hairlines and borders */
    --white:        #ffffff;

    /* Rhythm */
    --maxw:         1280px;
    --gutter:       clamp(1.25rem, 4vw, 3rem);
    --section-y:    clamp(3.5rem, 8vw, 6.5rem);
    --radius:       10px;
    --radius-lg:    18px;
    --shadow-sm:    0 4px 18px rgba(0,0,0,0.06);
    --shadow-md:    0 14px 40px rgba(0,0,0,0.12);
    --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Type */
    --font-head:    'Manrope', system-ui, -apple-system, sans-serif;
    --font-body:    'Manrope', system-ui, -apple-system, sans-serif;
    --font-nav:     'Sora', system-ui, -apple-system, sans-serif;   /* main nav + footer */
}

/* ---------- 2. Reset + base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.95rem + 0.15vw, 1.0625rem);
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--charcoal);
    line-height: 1.2;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); }

/* Headings inside main nav + footer use the nav font (Sora), not --font-head */
.dcs-mainbar h1, .dcs-mainbar h2, .dcs-mainbar h3,
.dcs-mainbar h4, .dcs-mainbar h5, .dcs-mainbar h6,
.dcs-footer h1, .dcs-footer h2, .dcs-footer h3,
.dcs-footer h4, .dcs-footer h5, .dcs-footer h6 {
    font-family: inherit;
}

p { margin: 0 0 1em; }

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--grey-line);
    text-underline-offset: 3px;
    transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
a:hover, a:focus {
    color: var(--brand-dark);
    text-decoration-color: var(--brand);
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- 3. Container + section rhythm ---------- */

.dcs-container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section         { padding-block: var(--section-y); background: var(--white); }
.section--grey   { padding-block: var(--section-y); background: var(--grey); }
.section--dark   { padding-block: var(--section-y); background: var(--charcoal); color: var(--white); }

.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark a { color: var(--white); text-decoration-color: rgba(255,255,255,0.35); }
.section--dark a:hover { color: var(--brand); text-decoration-color: var(--brand); }

/* ---------- 4. Buttons ---------- */

.dcs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.5em;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    color: var(--white);
    background: var(--brand);
    border: 0;
    border-radius: var(--radius);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.dcs-btn:hover, .dcs-btn:focus {
    background: var(--brand-dark);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.dcs-btn--light {
    background: var(--white); color: var(--charcoal);
}
.dcs-btn--light:hover, .dcs-btn--light:focus {
    background: var(--grey); color: var(--charcoal);
}
/* Solid charcoal button - the light-background counterpart to .dcs-btn--outline
   (which is designed for dark backgrounds). Use as a secondary CTA anywhere the
   background is white or light grey */
.dcs-btn--dark {
    background: var(--charcoal); color: var(--white);
}
.dcs-btn--dark:hover, .dcs-btn--dark:focus {
    background: #000; color: var(--white);
}
.dcs-btn--outline {
    background: transparent; color: var(--white);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.dcs-btn--outline:hover, .dcs-btn--outline:focus {
    background: var(--white); color: var(--charcoal);
    box-shadow: inset 0 0 0 2px var(--white);
}
.dcs-btn--sm { padding: 0.6em 1.1em; font-size: 0.85rem; }
.dcs-btn--lg { padding: 1em 1.75em; font-size: 1rem; }
.dcs-btn--block { display: flex; width: 100%; }

/* ---------- 4a. Reusable heading utilities ---------- */

/* Small pill sitting above a section heading */
.dcs-eyebrow {
    display: block;
    width: fit-content;
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 1rem;
    padding: 0.4rem 0.9rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 999px;
}

/* Section heading with a short brand-green rule beneath */
.dcs-heading-underlined {
    color: var(--charcoal);
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    margin: 0 0 1rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    display: inline-block;
    position: relative;
    padding-bottom: 0.85rem;
}
.dcs-heading-underlined::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: var(--brand);
    border-radius: 2px;
}
.dcs-heading-underlined--centred::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ---------- 4b. Shared form styles (Careers, Contact, Quote, Book) ---------- */

.dcs-form {
    max-width: 780px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--grey-line);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-sm);
}

/* Two-up row on wider screens */
.dcs-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 620px) {
    .dcs-form__row {
        grid-template-columns: 1fr;
    }
}

.dcs-form__field {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}
.dcs-form__row .dcs-form__field {
    margin-bottom: 0;
}

.dcs-form__label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
}
.dcs-form__label .dcs-form__req {
    color: var(--brand-dark);
    margin-left: 0.15rem;
}
.dcs-form__label .dcs-form__optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.82em;
    margin-left: 0.2rem;
}
/* legible on the dark Book-a-Service wizard */
.dcs-book .dcs-form__label .dcs-form__optional { color: rgba(255, 255, 255, 0.55); }

.dcs-form__input,
.dcs-form__textarea {
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 0.75rem 0.9rem;
    background: var(--white);
    border: 1px solid var(--grey-line);
    border-radius: var(--radius-md);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
    width: 100%;
}
.dcs-form__input:focus,
.dcs-form__textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.dcs-form__textarea {
    resize: none;
    min-height: 240px;
    line-height: 1.55;
}

/* File upload - custom-styled with the native input hidden on top */
.dcs-form__file-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: var(--white);
    border: 1px dashed var(--grey-line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color .18s var(--ease), background .18s var(--ease);
}
.dcs-form__file-wrap:hover {
    border-color: var(--brand);
    background: rgba(76, 175, 80, 0.03);
}
.dcs-form__file-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.dcs-form__file-icon {
    width: 36px;
    height: 36px;
    background: rgba(76, 175, 80, 0.1);
    color: var(--brand-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.dcs-form__file-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}
.dcs-form__file-title {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.95rem;
}
.dcs-form__file-hint {
    color: var(--muted);
    font-size: 0.8rem;
}
/* let the text block shrink so long filenames ellipsis instead of pushing out */
.dcs-form__file-text { flex: 1 1 auto; }
.dcs-form__file-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
/* --- File-upload states (set by dcs-careers.js) --- */
.dcs-form__file-wrap.is-selected {
    border-style: solid;
    border-color: var(--brand);
    background: rgba(76, 175, 80, 0.06);
}
.dcs-form__file-wrap.is-selected .dcs-form__file-icon {
    background: var(--brand);
    color: var(--white);
}
.dcs-form__file-wrap.has-error {
    border-style: solid;
    border-color: #d64545;
    background: rgba(214, 69, 69, 0.05);
}
.dcs-form__file-wrap.has-error .dcs-form__file-icon {
    background: rgba(214, 69, 69, 0.12);
    color: #d64545;
}
.dcs-form__file-wrap.has-error .dcs-form__file-hint {
    color: #d64545;
}
/* Remove/clear button - sits above the invisible file input */
.dcs-form__file-remove {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: var(--charcoal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.dcs-form__file-remove:hover,
.dcs-form__file-remove:focus-visible {
    background: rgba(214, 69, 69, 0.15);
    color: #d64545;
    outline: none;
}

/* Anti-spam honeypot - never visible but reachable by bots */
.dcs-form__honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Submit + note */
.dcs-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-top: 1.5rem;
}
.dcs-form__submit {
    font-family: inherit;
    cursor: pointer;
    border: 0;
}
.dcs-form__note {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

/* Wide form variant - overrides the default 780px cap */
.dcs-form--wide {
    max-width: 960px;
}

/* Dark form variant - form card sits on a dark section.
   Fields keep enough contrast to remain usable. */
.dcs-form--dark {
    background: #0d1613;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.dcs-form--dark .dcs-form__label {
    color: rgba(255, 255, 255, 0.95);
}
.dcs-form--dark .dcs-form__label .dcs-form__req {
    color: var(--brand);
}
.dcs-form--dark .dcs-form__input,
.dcs-form--dark .dcs-form__textarea {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.95);
}
.dcs-form--dark .dcs-form__input::placeholder,
.dcs-form--dark .dcs-form__textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.dcs-form--dark .dcs-form__input:focus,
.dcs-form--dark .dcs-form__textarea:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.22);
}
.dcs-form--dark .dcs-form__note {
    color: rgba(255, 255, 255, 0.65);
}

/* ---------- 4c. Reusable centred section-heading block ---------- */

.dcs-section-heading {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.dcs-section-heading .dcs-eyebrow {
    margin-left: auto;
    margin-right: auto;
}
.dcs-section-heading__lede {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}
/* Dark variant - text colours flip for dark backgrounds */
.dcs-section-heading--dark .dcs-eyebrow {
    color: var(--brand);
    background: rgba(76, 175, 80, 0.2);
}
.dcs-section-heading--dark .dcs-heading-underlined {
    color: var(--white);
}
.dcs-section-heading--dark .dcs-section-heading__lede {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- 4d. Dark-gradient section (reusable full-width dark area) ---------- */

.section--dark-gradient {
    position: relative;
    background:
        linear-gradient(135deg, #0e2617 0%, #1a1a1a 55%, #0f0f0f 100%);
    color: var(--white);
    overflow: hidden;
}
.section--dark-gradient::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 65%;
    height: 160%;
    background: radial-gradient(circle at center, rgba(76, 175, 80, 0.22), transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.section--dark-gradient::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -15%;
    width: 55%;
    height: 110%;
    background: radial-gradient(circle at center, rgba(76, 175, 80, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.section--dark-gradient .dcs-container {
    position: relative;
    z-index: 1;
}

/* ---------- 5. Contextual text links (in body copy) ---------- */

.dcs-link {
    color: inherit;                 /* matches the body text colour */
    font-weight: inherit;           /* not bold like before */
    text-decoration: underline;     /* thin, quiet underline - clearly a link, not loud */
    text-decoration-color: rgba(76, 175, 80, 0.6);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
.dcs-link:hover, .dcs-link:focus {
    color: var(--brand-dark);
    text-decoration-color: var(--brand);
}
.section--dark .dcs-link:hover, .section--dark .dcs-link:focus { color: var(--brand); text-decoration-color: var(--brand); }

/* ---------- 6. Header + Top bar ---------- */

.dcs-header { position: relative; z-index: 50; }

.dcs-topbar {
    background: var(--charcoal);
    color: var(--white);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dcs-topbar .dcs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: clamp(2rem, 3vw, 4rem);
    padding-right: clamp(2rem, 3vw, 4rem);
    max-width: none;
}
.dcs-topbar__social {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; gap: 0.4rem;
}
.dcs-topbar__social a {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 30px; height: 30px;
    color: var(--brand);
    background: transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.dcs-topbar__social a:hover { background: var(--brand); color: var(--white); }

.dcs-topbar__nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.dcs-topbar__nav ul li {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}
.dcs-topbar__nav ul li:not(:last-child)::after {
    content: "|";
    color: rgba(255,255,255,0.3);
    font-weight: 300;
    display: inline-block;
}
.dcs-topbar__nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color .18s var(--ease);
}
.dcs-topbar__nav a i {
    color: var(--brand);
    font-size: 0.95em;
}
.dcs-topbar__nav a:hover,
.dcs-topbar__nav a.is-active { color: var(--brand); }

/* ---------- 7. Main header bar ---------- */

.dcs-mainbar {
    background: var(--white);
    color: var(--charcoal);
    font-family: var(--font-nav);
    border-bottom: 1px solid var(--grey-line);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.dcs-mainbar .dcs-container {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: clamp(2rem, 3vw, 4rem);
    padding-right: clamp(2rem, 3vw, 4rem);
    max-width: none;
}

/* Brand block: live text wordmark + tagline (adapts to any header colour) */
.dcs-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: clamp(1rem, 2vw, 2.5rem);
    line-height: 1;
}
.dcs-brand__name {
    font-family: var(--font-nav);
    font-weight: 800;
    font-style: italic;
    font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--charcoal);
    line-height: 1;
    transition: color .18s var(--ease);
}
.dcs-brand__tag {
    font-family: var(--font-nav);
    font-size: clamp(0.58rem, 0.85vw, 0.72rem);
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.3rem;
    line-height: 1;
}
.dcs-brand:hover { text-decoration: none; }
.dcs-brand:hover .dcs-brand__name { color: var(--brand-dark); }

/* Primary nav — desktop */
.dcs-nav {
    display: flex;
    align-items: center;
    flex: 1;
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
.dcs-nav__close { display: none; }

.dcs-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.4vw, 1.75rem);
    margin: 0; padding: 0;
    flex-wrap: nowrap;
}
.dcs-nav__list > li {
    display: flex;
    align-items: center;
}
.dcs-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--charcoal);
    background: transparent;
    border: 0;
    padding: 0.6em 0.5em;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s var(--ease);
}
.dcs-nav__link:hover,
.dcs-nav__link:focus,
.dcs-nav__link.is-active { color: var(--brand); }

/* Right-side actions: phone + CTA */
.dcs-nav__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
    flex-shrink: 0;
}
.dcs-nav__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--charcoal);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.15;
    flex-shrink: 0;
    white-space: nowrap;
}
.dcs-nav__phone i { color: var(--brand); font-size: 1.15rem; }
.dcs-nav__phone-label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 400;
    white-space: nowrap;
}
.dcs-nav__phone-number {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    white-space: nowrap;
}
.dcs-nav__phone:hover { color: var(--brand); text-decoration: none; }
.dcs-nav__phone:hover i { color: var(--brand-dark); }

/* Header CTA button - default size (bigger than the sm variant) */
.dcs-nav__actions .dcs-btn {
    padding: 0.85em 1.6em;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Hamburger — desktop hidden */
.dcs-nav__toggle {
    display: none;
    background: transparent;
    color: var(--charcoal);
    border: 0;
    padding: 0.5rem;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: auto;
}

/* ---------- 8. Mega menu ---------- */

.dcs-mega {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--white);
    color: var(--ink);
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--brand);
    padding: 2rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    /* Closing: delay 1.5s before starting the fade out (Dan's request - gives users time to travel down into the menu) */
    transition: opacity .2s var(--ease) 1.5s, transform .2s var(--ease) 1.5s, visibility 0s linear 1.7s;
    z-index: 60;
}
.dcs-nav__item.has-mega:hover .dcs-mega,
.dcs-nav__item.has-mega:focus-within .dcs-mega,
.dcs-nav__item.has-mega[aria-expanded="true"] .dcs-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* Opening: immediately, no delay */
    transition: opacity .2s var(--ease) 0s, transform .2s var(--ease) 0s, visibility 0s linear 0s;
}

/* Highlight parent nav link while dropdown is open so users see the trigger stays "active" */
.dcs-nav__item.has-mega:hover > .dcs-nav__link,
.dcs-nav__item.has-mega:focus-within > .dcs-nav__link,
.dcs-nav__item.has-mega[aria-expanded="true"] > .dcs-nav__link {
    color: var(--brand);
}
.dcs-nav__item.has-mega:hover > .dcs-nav__link i,
.dcs-nav__item.has-mega:focus-within > .dcs-nav__link i {
    transform: rotate(180deg);
}
.dcs-nav__link--drop i { font-size: 0.75em; transition: transform .18s var(--ease); }

.dcs-mega__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(2rem, 5vw, 5rem);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}
.dcs-mega__heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--grey-line);
}
.dcs-mega__heading a {
    color: var(--charcoal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.dcs-mega__heading a i {
    color: var(--brand);
    font-size: 0.8em;
    width: 1.7em;
    height: 1.7em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 175, 80, 0.12);
    border-radius: 7px;
    flex-shrink: 0;
}
.dcs-mega__heading a:hover { color: var(--brand-dark); }
.dcs-mega__col ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 0.5rem;
}
.dcs-mega__col a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.32rem 0.6rem;
    margin-left: -0.6rem;
    border-radius: 8px;
    transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.dcs-mega__col a i {
    color: var(--brand);
    font-size: 0.9em;
    width: 1.35em;
    text-align: center;
    flex-shrink: 0;
    transition: color .16s var(--ease);
}
.dcs-mega__col a:hover {
    color: var(--brand-dark);
    background: rgba(76, 175, 80, 0.09);
    transform: translateX(2px);
}

/* ---------- 9. Footer ---------- */

.dcs-footer {
    background: var(--charcoal);
    color: var(--white);
    padding-block: clamp(3rem, 6vw, 5rem);
    font-family: var(--font-nav);
}
.dcs-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: clamp(2.5rem, 4vw, 4.5rem);
}
.dcs-footer__brand-name {
    font-family: inherit;
    font-weight: 800;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--white);
    margin: 0;
}
.dcs-footer__tagline {
    font-size: 0.85rem;
    font-weight: 700;
    font-style: italic;
    color: var(--brand);
    margin: 0.2rem 0 1rem;
}
.dcs-footer__blurb {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
}
.dcs-footer__contact {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.dcs-footer__contact li {
    display: flex; align-items: flex-start; gap: 0.6rem;
    color: rgba(255,255,255,0.85);
}
.dcs-footer__contact i {
    color: var(--brand); width: 1em;
    margin-top: 0.15em;
    flex-shrink: 0;
}
.dcs-footer__contact a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
.dcs-footer__contact a:hover { color: var(--brand); }

.dcs-footer__heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; gap: 0.5rem;
}
.dcs-footer__heading i { font-size: 0.9em; }

.dcs-footer ul.dcs-footer__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 0.5rem;
    font-size: 0.9rem;
}
.dcs-footer__list a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color .18s var(--ease);
}
.dcs-footer__list a:hover { color: var(--brand); }

/* Nested sub-list (e.g. town variants under End Of Tenancy Cleaning) */
.dcs-footer__sublist {
    list-style: none;
    margin: 0.4rem 0 0.6rem 0.5rem;
    padding: 0 0 0 0.75rem;
    border-left: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.82rem;
}
.dcs-footer__sublist a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color .18s var(--ease);
}
.dcs-footer__sublist a:hover { color: var(--brand); }

.dcs-footer__social {
    display: flex; gap: 0.5rem;
    margin-top: 1rem;
}
.dcs-footer__social a {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 34px; height: 34px;
    color: var(--white);
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    text-decoration: none;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.dcs-footer__social a:hover { background: var(--brand); color: var(--white); }

/* Horizontal row of company links - sits between the grid and the copyright to save vertical space */
.dcs-footer__row {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.dcs-footer__row-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 2rem;
    font-size: 0.9rem;
}
.dcs-footer__row-list a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color .18s var(--ease);
    white-space: nowrap;
}
.dcs-footer__row-list a:hover { color: var(--brand); }

.dcs-footer__bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}
.dcs-footer__bottom a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}
.dcs-footer__bottom a:hover { color: var(--brand); }
.dcs-footer__meta { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* Hide the mobile brand block on desktop - only shows inside the overlay menu on mobile */
.dcs-nav__brand-mobile { display: none; }

/* Mobile-only nav items - hidden on desktop (where they live in the top bar).
   Specificity bumped to beat .dcs-nav__list > li which sets display: flex. */
.dcs-nav__list > li.dcs-nav__mobile-only { display: none; }

/* Secondary links group (About/Careers/Blog) - shown only inside the mobile overlay; on desktop these live in the top bar */
.dcs-nav__secondary { display: none; }
.dcs-mega__more { display: none; }

/* ---------- 10. Responsive - primary breakpoint at 900px ---------- */

@media (max-width: 900px) {

    /* Top bar hidden on mobile per s.6 */
    .dcs-topbar { display: none; }
    /* Pin the header on mobile so the logo + menu button follow the user
       down the page - navigation is always one tap away */
    .dcs-header {
        position: sticky;
        top: 0;
        z-index: 60;
    }

    /* Hamburger visible */
    .dcs-nav__toggle {
        display: inline-flex;
        align-items: center;
    }

    /* --- Full-screen overlay --- */
    .dcs-nav {
        position: fixed;
        inset: 0;
        background: var(--charcoal);
        color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 4.5rem 1.25rem 2rem;
        gap: 0;
        margin: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
        z-index: 100;
    }
    .dcs-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    body.nav-open { overflow: hidden; }

    .dcs-nav__close {
        display: inline-flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: transparent;
        color: var(--white);
        border: 0;
        font-size: 1.6rem;
        padding: 0.5rem;
        cursor: pointer;
        z-index: 2;
    }

    /* --- Mobile logo top-middle --- */
    .dcs-nav__brand-mobile {
        display: flex;
        justify-content: center;
        padding: 0 0 1.25rem;
        margin: 0 0 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        flex-shrink: 0;
    }
    .dcs-nav__brand-mobile img {
        height: 56px;
        width: auto;
        display: block;
        max-width: 80%;
    }
    .dcs-nav__brand-mobile { flex-direction: column; align-items: center; }
    .dcs-nav__brand-mobile .dcs-brand__name { color: var(--white); font-size: 1.5rem; }
    .dcs-nav__brand-mobile .dcs-brand__tag { color: rgba(255, 255, 255, 0.55); }
    /* keep the mobile menu exactly as before - hide the new desktop dropdown icons here */
    .dcs-mega__heading a i,
    .dcs-mega__col a i { display: none; }

    /* --- Nav list stacked --- */
    .dcs-nav__list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0;
        list-style: none;
        flex-shrink: 0;
    }
    .dcs-nav__list > li {
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        margin: 0;
    }
    .dcs-nav__list > li:last-child { border-bottom: 0; }
    .dcs-nav__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1rem 0.5rem;
        font-size: 1.1rem;
        color: var(--white);
        background: transparent;
        border: 0;
        text-align: left;
        cursor: pointer;
        font-family: inherit;
        font-weight: 500;
    }
    .dcs-nav__link:hover,
    .dcs-nav__link:focus,
    .dcs-nav__link.is-active {
        color: var(--brand);
    }

    /* --- Mega menu on mobile - flat stacked list, alternating rows --- */
    /* Reset the desktop absolute positioning and hover behaviour */
    .dcs-mega {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        display: none;
        background: transparent !important;
        color: var(--white) !important;
        box-shadow: none !important;
        border-top: 0 !important;
        border-radius: 0 !important;
        padding: 0 0 1rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        z-index: auto !important;
    }
    /* Only show when parent li has aria-expanded="true" (set by JS on click) */
    .dcs-nav__item.has-mega[aria-expanded="true"] > .dcs-mega {
        display: block;
    }
    /* Chevron flip when open */
    /* Chevron follows tap state, not focus-within, so it flips back when you close on mobile */
    .dcs-nav__item.has-mega:focus-within > .dcs-nav__link i { transform: none; }
    .dcs-nav__item.has-mega[aria-expanded="true"] .dcs-nav__link--drop i {
        transform: rotate(180deg);
    }

    .dcs-mega__inner {
        display: block !important;
        grid-template-columns: none !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    .dcs-mega__col {
        display: block;
        margin: 0;
        padding: 0;
    }
    .dcs-mega__col + .dcs-mega__col {
        margin-top: 0.75rem;
    }
    .dcs-mega__heading {
        display: block;
        color: var(--white);
        font-size: 1rem;
        font-weight: 600;
        text-transform: none;
        letter-spacing: 0;
        padding: 0;
        margin: 0.5rem 0 0;
        border-bottom: 0;
    }
    /* First heading (Commercial Cleaning) sits flush against the Services nav item above */
    .dcs-mega__col:first-child .dcs-mega__heading {
        margin-top: 0;
    }
    /* Scoped to .dcs-mega__col so this specificity (0,3,1) wins over .dcs-mega__col a (0,2,1) */
    .dcs-mega__col .dcs-mega__heading a {
        color: var(--white);
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.9rem 1rem;
        font-weight: 600;
        background: rgba(76, 175, 80, 0.12);
        border-left: 3px solid var(--brand);
        border-radius: 6px;
    }
    /* White chevron - clearly visible on the pill whether the category is open or closed */
    .dcs-mega__col .dcs-mega__heading a::after {
        content: "\f078";                    /* fa-chevron-down */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        color: var(--white);
        font-size: 0.8rem;
        opacity: 0.85;
        margin-left: 1rem;
        transition: transform .18s var(--ease), opacity .18s var(--ease);
    }
    .dcs-mega__col .dcs-mega__heading a:hover::after,
    .dcs-mega__col .dcs-mega__heading a:focus::after {
        opacity: 1;
    }
    /* Chevron points down; rotates up when the category is expanded */
    .dcs-mega__col.is-open .dcs-mega__heading a::after {
        transform: rotate(180deg);
        opacity: 1;
    }
    .dcs-mega__col.is-open .dcs-mega__heading a {
        background: rgba(76, 175, 80, 0.20);
    }
    .dcs-mega__col ul {
        display: none;
        margin: 0;
        padding: 0;
        gap: 0;
        list-style: none;
    }
    .dcs-mega__col.is-open ul { display: block; }
    .dcs-mega__col li {
        display: block;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .dcs-mega__col a {
        display: block;
        padding: 0.7rem 1rem 0.7rem 1.85rem;
        color: rgba(255,255,255,0.88);
        text-decoration: none;
        font-size: 0.95rem;
        border-radius: 0;
        border-left: 3px solid transparent;
        transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
    }
    /* Kill the desktop bullet dot inside links */
    .dcs-mega__col a::before {
        content: none !important;
        display: none !important;
    }
    /* Alternating row backgrounds - subtle contrast on charcoal overlay */
    .dcs-mega__col li:nth-child(odd) a  { background: rgba(255,255,255,0.04); }
    .dcs-mega__col li:nth-child(even) a { background: rgba(255,255,255,0.09); }
    .dcs-mega__col a:hover,
    .dcs-mega__col a:focus {
        background: var(--brand);
        color: var(--white);
        border-left-color: var(--white);
    }
    /* "See all <category>" link - brand-coloured, set apart from the sub-services */
    .dcs-mega__more { display: block; }
    .dcs-mega__col .dcs-mega__more a {
        background: transparent;
        color: var(--brand);
        font-weight: 600;
        font-size: 0.9rem;
        padding: 0.65rem 1rem 0.9rem 1.85rem;
        border-left-color: transparent;
    }
    .dcs-mega__col .dcs-mega__more a:hover,
    .dcs-mega__col .dcs-mega__more a:focus {
        background: transparent;
        color: var(--white);
        border-left-color: transparent;
    }

    /* --- Actions inside menu (phone + CTA) - stacked --- */
    .dcs-nav__actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 1.5rem 0 0;
        padding: 0;
        width: 100%;
    }
    .dcs-nav__phone {
        justify-content: center;
        color: var(--white);
        padding: 1rem;
        background: rgba(255,255,255,0.05);
        border-radius: var(--radius);
        text-align: center;
    }
    .dcs-nav__actions .dcs-btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Footer stacks + everything centred on mobile --- */
    .dcs-footer__grid { grid-template-columns: 1fr 1fr; }
    .dcs-footer { text-align: center; }
    .dcs-footer__grid > div { text-align: center; }
    .dcs-footer__contact { align-items: center; }
    .dcs-footer__contact li { justify-content: center; text-align: left; }
    .dcs-footer__social { justify-content: center; }
    .dcs-footer__heading { justify-content: center; }
    .dcs-footer__row-list { justify-content: center; }
    .dcs-footer__bottom { justify-content: center; text-align: center; }
    .dcs-footer__meta { justify-content: center; width: 100%; }

    /* Mobile-only nav items appear inside the overlay menu */
    .dcs-nav__list > li.dcs-nav__mobile-only { display: block; }

    /* Secondary links (About / Careers / Blog) - a distinct group set apart
       from the main nav block by a divider, lighter styling */
    .dcs-nav__secondary {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 1.75rem;
        list-style: none;
        margin: 1.5rem 0 0;
        padding: 1.35rem 0 0;
        border-top: 1px solid var(--brand);
        flex-shrink: 0;
    }
    .dcs-nav__secondary li { margin: 0; }
    .dcs-nav__secondary a {
        color: rgba(255, 255, 255, 0.72);
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        padding: 0.35rem 0.25rem;
    }
    .dcs-nav__secondary a:hover,
    .dcs-nav__secondary a:focus,
    .dcs-nav__secondary a.is-active { color: var(--brand); }

    /* --- Mobile footer: pipe separators between wrapped items so the rows
       stay legible instead of running together --- */
    .dcs-footer__row-list {
        gap: 0.65rem 0;
        row-gap: 0.5rem;
    }
    .dcs-footer__row-list li {
        display: flex;
        align-items: center;
    }
    .dcs-footer__row-list li:not(:last-child)::after {
        content: "";
        display: inline-block;
        width: 1px;
        height: 14px;
        background: rgba(255,255,255,0.25);
        margin: 0 0.85rem;
    }
    .dcs-footer__meta {
        gap: 0.5rem 0;
        row-gap: 0.5rem;
    }
    .dcs-footer__meta > * {
        display: flex;
        align-items: center;
    }
    .dcs-footer__meta > *:not(:last-child)::after {
        content: "";
        display: inline-block;
        width: 1px;
        height: 14px;
        background: rgba(255,255,255,0.25);
        margin: 0 0.85rem;
    }

    /* --- Trustist widget - shrink on mobile via zoom.
       zoom (unlike transform) doesn't create a new containing block for
       fixed-positioned descendants, so the widget's own popup/overlay
       positioning remains intact. --- */
    [ts-sidebarwidget],
    [ts-sidebarWidget] {
        zoom: 0.7;
    }
    /* When the widget is clicked and the slide-out/popup expands, apply a
       modest counter to the popup so it opens larger than the collapsed
       badge but not full desktop size (which would overflow the mobile viewport).
       Popup ends up at ~80% of desktop size (0.7 x 1.15). */
    [ts-sidebarwidget] [class*="popup" i],
    [ts-sidebarwidget] [class*="modal" i],
    [ts-sidebarwidget] [class*="expanded" i],
    [ts-sidebarwidget] [class*="drawer" i],
    [ts-sidebarwidget] [class*="fullscreen" i],
    [ts-sidebarwidget] [class*="lightbox" i],
    [ts-sidebarwidget] iframe {
        zoom: 1.25;
    }
}

@media (max-width: 640px) {
    .dcs-footer__grid { grid-template-columns: 1fr; }
    .dcs-footer__bottom { flex-direction: column; align-items: center; }
    /* Even smaller viewport - shrink Trustist a touch more */
    [ts-sidebarwidget],
    [ts-sidebarWidget] {
        zoom: 0.6;
    }
    /* Popup ends up at ~87% of desktop (0.6 x 1.45) */
    [ts-sidebarwidget] [class*="popup" i],
    [ts-sidebarwidget] [class*="modal" i],
    [ts-sidebarwidget] [class*="expanded" i],
    [ts-sidebarwidget] [class*="drawer" i],
    [ts-sidebarwidget] [class*="fullscreen" i],
    [ts-sidebarwidget] [class*="lightbox" i],
    [ts-sidebarwidget] iframe {
        zoom: 1.45;
    }
}

@media (max-width: 420px) {
    .dcs-brand__tagline { font-size: 0.72rem; }
}

/* ---------- 11. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
