/*
 * Homepage Showcase
 * Loaded only when template-home-showcase.php is selected.
 */

.acms-showcase-template {
    --amh-navy: #071b38;
    --amh-blue: #0878ec;
    --amh-blue-dark: #0364ce;
    --amh-blue-soft: #eaf4ff;
    --amh-ink: #0b1d37;
    --amh-muted: #607087;
    --amh-line: #dce5f1;
    --amh-surface: #fff;
    --amh-background: #fff;
    background: var(--amh-background);
}

.acms-showcase-template .post-disclosure {
    display: none;
}

.acms-home-showcase {
    background: var(--amh-background);
    color: var(--amh-ink);
    overflow: hidden;
}

.amh-container {
    margin-inline: auto;
    max-width: 1240px;
    padding-inline: 32px;
    width: 100%;
}

.amh-hero {
    background:
        radial-gradient(circle at 78% 35%, color-mix(in srgb, var(--amh-blue) 12%, transparent), transparent 30%),
        linear-gradient(
            135deg,
            var(--amh-surface) 0%,
            color-mix(in srgb, var(--amh-surface) 94%, var(--amh-blue) 6%) 54%,
            color-mix(in srgb, var(--amh-surface) 88%, var(--amh-blue) 12%) 100%
        );
    border-bottom: 1px solid var(--amh-line);
    padding: 52px 0 46px;
    position: relative;
}

.amh-hero::before {
    background-image: radial-gradient(color-mix(in srgb, var(--amh-blue) 14%, transparent) 1px, transparent 1px);
    background-size: 20px 20px;
    content: "";
    inset: 0 0 0 52%;
    mask-image: linear-gradient(90deg, transparent, #000);
    opacity: 0.35;
    pointer-events: none;
    position: absolute;
}

.amh-hero__grid {
    align-items: center;
    display: grid;
    gap: 54px;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: 440px;
    position: relative;
}

.amh-hero__content {
    max-width: 670px;
    position: relative;
    z-index: 2;
}

.amh-eyebrow,
.amh-section-heading__eyebrow {
    color: var(--amh-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.amh-eyebrow {
    align-items: center;
    background: var(--amh-blue-soft);
    border: 1px solid color-mix(in srgb, var(--amh-blue) 24%, var(--amh-surface));
    border-radius: 999px;
    display: inline-flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
}

.amh-eyebrow i {
    font-size: 14px;
}

.amh-hero__title {
    color: var(--amh-ink);
    font-size: clamp(40px, 4.35vw, 58px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0;
    max-width: 650px;
    text-wrap: balance;
}

.amh-hero__title span {
    color: var(--amh-blue);
}

.amh-hero__description {
    color: var(--amh-muted);
    font-size: 17px;
    line-height: 1.7;
    margin: 20px 0 22px;
    max-width: 590px;
}

.amh-search {
    align-items: center;
    background: var(--amh-surface);
    border: 1px solid var(--amh-line);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(26, 61, 102, 0.1);
    display: flex;
    max-width: 590px;
    padding: 5px;
}

.amh-search > i {
    color: #7d8ba0;
    flex: 0 0 auto;
    margin-left: 13px;
}

.amh-search input {
    background: transparent;
    border: 0;
    color: var(--amh-ink);
    flex: 1;
    font: inherit;
    min-width: 0;
    outline: 0;
    padding: 12px;
}

.amh-search button {
    background: var(--amh-blue);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 13px 22px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.amh-search button:hover {
    background: var(--amh-blue-dark);
    transform: translateY(-1px);
}

.amh-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.amh-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: 0 21px;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.amh-button:hover {
    transform: translateY(-2px);
}

.amh-button--primary {
    background: var(--amh-blue);
    box-shadow: 0 9px 22px color-mix(in srgb, var(--amh-blue) 22%, transparent);
    color: #fff;
}

.amh-button--secondary {
    background: var(--amh-surface);
    border-color: var(--amh-line);
    color: var(--amh-ink);
}

.amh-trust-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 30px;
}

.amh-trust-list > div {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.amh-trust-list i {
    color: var(--amh-blue);
    font-size: 25px;
    flex: 0 0 auto;
}

.amh-trust-list span {
    color: #78869a;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    line-height: 1.4;
}

.amh-trust-list strong {
    color: var(--amh-ink);
    font-size: 12px;
}

.amh-hero__visual {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 440px;
    position: relative;
}

.amh-hero__orb {
    background: linear-gradient(
        145deg,
        var(--amh-blue-soft),
        color-mix(in srgb, var(--amh-blue) 22%, var(--amh-surface))
    );
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    height: min(450px, 38vw);
    position: absolute;
    width: min(450px, 38vw);
}

.amh-hero__orb::after {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    bottom: -25px;
    box-shadow: 0 18px 30px rgba(42, 78, 119, 0.12);
    content: "";
    height: 105px;
    left: 3%;
    position: absolute;
    transform: perspective(240px) rotateX(60deg);
    width: 94%;
}

.amh-hero__featured-image {
    align-items: center;
    display: flex;
    height: 410px;
    justify-content: center;
    position: relative;
    width: 100%;
    z-index: 1;
}

.amh-hero__featured-image img {
    filter: drop-shadow(0 22px 22px rgba(23, 50, 85, 0.22));
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.amh-hero__collage {
    height: 410px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.amh-hero__collage-card {
    background: var(--amh-surface);
    border: 7px solid var(--amh-surface);
    border-radius: 22px;
    box-shadow: 0 24px 45px rgba(23, 50, 85, 0.2);
    display: block;
    overflow: hidden;
    position: absolute;
}

.amh-hero__collage-card img,
.amh-hero__collage-card span {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.amh-hero__collage-card span {
    align-items: center;
    background: var(--amh-surface);
    color: var(--amh-blue);
    display: flex;
    font-size: 48px;
    justify-content: center;
}

.amh-hero__collage-card--1 {
    height: 235px;
    left: 23%;
    top: 78px;
    transform: rotate(-4deg);
    width: 55%;
    z-index: 3;
}

.amh-hero__collage-card--2 {
    height: 165px;
    left: 2%;
    top: 190px;
    transform: rotate(-8deg);
    width: 38%;
    z-index: 2;
}

.amh-hero__collage-card--3 {
    height: 165px;
    right: 0;
    top: 190px;
    transform: rotate(8deg);
    width: 37%;
    z-index: 2;
}

.amh-hero__placeholder {
    align-items: end;
    display: flex;
    gap: 20px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.amh-hero__placeholder i {
    align-items: center;
    background: var(--amh-surface);
    border-radius: 24px;
    box-shadow: 0 20px 35px rgba(23, 50, 85, 0.17);
    color: var(--amh-navy);
    display: flex;
    font-size: 72px;
    height: 155px;
    justify-content: center;
    width: 155px;
}

.amh-hero__placeholder i:nth-child(2) {
    height: 205px;
    width: 205px;
}

.amh-categories {
    background: var(--amh-background);
    padding: 42px 0 46px;
}

.amh-section-heading {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.amh-section-heading h2 {
    color: var(--amh-ink);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 4px 0 0;
}

.amh-section-heading > a {
    align-items: center;
    color: var(--amh-blue);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 750;
    gap: 7px;
    text-decoration: none;
}

.amh-section-heading > a:hover i {
    transform: translateX(3px);
}

.amh-section-heading > a i {
    transition: transform 0.2s ease;
}

.amh-category-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.amh-category {
    align-items: center;
    border-radius: 14px;
    color: var(--amh-ink);
    display: flex;
    flex-direction: column;
    padding: 10px 4px 12px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.amh-category:hover {
    background: var(--amh-blue-soft);
    color: var(--amh-blue);
    transform: translateY(-4px);
}

.amh-category__icon {
    align-items: center;
    background: linear-gradient(145deg, #f7f9fc, #e7eef7);
    border: 1px solid #e1e9f3;
    border-radius: 50%;
    color: var(--amh-navy);
    display: flex;
    font-size: 31px;
    height: 82px;
    justify-content: center;
    margin-bottom: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
    width: 82px;
}

.amh-category:hover .amh-category__icon {
    background: var(--amh-blue-soft);
    color: var(--amh-blue);
}

.amh-category strong {
    font-size: 13px;
    line-height: 1.25;
}

.amh-category small {
    color: #7f8da0;
    font-size: 11px;
    margin-top: 4px;
}

.amh-content-sections {
    background: color-mix(in srgb, var(--amh-background) 94%, var(--amh-blue) 6%);
    border-top: 1px solid var(--amh-line);
    padding: 12px 0 26px;
}

.amh-content-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.31fr);
}

.amh-content-layout--no-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

.amh-content-layout--sidebar-left {
    grid-template-columns: minmax(280px, 0.31fr) minmax(0, 1fr);
}

.amh-content-layout--sidebar-left .amh-content-layout__main {
    order: 2;
}

.amh-content-layout--sidebar-left .amh-sidebar {
    order: 1;
}

.amh-content-layout__main,
.amh-sidebar {
    min-width: 0;
}

.amh-content-layout:not(.amh-content-layout--no-sidebar) .amh-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-grid .amh-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-grid-4col .amh-post-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-post-grid {
    grid-template-columns: 1fr;
}

.amh-sidebar {
    padding: 44px 0 22px;
}

.amh-sidebar .content-layout__sidebar {
    display: block;
}

.amh-widget-list,
.amh-sidebar .sidebar {
    display: grid;
    gap: 16px;
}

.amh-sidebar .sidebar-widget {
    min-width: 0;
    margin: 0;
    padding: 20px;
    border: 1px solid var(--amh-line);
    border-radius: 10px;
    background: var(--amh-surface);
    box-shadow: 0 6px 18px rgba(26, 61, 102, 0.045);
}

.amh-sidebar .sidebar-widget__header {
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--amh-line);
}

.amh-sidebar .sidebar-widget__title,
.amh-sidebar .widget-title,
.amh-sidebar .sidebar-widget > .wp-block-heading {
    margin: 0;
    color: var(--amh-ink);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-transform: none;
}

.amh-sidebar .sidebar-widget img {
    max-width: 100%;
    height: auto;
}

.amh-sidebar .sidebar-widget select,
.amh-sidebar .sidebar-widget input {
    max-width: 100%;
}

.amh-sidebar .sidebar-widget > ul,
.amh-sidebar .sidebar-widget > ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.amh-sidebar .sidebar-widget a {
    overflow-wrap: anywhere;
}

.amh-post-section {
    padding: 44px 0 22px;
    scroll-margin-top: 90px;
}

.amh-section-heading--posts {
    align-items: center;
}

.amh-section-heading__title-group {
    align-items: center;
    display: flex;
    gap: 14px;
}

.amh-section-heading__icon {
    align-items: center;
    background: var(--amh-blue-soft);
    border: 1px solid color-mix(in srgb, var(--amh-blue) 24%, var(--amh-surface));
    border-radius: 11px;
    color: var(--amh-blue);
    display: flex;
    flex: 0 0 43px;
    font-size: 21px;
    height: 43px;
    justify-content: center;
}

.amh-section-heading--posts h2 {
    font-size: 21px;
    margin: 0;
}

.amh-section-heading--posts p {
    color: var(--amh-muted);
    font-size: 13px;
    margin: 4px 0 0;
}

.amh-post-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.amh-card {
    background: var(--amh-surface);
    border: 1px solid var(--amh-line);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(26, 61, 102, 0.045);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.amh-card:hover {
    border-color: color-mix(in srgb, var(--amh-blue) 38%, var(--amh-line));
    box-shadow: 0 16px 32px rgba(26, 61, 102, 0.12);
    transform: translateY(-5px);
}

.amh-card__image {
    aspect-ratio: 16 / 9;
    background: #edf3fa;
    display: block;
    overflow: hidden;
    position: relative;
}

.amh-card__image img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    width: 100%;
}

.amh-card:hover .amh-card__image img {
    transform: scale(1.045);
}

.amh-card__label {
    background: var(--amh-blue);
    border-radius: 4px;
    bottom: 9px;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    left: 10px;
    letter-spacing: 0.045em;
    max-width: calc(100% - 20px);
    overflow: hidden;
    padding: 4px 7px;
    position: absolute;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.amh-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.amh-card__body h3 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.018em;
    line-height: 1.38;
    margin: 0;
}

.amh-card__body h3 a {
    color: var(--amh-ink);
    text-decoration: none;
}

.amh-card__body h3 a:hover {
    color: var(--amh-blue);
}

.amh-card__body > p {
    color: var(--amh-muted);
    display: -webkit-box;
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-height: 1.55;
    margin: 9px 0 14px;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.amh-card__meta {
    align-items: center;
    color: #7f8da0;
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;
    gap: 7px;
    margin-top: auto;
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card__image {
    min-height: 220px;
    aspect-ratio: auto;
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card__body {
    justify-content: center;
    padding: 24px;
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card__body h3 {
    font-size: 20px;
}

.amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card__body > p {
    -webkit-line-clamp: 3;
}

.acms-showcase-template .site-footer {
    margin-top: 0;
}

@media (max-width: 1100px) {
    .amh-hero__grid {
        gap: 28px;
        grid-template-columns: minmax(0, 1fr) minmax(350px, 0.82fr);
    }

    .amh-hero__title {
        font-size: clamp(40px, 4.7vw, 52px);
    }

    .amh-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        row-gap: 22px;
    }

    .amh-content-layout.amh-content-layout--no-sidebar .amh-post-grid,
    .amh-content-layout:not(.amh-content-layout--no-sidebar) .amh-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .amh-content-layout {
        grid-template-columns: 1fr;
    }

    .amh-content-layout .amh-content-layout__main {
        order: 1;
    }

    .amh-content-layout .amh-sidebar {
        order: 2;
        padding-top: 10px;
    }

    .amh-widget-list,
    .amh-sidebar .sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .amh-widget-list > :last-child:nth-child(odd),
    .amh-sidebar .sidebar > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .amh-container {
        padding-inline: 22px;
    }

    .amh-hero {
        padding: 44px 0 34px;
    }

    .amh-hero__grid {
        grid-template-columns: 1fr;
    }

    .amh-hero__content {
        max-width: none;
    }

    .amh-hero__visual {
        min-height: 390px;
        order: 2;
    }

    .amh-hero__orb {
        height: 360px;
        width: 360px;
    }

    .amh-hero__collage,
    .amh-hero__featured-image {
        height: 350px;
        max-width: 560px;
    }

}

@media (max-width: 640px) {
    .amh-container {
        padding-inline: 16px;
    }

    .amh-hero__title {
        font-size: 36px;
        line-height: 1.1;
    }

    .amh-hero__description {
        font-size: 15px;
    }

    .amh-search {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .amh-search input {
        width: calc(100% - 42px);
    }

    .amh-search button {
        width: 100%;
    }

    .amh-trust-list {
        gap: 14px;
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .amh-hero__visual {
        min-height: 310px;
    }

    .amh-hero__orb {
        height: 290px;
        width: 290px;
    }

    .amh-hero__collage,
    .amh-hero__featured-image {
        height: 285px;
    }

    .amh-hero__collage-card--1 {
        height: 170px;
        left: 20%;
        top: 55px;
        width: 60%;
    }

    .amh-hero__collage-card--2,
    .amh-hero__collage-card--3 {
        height: 115px;
        top: 150px;
        width: 38%;
    }

    .amh-section-heading {
        align-items: flex-start;
    }

    .amh-section-heading--posts {
        align-items: flex-end;
    }

    .amh-section-heading--posts p {
        display: none;
    }

    .amh-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .amh-content-layout.amh-content-layout--no-sidebar .amh-post-grid,
    .amh-content-layout:not(.amh-content-layout--no-sidebar) .amh-post-grid {
        grid-template-columns: 1fr;
    }

    .amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card {
        grid-template-columns: 1fr;
    }

    .amh-content-layout--no-sidebar.amh-content-layout--cards-list .amh-card__image {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .amh-widget-list,
    .amh-sidebar .sidebar {
        grid-template-columns: 1fr;
    }

    .amh-widget-list > :last-child:nth-child(odd),
    .amh-sidebar .sidebar > :last-child:nth-child(odd) {
        grid-column: auto;
    }

    .amh-card__body h3 {
        font-size: 17px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .acms-home-showcase *,
    .acms-home-showcase *::before,
    .acms-home-showcase *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
