/* Only the new page template. Enfold retains its header offset, header and footer. */
#top #wrap_all .tw-home {
    display: block;
    margin: 0;
    padding: 0 0 var(--triwas-section-space);
    background: var(--triwas-color-background);
}
#top #wrap_all .tw-home .tw-home-hero {
    position: relative;
    isolation: isolate;
    width: calc(100% - var(--triwas-gutter) * 2);
    max-width: var(--triwas-content-max);
    min-height: 440px;
    aspect-ratio: 18 / 11;
    margin: 0 auto;
    overflow: hidden;
    background: var(--triwas-color-accent);
    display: flex;
    align-items: flex-end;
}
#top #wrap_all .tw-home .tw-home-hero-media,
#top #wrap_all .tw-home .tw-home-hero-media picture,
#top #wrap_all .tw-home .tw-home-hero-media img,
#top #wrap_all .tw-home .tw-home-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
#top #wrap_all .tw-home .tw-home-hero-media { z-index: 0; }
#top #wrap_all .tw-home .tw-home-hero-media img,
#top #wrap_all .tw-home .tw-home-hero-video { object-fit: cover; object-position: center; }
#top #wrap_all .tw-home .tw-home-hero-media img { animation: triwas-home-zoom 17s ease-out forwards; }
#top #wrap_all .tw-home .tw-home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 78%),
        linear-gradient(0deg, rgba(0,0,0,.32), transparent 72%);
}
#top #wrap_all .tw-home .tw-home-hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(24px, 4.2vw, 64px);
    color: var(--triwas-color-white);
    width: 100%;
}
#top #wrap_all .tw-home .tw-home-hero h1 {
    max-width: 780px;
    margin: 0 0 24px;
    font-size: var(--triwas-home-hero-size);
    color: var(--triwas-color-white);
    line-height: 1.13;
}
#top #wrap_all .tw-home .tw-home-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
#top #wrap_all .tw-home .tw-home-hero-actions .tw-button { min-width: 132px; }
#top #wrap_all .tw-home .tw-home-about {
    display: grid;
    margin-top: var(--triwas-section-space);
    background: var(--triwas-color-surface);
    align-items: stretch;
}
#top #wrap_all .tw-home .tw-home-about-copy { padding: var(--triwas-copy-padding); }
#top #wrap_all .tw-home .tw-home-about-copy h2 { line-height: 1.08; }
#top #wrap_all .tw-home .tw-home-about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
#top #wrap_all .tw-home .tw-home-about-actions .tw-button { margin-top: 0; }
#top #wrap_all .tw-home .tw-home-about-image { min-width: 0; }
#top #wrap_all .tw-home .tw-home-about-image img { width: 100%; height: 100%; object-fit: cover; }
#top #wrap_all .tw-home .tw-home-quote { padding-block: var(--triwas-interlude-space); }
#top #wrap_all .tw-home .tw-home-quote blockquote {
    padding: 0;
    border: 0;
    margin: 0 auto;
    max-width: 990px;
    background: none;
    box-shadow: none;
    text-align: center;
    font-family: var(--triwas-quote-font);
    font-style: normal;
    font-weight: 400;
    font-size: var(--triwas-size-quote);
    line-height: var(--triwas-line-quote);
    color: var(--triwas-quote-color);
}
#top #wrap_all .tw-home .tw-home-quote p { margin: 0; }
#top #wrap_all .tw-home .tw-home-homes { margin-bottom: var(--triwas-section-space); }
#top #wrap_all .tw-home .tw-home-homes-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 480px;
    margin: 32px auto 0;
    text-align: center;
}
#top #wrap_all .tw-home .tw-home-homes h2 { text-align: center; margin: 0 0 34px; }
#top #wrap_all .tw-home .tw-home-homes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#top #wrap_all .tw-home .tw-home-home { display: block; min-width: 0; background: none; border: 0; box-shadow: none; }
#top #wrap_all .tw-home .tw-home-home img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
#top #wrap_all .tw-home .image-overlay { display: none !important; }
#top #wrap_all .tw-home .tw-home-valuation { display: grid; background: var(--triwas-color-surface); }
/* Homepage valuation keeps its square portrait, independent of text height. */
#top #wrap_all .tw-editorial.tw-home .tw-home-team-image { aspect-ratio: 1; align-self: start; }
#top #wrap_all .tw-editorial.tw-home .tw-home-team-image img { object-fit: cover; object-position: center; }
#top #wrap_all .tw-home .tw-home-valuation-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--triwas-copy-padding);
    text-align: center;
}
#top #wrap_all .tw-home .tw-home-valuation-copy p { max-width: 30ch; font-size: clamp(22px, 2vw, 28px); }
#top #wrap_all .tw-home .tw-home-valuation-copy .tw-home-valuation-title { margin-bottom: 24px; }
#top #wrap_all .tw-home .tw-home-valuation-copy .tw-home-valuation-description { line-height: 1.3; }
#top #wrap_all .tw-home .tw-home-valuation-copy .tw-button { margin-top: 10px; }
@keyframes triwas-home-zoom { from { transform: scale(1); } to { transform: scale(1.055); } }
@media (max-width: 900px) {
    #top #wrap_all .tw-home .tw-home-hero { min-height: 490px; aspect-ratio: 5 / 4; }
    #top #wrap_all .tw-home .tw-home-hero h1 { max-width: 650px; }
    #top #wrap_all .tw-home .tw-home-homes-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 767px) {
    #top #wrap_all .tw-home .tw-home-about { background: transparent; }
    #top #wrap_all .tw-editorial.tw-home .tw-home-about-image img {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    #top #wrap_all .tw-home { display: flex; flex-direction: column; }
    /* Keep optional listings after the requested hero/about/quote/team/valuation sequence. */
    #top #wrap_all .tw-home .tw-home-homes { order: 1; margin-top: var(--triwas-section-space); margin-bottom: 0; }
    #top #wrap_all .tw-home .tw-home-hero {
        width: 100%;
        display: block;
        aspect-ratio: auto;
        min-height: 0;
        background: var(--triwas-color-background);
    }
    #top #wrap_all .tw-home .tw-home-hero::after { display: none; }
    #top #wrap_all .tw-home .tw-home-hero-media,
    #top #wrap_all .tw-home .tw-home-hero-media picture,
    #top #wrap_all .tw-home .tw-home-hero-media img {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        display: block;
    }
    #top #wrap_all .tw-home .tw-home-hero-media { overflow: hidden; }
    #top #wrap_all .tw-home .tw-home-hero-media img { animation: none; transform: none; }
    #top #wrap_all .tw-home .tw-home-hero-content,
    #top #wrap_all .tw-home .tw-home-hero-video { display: none; }
    #top #wrap_all .tw-home .tw-home-hero h1 { color: var(--triwas-color-text); }
    #top #wrap_all .tw-home .tw-home-hero-actions .tw-button-outline { color: var(--triwas-color-button); border-color: var(--triwas-color-button); }
    #top #wrap_all .tw-home .tw-home-hero-actions .tw-button-outline:hover { background: var(--triwas-color-button); color: var(--triwas-color-white); }
}
@media (max-width: 520px) {
    #top #wrap_all .tw-home .tw-home-hero-content { padding: 28px 22px; }
    #top #wrap_all .tw-home .tw-home-hero-break { display: none; }
    #top #wrap_all .tw-home .tw-home-hero-actions { gap: 12px; }
    #top #wrap_all .tw-home .tw-home-hero-actions .tw-button { min-width: 116px; padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    #top #wrap_all .tw-home .tw-home-hero-media img { animation: none; transform: none; }
    #top #wrap_all .tw-home .tw-home-hero-video { display: none; }
}
