/* ==========================================================
   Případové studie (pripadove-studie.php)
   ========================================================== */

.page-pripadove-studie {
    --ps-accent: #3096a8;          /* tyrkysový eyebrow */
    --ps-heading: #191b22;         /* nadpisy karet */
    --ps-border: #c6c5d2;
    --ps-chip-bg: #f3f3fd;
    --ps-cta-bg: #e7e7f1;
    --ps-stat-bg: rgba(14, 34, 107, 0.05);
    --ps-stat-border: rgba(14, 34, 107, 0.1);
}

/* Vnitřní odsazení sekcí (24px uvnitř 1200px kontejneru = obsah 1152px) */
.ps-hero__inner,
.ps-bento,
.ps-cta { margin-inline: 24px; }

/* ---------- Hero ---------- */
.ps-hero { padding-top: 80px; padding-bottom: 96px; }
.ps-hero__inner { display: flex; flex-direction: column; gap: 40px; }
.ps-hero__text { max-width: 100%; display: flex; flex-direction: column; gap: 16px; }

.ps-eyebrow {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ps-accent);
}
.ps-hero__title {
    width: 827px;
    max-width: 100%;
    font-family: var(--f-heading);
    font-weight: 700;
    font-size: 64px;
    line-height: 60px;
    letter-spacing: -0.48px;
    color: var(--c-primary);
}
.ps-hero__lead { max-width: 768px; padding-top: 8px; font-size: 18px; line-height: 28px; color: var(--c-text); }

/* Filtry */
.ps-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.ps-chip {
    padding: 9px 25px;
    border: 1px solid var(--ps-border);
    border-radius: 9999px;
    background: var(--ps-chip-bg);
    font-family: var(--f-body);
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.6px;
    color: var(--c-text);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.ps-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.ps-chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.ps-chip:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

/* ---------- Bento grid ---------- */
.ps-bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(422px, auto);
    gap: 24px;
}
.ps-card {
    background: var(--c-white);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    padding: 41px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
    animation: ps-fade .3s ease;
}
.ps-card--wide { grid-column: span 8; display: flex; gap: 40px; align-items: stretch; }
.ps-card--narrow { grid-column: span 4; display: flex; flex-direction: column; }
/* Pořadí jako ve Figmě: 8+4 / 4+8 */
.ps-bento > .ps-card:nth-child(1) { grid-column: 1 / span 8; }
.ps-bento > .ps-card:nth-child(2) { grid-column: 9 / span 4; }
.ps-bento > .ps-card:nth-child(3) { grid-column: 1 / span 4; }
.ps-bento > .ps-card:nth-child(4) { grid-column: 5 / span 8; }

.ps-card[hidden] { display: none; }

.ps-card__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.ps-card__tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.6px;
    color: var(--c-text);
}
.ps-card__tag img { flex: none; }
.ps-card--narrow .ps-card__tag,
.ps-card--narrow .ps-card__title { margin-bottom: 16px; }

.ps-card__title {
    font-family: var(--f-heading);
    font-weight: 500;
    font-size: 24px;
    line-height: 32px;
    color: var(--ps-heading);
}
.ps-card__title--lg { font-weight: 600; font-size: 32px; line-height: 40px; }

.ps-card__text { font-size: 14px; line-height: 20px; color: var(--c-text); }
.ps-card__text--lg { font-size: 16px; line-height: 24px; }
.ps-card--narrow .ps-card__text { padding-bottom: 24px; }

.ps-card__figure { padding-block: 24px; }

.ps-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 8px;
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--c-primary);
}
.ps-card__link img { flex: none; transition: transform .2s; }
.ps-card__link:hover img { transform: translateX(3px); }
.ps-card__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.ps-stat {
    font-family: var(--f-heading);
    font-weight: 700;
    font-size: 64px;
    line-height: 72px;
    letter-spacing: -1.28px;
    color: var(--c-primary);
    white-space: nowrap;
}
.ps-stat__label {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--c-text);
}
.ps-stat-box {
    flex: 0 0 256px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: var(--ps-stat-bg);
    border: 1px solid var(--ps-stat-border);
    border-radius: 8px;
    text-align: center;
}
.ps-stat-box .ps-stat__label { padding-top: 8px; white-space: nowrap; }
@media (max-width: 1100px) { .ps-stat-box .ps-stat__label { white-space: normal; } }

/* Filtrovaný stav – viditelné karty přes celou šířku */
.ps-bento.is-filtered { grid-auto-rows: auto; }
.ps-bento.is-filtered > .ps-card { grid-column: 1 / -1; min-height: 422px; }
.ps-bento.is-filtered > .ps-card--narrow { min-height: 0; max-width: 100%; }

.ps-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 41px;
    border: 1px dashed var(--ps-border);
    border-radius: 12px;
    background: var(--c-white);
}
.ps-empty[hidden] { display: none; }
.ps-empty__title { font-family: var(--f-heading); font-weight: 600; font-size: 24px; line-height: 32px; color: var(--ps-heading); }
.ps-empty__text { font-size: 16px; line-height: 24px; color: var(--c-text); }

@keyframes ps-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-card { animation: none; } }

/* ---------- Image break ---------- */
.ps-break { padding-block: 80px; }
.ps-break__media { position: relative; height: 400px; overflow: hidden; }
.ps-break__img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.ps-break__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 34, 107, 0.4);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}
.ps-break__content {
    max-width: 1200px;
    padding-inline: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15.5px;
    text-align: center;
    color: var(--c-white);
}
.ps-break__title {
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -0.48px;
}
.ps-break__text { font-size: 18px; line-height: 28px; }

/* ---------- CTA ---------- */
.ps-cta-wrap { padding-bottom: 80px; }
.ps-cta {
    position: relative;
    overflow: hidden;
    padding: 80px;
    border-radius: 24px;
    background: var(--ps-cta-bg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.ps-cta__blob {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 9999px;
    filter: blur(32px);
    pointer-events: none;
}
.ps-cta__blob--br { right: -80px; bottom: -80px; background: rgba(14, 34, 107, 0.05); }
.ps-cta__blob--tl { left: -80px; top: -80px; background: rgba(48, 150, 168, 0.05); }
.ps-cta__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.ps-cta__title {
    font-family: var(--f-heading);
    font-weight: 600;
    font-size: 56px;
    line-height: 56px;
    letter-spacing: -0.48px;
    color: var(--ps-heading);
}
.ps-cta__text { max-width: 672px; font-size: 18px; line-height: 28px; color: var(--c-text); }
.ps-cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; padding-top: 16px; }

.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    padding: 0 40px;
    border-radius: 8px;
    font-family: var(--f-heading);
    font-weight: 500;
    font-size: 24px;
    line-height: 32px;
    white-space: nowrap;
    transition: background-color .2s, color .2s, box-shadow .2s;
}
.ps-btn--primary {
    background: var(--c-primary);
    color: var(--c-white);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.ps-btn--primary:hover { background: #1a3290; }
.ps-btn--outline { border: 1px solid var(--c-primary); color: var(--c-primary); }
.ps-btn--outline:hover { background: var(--c-primary); color: var(--c-white); }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
    .ps-hero__inner, .ps-bento, .ps-cta { margin-inline: 0; }
    .ps-hero { padding-top: 56px; padding-bottom: 64px; }
    .ps-hero__title { font-size: 48px; line-height: 52px; }

    .ps-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
    .ps-bento > .ps-card:nth-child(n) { grid-column: 1 / -1; }
    .ps-bento > .ps-card--narrow:nth-child(n) { grid-column: span 1; }
    .ps-bento.is-filtered > .ps-card:nth-child(n) { grid-column: 1 / -1; min-height: 0; }
    .ps-card--wide { min-height: 380px; }
    .ps-card--narrow .ps-card__figure { margin-top: auto; }

    .ps-break { padding-block: 64px; }
    .ps-break__media { height: 360px; }
    .ps-break__title { font-size: 40px; line-height: 48px; }

    .ps-cta { padding: 64px 40px; }
    .ps-cta__title { font-size: 44px; line-height: 50px; }
    .ps-cta-wrap { padding-bottom: 64px; }
}

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
    .ps-hero { padding-top: 40px; padding-bottom: 48px; }
    .ps-hero__inner { gap: 32px; }
    .ps-hero__title { font-size: 36px; line-height: 40px; }
    .ps-hero__title br { display: none; }
    .ps-hero__lead { font-size: 16px; line-height: 26px; }
    .ps-filters { gap: 8px; }
    .ps-chip { padding: 8px 18px; }

    .ps-bento { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .ps-bento > .ps-card--narrow:nth-child(n) { grid-column: 1 / -1; }
    .ps-card { padding: 24px; }
    .ps-card--wide, .ps-card--reverse { flex-direction: column; gap: 24px; min-height: 0; }
    .ps-card--reverse .ps-stat-box { order: 2; }
    .ps-stat-box { flex-basis: auto; padding: 32px 20px; }
    .ps-card__title--lg { font-size: 26px; line-height: 32px; }
    .ps-card__title br { display: none; }
    .ps-stat { font-size: 52px; line-height: 60px; }
    .ps-empty { padding: 24px; }

    .ps-break { padding-block: 48px; }
    .ps-break__media { height: 320px; }
    .ps-break__title { font-size: 30px; line-height: 36px; }
    .ps-break__text { font-size: 16px; line-height: 24px; }

    .ps-cta { padding: 48px 20px; border-radius: 16px; }
    .ps-cta__title { font-size: 32px; line-height: 38px; }
    .ps-cta__text { font-size: 16px; line-height: 26px; }
    .ps-cta__text br { display: none; }
    .ps-cta__actions { flex-direction: column; align-items: stretch; width: 100%; }
    .ps-btn { height: 56px; font-size: 20px; padding: 0 24px; }
    .ps-cta-wrap { padding-bottom: 48px; }
}
@media (max-width: 560px) {
    .ps-bento.is-filtered > .ps-card:nth-child(n) { min-height: 0; }
}
