/* Page Experience Hub block — colors/geometry match approved mockup + framework-resource-list. */

.page-experience-hub {
    --peh-blue: #3e57a3;
    --peh-blue-deep: #263766;
    --peh-ink: #17181a;
    --peh-line: #e6e7ec;
    --peh-tag-bg: #fef1df;
    --peh-tag-ink: #7c5310;
    --peh-radius: 12.5px;
    --peh-shadow: rgba(0, 0, 0, 0.34) 11px 14px 21px 0px;
}

/* -- Featured item -- */

.page-experience-hub__featured {
    display: block;
}

.page-experience-hub__featured-photo {
    display: block;
    width: 100%;
    position: relative;
    aspect-ratio: 2.6 / 1;
    max-height: 420px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--peh-blue) 0%, var(--peh-blue-deep) 100%);
}

@media (max-width: 640px) {
    .page-experience-hub__featured-photo {
        aspect-ratio: 4 / 3;
        max-height: none;
    }
}

.page-experience-hub__featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* White panel overlaps up into the photo's bottom edge (matches the
   featured-event card pattern on /events/) so the text reads as part of
   the image frame without sitting on top of the photo itself. */
.page-experience-hub__featured-panel {
    background: #fff;
    margin-top: -32px;
    position: relative;
    max-width: 92%;
    padding: 0.5rem 0 0.25rem;
}

@media (max-width: 640px) {
    .page-experience-hub__featured-panel {
        margin-top: -20px;
        max-width: 100%;
    }
}

.page-experience-hub__featured-meta {
    font-family: "Open Sans", sans-serif;
    font-size: 0.95rem;
    color: var(--peh-ink);
    margin: 0 0 0.2rem;
}

.page-experience-hub__featured-title {
    margin: 0.1rem 0 0.5rem;
}

.page-experience-hub__featured-title a {
    font-family: "Alata", sans-serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 1rem + 1.8vw, 2rem);
    line-height: 1.15;
    color: var(--peh-ink);
    text-decoration: none;
}

.page-experience-hub__featured-dek {
    font-family: "Open Sans", sans-serif;
    font-size: 1rem;
    color: var(--peh-ink);
    margin: 0 0 0.85rem;
    max-width: 70ch;
}

.page-experience-hub__featured-cta {
    display: inline-block;
    font-family: "Alata", sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--peh-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.page-experience-hub__featured-cta:hover {
    border-bottom-color: var(--peh-blue);
}

/* -- Rows -- */

.page-experience-hub__row {
    padding: 2.5rem 0;
    border-top: 1px solid var(--peh-line);
}

.page-experience-hub__row:first-of-type {
    border-top: none;
}

.page-experience-hub__row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.page-experience-hub__row-title {
    font-family: "Alata", sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0;
    color: var(--peh-ink);
}

.page-experience-hub__row-view-all {
    font-family: "Alata", sans-serif;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--peh-blue);
    text-decoration: none;
    white-space: nowrap;
}

/* -- Card grid -- */

.page-experience-hub__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.85rem;
}

/* Editor-configured tiles-per-row cap (Manual Row / Automated Row's "Tiles
   per row" field) — overrides the 4-column default. More tiles than the cap
   simply wrap to another row via the same column count, since grid's default
   auto-flow already does that with no extra CSS needed. */
.page-experience-hub__grid[data-max-cols="3"] {
    grid-template-columns: repeat(3, 1fr);
}
.page-experience-hub__grid[data-max-cols="2"] {
    grid-template-columns: repeat(2, 1fr);
}

/* Fewer tiles than the row's column count stretch to fill the row instead
   of sitting narrow with empty space alongside; a single tile is the one
   exception and intentionally stays narrow at any cap. */
@media (min-width: 1025px) {
    .page-experience-hub__grid[data-max-cols="4"]:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-experience-hub__grid[data-max-cols="4"]:has(> :nth-child(3):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }
    .page-experience-hub__grid[data-max-cols="3"]:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .page-experience-hub__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .page-experience-hub__grid { grid-template-columns: 1fr; }
}

.page-experience-hub__card {
    display: flex;
    flex-direction: column;
    border-radius: var(--peh-radius);
    box-shadow: var(--peh-shadow);
    overflow: hidden;
    background: #fff;
    text-decoration: none;
}

.page-experience-hub__card-thumb {
    aspect-ratio: 463 / 260;
    position: relative;
    background: linear-gradient(150deg, var(--peh-blue) 0%, var(--peh-blue-deep) 100%);
}

.page-experience-hub__card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-experience-hub__filetype-badge {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-experience-hub__file-icon {
    width: 30%;
    max-width: 56px;
    height: auto;
}

.page-experience-hub__card-body {
    padding: 0.85rem 1rem 1.1rem;
    display: flex;
    flex-direction: column;
}

.page-experience-hub__card-tag {
    display: inline-block;
    align-self: flex-start;
    font-family: "Open Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--peh-tag-ink);
    background: var(--peh-tag-bg);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.6rem;
}

.page-experience-hub__card-title {
    font-family: "Alata", sans-serif;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.35;
    margin: 0;
    color: var(--peh-blue);
}

.page-experience-hub__card-desc {
    font-family: "Open Sans", sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4b4f5a;
    margin: 0.4rem 0 0;
}

.page-experience-hub__ext-icon {
    width: 0.75em;
    height: 0.75em;
    vertical-align: middle;
    margin-left: 0.15em;
}

.page-experience-hub__source {
    font-family: "Open Sans", sans-serif;
    font-size: 0.7rem;
    color: #9ca3af;
    margin: 0.25rem 0 0;
}

@media (max-width: 640px) {
    .page-experience-hub__row-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}
