/* Minimal reset now that Bootstrap is gone (its reboot used to do this).
   Tailwind preflight in main.css covers most of it; this is belt and braces. */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

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

button {
    font: inherit;
    cursor: pointer;
}

/* -- MeraBoiler new design: base (header, top bar, footer, buttons) --
   Loaded sitewide. All classes are dc- prefixed to avoid Bootstrap clashes. */

.dc {
    font-family: var(--dc-font-body);
    color: var(--dc-navy);
    background: var(--dc-white);
}

.dc h1,
.dc h2,
.dc h3 {
    font-family: var(--dc-font-head);
    font-weight: 400;
    margin: 0;
}

.dc a {
    color: inherit;
    text-decoration: none;
}

/* Content container: caps line length on large screens (1440 design),
   while section backgrounds bleed full width. */
.dc-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 64px;
    padding-right: 64px;
    box-sizing: border-box;
}

@media (max-width: 820px) {
    .dc-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Shared card grids - one definition each, no duplicates.
   Sections keep their own class names; responsive differences stay
   with the section below. */
.dc-cards-3,
.dc-post-grid,
.dc-problems,
.dc-steps,
.dc-tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dc-cards-4,
.dc-areas__grid,
.dc-brands__grid,
.dc-feats,
.dc-tiers--4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .dc-cards-4,
    .dc-areas__grid,
    .dc-feats,
    .dc-tiers--4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dc-cards-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .dc-cards-3,
    .dc-post-grid,
    .dc-problems,
    .dc-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dc-cards-4,
    .dc-areas__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .dc-cards-4 {
        grid-template-columns: 1fr;
    }
}

/* Shared card patterns - one definition each, used across sections. */
.dc-review,
.dc-feat,
.dc-problem {
    padding: 24px;
}

.dc-service,
.dc-article,
.dc-choice {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dc-feat h3,
.dc-problem h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.dc-boiler h3,
.dc-job h3,
.dc-choice__body h3 {
    font-size: 22px;
}

.dc-step p,
.dc-problem p {
    margin: 0;
    color: var(--dc-muted);
    font-size: 15px;
    line-height: 1.55;
}

.dc-boiler__price span,
.dc-article__meta,
.dc-post-meta {
    color: var(--dc-muted);
    font-size: 13px;
}

.dc-job__apply,
.dc-map__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.dc-jobs,
.dc-contact__rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dc-pills,
.dc-region__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dc-safety,
.dc-choice__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dc-split,
.dc-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: center;
}

.dc-author span,
.dc-contact__sub {
    display: block;
    font-size: 14px;
    color: var(--dc-muted);
}

.dc-side .dc-quote,
.dc-map__panel,
.dc-safety-card {
    padding: 28px;
}

.dc-promo__price,
.dc-tier__price {
    font-family: var(--dc-font-head);
    font-size: 40px;
    line-height: 1.1;
}

.dc-areas__card:hover,
.dc-areas__card:focus-visible,
.dc-pill:hover {
    border-color: var(--dc-navy);
}

/* Buttons */
.dc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: var(--dc-r-sm);
    background: var(--dc-red);
    color: var(--dc-white) !important;
    font-weight: 800;
    font-size: 16px;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none !important;
}

.dc-btn:hover {
    background: var(--dc-red-dark);
    color: var(--dc-white) !important;
}

.dc-btn--outline {
    background: var(--dc-white);
    color: var(--dc-navy) !important;
    border: 2px solid var(--dc-navy);
}

.dc-btn--outline:hover {
    background: var(--dc-navy);
    color: var(--dc-white) !important;
}

.dc-btn--white {
    background: var(--dc-white);
    color: var(--dc-red) !important;
}

.dc-btn--white:hover {
    background: var(--dc-hover);
    color: var(--dc-red) !important;
}

.dc-btn--ghost {
    background: transparent;
    border: 2px solid var(--dc-white);
    color: var(--dc-white) !important;
}

.dc-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--dc-white) !important;
}

/* Cards, inputs, misc */
.dc-card {
    background: var(--dc-white);
    border: 1px solid var(--dc-line);
    border-radius: var(--dc-r-md);
}

.dc-mut {
    color: var(--dc-muted);
}

.dc-in {
    height: 48px;
    border: 1px solid var(--dc-input-border);
    border-radius: var(--dc-r-sm);
    padding: 0 14px;
    font: inherit;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    background: var(--dc-white);
    color: var(--dc-navy);
}

.dc-tick {
    width: 18px;
    height: 18px;
    flex: none;
}

.dc-eyebrow {
    color: var(--dc-red);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
}

/* -- Top offer bar (CSS-only rotation) -- */
.dc-topbar {
    position: relative;
    height: 42px;
    background: var(--dc-navy);
    color: var(--dc-white);
    overflow: hidden;
    font-size: 14px;
}

.dc-topbar__msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 64px 0 12px;
    text-align: center;
    opacity: 0;
    animation: dc-topbar-fade 12s infinite both;
}

.dc-topbar__msg:nth-child(1) { animation-delay: 0s; }
.dc-topbar__msg:nth-child(2) { animation-delay: 4s; }
.dc-topbar__msg:nth-child(3) { animation-delay: 8s; }

.dc-topbar__msg b,
.dc-topbar__msg strong {
    color: var(--dc-white);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    font-weight: 700;
}

.dc-topbar__tag {
    background: var(--dc-red);
    border-radius: var(--dc-pill);
    padding: 3px 10px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.dc-topbar__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--dc-white);
    border-radius: var(--dc-r-xs);
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
    z-index: 2;
}

.dc-topbar__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

@keyframes dc-topbar-fade {
    0% { opacity: 0; transform: translateY(10px); }
    4% { opacity: 1; transform: none; }
    30% { opacity: 1; transform: none; }
    34% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 0; }
}

@media (max-width: 820px) {
    .dc-topbar {
        height: 36px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-topbar__msg { animation: none; }
    .dc-topbar__msg:nth-child(1) { opacity: 1; }
}

@media (max-width: 640px) {
    .dc-topbar__msg {
        font-size: 12px;
        gap: 8px;
    }

    /* Single line with ellipsis: the fixed-height bar clips wrapped text. */
    .dc-topbar__msg > span:nth-child(2) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .dc-topbar__tag,
    .dc-topbar__msg b,
    .dc-topbar__msg strong {
        flex: none;
    }
}

/* -- Header -- */
.dc-header {
    background: var(--dc-white);
}

.dc-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 64px;
    box-sizing: border-box;
}

/* Full-bleed bottom border (row itself is capped). */
.dc-header__bar {
    border-bottom: 1px solid var(--dc-line);
}

.dc-header__logo {
    flex: none;
    line-height: 0;
}

.dc-header__logo img {
    height: 40px;
    width: auto;
    max-width: 280px;
    display: block;
}

.dc-logo-fallback {
    font-family: var(--dc-font-head);
    font-size: 26px;
    color: var(--dc-navy);
    line-height: 1.2;
}

.dc-header__list {
    display: flex;
    gap: 28px;
    font-weight: 600;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.dc-header__list a,
.dc-header__list button.nav-link {
    color: var(--dc-navy);
    background: transparent;
    border: 0;
    border-radius: var(--dc-pill);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.dc-header__list a:hover,
.dc-header__list button.nav-link:hover,
.dc-header__list a:focus-visible,
.dc-header__list button.nav-link:focus-visible {
    color: var(--dc-red);
    background: var(--dc-bg);
}

.dc-header__list a.active,
.dc-header__list button.nav-link.active {
    color: var(--dc-red);
    background: rgba(200, 16, 46, 0.08);
}

@media (min-width: 1200px) {
    .dc-header__list {
        flex-direction: row;
        justify-content: flex-end;
        width: auto;
        gap: 0.1rem 0.35rem;
    }

    .dc-header__list a,
    .dc-header__list button.nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.4rem;
    }
}

@media (min-width: 1280px) and (max-width: 1399px) {
    .dc-header__list a,
    .dc-header__list button.nav-link {
        font-size: 0.82rem;
    }
}

@media (min-width: 1400px) {
    .dc-header__list {
        gap: 0.2rem 0.55rem;
    }

    .dc-header__list a,
    .dc-header__list button.nav-link {
        font-size: 0.88rem;
        padding: 0.4rem 0.55rem;
    }
}

.dc-header__cta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex: none;
}

@media (min-width: 1200px) {
    .dc-header .dc-header__nav {
        display: flex;
        justify-content: center;
        flex: 1 1 auto;
        min-width: 0;
    }
}

.dc-header__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--dc-navy) !important;
}

.dc-header__phone svg {
    flex: none;
}

.dc-header__phone:hover {
    color: var(--dc-red) !important;
}

/* -- Desktop dropdown panel -- */
@media (min-width: 1200px) {
    .dc-header .nav-item.group > .dropdown-menu {
        min-width: 16.5rem;
        padding: 0.4rem;
        border: 1px solid var(--dc-line);
        border-radius: var(--dc-r-md);
        box-shadow: var(--dc-shadow-pop);
    }

    /* Wide two-column panel when a parent has many children. */
    .dc-header .nav-item.group.has-many > .dropdown-menu {
        min-width: 28rem;
        column-count: 2;
        column-gap: 0.5rem;
    }

    .dc-header .nav-item.group.has-many > .dropdown-menu > li {
        break-inside: avoid;
    }

    .dc-header .dropdown-menu .dropdown-item {
        border-radius: var(--dc-r-sm);
        padding: 0.65rem 0.85rem;
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--dc-navy);
    }

    .dc-header .dropdown-menu .dropdown-item:hover,
    .dc-header .dropdown-menu .dropdown-item:focus,
    .dc-header .dropdown-menu .dropdown-item.active {
        background: var(--dc-bg);
        color: var(--dc-red);
    }
}

/* -- Mobile header + off-canvas drawer -- */
@media (max-width: 1199px) {
    .dc-header__row {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .dc-header__cta {
        display: none;
    }

    .dc-header__nav {
        display: none;
    }

    .dc-header__logo img {
        height: 30px;
    }

    /* Bordered hamburger box, like the design reference. */
    .dc-header .navbar-toggler {
        border: 1px solid var(--dc-line);
        border-radius: var(--dc-r-sm);
    }
}

.dc-drawer__overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 42, 91, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1050;
}

.dc-drawer__overlay[hidden] {
    display: none;
}

.dc-drawer__overlay.open {
    opacity: 1;
}

.dc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(390px, 100%);
    background: var(--dc-white);
    z-index: 1060;
    transform: translateX(102%);
    transition: transform 0.32s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--dc-shadow-drawer);
}

.dc-drawer[hidden] {
    display: none;
}

.dc-drawer.open {
    transform: none;
}

body.dc-lock {
    overflow: hidden;
}

.dc-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--dc-line);
    flex: none;
}

.dc-drawer__logo {
    line-height: 0;
}

.dc-drawer__logo img {
    height: 30px;
    width: auto;
    max-width: 220px;
    display: block;
}

.dc-drawer__close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--dc-line);
    border-radius: var(--dc-r-sm);
    background: var(--dc-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex: none;
}

.dc-drawer__close:hover {
    background: var(--dc-bg);
}

.dc-drawer__nav {
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px;
}

.dc-drawer__nav > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dc-drawer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dc-drawer__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 14px;
    border: 0;
    border-radius: var(--dc-r-sm);
    font-weight: 700;
    font-size: 17px;
    color: var(--dc-navy) !important;
}

.dc-drawer__link:hover,
.dc-drawer__link.is-current {
    color: var(--dc-red) !important;
    background: var(--dc-bg);
}

.dc-drawer__row {
    display: flex;
    align-items: stretch;
    border: 0;
    border-radius: var(--dc-r-sm);
}

.dc-drawer__row .dc-drawer__link {
    flex: 1 1 auto;
    border-bottom: 0;
    min-width: 0;
}

.dc-drawer__toggle {
    flex: none;
    width: 56px;
    border: 0;
    border-left: 1px solid var(--dc-line);
    background: var(--dc-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-drawer__toggle svg {
    transition: transform 0.25s ease;
}

.dc-drawer__item.open > .dc-drawer__row .dc-drawer__toggle svg {
    transform: rotate(90deg);
}

.dc-drawer__sub {
    background: var(--dc-bg);
    border-radius: var(--dc-r-sm);
    margin: 4px 0 6px;
    padding: 4px;
}

.dc-drawer__sub[hidden] {
    display: none;
}

.dc-drawer__sub a {
    display: block;
    padding: 11px 12px 11px 16px;
    font-weight: 700;
    font-size: 15px;
    border: 0;
    border-radius: var(--dc-r-xs);
    color: var(--dc-navy) !important;
}

.dc-drawer__sub a:hover {
    color: var(--dc-red) !important;
}

.dc-drawer__cta {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    flex: none;
    border-top: 1px solid var(--dc-line);
}

.dc-drawer__cta .dc-btn {
    width: 100%;
}

.dc-btn--wa {
    background: var(--dc-green) !important;
    gap: 10px;
}

.dc-btn--wa:hover {
    background: var(--dc-green-dark) !important;
}

/* Never show the drawer on desktop (belt & braces with the JS). */
@media (min-width: 1200px) {
    .dc-drawer,
    .dc-drawer__overlay {
        display: none;
    }

    .dc-header__nav {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-drawer,
    .dc-drawer__overlay {
        transition: none;
    }
}

/* -- Footer -- */
.dc-footer {
    background: var(--dc-navy);
    color: var(--dc-white);
    padding: 56px 0 32px;
}

.dc-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr;
    gap: 32px;
}

.dc-footer__logo img {
    height: 40px;
    width: auto;
    display: block;
}

.dc-footer__about {
    opacity: 0.85;
    font-size: 14px;
    line-height: 1.5;
    margin: 16px 0 0;
}

.dc-footer__social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.dc-footer__social a {
    width: 44px;
    height: 44px;
    border-radius: var(--dc-circle);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-footer__social a:hover {
    background: rgba(255, 255, 255, 0.24);
}

.dc-footer__heading {
    font-size: 13px;
    letter-spacing: 0.08em;
    font-weight: 800;
    font-family: var(--dc-font-body);
}

.dc-footer__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    opacity: 0.85;
    font-size: 15px;
}

.dc-footer__links a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dc-footer__contact {
    font-size: 14px;
    line-height: 1.5;
}

.dc-footer__contact-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dc-footer__contact-list li,
.dc-footer__contact-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
}

.dc-footer__contact-list svg {
    flex: none;
    margin-top: 1px;
    opacity: 0.9;
}

.dc-footer__contact-list span,
.dc-footer__contact-list a {
    opacity: 0.9;
}

.dc-footer__contact-list a:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dc-footer__trustbar {
    margin-top: 32px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    font-weight: 700;
    font-size: 14px;
}

.dc-footer__trustbar div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dc-footer__legal {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    opacity: 0.75;
}

.dc-footer__legal p {
    margin: 0;
}

@media (max-width: 1024px) {
    .dc-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .dc-footer {
        padding: 32px 0 24px;
    }

    .dc-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .dc-footer__trustbar {
        gap: 16px;
    }
}
