.pmh-homepage {
    --pmh-gap: 18px;
    --pmh-radius: 18px;
    --pmh-glass: rgba(255, 255, 255, 0.64);
    --pmh-border: rgba(255, 255, 255, 0.68);
    --pmh-text: #111114;
    --pmh-muted: #6b6f76;
    --pmh-shadow: 0 18px 44px rgba(26, 30, 40, 0.12);
    position: relative;
    min-height: 100vh;
    padding: clamp(10px, 2vw, 28px);
    color: var(--pmh-text);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.92), transparent 30%),
        linear-gradient(135deg, #f7f8fb 0%, #eef1f6 48%, #f9fafc 100%);
    isolation: isolate;
}

.pmh-homepage *,
.pmh-homepage *::before,
.pmh-homepage *::after {
    box-sizing: border-box;
}

.pmh-ambient {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    filter: blur(26px);
    opacity: 0.34;
}

.pmh-ambient-one {
    inset: 12% auto auto 4%;
    width: 220px;
    height: 220px;
    background: #b9ddff;
}

.pmh-ambient-two {
    right: 8%;
    bottom: 8%;
    width: 260px;
    height: 260px;
    background: #ffe1ed;
}

.pmh-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1760px;
    margin: 0 auto 22px;
    padding: 14px;
    border: 1px solid var(--pmh-border);
    border-radius: 24px;
    background: var(--pmh-glass);
    box-shadow: 0 14px 36px rgba(31, 35, 44, 0.08);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
}

.pmh-title {
    margin: 0;
    padding: 0 8px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 720;
    line-height: 1.1;
    letter-spacing: 0;
}

.pmh-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.pmh-search input {
    width: min(26vw, 260px);
    min-height: 42px;
    border: 1px solid rgba(18, 19, 22, 0.08);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--pmh-text);
    background: rgba(255, 255, 255, 0.72);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pmh-search input:focus {
    border-color: rgba(0, 113, 227, 0.48);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.pmh-filters {
    display: flex;
    gap: 8px;
    max-width: min(46vw, 720px);
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: none;
}

.pmh-filters::-webkit-scrollbar {
    display: none;
}

.pmh-filter,
.pmh-load-more {
    min-height: 40px;
    border: 1px solid rgba(18, 19, 22, 0.08);
    border-radius: 999px;
    padding: 0 15px;
    color: var(--pmh-text);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pmh-filter:hover,
.pmh-load-more:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 24px rgba(31, 35, 44, 0.1);
}

.pmh-filter.is-active {
    color: #fff;
    border-color: rgba(17, 17, 20, 0.9);
    background: rgba(17, 17, 20, 0.92);
}

.pmh-grid {
    max-width: 1760px;
    margin: 0 auto;
    column-count: 6;
    column-gap: var(--pmh-gap);
}

.pmh-grid.is-enhanced {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--pmh-gap);
    column-count: initial;
}

.pmh-column {
    display: flex;
    flex-direction: column;
    gap: var(--pmh-gap);
    min-width: 0;
}

.pmh-card {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 0 var(--pmh-gap) !important;
    padding: 0 !important;
    break-inside: avoid;
    border: 0 !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.68) !important;
    box-shadow: 0 14px 42px rgba(31, 38, 45, 0.06) !important;
    -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    backdrop-filter: blur(18px) saturate(150%) !important;
    transform: translateZ(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pmh-grid.is-enhanced .pmh-card {
    display: block !important;
    margin: 0 !important;
}

.pmh-homepage article.pmh-card > .pmh-image-link:first-child,
.pmh-homepage .pmh-grid article.pmh-card > a.pmh-image-link:first-child {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
    color: inherit !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.68) center / cover !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: top !important;
}

.pmh-homepage article.pmh-card > .pmh-image-link:first-child > .pmh-image:first-child,
.pmh-homepage .pmh-grid article.pmh-card > a.pmh-image-link:first-child > img.pmh-image:first-child {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    vertical-align: top !important;
}

.pmh-homepage .pmh-card > a.pmh-image-link:first-child {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.68) center / cover !important;
    border-radius: 0 !important;
}

.pmh-homepage .pmh-card > a.pmh-image-link:first-child > img.pmh-image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
    vertical-align: top !important;
}

.pmh-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 24px 70px rgba(31, 38, 45, 0.12) !important;
}

.pmh-image-link {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.68) center / cover;
    border-radius: 0;
}

.pmh-image-link br {
    display: none !important;
}

.pmh-image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    object-fit: cover;
    vertical-align: top;
    transition: filter 180ms ease, transform 220ms ease;
}

.pmh-image-link.pmh-ratio-original .pmh-image {
    object-fit: cover;
}

.pmh-image-link.pmh-ratio-custom .pmh-image {
    object-fit: cover;
}

.pmh-card:hover .pmh-image {
    filter: brightness(0.96) saturate(1.06);
}

.pmh-placeholder {
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.08)),
        repeating-linear-gradient(45deg, rgba(17, 17, 20, 0.04) 0 12px, transparent 12px 24px);
}

.pmh-card-body {
    display: grid !important;
    gap: 8px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 15px !important;
    border: 0 !important;
    background: transparent !important;
}

.pmh-card-title {
    display: block;
    margin: 0;
    color: var(--pmh-text);
    font-size: 15px;
    line-height: 1.28;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.pmh-card-title:hover,
.pmh-card-title:focus {
    color: var(--pmh-text);
    text-decoration: none;
}

.pmh-card-arrow {
    display: none;
}

.pmh-card:hover .pmh-card-arrow,
.pmh-card:focus-within .pmh-card-arrow {
    opacity: 1;
    transform: translateY(0);
}

.pmh-card.is-hidden,
.pmh-card.is-paged-out {
    display: none;
}

.pmh-load-wrap {
    display: flex;
    justify-content: center;
    margin: 28px auto 0;
}

.pmh-load-more[hidden] {
    display: none;
}

@media (min-width: 901px) {
    .pmh-card {
        border-radius: 26px !important;
    }

    .pmh-card-body {
        padding: 18px !important;
    }

    .pmh-card-title {
        font-size: 16px;
    }
}

.pmh-empty {
    max-width: 640px;
    margin: 8vh auto 0;
    padding: 28px;
    border: 1px solid var(--pmh-border);
    border-radius: 24px;
    text-align: center;
    background: var(--pmh-glass);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
}

.pmh-empty h2 {
    margin: 0 0 8px;
}

.pmh-empty p {
    margin: 0;
    color: var(--pmh-muted);
}

@media (max-width: 1280px) {
    .pmh-grid {
        column-count: 4;
    }

    .pmh-grid.is-enhanced {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .pmh-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .pmh-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .pmh-search input,
    .pmh-filters {
        width: 100%;
        max-width: 100%;
    }

    .pmh-grid {
        column-count: 3;
    }

    .pmh-grid.is-enhanced {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pmh-card {
        border-radius: 22px !important;
    }

    .pmh-card-body {
        padding: 12px !important;
    }

    .pmh-card-title {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .pmh-homepage {
        --pmh-gap: 10px;
        --pmh-radius: 14px;
        padding: 10px;
    }

    .pmh-topbar {
        top: 8px;
        margin-bottom: 12px;
        border-radius: 20px;
        padding: 12px;
    }

    .pmh-grid {
        column-count: 2;
    }

    .pmh-grid.is-enhanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pmh-card-title {
        font-size: 0.92rem;
    }

    .pmh-card-arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pmh-homepage *,
    .pmh-homepage *::before,
    .pmh-homepage *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
