/* ===== Homepage — Reimagined Sections ===== */
/* Loaded only on the homepage via OCMOD */

/* --- Reset HTML module wrapper styles on homepage --- */
/* The html.twig template wraps content in .content-block-text which adds  */
/* fsz-14, secondary-text, and fw-300 — reset those for our homepage HTML modules */
#common-home .content-block-text {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}
#common-home > .container-fluid > .mt-3 {
    margin-top: 0;
}

/* --- Section 1: Hero refinements --- */
#common-home .ds-video-hero__content {
    width: min(100%, 760px);
    max-width: 960px;
    padding-bottom: 5rem;
}
#common-home .ds-video-hero__title {
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    line-height: 1.14;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
#common-home .ds-video-hero__text {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.65;
    color: rgba(255,255,255,0.86);
}
#common-home .ds-video-hero__buttons {
    max-width: 520px;
    gap: 0.875rem;
}
#common-home .button-hero-cta {
    min-height: 52px;
    padding: 1rem 1.5rem;
    box-shadow: var(--ds-light-shadow-light);
}
#common-home .ds-video-hero__proof {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
/* Trust bar — footer-style Google + Trustpilot in hero */
.ds-video-hero__trust-bar {
    margin-top: 1.5rem;
    display: flex !important;
    justify-content: center;
    gap: 2.5rem !important;
    align-items: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
}
.ds-video-hero__trust-bar .google-reviews,
.ds-video-hero__trust-bar .trust-reviews {
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    display: grid;
    grid-template-rows: 44px 28px 20px;
    justify-items: center;
    text-align: center;
    align-items: end;
}
.ds-video-hero__trust-bar .google-reviews {
    width: 120px !important;
    position: relative;
    top: 1px;
    left: 10px;
}
.ds-video-hero__trust-bar .trust-reviews {
    width: 140px !important;
    grid-template-rows: 44px 32px 20px;
}
.ds-video-hero__trust-bar .google-reviews .text-count,
.ds-video-hero__trust-bar .powered-by,
.ds-video-hero__trust-bar .trust-caption {
    color: rgba(255,255,255,0.85);
    position: relative;
    left: 3px;
}
.ds-video-hero__trust-bar .star-co {
    color: #D4A837;
}
.ds-hero-google-logo {
    display: block;
    width: 85%;
    height: auto;
    align-self: center;
}
.ds-video-hero__trust-bar .google-reviews .ds-module-rating-stars {
    align-self: center;
    position: relative;
    top: -5px;
    left: 3px;
}
.ds-hero-review-count {
    display: block;
    color: rgba(255,255,255,0.85);
    align-self: start;
    position: relative;
    top: 2px;
    left: 3px;
    width: 100%;
    letter-spacing: 0.08em;
}
.ds-video-hero__trust-bar .trust-reviews > img:first-child {
    width: 100%;
    align-self: center;
}
.ds-video-hero__trust-bar .trust-reviews > img.stars {
    width: 100%;
    align-self: center;
    position: relative;
    left: 3px;
}

#common-home .ds-video-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: ds-scroll-bounce 2s ease-in-out infinite;
}
#common-home .ds-video-hero__scroll-hint svg {
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.7);
}
@keyframes ds-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* --- Section 2: Confidence Strip --- */
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] {
    gap: 1rem;
    padding-top: 0 !important;
    overflow: visible !important;
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item {
    flex: 1 1 0;
    min-width: 0;
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item > div {
    height: 100%;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem !important;
    border: 1px solid var(--ds-border-color-light);
    background: var(--ds-body-bg-light-color);
    box-shadow: var(--ds-light-shadow-light);
    transition: transform var(--ds-main-transition), box-shadow var(--ds-main-transition), border-color var(--ds-main-transition);
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item > div:hover {
    transform: translateY(-2px);
    box-shadow: var(--ds-medium-shadow-light);
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item img,
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item > div > svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item > div > svg {
    color: var(--ds-primary-color);
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item-text {
    gap: 0.25rem;
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item-title {
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.35;
}
#common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item-text span {
    line-height: 1.55;
}

@media (max-width: 991px) {
    #common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] {
        flex-wrap: wrap;
    }
    #common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item {
        flex: 1 1 calc(50% - 0.5rem);
    }
}
@media (max-width: 575px) {
    #common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] {
        display: grid !important;
        grid-template-columns: 1fr;
    }
    #common-home .ds-hp-confidence-strip [id^="ds-shop-advantages-"] .ds-advantages-item {
        flex: initial;
        width: 100%;
    }
}

/* --- Section 3: Category Wall — overlay card grid --- */
#common-home .ds-category-wall-section {
    padding: 2rem 0 1rem;
}
#common-home .ds-category-wall-header {
    margin-bottom: 1.5rem;
}
#common-home .ds-category-wall-overlay .ds-category-wall-card {
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
}
#common-home .ds-category-wall-card-img {
    display: block;
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s ease-out;
}
/* Featured cards (first 2) — wide landscape */
#common-home .col-md-6 .ds-category-wall-card-img {
    aspect-ratio: 16 / 9;
}
/* Hero card (full-width, 3rd position) */
#common-home .ds-category-wall-overlay > .col-12:not(.col-md-6):not(.col-md-4) .ds-category-wall-card-img {
    aspect-ratio: 21 / 9;
}
/* Standard cards — shorter portrait */
#common-home .col-md-4 .ds-category-wall-card-img {
    aspect-ratio: 4 / 5;
}
#common-home .ds-category-wall-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.12) 45%,
        rgba(0, 0, 0, 0.02) 100%
    );
    transition: background var(--ds-main-transition);
    z-index: 1;
}
#common-home .ds-category-wall-card-content {
    position: absolute;
    inset: 0;
    padding: 1.5rem 1.25rem;
    z-index: 2;
    color: #fff;
}
#common-home .ds-category-wall-card-name {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: transform var(--ds-main-transition);
}
#common-home .ds-category-wall-card-subs {
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease-out, opacity var(--ds-main-transition);
}
#common-home .ds-category-wall-card-sub {
    font-size: 0.75rem;
    font-weight: 300;
    padding: 0.2rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}
#common-home .ds-category-wall-card-cta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--ds-main-transition), transform var(--ds-main-transition);
}

/* Hover state */
#common-home .ds-category-wall-card:hover .ds-category-wall-card-img {
    transform: scale(1.04);
}
#common-home .ds-category-wall-card:hover .ds-category-wall-card-overlay {
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.18) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
}
#common-home .ds-category-wall-card:hover .ds-category-wall-card-name {
    transform: translateY(-4px);
}
#common-home .ds-category-wall-card:hover .ds-category-wall-card-subs {
    max-height: 80px;
    opacity: 1;
}
#common-home .ds-category-wall-card:hover .ds-category-wall-card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile — touch devices don't hover, so always show content */
@media (max-width: 767px) {
    #common-home .col-md-6 .ds-category-wall-card-img,
    #common-home .col-md-4 .ds-category-wall-card-img {
        aspect-ratio: 4 / 5;
    }
    #common-home .ds-category-wall-overlay > .col-12:not(.col-md-6):not(.col-md-4) .ds-category-wall-card-img {
        aspect-ratio: 16 / 9;
    }
    #common-home .ds-category-wall-card-content {
        padding: 1rem;
    }
    #common-home .ds-category-wall-card-name {
        font-size: 1.1rem;
    }
    #common-home .ds-category-wall-card-subs {
        max-height: 60px;
        opacity: 1;
    }
    #common-home .ds-category-wall-card-cta {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 575px) {
    #common-home .ds-category-wall-card-content {
        padding: 0.75rem;
    }
    #common-home .ds-category-wall-card-name {
        font-size: 1rem;
    }
    #common-home .ds-category-wall-card-sub {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

/* --- Section 4: Signature Pieces heading refinement --- */
#common-home .ds-hp-signature-header {
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
#common-home .ds-hp-signature-grid {
    margin-top: 0 !important;
    margin-bottom: 0.5rem !important;
}
#common-home .ds-hp-signature-grid .ds-module-item {
    margin-top: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

/* --- Section 5: Story Block — uses existing ds-trust-section pattern --- */
#common-home .ds-trust-module {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
#common-home .ds-trust-section {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 4vw, 4rem);
    padding: 3rem 0;
}
#common-home .ds-trust-section:nth-child(even) {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
#common-home .ds-trust-section:nth-child(even) .ds-trust-section-image {
    order: 2;
}
#common-home .ds-trust-section:nth-child(even) .ds-trust-section-content,
#common-home .ds-trust-section:nth-child(even) .ds-trust-section-text {
    order: 1;
}
#common-home .ds-trust-section-content,
#common-home .ds-trust-section-text {
    max-width: 540px;
}
#common-home .ds-trust-section:nth-child(odd) .ds-trust-section-content,
#common-home .ds-trust-section:nth-child(odd) .ds-trust-section-text {
    margin-right: auto;
}
#common-home .ds-trust-section:nth-child(even) .ds-trust-section-content,
#common-home .ds-trust-section:nth-child(even) .ds-trust-section-text {
    margin-left: auto;
}
#common-home .ds-trust-section-image {
    min-width: 0;
}
#common-home .ds-trust-section-image img {
    aspect-ratio: 4 / 3;
    border-radius: 0;
    box-shadow: var(--ds-medium-shadow-light);
}
#common-home .ds-trust-section-title,
#common-home .ds-trust-section-content h3,
#common-home .ds-trust-section-text h3 {
    margin-top: 0 !important;
    margin-bottom: 1rem;
    color: var(--ds-primary-color);
}
#common-home .ds-trust-section p {
    font-size: 1rem;
    line-height: 1.75 !important;
    color: var(--ds-dark-text-color);
}
#common-home .ds-trust-section p + p {
    margin-top: 1rem;
}
#common-home .ds-trust-section a {
    display: inline-flex;
    margin-top: 1.25rem;
    color: var(--ds-primary-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

@media (max-width: 767px) {
    #common-home .ds-trust-section,
    #common-home .ds-trust-section:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }
    #common-home .ds-trust-section:nth-child(even) .ds-trust-section-image,
    #common-home .ds-trust-section:nth-child(even) .ds-trust-section-content,
    #common-home .ds-trust-section:nth-child(even) .ds-trust-section-text {
        order: initial;
    }
    #common-home .ds-trust-section-content,
    #common-home .ds-trust-section-text {
        margin-left: 0;
        margin-right: 0;
        max-width: none;
    }
}

/* --- Section 8: Final Reassurance Strip --- */
.ds-hp-final-strip {
    background-color: var(--ds-primary-color);
    padding: 4.5rem calc(50vw - 50%);
    text-align: center;
}
.ds-hp-final-strip-inner {
    max-width: 760px;
    margin: 0 auto;
}
.ds-hp-final-strip-title {
    font-family: 'Noto Serif', serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    color: #fff;
    margin: 0 0 1rem;
    text-wrap: balance;
}
.ds-hp-final-strip-text {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
}
.ds-hp-final-strip .button-hero-cta--solid {
    display: inline-flex;
    min-width: 240px;
    max-width: 320px;
}
.ds-hp-final-strip-guarantee {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (max-width: 575px) {
    #common-home .ds-video-hero__content {
        padding-bottom: 4rem;
    }
    #common-home .ds-video-hero__buttons {
        flex-direction: column;
    }
    .ds-video-hero__trust-bar {
        display: inline-flex !important;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        padding-left: 0;
        gap: calc(1.5rem + 10px) !important;
    }
    .ds-video-hero__trust-bar .google-reviews {
        width: 100px !important;
        left: 0 !important;
        top: 0 !important;
        margin-top: 0 !important;
    }
    .ds-video-hero__trust-bar .google-reviews,
    .ds-video-hero__trust-bar .trust-reviews {
        grid-template-rows: auto auto auto !important;
        gap: 4px;
    }
    .ds-video-hero__trust-bar .trust-reviews {
        width: 120px !important;
        position: relative;
        top: -5px;
    }
    .ds-video-hero__trust-bar .trust-reviews img {
        max-width: 100% !important;
        width: 100% !important;
    }
    .ds-video-hero__trust-bar .trust-reviews .trust-caption {
        white-space: nowrap;
        font-size: 8px;
    }
    .ds-video-hero__trust-bar .google-reviews .ds-module-rating-stars {
        top: 0 !important;
    }
    .ds-hero-review-count {
        top: 2px !important;
        margin-top: 0 !important;
        letter-spacing: normal !important;
    }
    .ds-hero-google-logo {
        width: 100% !important;
        position: relative;
        top: 0px;
    }
    .ds-hp-final-strip {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .ds-hp-final-strip-title {
        font-size: 1.5rem;
    }
    .ds-hp-final-strip .button-hero-cta--solid {
        width: 100%;
    }
}
