.kpa-home-section {
    background: linear-gradient(180deg, #fff 0%, var(--kp-paper, #fff7fb) 100%);
}

.kpa-home-heading {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 30px;
    align-items: end;
    margin-bottom: 28px;
}

.kpa-home-heading h2 {
    margin: 7px 0 0;
    color: var(--kp-primary, #4b164c);
    font-family: Georgia, serif;
    font-size: 42px;
    line-height: 1;
}

.kpa-home-heading p {
    margin: 0;
    color: #74616f;
    line-height: 1.55;
}

.kpa-home-grid {
    display: grid;
    gap: 16px;
}

.kpa-home-count-1 {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
}

.kpa-home-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpa-home-count-3 {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr);
    grid-template-rows: auto auto;
}

.kpa-home-count-3 .kpa-home-card-main {
    grid-row: 1 / 3;
}

.kpa-home-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
    border: 1px solid #eadde8;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(75, 22, 76, .06);
    overflow: hidden;
}

.kpa-home-card-main {
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
}

.kpa-home-card-main > img {
    width: 100%;
    height: 290px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.kpa-home-card-main > .kpa-home-date,
.kpa-home-card-main > div:last-child {
    margin-left: 18px;
    margin-right: 18px;
}

.kpa-home-card-main > div:last-child {
    min-width: 0;
    margin-bottom: 18px;
}

.kpa-home-date {
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 64px;
    min-height: 64px;
    border-radius: 16px;
    background: #fff0f7;
    color: var(--kp-secondary, #8d175f);
}

.kpa-home-date strong {
    font-size: 28px;
}

.kpa-home-date span {
    font-size: 10px;
    font-weight: 900;
}

.kpa-home-meta,
.kpa-meta {
    min-width: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.kpa-home-meta span,
.kpa-meta span {
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f8e7f2;
    color: #86185d;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    overflow-wrap: break-word;
}

.kpa-home-card h3 {
    margin: 8px 0 6px;
    color: var(--kp-primary, #4b164c);
    font-family: Georgia, serif;
    font-size: 24px;
    overflow-wrap: break-word;
}

.kpa-home-card p {
    margin: 0 0 9px;
    color: #6f5d6b;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.kpa-home-card small {
    color: #7e6b78;
}

.kpa-home-card.is-cancelled {
    opacity: .78;
    border-style: dashed;
}

.kpa-home-link {
    margin-top: 18px;
    text-align: right;
}

.kpa-home-link a {
    color: #8f1b61;
    font-weight: 900;
    text-decoration: none;
}

.kp-public-status-grid.kp-public-status-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

/* HOTFIX 8B.2.1 — a página pública nunca deve aumentar o viewport horizontal. */
.kpa-page,
.kpa-page * {
    box-sizing: border-box;
}

.kpa-page {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: #fff9fc;
    color: #3d2b39;
}

.kpa-page .kp-container,
.kpa-header,
.kpa-header .kp-container,
.kpa-preview-strip,
.kpa-preview-inner,
.kpa-main,
.kpa-intro,
.kpa-filters,
.kpa-section,
.kpa-section-title,
.kpa-grid,
.kpa-card,
.kpa-card-body,
.kpa-card-copy,
.kpa-past,
.kpa-past-list,
.kpa-footer,
.kpa-footer .kp-container {
    min-width: 0;
    max-width: 100%;
}

.kpa-header {
    border-bottom: 1px solid #eadde8;
    background: #fff;
}

.kpa-header .kp-container {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.kpa-header a {
    min-width: 0;
    max-width: 100%;
    color: var(--kp-primary, #4b164c);
    text-decoration: none;
    overflow-wrap: break-word;
}

.kpa-header nav {
    min-width: 0;
    display: flex;
    gap: 18px;
}

.kpa-preview-strip {
    width: 100%;
    padding: 0;
    background: #fff2c7;
    color: #6b4d00;
}

.kpa-preview-inner {
    min-height: 52px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.kpa-preview-inner strong,
.kpa-preview-inner span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.kpa-preview-inner strong {
    flex: 0 0 auto;
}

.kpa-preview-inner span {
    flex: 0 1 auto;
}

.kpa-main {
    padding-top: 54px;
    padding-bottom: 70px;
}

.kpa-intro {
    width: 100%;
    max-width: 900px;
    margin-bottom: 28px;
}

.kpa-eyebrow {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--kp-primary, #4b164c);
}

.kpa-intro h1,
.kpa-section-title h2 {
    max-width: 100%;
    font-family: Georgia, serif;
    color: var(--kp-primary, #4b164c);
    overflow-wrap: break-word;
    word-break: normal;
}

.kpa-intro h1 {
    margin: 10px 0 14px;
    font-size: 56px;
    line-height: .98;
}

.kpa-intro p {
    max-width: 680px;
    margin-right: 0;
    font-size: 18px;
    line-height: 1.55;
    color: #74616f;
    overflow-wrap: break-word;
}

.kpa-filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    padding: 16px;
    border: 1px solid #eadde8;
    border-radius: 18px;
    background: #fff;
}

.kpa-filters input,
.kpa-filters select,
.kpa-filters button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d9c8d5;
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.kpa-filters button {
    background: var(--kp-button-surface, var(--kp-primary, #4b164c));
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.kpa-section {
    margin-top: 46px;
}

.kpa-section-title span {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
    color: #9a256d;
}

.kpa-section-title h2 {
    margin: 8px 0 22px;
    font-size: 38px;
}

.kpa-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.kpa-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid #eadde8;
    border-radius: 24px;
    background: #fff;
}

.kpa-card > img {
    width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.kpa-card-body {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
}

.kpa-card-copy {
    min-width: 0;
}

.kpa-card h3 {
    max-width: 100%;
    margin: 8px 0;
    font-family: Georgia, serif;
    color: var(--kp-primary, #4b164c);
    font-size: 25px;
    overflow-wrap: break-word;
}

.kpa-card p {
    max-width: 100%;
    color: #6f5d6b;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.kpa-card ul {
    max-width: 100%;
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.kpa-card li {
    max-width: 100%;
    padding: 6px 9px;
    border-radius: 999px;
    background: #faf1f6;
    color: #704c65;
    font-size: 12px;
    overflow-wrap: break-word;
}

.kpa-card-featured {
    box-shadow: 0 18px 48px rgba(75, 22, 76, .1);
}

.kpa-card-cancelled {
    opacity: .8;
    border-style: dashed;
}

.kpa-empty {
    max-width: 100%;
    padding: 30px;
    border: 1px dashed #d9c8d5;
    border-radius: 18px;
    text-align: center;
    color: #766472;
    overflow-wrap: break-word;
}

.kpa-past-list {
    display: grid;
    gap: 10px;
}

.kpa-past-list article {
    min-width: 0;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid #eadde8;
}

.kpa-past-list article > * {
    min-width: 0;
    max-width: 100%;
}

.kpa-past-list strong,
.kpa-past-list span {
    display: block;
    overflow-wrap: break-word;
}

.kpa-past-list span {
    margin-top: 4px;
    color: #7b6976;
}

.kpa-past-list em {
    font-style: normal;
    color: var(--kp-secondary, #8d175f);
    font-weight: 800;
}

.kpa-footer {
    background: #351034;
    color: #fff;
}

.kpa-footer .kp-container {
    min-height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.kpa-footer a {
    color: #fff;
    overflow-wrap: break-word;
}

@media (max-width: 900px) {
    .kpa-home-heading {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpa-home-count-2,
    .kpa-home-count-3 {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
    }

    .kpa-home-count-3 .kpa-home-card-main {
        grid-row: auto;
    }

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

    .kpa-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 430 px cobre iPhone 14 Pro Max; 700 px deixa também tablets estreitos protegidos. */
@media (max-width: 700px) {
    .kpa-page .kp-container {
        width: min(100% - 28px, 1180px);
        margin-inline: auto;
    }

    .kpa-header .kp-container {
        min-height: 62px;
    }

    .kpa-header nav {
        display: none;
    }

    .kpa-header strong {
        display: block;
        font-size: 15px;
        line-height: 1.25;
    }

    .kpa-preview-inner {
        min-height: 0;
        padding-top: 12px;
        padding-bottom: 12px;
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        text-align: left;
    }

    .kpa-preview-inner strong {
        font-size: 12px;
        letter-spacing: .04em;
    }

    .kpa-preview-inner span {
        font-size: 13px;
        line-height: 1.45;
    }

    .kpa-main {
        padding-top: 30px;
        padding-bottom: 48px;
    }

    .kpa-intro {
        width: 100%;
        max-width: none;
        margin-bottom: 22px;
    }

    .kpa-intro h1 {
        width: 100%;
        margin-top: 8px;
        margin-bottom: 12px;
        font-size: clamp(2.25rem, 11vw, 3rem);
        line-height: 1.02;
        letter-spacing: -.035em;
    }

    .kpa-intro p {
        width: 100%;
        max-width: none;
        margin: 0;
        font-size: 16px;
        line-height: 1.55;
    }

    .kpa-filters {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        padding: 14px;
        border-radius: 16px;
    }

    .kpa-filters input,
    .kpa-filters select,
    .kpa-filters button {
        min-height: 46px;
    }

    .kpa-section {
        margin-top: 36px;
    }

    .kpa-section-title h2 {
        margin-bottom: 18px;
        font-size: clamp(1.9rem, 9vw, 2.35rem);
        line-height: 1.05;
    }

    .kpa-card {
        border-radius: 20px;
    }

    .kpa-card > img {
        height: auto;
        max-height: none;
        object-fit: contain;
    }

    .kpa-card-body {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
    }

    .kpa-card h3 {
        font-size: 21px;
        line-height: 1.12;
    }

    .kpa-card p {
        margin-top: 7px;
        font-size: 14px;
        line-height: 1.5;
    }

    .kpa-card li {
        border-radius: 12px;
    }

    .kpa-past-list article {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        padding-inline: 4px;
    }

    .kpa-footer .kp-container {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .kpa-home-heading {
        gap: 12px;
    }

    .kpa-home-heading h2 {
        font-size: 34px;
    }

    .kpa-home-card {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .kpa-home-card-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpa-home-card-main > img {
        height: auto;
        max-height: none;
        object-fit: contain;
    }
}

@media (max-width: 380px) {
    .kpa-page .kp-container {
        width: min(100% - 22px, 1180px);
    }

    .kpa-intro h1 {
        font-size: 2.15rem;
    }

    .kpa-card-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpa-date {
        width: 58px;
    }
}
