/* Home Design Ideas — Views/Pages/DesignIdeaList.cshtml (/home-design-ideas/) and DesignIdeaDetail.cshtml (/{slug}/).
   The hero, buttons, quote form, chips and call to action are the service area components (service-areas.css, loaded
   before this file); the rest is scoped to .di-* classes. */

.di-guides,
.di-main,
.di-products,
.di-faq,
.di-reading {
    /* the service area tokens, so their buttons and links work inside these sections too */
    --sa-accent: var(--red, #dc3131);
    --sa-accent-dark: #b92323;
    --sa-ink: var(--dark-gray, #232323);
    --sa-muted: var(--medium-gray, #717580);
    --sa-line: #e6e7eb;
    --sa-soft: #f6f6f8;
    --sa-radius: 16px;
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
}

/* ---- hero ---- */
.di-hero__title {
    font-size: clamp(32px, 3.6vw, 48px);
}

.di-updated {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
    line-height: 1.4;
}

.di-hero__media {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    aspect-ratio: 4 / 3;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}

.di-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- section headings ---- */
.di-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 28px;
}

.di-section-head .sa-eyebrow {
    margin-bottom: 12px;
}

.di-section-title {
    margin: 0;
    color: var(--sa-ink);
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.2;
}

/* ---- hub: one card per design idea ---- */
.di-guides {
    padding: 72px 0 8px;
    background: #fff;
    scroll-margin-top: 90px;
}

.di-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.di-guide {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: #fff;
    color: var(--sa-muted);
    box-shadow: 0 12px 32px rgba(27, 31, 39, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.di-guide:hover {
    border-color: transparent;
    color: var(--sa-muted);
    box-shadow: 0 22px 44px rgba(27, 31, 39, .12);
    transform: translateY(-3px);
}

.di-guide__img {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--sa-soft);
}

.di-guide__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.di-guide:hover .di-guide__img img {
    transform: scale(1.04);
}

.di-guide__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.di-guide__name {
    color: var(--sa-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.di-guide__desc {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.di-guide__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--sa-accent);
    font-size: 15px;
    font-weight: 700;
}

/* ---- article and aside ---- */
.di-main {
    padding: 80px 0;
    background: #fff;
}

.di-article {
    color: #4b4f58;
    font-family: var(--primary-font, "Inter", sans-serif);
    font-size: 17px;
    line-height: 1.8;
}

.di-article > :first-child {
    margin-top: 0;
}

.di-article h2 {
    margin: 48px 0 18px;
    color: var(--sa-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
    scroll-margin-top: 110px;
}

.di-article h3 {
    margin: 30px 0 12px;
    color: var(--sa-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.di-article p {
    margin: 0 0 20px;
}

.di-article strong {
    color: var(--sa-ink);
}

/* .di-main for weight: the theme's own link colours are more specific than .di-article a */
.di-main .di-article a {
    color: var(--sa-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.di-main .di-article a:hover {
    color: var(--sa-accent-dark);
}

.di-article ul,
.di-article ol {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.di-article li {
    position: relative;
    margin-bottom: 10px;
}

.di-article ul > li {
    padding-left: 28px;
}

.di-article ul > li::before {
    content: "";
    position: absolute;
    top: .72em;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sa-accent);
    box-shadow: 0 0 0 4px rgba(220, 49, 49, .14);
}

.di-article ol {
    counter-reset: di-step;
}

.di-article ol > li {
    padding-left: 42px;
    counter-increment: di-step;
}

.di-article ol > li::before {
    content: counter(di-step);
    position: absolute;
    top: .2em;
    left: 0;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--sa-ink);
    color: #fff;
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* comparison tables: <div class="di-table"><table>... (scrolls sideways on phones) */
.di-table {
    overflow-x: auto;
    margin: 0 0 28px;
    border: 1px solid var(--sa-line);
    border-radius: 14px;
}

.di-article table {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.55;
    /* the theme's body break-word would split the label column mid-word */
    word-break: normal;
}

.di-article th,
.di-article td {
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--sa-line);
    text-align: left;
    vertical-align: top;
}

.di-article thead th {
    background: var(--sa-soft);
    color: var(--sa-ink);
    font-family: var(--alt-font, "Plus Jakarta Sans", sans-serif);
    font-weight: 700;
}

.di-article tbody tr:last-child td {
    border-bottom: 0;
}

.di-article tbody td:first-child {
    color: var(--sa-ink);
    font-weight: 600;
}

/* <p class="di-tip"><strong>Designer tip:</strong> ...</p> */
.di-article .di-tip {
    margin: 0 0 24px;
    padding: 18px 22px;
    border-left: 4px solid var(--sa-accent);
    border-radius: 0 14px 14px 0;
    background: rgba(220, 49, 49, .06);
    color: var(--sa-ink);
    font-size: 16px;
    line-height: 1.7;
}

.di-aside {
    position: sticky;
    top: 120px;
    display: grid;
    gap: 20px;
}

.di-toc {
    padding: 22px 24px;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: #fff;
}

.di-toc__title {
    display: block;
    margin-bottom: 8px;
    color: var(--sa-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.di-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: di-toc;
}

.di-toc li {
    counter-increment: di-toc;
}

.di-toc li + li a {
    border-top: 1px solid var(--sa-line);
}

.di-toc a {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    color: var(--sa-muted);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.di-toc a::before {
    content: counter(di-toc, decimal-leading-zero);
    flex: 0 0 auto;
    color: var(--sa-accent);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.85;
}

.di-toc a:hover {
    color: var(--sa-ink);
}

.di-help {
    padding: 28px 26px;
    border-radius: var(--sa-radius);
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(220, 49, 49, .32), transparent 60%),
        linear-gradient(135deg, #171a21 0%, #232833 100%);
    color: rgba(255, 255, 255, .75);
}

.di-help__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--sa-accent);
    color: #fff;
    font-size: 22px;
}

.di-help__title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
}

.di-help p {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
}

.di-help .sa-btn {
    justify-content: center;
    width: 100%;
}

.di-help__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.di-help__phone:hover {
    color: #fff;
    text-decoration: underline;
}

/* ---- detail page: door styles and brands ---- */
.di-products {
    padding: 0 0 80px;
    background: #fff;
}

.di-products__box {
    padding: 52px 48px;
    border-radius: 24px;
    background: var(--sa-soft);
}

.di-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.di-product {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(27, 31, 39, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.di-product:hover {
    box-shadow: 0 18px 36px rgba(27, 31, 39, .12);
    transform: translateY(-3px);
}

.di-product__img {
    display: block;
    padding: 16px;
    aspect-ratio: 4 / 5;
}

.di-product__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.di-product__body {
    display: block;
    padding: 14px 16px 18px;
    border-top: 1px solid var(--sa-line);
}

.di-product__brand {
    display: block;
    color: var(--sa-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.di-product__name {
    display: block;
    margin-top: 4px;
    color: var(--sa-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.di-brands__title {
    margin: 40px 0 16px;
    color: var(--sa-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

.di-products__box > .di-brands__title:first-child {
    margin-top: 0;
}

.di-brand-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.di-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease;
}

.di-brand:hover {
    border-color: var(--sa-ink);
}

.di-brand img {
    flex: 0 0 auto;
    width: 88px;
    height: 52px;
    object-fit: contain;
}

.di-brand__meta b {
    display: block;
    color: var(--sa-ink);
    font-size: 15px;
    line-height: 1.3;
}

.di-brand__meta span {
    display: block;
    margin-top: 2px;
    color: var(--sa-muted);
    font-size: 13px;
    line-height: 1.4;
}

/* ---- questions ---- */
.di-faq {
    padding: 0 0 80px;
    background: #fff;
}

.di-faq__wrap {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 48px;
}

.di-faq__intro p {
    margin: 14px 0 0;
    color: var(--sa-muted);
    font-size: 16px;
    line-height: 1.6;
}

.di-faq__intro a {
    color: var(--sa-accent);
    font-weight: 700;
}

.di-faq__item {
    border-bottom: 1px solid var(--sa-line);
}

.di-faq__item:first-child {
    border-top: 1px solid var(--sa-line);
}

.di-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    color: var(--sa-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.di-faq__item summary::-webkit-details-marker {
    display: none;
}

.di-faq__item summary::after {
    content: "";
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .2s ease;
}

.di-faq__item[open] summary::after {
    transform: translateY(3px) rotate(-135deg);
}

.di-faq__item summary:hover {
    color: var(--sa-accent);
}

.di-faq__answer {
    margin: 0;
    padding: 0 40px 24px 0;
    color: #4b4f58;
    font-family: var(--primary-font, "Inter", sans-serif);
    font-size: 16px;
    line-height: 1.75;
}

/* ---- detail page: blog posts ---- */
.di-reading {
    padding: 0 0 80px;
    background: #fff;
}

.di-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.di-post {
    display: flex;
    flex-direction: column;
    padding: 24px 26px;
    border: 1px solid var(--sa-line);
    border-radius: var(--sa-radius);
    background: #fff;
    color: var(--sa-muted);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.di-post:hover {
    border-color: transparent;
    color: var(--sa-muted);
    box-shadow: 0 18px 36px rgba(27, 31, 39, .1);
}

.di-post__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--sa-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.di-post__title {
    color: var(--sa-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    transition: color .2s ease;
}

.di-post:hover .di-post__title {
    color: var(--sa-accent);
}

.di-post__desc {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.di-post__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--sa-ink);
    font-size: 14px;
    font-weight: 700;
}

/* ---- responsive ---- */
@media (max-width: 1199px) {
    .di-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .di-guide-grid,
    .di-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .di-aside {
        position: static;
    }

    /* below the article on these widths, where an outline no longer helps */
    .di-toc {
        display: none;
    }

    .di-faq__wrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .di-hero__media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 767px) {
    .di-guide-grid,
    .di-post-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .di-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .di-guides {
        padding: 48px 0 0;
    }

    .di-main {
        padding: 48px 0;
    }

    .di-products,
    .di-faq,
    .di-reading {
        padding-bottom: 56px;
    }

    .di-products__box {
        padding: 32px 18px;
    }

    .di-article {
        font-size: 16px;
    }

    .di-article h2 {
        margin-top: 36px;
        font-size: 24px;
    }

    .di-faq__item summary {
        font-size: 16px;
    }

    .di-faq__answer {
        padding-right: 0;
    }
}
