/*
 * SOFON Human Design 1.0.1
 * Phase 02B – opravy layoutu a jemnější animované pozadí
 */

:root {
    --human-canvas: #f2f5f8;
    --human-canvas-alt: #ebf1f5;
    --human-surface: rgba(255, 255, 255, 0.9);
    --human-surface-solid: #ffffff;
    --human-surface-soft: #f8fbfc;
    --human-ink: #18232c;
    --human-ink-soft: #344650;
    --human-muted: #6a7a84;
    --human-line: rgba(35, 61, 75, 0.12);
    --human-line-strong: rgba(35, 61, 75, 0.2);
    --human-red: #b9274c;
    --human-red-bright: #df4968;
    --human-red-soft: #f7dfe6;
    --human-blue: #3b708a;
    --human-blue-soft: #dcebf1;
    --human-teal: #4d8e8b;
    --human-shadow-sm: 0 10px 30px rgba(27, 48, 58, 0.08);
    --human-shadow-md: 0 18px 50px rgba(27, 48, 58, 0.12);
    --human-shadow-lg: 0 28px 80px rgba(27, 48, 58, 0.16);
    --human-radius-sm: 14px;
    --human-radius-md: 22px;
    --human-radius-lg: 34px;
    --human-reading: 880px;
    --human-wide: 1160px;
    --human-ease: cubic-bezier(.2, .75, .25, 1);
}

html {
    scroll-behavior: smooth;
}

body.sofon-human-design {
    position: relative;
    color: var(--human-ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(185, 39, 76, 0.1), transparent 24rem),
        radial-gradient(circle at 88% 12%, rgba(59, 112, 138, 0.14), transparent 30rem),
        linear-gradient(180deg, #fbfcfd 0%, var(--human-canvas) 46%, #f7fafb 100%);
    background-size: 140% 140%, 150% 150%, 100% 100%;
    animation: human-bg-shift 24s ease-in-out infinite alternate;
}

body.sofon-human-design::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .36;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(185, 39, 76, .12) 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 65%, rgba(59, 112, 138, .12) 0 1px, transparent 1.5px);
    background-size: 44px 44px, 58px 58px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
    animation: human-grain-drift 28s linear infinite;
}

body.sofon-human-design::after {
    content: "";
    position: fixed;
    inset: -12% -6%;
    z-index: -3;
    pointer-events: none;
    opacity: .72;
    background:
        radial-gradient(circle at 18% 24%, rgba(223, 73, 104, .16), transparent 23rem),
        radial-gradient(circle at 77% 18%, rgba(76, 142, 139, .16), transparent 25rem),
        radial-gradient(circle at 68% 82%, rgba(59, 112, 138, .12), transparent 28rem);
    animation: human-ambient 26s ease-in-out infinite alternate;
}

@keyframes human-bg-shift {
    0% {
        background-position: 0% 0%, 100% 0%, 0% 0%;
    }
    100% {
        background-position: 14% 6%, 86% 10%, 0% 0%;
    }
}

@keyframes human-ambient {
    0% {
        transform: translate3d(-1.5%, -1%, 0) scale(1);
    }
    100% {
        transform: translate3d(1.5%, 1%, 0) scale(1.04);
    }
}

@keyframes human-grain-drift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -14px, 0);
    }
}

body.sofon-human-design,
body.sofon-human-design button,
body.sofon-human-design input,
body.sofon-human-design textarea,
body.sofon-human-design select {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.sofon-human-design .wp-site-blocks,
body.sofon-human-design .wp-block-group,
body.sofon-human-design .wp-block-columns,
body.sofon-human-design .wp-block-column,
body.sofon-human-design .wp-block-cover,
body.sofon-human-design .wp-block-image,
body.sofon-human-design .wp-block-post-content,
body.sofon-human-design .entry-content,
body.sofon-human-design main {
    box-sizing: border-box;
    min-width: 0;
}

body.sofon-human-design img,
body.sofon-human-design svg,
body.sofon-human-design video,
body.sofon-human-design iframe,
body.sofon-human-design canvas {
    max-width: 100% !important;
}

body.sofon-human-design img,
body.sofon-human-design video,
body.sofon-human-design iframe {
    height: auto;
}

body.sofon-human-design p,
body.sofon-human-design li,
body.sofon-human-design td,
body.sofon-human-design th,
body.sofon-human-design figcaption,
body.sofon-human-design h1,
body.sofon-human-design h2,
body.sofon-human-design h3,
body.sofon-human-design h4,
body.sofon-human-design h5,
body.sofon-human-design h6,
body.sofon-human-design a {
    overflow-wrap: anywhere;
}

body.sofon-human-design a {
    text-decoration-thickness: 1px;
    text-underline-offset: .16em;
    transition:
        color .2s ease,
        opacity .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .25s ease,
        transform .25s var(--human-ease);
}

body.sofon-human-design main a:not(.wp-element-button):not(.crp_link) {
    color: var(--human-red);
}

body.sofon-human-design main a:not(.wp-element-button):not(.crp_link):hover {
    color: #8f1737;
}

body.sofon-human-design ::selection {
    color: #fff;
    background: var(--human-red);
}

/* ---------------------------------------------------------
   ZÁHLAVÍ / OBRÁZKOVÉ MENU
   --------------------------------------------------------- */

body.sofon-human-design .wp-site-blocks {
    padding-top: 0 !important;
}

body.sofon-human-design header.wp-block-template-part {
    position: relative;
    z-index: 20;
    padding: 0 clamp(14px, 3vw, 40px) 0;
    margin-top: 0 !important;
}

body.sofon-human-design header.wp-block-template-part > .wp-block-site-title {
    width: min(var(--human-wide), 100%);
    margin: 0 auto clamp(16px, 2vw, 24px) !important;
    padding: clamp(2px, .6vw, 8px) 8px 0;
    font-size: clamp(2rem, 4.2vw, 4.9rem) !important;
    font-weight: 650 !important;
    line-height: .95 !important;
    letter-spacing: clamp(.11em, 1.25vw, .31em) !important;
    text-transform: uppercase;
    background: linear-gradient(104deg, #172630 5%, #354c59 44%, var(--human-red) 72%, #6a1d35 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    text-shadow: 0 12px 32px rgba(35, 61, 75, .06);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-site-title a {
    color: inherit !important;
    text-decoration: none;
}

body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide {
    width: min(var(--human-wide), 100%) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: clamp(10px, 1.5vw, 16px) !important;
    overflow: clip;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(244, 248, 250, .82));
    box-shadow:
        0 24px 70px rgba(27, 48, 58, .12),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    backdrop-filter: blur(14px);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide > .wp-block-group.alignfull {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    align-items: stretch;
    justify-items: stretch;
    gap: clamp(8px, 1vw, 13px) !important;
}

body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide > .wp-block-group.alignfull > * {
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover {
    position: relative;
    width: 100% !important;
    min-height: clamp(108px, 9vw, 142px) !important;
    margin: 0 !important;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .44) !important;
    border-radius: 21px !important;
    box-shadow: 0 10px 25px rgba(24, 35, 44, .12);
    transform: translateZ(0);
    transition:
        transform .35s var(--human-ease),
        box-shadow .35s var(--human-ease),
        border-color .35s ease;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10, 18, 23, .05) 5%, rgba(10, 18, 23, .2) 48%, rgba(10, 18, 23, .72) 100%),
        linear-gradient(125deg, rgba(185, 39, 76, .14), transparent 44%, rgba(59, 112, 138, .12));
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: 3;
    border-radius: 20px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__image-background {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: saturate(.84) contrast(1.06) brightness(.88);
    transform: scale(1.02);
    transition:
        transform .6s var(--human-ease),
        filter .45s ease;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__background {
    opacity: 0 !important;
    background: transparent !important;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__inner-container {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: inherit;
    padding: 12px 10px;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__inner-container p {
    width: 100%;
    margin: 0 !important;
    line-height: 1.12;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__inner-container a {
    position: relative;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 96%;
    min-height: 38px;
    padding: 7px 11px;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(14, 25, 31, .56);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .15);
    backdrop-filter: blur(9px);
    font-size: clamp(.73rem, .8vw, .9rem);
    font-weight: 650;
    text-decoration: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .42);
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover__inner-container a::after {
    content: "";
    position: absolute;
    z-index: 6;
    inset: -100px;
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover:hover,
body.sofon-human-design header.wp-block-template-part .wp-block-cover:focus-within {
    z-index: 6;
    border-color: rgba(185, 39, 76, .34) !important;
    box-shadow:
        0 18px 36px rgba(24, 35, 44, .2),
        0 0 0 4px rgba(185, 39, 76, .07);
    transform: translateY(-4px);
}

body.sofon-human-design header.wp-block-template-part .wp-block-cover:hover .wp-block-cover__image-background,
body.sofon-human-design header.wp-block-template-part .wp-block-cover:focus-within .wp-block-cover__image-background {
    filter: saturate(1.02) contrast(1.08) brightness(.82);
    transform: scale(1.1);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-buttons {
    width: min(var(--human-wide), 100%);
    gap: 8px !important;
    margin: 18px auto 10px !important;
}

body.sofon-human-design header.wp-block-template-part > .wp-block-buttons .wp-block-button__link {
    padding: .62rem 1rem !important;
    color: var(--human-ink-soft) !important;
    border: 1px solid var(--human-line) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .74) !important;
    box-shadow: 0 7px 20px rgba(27, 48, 58, .06);
    font-family: inherit !important;
    font-size: .84rem !important;
    font-weight: 650;
    backdrop-filter: blur(8px);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-buttons .wp-block-button__link:hover {
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--human-red), var(--human-red-bright)) !important;
    box-shadow: 0 10px 24px rgba(185, 39, 76, .22);
    transform: translateY(-2px);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-search {
    width: min(840px, calc(100% - 28px)) !important;
    margin: 15px auto 6px !important;
}

body.sofon-human-design header.wp-block-template-part .wp-block-search__inside-wrapper {
    min-height: 52px;
    padding: 5px 6px 5px 16px;
    border: 1px solid var(--human-line) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--human-shadow-sm);
    backdrop-filter: blur(10px);
    transition: box-shadow .25s ease, border-color .25s ease;
}

body.sofon-human-design header.wp-block-template-part .wp-block-search__inside-wrapper:focus-within {
    border-color: rgba(185, 39, 76, .34) !important;
    box-shadow: 0 12px 32px rgba(185, 39, 76, .11);
}

body.sofon-human-design header.wp-block-template-part .wp-block-search__input {
    color: var(--human-ink);
    border: 0 !important;
    background: transparent !important;
    font-size: .96rem;
    outline: none;
}

body.sofon-human-design header.wp-block-template-part .wp-block-search__button {
    width: 42px;
    height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff;
    border: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--human-red), var(--human-red-bright)) !important;
    box-shadow: 0 8px 20px rgba(185, 39, 76, .23);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-separator {
    width: min(var(--human-wide), 92%) !important;
    height: 1px !important;
    margin: 22px auto 0 !important;
    border: 0 !important;
    background: linear-gradient(90deg, transparent, rgba(59, 112, 138, .22), rgba(185, 39, 76, .26), transparent);
}

body.sofon-human-design header.wp-block-template-part > .wp-block-spacer {
    height: 4px !important;
}

/* ---------------------------------------------------------
   TITULNÍ STRÁNKA
   --------------------------------------------------------- */

body.sofon-human-home main {
    overflow-x: clip;
}

body.sofon-human-home main > .wp-block-group {
    width: min(var(--human-wide), calc(100% - 32px)) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: clip;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: var(--human-shadow-md);
}

body.sofon-human-home main > .wp-block-group:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
    align-items: center;
    gap: clamp(24px, 4vw, 58px) !important;
    margin-top: 8px !important;
    margin-bottom: 26px !important;
    padding: clamp(28px, 4vw, 58px) !important;
    border-radius: var(--human-radius-lg);
    background:
        radial-gradient(circle at 85% 18%, rgba(185, 39, 76, .13), transparent 22rem),
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(238, 244, 247, .92));
}

body.sofon-human-home main > .wp-block-group:first-child > .wp-block-group {
    width: auto !important;
    max-width: 700px;
}

body.sofon-human-home main > .wp-block-group:first-child > .wp-block-spacer {
    display: none;
}

body.sofon-human-home main > .wp-block-group:first-child > figure.wp-block-image {
    position: relative;
    width: 100%;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px !important;
    box-shadow: var(--human-shadow-lg);
    transform: rotate(1.2deg);
}

body.sofon-human-home main > .wp-block-group:first-child > figure.wp-block-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(185, 39, 76, .08), transparent 45%, rgba(59, 112, 138, .1));
}

body.sofon-human-home main > .wp-block-group:first-child > figure.wp-block-image img {
    display: block;
    width: 100%;
    min-height: 330px;
    object-fit: cover;
    filter: saturate(.82) contrast(1.02);
}

body.sofon-human-home main > .wp-block-group:first-child p {
    color: var(--human-ink-soft);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.75;
}

body.sofon-human-home main > .wp-block-group:nth-child(2) {
    margin-top: 0 !important;
    margin-bottom: 26px !important;
    padding: clamp(28px, 4vw, 54px) !important;
    border-radius: var(--human-radius-lg);
    background:
        radial-gradient(circle at 13% 3%, rgba(59, 112, 138, .1), transparent 22rem),
        linear-gradient(145deg, rgba(243, 248, 250, .96), rgba(255, 255, 255, .94)) !important;
}

body.sofon-human-home main > .wp-block-group:nth-child(2) .wp-block-columns {
    gap: 16px !important;
}

body.sofon-human-home main > .wp-block-group:nth-child(2) .wp-block-column {
    padding: clamp(20px, 2.3vw, 30px);
    border: 1px solid var(--human-line);
    border-radius: var(--human-radius-md);
    background: rgba(255, 255, 255, .76);
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-home main > .wp-block-group:nth-child(2) .wp-block-column p {
    color: var(--human-ink-soft);
    line-height: 1.68;
}

body.sofon-human-home main > .wp-block-group:nth-child(3) {
    margin-top: 0 !important;
    margin-bottom: 26px !important;
    padding: clamp(30px, 4vw, 58px) !important;
    border-radius: var(--human-radius-lg);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, .96), rgba(245, 247, 249, .9));
}

body.sofon-human-home main > .wp-block-group:nth-child(3) .wp-block-columns {
    align-items: center;
    padding: clamp(16px, 2vw, 24px);
    border: 1px solid var(--human-line);
    border-radius: 26px;
    background: rgba(255, 255, 255, .74);
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-home main > .wp-block-group:nth-child(3) figure.wp-block-image {
    overflow: hidden;
    border-radius: 22px !important;
    box-shadow: none !important;
}

body.sofon-human-home main > .wp-block-group:nth-child(3) figure.wp-block-image img {
    transition: transform .5s var(--human-ease);
}

body.sofon-human-home main > .wp-block-group:nth-child(3) .wp-block-columns:hover figure.wp-block-image img {
    transform: scale(1.025);
}

body.sofon-human-home main > .wp-block-group:nth-child(4) {
    margin-top: 0 !important;
    margin-bottom: 38px !important;
    padding: 0 !important;
    border: 0;
    border-radius: var(--human-radius-lg);
    background: transparent;
    box-shadow: none;
}

body.sofon-human-home main > .wp-block-group:nth-child(4) > .wp-block-group {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--human-radius-lg) !important;
    box-shadow: var(--human-shadow-lg);
}

body.sofon-human-home main > .wp-block-group:nth-child(4) > .wp-block-group::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(18, 28, 35, .82), rgba(52, 32, 45, .45)),
        radial-gradient(circle at 70% 15%, rgba(223, 73, 104, .25), transparent 20rem);
}

body.sofon-human-home main > .wp-block-group:nth-child(4) > .wp-block-group > * {
    position: relative;
    z-index: 1;
}

body.sofon-human-design .wp-block-heading.is-style-asterisk::before {
    color: var(--human-red) !important;
}

body.sofon-human-home main h2 {
    color: var(--human-ink);
    font-weight: 650;
    letter-spacing: -.02em;
}

body.sofon-human-home main h3 {
    color: var(--human-ink);
    font-weight: 650;
}

body.sofon-human-design .wp-block-button__link {
    border-radius: 999px !important;
    font-weight: 650;
    box-shadow: 0 8px 22px rgba(185, 39, 76, .16);
    transition:
        transform .24s var(--human-ease),
        box-shadow .24s ease,
        background .24s ease;
}

body.sofon-human-design .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 28px rgba(185, 39, 76, .23);
}

/* ---------------------------------------------------------
   ČLÁNKY A STRÁNKY
   --------------------------------------------------------- */

body.sofon-human-single main.wp-block-group,
body.sofon-human-page main.wp-block-group {
    width: min(1100px, calc(100% - 32px));
    max-width: none !important;
    margin: 6px auto 32px !important;
    padding: clamp(26px, 4vw, 54px) clamp(18px, 4vw, 52px) !important;
    overflow-x: clip;
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: var(--human-radius-lg);
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--human-shadow-md);
    backdrop-filter: blur(10px);
}

body.sofon-human-single main > .wp-block-post-title,
body.sofon-human-page main .wp-block-post-title {
    width: min(920px, 100%);
    margin: 0 auto clamp(18px, 2.5vw, 30px) !important;
    color: var(--human-ink);
    font-size: clamp(2rem, 4vw, 4.1rem) !important;
    font-weight: 680;
    line-height: 1.03;
    letter-spacing: -.035em;
    text-wrap: balance;
}

body.sofon-human-page main > .wp-block-group:first-child {
    width: min(100%, 1040px);
    margin: 0 auto 18px !important;
}

body.sofon-human-single .wp-block-post-featured-image,
body.sofon-human-page .wp-block-post-featured-image {
    width: min(1040px, 100%);
    margin: 0 auto clamp(24px, 3vw, 38px) !important;
    overflow: hidden;
    border: 1px solid var(--human-line);
    border-radius: 28px;
    box-shadow: var(--human-shadow-md);
}

body.sofon-human-single .wp-block-post-featured-image img,
body.sofon-human-page .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
}

body.sofon-human-design .entry-content,
body.sofon-human-page .wp-block-post-content {
    width: 100%;
    max-width: 1040px !important;
    margin-inline: auto !important;
    padding-inline: clamp(2px, 1vw, 10px);
    color: var(--human-ink-soft);
}

body.sofon-human-design .entry-content > *,
body.sofon-human-page .wp-block-post-content > * {
    max-width: 100%;
}

body.sofon-human-design .entry-content > p,
body.sofon-human-page .wp-block-post-content > p {
    width: min(var(--human-reading), 100%);
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1rem, 1.1vw, 1.09rem);
    line-height: 1.82;
}

body.sofon-human-design .entry-content > ul,
body.sofon-human-design .entry-content > ol,
body.sofon-human-page .wp-block-post-content > ul,
body.sofon-human-page .wp-block-post-content > ol {
    width: min(var(--human-reading), 100%);
    margin-left: auto;
    margin-right: auto;
    line-height: 1.72;
}

body.sofon-human-design .mw-heading,
body.sofon-human-design .entry-content > h2,
body.sofon-human-design .entry-content > h3,
body.sofon-human-page .wp-block-post-content > h2,
body.sofon-human-page .wp-block-post-content > h3 {
    width: min(var(--human-reading), 100%);
    margin-left: auto;
    margin-right: auto;
}

body.sofon-human-design .entry-content > .wp-block-columns,
body.sofon-human-page .wp-block-post-content > .wp-block-columns,
body.sofon-human-design .entry-content > .wp-block-group,
body.sofon-human-page .wp-block-post-content > .wp-block-group,
body.sofon-human-design .entry-content > .wp-block-image,
body.sofon-human-page .wp-block-post-content > .wp-block-image,
body.sofon-human-design .entry-content > .wp-block-table,
body.sofon-human-page .wp-block-post-content > .wp-block-table,
body.sofon-human-design .entry-content > figure,
body.sofon-human-page .wp-block-post-content > figure {
    width: min(100%, 1000px);
    margin-left: auto !important;
    margin-right: auto !important;
}

body.sofon-human-design .entry-content .wp-block-columns,
body.sofon-human-page .wp-block-post-content .wp-block-columns {
    gap: clamp(14px, 2.2vw, 28px) !important;
    align-items: flex-start;
}

body.sofon-human-design .entry-content .wp-block-column,
body.sofon-human-page .wp-block-post-content .wp-block-column {
    min-width: 0;
}

body.sofon-human-design .mw-heading {
    position: relative;
    margin-top: clamp(34px, 4vw, 52px);
    margin-bottom: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--human-line);
}

body.sofon-human-design .mw-heading::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 68px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--human-red), var(--human-red-bright));
}

body.sofon-human-design .mw-heading h2,
body.sofon-human-design .mw-heading h3,
body.sofon-human-design .entry-content h2,
body.sofon-human-design .entry-content h3,
body.sofon-human-page .wp-block-post-content h2,
body.sofon-human-page .wp-block-post-content h3 {
    color: var(--human-ink);
    font-weight: 660;
    line-height: 1.18;
    letter-spacing: -.02em;
}

body.sofon-human-design .entry-content img,
body.sofon-human-page .wp-block-post-content img {
    display: block;
    border-radius: 18px;
}

body.sofon-human-design .entry-content figure,
body.sofon-human-page .wp-block-post-content figure {
    margin-top: 26px;
    margin-bottom: 30px;
}

body.sofon-human-design .entry-content figcaption,
body.sofon-human-page .wp-block-post-content figcaption {
    color: var(--human-muted);
    font-size: .82rem;
    line-height: 1.5;
}

body.sofon-human-design blockquote,
body.sofon-human-design .wp-block-quote {
    width: min(var(--human-reading), 100%);
    margin-left: auto;
    margin-right: auto;
    padding: 20px 24px;
    border: 1px solid rgba(185, 39, 76, .14);
    border-left: 4px solid var(--human-red);
    border-radius: 0 18px 18px 0;
    background: linear-gradient(110deg, rgba(247, 223, 230, .48), rgba(255, 255, 255, .76));
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-design table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--human-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-design table th,
body.sofon-human-design table td {
    padding: .78rem .92rem;
    border-color: var(--human-line) !important;
}

body.sofon-human-design table th {
    color: var(--human-ink);
    background: var(--human-blue-soft);
    font-weight: 650;
}

body.sofon-human-design table tr:nth-child(even) td {
    background: rgba(237, 243, 246, .54);
}

/* Související články */
body.sofon-human-design .crp_related.crp-grid {
    width: min(1000px, 100%);
    margin: 42px auto 10px !important;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--human-line);
    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(247, 250, 251, .94), rgba(255, 255, 255, .9));
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-design .crp_related.crp-grid > h3,
body.sofon-human-design .crp_related.crp-grid > .crp_heading {
    color: var(--human-ink);
}

body.sofon-human-design .crp_related.crp-grid ul {
    gap: 14px !important;
}

body.sofon-human-design .crp_related.crp-grid .crp_link {
    overflow: hidden;
    border: 1px solid var(--human-line);
    border-radius: 18px;
    background: var(--human-surface-solid);
    box-shadow: 0 8px 20px rgba(27, 48, 58, .07);
    text-decoration: none;
    transition:
        transform .25s var(--human-ease),
        box-shadow .25s ease,
        border-color .25s ease;
}

body.sofon-human-design .crp_related.crp-grid .crp_link:hover {
    border-color: rgba(185, 39, 76, .22);
    box-shadow: 0 14px 30px rgba(27, 48, 58, .12);
    transform: translateY(-3px);
}

body.sofon-human-design .crp_related.crp-grid .crp_thumb {
    transition: transform .45s var(--human-ease);
}

body.sofon-human-design .crp_related.crp-grid .crp_link:hover .crp_thumb {
    transform: scale(1.04);
}

body.sofon-human-design .crp_related.crp-grid .crp_title {
    color: var(--human-ink);
    font-weight: 620;
}

/* Tagy a kategorie */
body.sofon-human-design .taxonomy-post_tag,
body.sofon-human-design .taxonomy-category {
    width: min(1000px, calc(100% - 16px));
    margin: 14px auto !important;
    padding: 18px 22px;
    border: 1px solid var(--human-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--human-shadow-sm);
}

body.sofon-human-design .wp-block-post-terms__prefix {
    color: var(--human-ink) !important;
    font-weight: 650;
}

body.sofon-human-design .taxonomy-post_tag a,
body.sofon-human-design .taxonomy-category a {
    display: inline-flex;
    margin: 3px 2px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--human-blue-soft);
    color: #315c70 !important;
    text-decoration: none;
}

body.sofon-human-design .taxonomy-post_tag a:hover,
body.sofon-human-design .taxonomy-category a:hover {
    color: #fff !important;
    background: var(--human-red);
}

/* ---------------------------------------------------------
   ARCHIVY A VYHLEDÁVÁNÍ
   --------------------------------------------------------- */

body.sofon-human-archive main,
body.sofon-human-search main {
    width: min(1100px, calc(100% - 32px));
    margin: 10px auto 36px !important;
    padding: clamp(26px, 4vw, 48px) !important;
    overflow-x: clip;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: var(--human-radius-lg);
    background: rgba(255, 255, 255, .87);
    box-shadow: var(--human-shadow-md);
}

body.sofon-human-archive .wp-block-query-title,
body.sofon-human-search .wp-block-query-title {
    color: var(--human-ink);
    font-size: clamp(2rem, 4vw, 3.7rem);
    font-weight: 680;
    letter-spacing: -.035em;
}

body.sofon-human-archive .wp-block-post-template,
body.sofon-human-search .wp-block-post-template {
    gap: 18px !important;
}

body.sofon-human-archive .wp-block-post-template > li,
body.sofon-human-search .wp-block-post-template > li {
    overflow: hidden;
    padding: 0 0 18px;
    border: 1px solid var(--human-line);
    border-radius: 22px;
    background: var(--human-surface-solid);
    box-shadow: var(--human-shadow-sm);
    transition:
        transform .28s var(--human-ease),
        box-shadow .28s ease,
        border-color .28s ease;
}

body.sofon-human-archive .wp-block-post-template > li:hover,
body.sofon-human-search .wp-block-post-template > li:hover {
    border-color: rgba(185, 39, 76, .2);
    box-shadow: var(--human-shadow-md);
    transform: translateY(-4px);
}

body.sofon-human-archive .wp-block-post-template .wp-block-post-featured-image,
body.sofon-human-search .wp-block-post-template .wp-block-post-featured-image {
    overflow: hidden;
    border-radius: 0 !important;
}

body.sofon-human-archive .wp-block-post-template .wp-block-post-featured-image img,
body.sofon-human-search .wp-block-post-template .wp-block-post-featured-image img {
    transition: transform .5s var(--human-ease);
}

body.sofon-human-archive .wp-block-post-template > li:hover .wp-block-post-featured-image img,
body.sofon-human-search .wp-block-post-template > li:hover .wp-block-post-featured-image img {
    transform: scale(1.045);
}

body.sofon-human-archive .wp-block-post-template .wp-block-post-title,
body.sofon-human-search .wp-block-post-template .wp-block-post-title {
    padding-inline: 14px;
    font-size: clamp(1.05rem, 1.45vw, 1.28rem) !important;
    font-weight: 650;
    line-height: 1.18;
}

body.sofon-human-archive .wp-block-post-template .wp-block-post-title a,
body.sofon-human-search .wp-block-post-template .wp-block-post-title a {
    color: var(--human-ink) !important;
    text-decoration: none;
}

body.sofon-human-archive .wp-block-post-excerpt,
body.sofon-human-search .wp-block-post-excerpt {
    padding-inline: 14px;
    color: var(--human-muted) !important;
    line-height: 1.55;
}

body.sofon-human-design .wp-block-query-pagination a,
body.sofon-human-design .wp-block-query-pagination .page-numbers {
    min-width: 38px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid var(--human-line);
    border-radius: 999px;
    background: #fff;
    color: var(--human-ink) !important;
    text-decoration: none;
}

body.sofon-human-design .wp-block-query-pagination .current {
    color: #fff !important;
    border-color: transparent;
    background: var(--human-red);
}

/* ---------------------------------------------------------
   ZÁPATÍ
   --------------------------------------------------------- */

body.sofon-human-design footer.wp-block-template-part {
    width: min(var(--human-wide), calc(100% - 32px));
    margin: 0 auto clamp(20px, 3vw, 42px);
    padding: clamp(24px, 3.5vw, 44px);
    overflow: hidden;
    color: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--human-radius-lg);
    background:
        radial-gradient(circle at 11% 5%, rgba(185, 39, 76, .3), transparent 24rem),
        radial-gradient(circle at 90% 30%, rgba(59, 112, 138, .3), transparent 28rem),
        linear-gradient(145deg, #18262f 0%, #1c303b 48%, #16222a 100%);
    box-shadow: var(--human-shadow-lg);
}

body.sofon-human-design footer.wp-block-template-part .wp-block-separator {
    border-color: rgba(255, 255, 255, .13) !important;
}

body.sofon-human-design footer.wp-block-template-part .wp-block-site-title,
body.sofon-human-design footer.wp-block-template-part .wp-block-site-title a,
body.sofon-human-design footer.wp-block-template-part h2 {
    color: #fff !important;
}

body.sofon-human-design footer.wp-block-template-part .wp-block-site-tagline {
    color: rgba(255, 255, 255, .58);
}

body.sofon-human-design footer.wp-block-template-part a {
    color: rgba(255, 255, 255, .78) !important;
    text-decoration-color: rgba(255, 255, 255, .22);
}

body.sofon-human-design footer.wp-block-template-part a:hover {
    color: #fff !important;
    text-decoration-color: var(--human-red-bright);
}

body.sofon-human-design footer.wp-block-template-part .wp-block-site-logo img {
    border-radius: 15px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

/* ---------------------------------------------------------
   DARK MODE – plugin WP Dark Mode / systémový fallback
   --------------------------------------------------------- */

html.wp-dark-mode-active body.sofon-human-design,
body.wp-dark-mode-active.sofon-human-design,
body.sofon-human-design.wp-dark-mode-active {
    --human-canvas: #10171c;
    --human-canvas-alt: #152027;
    --human-surface: rgba(24, 35, 42, .9);
    --human-surface-solid: #1a272f;
    --human-surface-soft: #18242b;
    --human-ink: #edf4f7;
    --human-ink-soft: #d0dde2;
    --human-muted: #9fb1ba;
    --human-line: rgba(205, 226, 235, .12);
    --human-line-strong: rgba(205, 226, 235, .2);
    --human-blue-soft: #203b48;
    --human-red-soft: #492334;
    color: var(--human-ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(185, 39, 76, .18), transparent 24rem),
        radial-gradient(circle at 88% 12%, rgba(59, 112, 138, .2), transparent 30rem),
        #10171c;
}

html.wp-dark-mode-active body.sofon-human-design::after,
body.wp-dark-mode-active.sofon-human-design::after {
    opacity: .58;
}

html.wp-dark-mode-active body.sofon-human-design header.wp-block-template-part > .wp-block-site-title,
body.wp-dark-mode-active.sofon-human-design header.wp-block-template-part > .wp-block-site-title {
    background: linear-gradient(104deg, #f1f7fa 5%, #bacbd4 45%, #f08098 78%, #f1b2c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

html.wp-dark-mode-active body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide,
html.wp-dark-mode-active body.sofon-human-design main.wp-block-group,
body.wp-dark-mode-active.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide,
body.wp-dark-mode-active.sofon-human-design main.wp-block-group {
    background-color: rgba(22, 33, 40, .9) !important;
}

/* ---------------------------------------------------------
   POHYB / REVEAL
   --------------------------------------------------------- */

body.sofon-human-design.human-motion-enabled .human-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity .5s ease,
        transform .58s var(--human-ease);
}

body.sofon-human-design.human-motion-enabled .human-reveal.human-in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body.sofon-human-design,
    body.sofon-human-design::before,
    body.sofon-human-design::after,
    body.sofon-human-design *,
    body.sofon-human-design *::before,
    body.sofon-human-design *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1100px) {
    body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide > .wp-block-group.alignfull {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.sofon-human-home main > .wp-block-group:first-child {
        grid-template-columns: 1fr 360px;
    }
}

@media (max-width: 820px) {
    body.sofon-human-design header.wp-block-template-part {
        padding-inline: 10px;
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-site-title {
        margin-bottom: 17px !important;
        letter-spacing: .12em !important;
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide > .wp-block-group.alignfull {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    body.sofon-human-design header.wp-block-template-part .wp-block-cover {
        min-height: 112px !important;
    }

    body.sofon-human-home main > .wp-block-group:first-child {
        grid-template-columns: 1fr;
    }

    body.sofon-human-home main > .wp-block-group:first-child > figure.wp-block-image {
        max-width: 620px;
        margin: 0 auto !important;
        transform: none;
    }

    body.sofon-human-home main > .wp-block-group:first-child > figure.wp-block-image img {
        min-height: 260px;
    }

    body.sofon-human-home main > .wp-block-group:nth-child(2) .wp-block-columns,
    body.sofon-human-home main > .wp-block-group:nth-child(3) .wp-block-columns {
        gap: 12px !important;
    }

    body.sofon-human-archive .wp-block-post-template,
    body.sofon-human-search .wp-block-post-template {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.sofon-human-design footer.wp-block-template-part .wp-block-columns {
        gap: 24px;
    }

    body.sofon-human-design .entry-content,
    body.sofon-human-page .wp-block-post-content {
        padding-inline: 0;
    }
}

@media (max-width: 560px) {
    body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide {
        padding: 8px !important;
        border-radius: 23px;
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-group.alignwide > .wp-block-group.alignfull {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    body.sofon-human-design header.wp-block-template-part .wp-block-cover {
        min-height: 104px !important;
        border-radius: 17px !important;
    }

    body.sofon-human-design header.wp-block-template-part .wp-block-cover::after {
        border-radius: 16px;
    }

    body.sofon-human-design header.wp-block-template-part .wp-block-cover__inner-container a {
        min-height: 34px;
        padding: 6px 8px;
        font-size: .7rem;
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-buttons {
        gap: 6px !important;
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-buttons .wp-block-button {
        flex: 1 1 calc(50% - 6px);
    }

    body.sofon-human-design header.wp-block-template-part > .wp-block-buttons .wp-block-button__link {
        width: 100%;
        padding: .58rem .66rem !important;
        font-size: .75rem !important;
    }

    body.sofon-human-home main > .wp-block-group,
    body.sofon-human-single main.wp-block-group,
    body.sofon-human-page main.wp-block-group,
    body.sofon-human-archive main,
    body.sofon-human-search main,
    body.sofon-human-design footer.wp-block-template-part {
        width: calc(100% - 20px) !important;
        border-radius: 24px;
    }

    body.sofon-human-home main > .wp-block-group:first-child,
    body.sofon-human-home main > .wp-block-group:nth-child(2),
    body.sofon-human-home main > .wp-block-group:nth-child(3) {
        padding: 24px 18px !important;
    }

    body.sofon-human-home main > .wp-block-group:nth-child(3) .wp-block-columns {
        padding: 14px;
    }

    body.sofon-human-single main.wp-block-group,
    body.sofon-human-page main.wp-block-group {
        padding: 26px 16px !important;
    }

    body.sofon-human-single main > .wp-block-post-title,
    body.sofon-human-page main .wp-block-post-title {
        font-size: clamp(1.9rem, 10vw, 2.8rem) !important;
    }

    body.sofon-human-archive .wp-block-post-template,
    body.sofon-human-search .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }

    body.sofon-human-design footer.wp-block-template-part {
        padding: 28px 20px;
    }
}
