/*
 * Home page bridge (DESIGN.md "Components contract"): the "Karta katalogowa" home
 * (app/content/pages/strona-glowna-72.html, .medi-home--sheet on the .medi-home--concept base),
 * its hero, installation types, facts, popular categories and the brand logo carousel.
 * Loaded only where the post content carries .medi-home, after flatsome-bridge.css. Like
 * flatsome-bridge.css it may target Flatsome/.medi-* markup; values come from tokens.css.
 * Moved out of style.css on 2026-11-27 (rewrite stage 3 in docs/plans/design-system-cleanup-2026-11.md).
 */

/* Homepage redesign draft */
.medi-home {
    --medi-home-green: var(--mt-green-text);
    --medi-home-green-dark: var(--mt-green-deep);
    --medi-home-green-soft: var(--mt-green-soft);
    --medi-home-bg: var(--mt-bg);
    --medi-home-ink: var(--mt-ink);
    --medi-home-muted: var(--mt-muted);
    --medi-home-line: var(--mt-line);
    --medi-home-card: var(--mt-surface);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    background: var(--medi-home-bg);
    overflow-x: clip;
}

.medi-home a {
    color: var(--medi-home-green);
}

.medi-home-hero {
    position: relative;
    overflow: hidden;
    color: var(--mt-surface);
}

.medi-home-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(620px, 1.05fr) minmax(390px, .75fr);
    align-items: center;
    margin: 0 auto;
}

.medi-home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--mt-green-text);
    font-size: var(--mt-text-12);
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.medi-home h1,
.medi-home h2,
.medi-home h3 {
    letter-spacing: -.02em;
}

.medi-home h1 {
    margin: 0 0 18px;
    color: var(--mt-surface);
}

.medi-home-lead {
    margin: 0 0 24px;
    color: color-mix(in srgb, var(--mt-surface) 88%, transparent);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.55;
}

.medi-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 720px;
}

.medi-home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: var(--mt-radius-pill);
    padding: 0 18px;
    background: var(--mt-surface);
    color: var(--medi-home-green-dark) !important;
    font-size: var(--mt-text-13);
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.medi-home-button--ghost {
    border: 1px solid color-mix(in srgb, var(--mt-surface) 38%, transparent);
    background: color-mix(in srgb, var(--mt-surface) 8%, transparent);
    color: var(--mt-surface) !important;
}

.medi-home-section {
    margin: 0 auto;
}

.medi-home-section__head {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.medi-home-section__head h2 {
    margin: 0;
    color: var(--medi-home-ink);
    font-size: clamp(25px, 3vw, 38px);
}

.medi-home-section__head p {
    max-width: 620px;
    margin: 8px 0 0;
    color: var(--medi-home-muted);
    line-height: 1.55;
}

.medi-home-grid {
    display: grid;
    gap: 14px;
}

.medi-home-grid--solutions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.medi-home-card {
    display: flex;
    flex-direction: column;
    min-height: 126px;
    border: 1px solid var(--medi-home-line);
    background: var(--medi-home-card);
    color: var(--medi-home-ink) !important;
}

.medi-home-category-card {
    overflow: hidden;
    padding: 0;
}

.medi-home-category-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-bottom: 1px solid var(--medi-home-line);
    background: var(--mt-surface);
}

.medi-home-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    mix-blend-mode: multiply;
}

.medi-home-category-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.medi-home-card:hover {
    border-color: color-mix(in srgb, var(--mt-green-text) 38%, transparent);
    transform: translateY(-1px);
}

.medi-home-card strong {
    margin-bottom: 8px;
    font-size: var(--mt-text-15);
    line-height: 1.25;
}

.medi-home-card span {
    color: var(--medi-home-muted);
    font-size: var(--mt-text-13);
    line-height: 1.4;
}

.medi-home-card em {
    font-style: normal;
    font-weight: 900;
}

.medi-home--concept .medi-home-category-card__body {
    position: relative;
    justify-content: center;
    padding-right: 54px;
}

.medi-home--concept .medi-home-category-card em {
    position: absolute;
    right: 18px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: var(--medi-home-green);
    font-size: 64px;
    line-height: 1;
    transform: translateY(-50%);
    transition: transform .18s ease, color .18s ease;
}

.medi-home--concept .medi-home-category-card:hover em {
    color: var(--medi-home-green-dark);
    transform: translate(3px, -50%);
}

.medi-home-solution {
    border: 1px solid var(--medi-home-line);
    background: var(--mt-surface);
    box-shadow: var(--mt-shadow-raised);
}

.medi-home-popular-bento {
    display: grid;
    gap: 16px;
}

.medi-home-popular-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--medi-home-line);
    box-shadow: var(--mt-shadow-raised);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.medi-home-popular-card:hover {
    border-color: color-mix(in srgb, var(--mt-green-text) 34%, transparent);
    box-shadow: var(--mt-shadow-raised);
    transform: translateY(-2px);
}

.medi-home-popular-card--lan {
    color: var(--mt-surface);
}

.medi-home-popular-card--hardware {
    background: linear-gradient(135deg, var(--mt-surface) 0%, var(--mt-green-soft) 100%);
}

.medi-home-popular-card--fiber {
    background: linear-gradient(135deg, var(--mt-surface) 0%, var(--mt-green-soft) 100%);
}

.medi-home-popular-card--rack {
    background:
        radial-gradient(circle at 82% 38%, color-mix(in srgb, var(--mt-green-text) 12%, transparent), transparent 28%),
        linear-gradient(135deg, var(--mt-surface) 0%, var(--mt-bg) 100%);
}

.medi-home-popular-card__kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--medi-home-green);
    font-size: var(--mt-text-min);
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.medi-home-popular-card--lan .medi-home-popular-card__kicker {
    color: var(--mt-on-dark-accent);
}

.medi-home-popular-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: var(--medi-home-ink);
    line-height: 1.05;
}

.medi-home-popular-card--lan h3 {
    color: var(--mt-surface);
}

.medi-home-popular-card p {
    position: relative;
    z-index: 1;
    color: var(--medi-home-muted);
}

.medi-home-popular-card--lan p {
    color: color-mix(in srgb, var(--mt-surface) 84%, transparent);
}

.medi-home-popular-card__image {
    position: absolute;
    z-index: 0;
    opacity: .96;
    filter: drop-shadow(0 18px 28px color-mix(in srgb, var(--mt-ink) 18%, transparent));
}

.medi-home-popular-card__links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
}

.medi-home-popular-card__links a {
    display: inline-flex;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--mt-green-text) 16%, transparent);
    border-radius: var(--mt-radius-pill);
    background: color-mix(in srgb, var(--mt-surface) 88%, transparent);
    color: var(--medi-home-green-dark);
    font-weight: 850;
    box-shadow: var(--mt-shadow-raised);
}

.medi-home-popular-card--lan .medi-home-popular-card__links a {
    color: var(--mt-surface);
    box-shadow: none;
}

.medi-home-popular-card__links a::after {
    content: "\2192";
    margin-left: 7px;
}

.medi-home-popular-card__links a:hover {
    transform: translateY(-1px);
}

.medi-home-popular-card__cta {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    font-size: var(--mt-text-14);
    font-weight: 900;
    letter-spacing: -.01em;
}

.medi-home-popular-card__cta:hover {
    color: var(--medi-home-green-dark);
}

.medi-home-popular-card--lan .medi-home-popular-card__cta {
    color: var(--mt-surface);
}

.medi-brand-logo-carousel {
    position: relative;
    min-height: 96px;
    border: 1px solid var(--medi-home-line);
    padding: 18px 44px;
    background: var(--mt-surface);
    box-shadow: var(--mt-shadow-raised);
}

.medi-brand-logo-carousel__track {
    display: flex;
    gap: 14px;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.medi-brand-logo-carousel__track::-webkit-scrollbar {
    display: none;
}

.medi-brand-logo-carousel__slide {
    flex: 0 0 160px;
    scroll-snap-align: start;
}

.medi-brand-logo-carousel__item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 14px 18px;
    background: var(--mt-surface);
}

.medi-brand-logo-carousel__logo {
    width: 150px;
    height: 46px;
    max-width: 100%;
    background-image: var(--medi-brand-logo-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: grayscale(.12);
    transition: filter .18s ease, transform .18s ease;
}

.medi-brand-logo-carousel__item:hover .medi-brand-logo-carousel__logo {
    filter: none;
    transform: translateY(-1px);
}

.medi-brand-logo-carousel__arrow {
    position: absolute !important;
    top: 42px !important;
    z-index: 3;
    margin: 0 !important;
}

.medi-brand-logo-carousel__arrow--prev {
    left: 10px !important;
}

.medi-brand-logo-carousel__arrow--next {
    right: 10px !important;
}

@media only screen and (max-width: 34em) {
.medi-brand-logo-carousel {
        padding-inline: 38px;
    }

.medi-brand-logo-carousel__slide {
        flex-basis: 150px;
    }
}

.medi-home-text {
    display: grid;
    gap: 36px;
    border: 1px solid var(--medi-home-line);
    padding: 34px;
    background: var(--mt-surface);
}

.medi-home-text--visual {
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
    align-items: center;
}

.medi-home-text__visual {
    border-radius: var(--mt-radius-panel);
    position: relative;
    overflow: hidden;
}

.medi-home-text__visual--image {
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    background: var(--mt-green-night);
}

.medi-home-text__visual--image img {
    width: 100%;
    min-height: inherit;
    object-fit: cover;
}

.medi-home-text__visual::before,
.medi-home-text__visual::after {
    content: "";
    position: absolute;
    border: 1px solid color-mix(in srgb, var(--mt-surface) 32%, transparent);
    border-radius: var(--mt-radius-panel);
}

.medi-home-text__visual::before {
    inset: 42px 34px 84px 82px;
}

.medi-home-text__visual::after {
    inset: 104px 82px 42px 34px;
}

.medi-home-text h2 {
    margin: 0;
    color: var(--medi-home-ink);
}

.medi-home-text p {
    color: var(--mt-muted);
    line-height: 1.68;
}

.medi-home-contact {
    padding: 36px;
}

.medi-home-contact h2 {
    margin: 0 0 10px;
}

.medi-home-contact p {
    max-width: 760px;
}

/* Homepage concept implementation */
.medi-home--concept {
    --medi-home-green: var(--mt-green-text);
    --medi-home-green-dark: var(--mt-green-deep);
    --medi-home-green-deep: var(--mt-green-night);
    --medi-home-bg: var(--mt-bg);
    --medi-home-ink: var(--mt-ink);
    --medi-home-muted: var(--mt-muted);
    --medi-home-line: var(--mt-line);
}

.medi-home--concept .medi-home-hero {
    background: linear-gradient(160deg, var(--mt-green-deep) 0%, var(--mt-green-night) 100%);
}

.medi-home--concept .medi-home-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(420px, .82fr);
    gap: clamp(34px, 4vw, 70px);
    max-width: 1680px;
    min-height: 520px;
    margin-inline: auto;
    padding:
        clamp(58px, 6vw, 86px)
        clamp(44px, 5vw, 76px)
        clamp(56px, 6vw, 78px);
    isolation: isolate;
}

.medi-home-hero__copy,
.medi-home-hero__panel {
    position: relative;
    z-index: 2;
}

.medi-home--concept .medi-home h1,
.medi-home--concept h1 {
    max-width: 720px;
    font-size: clamp(42px, 5vw, 74px);
    line-height: .98;
}

.medi-home--concept .medi-home-lead {
    max-width: 720px;
}

.medi-home-hero__panel {
    border: 1px solid color-mix(in srgb, var(--mt-surface) 20%, transparent);
    border-radius: var(--mt-radius-panel);
    background: color-mix(in srgb, var(--mt-green-night) 62%, transparent);
    box-shadow: var(--mt-shadow-raised);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.medi-home-hero__panel-block {
    padding: 24px;
}

.medi-home-hero__panel-block + .medi-home-hero__panel-block {
    border-top: 1px solid color-mix(in srgb, var(--mt-surface) 14%, transparent);
}

.medi-home-hero__panel-title {
    display: block;
    margin-bottom: 14px;
    color: var(--mt-on-dark-accent);
    font-size: var(--mt-text-min);
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.medi-home-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.medi-home-hero-card {
    position: relative;
    display: flex;
    min-height: 112px;
    border: 1px solid color-mix(in srgb, var(--mt-surface) 16%, transparent);
    border-radius: var(--mt-radius-card);
    padding: 18px 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 52%, color-mix(in srgb, var(--mt-glow) 20%, transparent), transparent 36%),
        linear-gradient(135deg, color-mix(in srgb, var(--mt-surface) 11%, transparent), color-mix(in srgb, var(--mt-surface) 4.5%, transparent));
    color: var(--mt-surface) !important;
    font-weight: 900;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--mt-surface) 8%, transparent);
}

.medi-home-hero-card span {
    position: relative;
    z-index: 2;
    max-width: 52%;
    line-height: 1.2;
}

.medi-home-hero-card em {
    position: absolute;
    left: 16px;
    bottom: 25px;
    z-index: 2;
    color: var(--mt-on-dark);
    font-style: normal;
    font-size: 40px;
    line-height: 1;
    transition: transform .18s ease, color .18s ease;
}

.medi-home-hero-card:hover em {
    color: var(--mt-surface);
    transform: translateX(3px);
}

.medi-home-hero-card::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 8px;
    width: 46%;
    height: 62%;
    border-radius: var(--mt-radius-pill);
    background: radial-gradient(circle, color-mix(in srgb, var(--mt-glow) 14%, transparent), color-mix(in srgb, var(--mt-green-text) 1.5%, transparent) 62%, transparent 72%);
    filter: blur(5px);
    pointer-events: none;
}

.medi-home-hero-card img {
    position: absolute;
    width: 50%;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--mt-ink) 24%, transparent));
    transition: transform .18s ease;
    z-index: 1;
}

.medi-home-hero-card:hover img {
    transform: translateY(-2px) scale(1.015);
}

.medi-home-hero-card--patchcord img {
    right: 10px;
    bottom: -4px;
    width: 46%;
    height: 94%;
}

.medi-home-hero-card--twisted img {
    right: -22px;
    bottom: 4px;
    width: 60%;
    height: 78%;
}

.medi-home-hero-card--twisted:hover img {
    transform: translateY(-2px) scale(1.015);
}

.medi-home-hero-card--rack img {
    right: 12px;
    bottom: -2px;
    width: 43%;
    height: 92%;
}

.medi-home-hero-card--fiber img {
    right: -10px;
    bottom: 4px;
    width: 58%;
    height: 78%;
}

.medi-home-hero-card--fiber:hover img {
    transform: translateY(-2px) scale(1.015);
}

.medi-home-hero-search {
    position: relative;
    display: flex;
    align-items: center;
}

.medi-home-hero-search input {
    width: 100%;
    height: 52px;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--mt-surface) 18%, transparent);
    border-radius: var(--mt-radius-card);
    padding: 0 58px 0 18px;
    background: color-mix(in srgb, var(--mt-surface) 12%, transparent);
    color: var(--mt-surface);
    box-shadow: none;
    font-size: var(--mt-text-15);
}

.medi-home-hero-search input::placeholder {
    color: color-mix(in srgb, var(--mt-surface) 74%, transparent);
}

.medi-home-hero-search button {
    position: absolute;
    right: 10px;
    width: 34px;
    height: 34px;
    min-height: 34px;
    border: 0;
    border-radius: var(--mt-radius-card);
    padding: 0;
    font-size: var(--mt-text-21);
    opacity: .9;
}

.medi-home--concept .medi-home-section {
    max-width: 1680px;
    width: 100%;
    margin-inline: auto;
    padding-left: clamp(44px, 5vw, 76px);
    padding-right: clamp(44px, 5vw, 76px);
    padding-top: 42px;
    padding-bottom: 42px;
}

.medi-home--concept .medi-home-section__head {
    align-items: center;
}

.medi-home--concept .medi-home-grid--categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.medi-home--concept .medi-home-card {
    box-shadow: var(--mt-shadow-raised);
}

.medi-home--concept .medi-home-category-card__image {
    height: 138px;
}

.medi-home--concept .medi-home-category-card__body {
    min-height: 104px;
}

.medi-home--concept .medi-home-grid--trust-icons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.medi-home-trust-card {
    min-height: 178px;
    padding: 20px 18px 18px;
}

.medi-home--concept .medi-home-card strong {
    color: var(--mt-green-night);
}

.medi-home--concept .medi-home-solution {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-height: 136px;
    border-radius: var(--mt-radius-card);
    padding: 18px 20px;
    color: var(--medi-home-ink) !important;
    text-align: left !important;
}

.medi-home-solution__icon {
    display: inline-grid;
    place-items: center;
    height: 100%;
    min-height: 98px;
    border: 1px solid var(--mt-line-strong);
    border-radius: var(--mt-radius-panel);
    background: linear-gradient(135deg, var(--mt-surface), var(--mt-green-soft));
    color: var(--medi-home-green-dark);
    font-size: var(--mt-text-21);
}

.medi-home-solution__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.medi-home-solution__body strong {
    margin: 0 0 8px;
    color: var(--medi-home-green-dark);
    font-size: var(--mt-text-18);
    line-height: 1.2;
}

.medi-home-solution__body span {
    max-width: 360px;
    color: var(--medi-home-muted);
    font-size: var(--mt-text-13);
    line-height: 1.42;
}

.medi-home-solution__body em {
    align-self: flex-start;
    margin-top: 12px;
    color: var(--medi-home-green);
    font-style: normal;
    font-weight: 850;
}

.medi-home--concept .medi-home-popular-bento {
    grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, .9fr));
    grid-auto-rows: minmax(315px, auto);
}

.medi-home--concept .medi-home-popular-card {
    border-radius: var(--mt-radius-card);
    min-height: 315px;
    padding: 22px;
}

.medi-home--concept .medi-home-popular-card--lan {
    grid-row: auto;
    background:
        radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--mt-glow-strong) 24%, transparent), transparent 26%),
        linear-gradient(135deg, var(--mt-green-night) 0%, var(--mt-green-text) 58%, var(--mt-green-night) 100%);
}

.medi-home--concept .medi-home-popular-card--rack {
    grid-column: auto;
}

.medi-home--concept .medi-home-popular-card h3 {
    max-width: 300px;
    font-size: clamp(22px, 1.7vw, 30px);
    line-height: 1.08;
}

.medi-home--concept .medi-home-popular-card p {
    max-width: 292px;
    margin-bottom: 16px;
    font-size: var(--mt-text-14);
    line-height: 1.55;
}

.medi-home--concept .medi-home-popular-card__links {
    max-width: 245px;
    gap: 8px;
}

.medi-home--concept .medi-home-popular-card__links a {
    min-height: 32px;
    padding: 0 12px;
    font-size: var(--mt-text-min);
}

.medi-home--concept .medi-home-popular-card--lan .medi-home-popular-card__links {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 212px;
}

.medi-home--concept .medi-home-popular-card--lan .medi-home-popular-card__links a {
    justify-content: flex-start;
    border-color: color-mix(in srgb, var(--mt-surface) 18%, transparent);
    background: color-mix(in srgb, var(--mt-surface) 10%, transparent);
}

.medi-home--concept .medi-home-popular-card--lan .medi-home-popular-card__links a::before {
    content: "\2713";
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-right: 7px;
    border-radius: var(--mt-radius-pill);
    background: color-mix(in srgb, var(--mt-surface) 15%, transparent);
    color: var(--mt-on-dark);
    font-size: var(--mt-text-min);
}

.medi-home--concept .medi-home-popular-card__cta {
    margin-top: 16px;
}

.medi-home--concept .medi-home-popular-card--lan .medi-home-popular-card__image {
    right: -4px;
    bottom: 18px;
    width: 55%;
    max-width: 270px;
    opacity: .68;
    mix-blend-mode: screen;
}

.medi-home--concept .medi-home-popular-card--fiber .medi-home-popular-card__image {
    right: 22px;
    bottom: -6px;
    width: 54%;
    max-width: 230px;
}

.medi-home--concept .medi-home-popular-card--hardware .medi-home-popular-card__image {
    right: 12px;
    bottom: 14px;
    width: 44%;
    max-width: 165px;
    background: transparent;
    mix-blend-mode: multiply;
}

.medi-home--concept .medi-home-popular-card--rack .medi-home-popular-card__image {
    right: -16px;
    bottom: -22px;
    width: 58%;
    max-width: 255px;
}

.medi-home--concept .medi-brand-logo-carousel {
    border-radius: var(--mt-radius-card);
}

.medi-home--concept .medi-home-contact {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, .75fr);
    gap: 24px;
    align-items: center;
    border: 1px solid var(--medi-home-line);
    border-radius: var(--mt-radius-card);
    background:
        radial-gradient(circle at 78% 38%, color-mix(in srgb, var(--mt-green-text) 12%, transparent), transparent 28%),
        linear-gradient(135deg, var(--mt-surface) 0%, var(--mt-bg) 100%);
    color: var(--medi-home-ink);
}

.medi-home--concept .medi-home-contact h2 {
    color: var(--medi-home-green-dark);
}

.medi-home--concept .medi-home-contact p {
    color: var(--mt-muted);
}

.medi-home-contact__visual {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.medi-home-contact__visual img {
    width: 31%;
    max-height: 150px;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--mt-ink) 12%, transparent));
}

.medi-home--concept .medi-home-text {
    border-radius: var(--mt-radius-card);
}

.medi-home--concept .medi-home-text__visual {
    min-height: 240px;
}

.medi-home--concept .medi-home-text__visual--image::before,
.medi-home--concept .medi-home-text__visual--image::after {
    display: none;
}

@media only screen and (max-width: 64em) {
.medi-home-hero__inner,
    .medi-home-text {
        grid-template-columns: 1fr;
    }

.medi-home-grid--categories,
    .medi-home-grid--solutions,
    .medi-home-grid--trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.medi-home-popular-card--lan,
    .medi-home-popular-card--rack {
        grid-column: 1 / -1;
    }

.medi-home--concept .medi-home-hero__inner,
    .medi-home--concept .medi-home-contact {
        grid-template-columns: 1fr;
    }

.medi-home--concept .medi-home-popular-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.medi-home--concept .medi-home-grid--trust-icons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media only screen and (max-width: 34em) {

.medi-home-actions {
        display: grid;
    }

.medi-home-section__head {
        display: block;
    }

.medi-home-grid--categories,
    .medi-home-grid--solutions,
    .medi-home-grid--trust {
        grid-template-columns: 1fr;
    }

.medi-home-popular-card--lan,
    .medi-home-popular-card--rack {
        grid-column: auto;
    }

.medi-home-popular-card__image {
        position: static;
        display: block;
        margin: 10px 0 0 auto;
    }

.medi-home-text,
    .medi-home-contact {
        padding: 22px;
    }

.medi-home-trust-card {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        grid-template-areas:
            "icon title"
            "icon text";
        gap: 16px;
        align-items: center;
        min-height: 0;
        padding: 18px;
        text-align: left;
    }

.medi-home-trust-card strong {
        grid-area: title;
        margin-bottom: 6px;
    }

.medi-home-trust-card > span:not(.medi-home-trust-card__icon) {
        grid-area: text;
        min-width: 0;
    }

.medi-home--concept .medi-home-hero__inner {
        min-height: 0;
    }

.medi-home-hero-grid {
        grid-template-columns: 1fr;
    }

.medi-home-hero-card {
        min-height: 92px;
    }

.medi-home--concept .medi-home-grid--categories,
    .medi-home--concept .medi-home-popular-bento,
    .medi-home--concept .medi-home-grid--trust-icons {
        grid-template-columns: 1fr;
    }

.medi-home-contact__visual {
        justify-content: center;
    }
}

/* Homepage, "Karta katalogowa" pass (DESIGN.md). Content: app/content/pages/strona-glowna-72.html.
   Scoped to .medi-home--sheet so the previous content keeps rendering until both ship together. */
.medi-home--sheet .medi-home-arrow,
.medi-home--sheet .medi-home-hero-search svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

.medi-home--sheet .medi-home-hero {
    background: linear-gradient(160deg, var(--mt-green-night) 0%, var(--mt-green-deep) 100%);
}

.medi-home--sheet .medi-home-hero::before,
.medi-home--sheet .medi-home-hero::after,
.medi-home--sheet .medi-home-hero-card::after {
    display: none;
}

.medi-home--sheet h1 {
    line-height: 1.02;
}

.medi-home--sheet .medi-home-lead {
    max-width: 62ch;
    color: var(--mt-on-dark);
}

.medi-home-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin: 0 0 28px;
    list-style: none;
    color: var(--mt-on-dark);
    font-size: var(--mt-text-15);
    font-weight: 700;
}

.medi-home-facts li {
    margin: 0;
    padding: 0 14px;
    border-left: 1px solid color-mix(in srgb, var(--mt-on-dark) 40%, transparent);
}

.medi-home-facts li:first-child {
    padding-left: 0;
    border-left: 0;
}

.medi-home--sheet .medi-home-button {
    border-radius: var(--mt-radius-control);
    padding: 0 22px;
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color .15s ease, color .15s ease;
}

.medi-home--sheet .medi-home-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.medi-home--sheet .medi-home-hero .medi-home-button:hover {
    background: var(--mt-green-soft);
}

.medi-home--sheet .medi-home-button--ghost {
    border-color: color-mix(in srgb, var(--mt-surface) 60%, transparent);
    background: transparent;
}

.medi-home--sheet .medi-home-hero .medi-home-button--ghost:hover {
    background: color-mix(in srgb, var(--mt-surface) 10%, transparent);
}

.medi-home--sheet .medi-home-section .medi-home-button:hover {
    background: var(--mt-green-deep);
}

.medi-home--sheet .medi-home-section .medi-home-button--quiet:hover {
    background: var(--mt-green-soft);
}

.medi-home--sheet .medi-home-hero__panel {
    background: color-mix(in srgb, var(--mt-green-night) 45%, transparent);
    box-shadow: none;
    backdrop-filter: none;
}

.medi-home--sheet .medi-home-hero__panel-title {
    margin: 0 0 14px;
    color: var(--mt-surface);
    font-size: var(--mt-text-15);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.medi-home--sheet .medi-home-hero__panel-title label {
    margin: 0;
    color: inherit;
    font: inherit;
}

.medi-home--sheet .medi-home-hero-card {
    background: color-mix(in srgb, var(--mt-surface) 7%, transparent);
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.medi-home--sheet .medi-home-hero-card:hover,
.medi-home--sheet .medi-home-hero-card:focus-visible {
    border-color: color-mix(in srgb, var(--mt-surface) 40%, transparent);
    background: color-mix(in srgb, var(--mt-surface) 12%, transparent);
}

.medi-home--sheet .medi-home-hero-card span {
    max-width: 60%;
    font-size: var(--mt-text-15);
    hyphens: auto;
}

.medi-home--sheet .medi-home-hero-card em {
    left: 18px;
    bottom: 18px;
    font-size: 0;
}

.medi-home--sheet .medi-home-hero-card em svg {
    width: 24px;
    height: 24px;
}

.medi-home--sheet .medi-home-hero-search input::placeholder {
    color: var(--mt-on-dark);
}

.medi-home--sheet .medi-home-hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.medi-home--sheet .medi-home-section__head {
    align-items: end;
    margin-bottom: 20px;
}

.medi-home--sheet .medi-home-section__head p {
    margin: 0;
}

.medi-home--sheet .medi-home-category-card em {
    width: 28px;
    height: 28px;
    font-size: 0;
}

.medi-home--sheet .medi-home-category-card em svg {
    width: 28px;
    height: 28px;
}

/* Installation types: one catalogue sheet, four columns divided by hairlines. */
.medi-home-install {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
}

.medi-home-install__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
}

.medi-home-install__col + .medi-home-install__col {
    border-left: 1px solid var(--mt-line);
}

.medi-home-install__photo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    margin: -8px -8px 6px;
    border-radius: var(--mt-radius-control);
    background: var(--mt-bg);
    overflow: hidden;
}

.medi-home-install__photo img {
    width: 78%;
    height: 82%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.medi-home-install__col h3 {
    margin: 0;
    color: var(--mt-ink);
    font-size: var(--mt-text-18);
    line-height: 1.3;
    letter-spacing: 0;
}

.medi-home-install__col p {
    margin: 0;
    color: var(--mt-muted);
    font-size: var(--mt-text-14);
    line-height: 1.5;
}

.medi-home-install__links {
    margin: 4px 0 0;
    list-style: none;
}

.medi-home-install__links li {
    margin: 0;
    border-top: 1px solid var(--mt-line);
}

.medi-home-install__links li:last-child {
    border-bottom: 1px solid var(--mt-line);
}

.medi-home-install__links a {
    display: block;
    padding: 9px 0;
    color: var(--mt-ink) !important;
    font-size: var(--mt-text-14);
    font-weight: 700;
}

.medi-home-install__links a:hover {
    color: var(--mt-green-text) !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.medi-home-install__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    font-size: var(--mt-text-14);
    font-weight: 700;
}

.medi-home-install__more:hover {
    color: var(--mt-green-deep) !important;
}

.medi-home--sheet .medi-home-text p {
    max-width: 62ch;
}

.medi-home-brands-more {
    margin: 18px 0 0;
}

/* Why Meditronik: plain facts, not cards. */
/* Flatsome styles every dl as small inline uppercase metadata; reset for content lists. */
.medi-home-trust,
.medi-home-contact__facts {
    font-size: inherit;
    opacity: 1;
    text-transform: none;
}

.medi-home-trust dt,
.medi-home-trust dd,
.medi-home-contact__facts dt,
.medi-home-contact__facts dd {
    display: block;
}

.medi-home-trust {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    border-top: 2px solid var(--mt-green);
}

.medi-home-trust > div {
    padding: 18px 20px 0 0;
}

.medi-home-trust > div {
    position: relative;
    padding-left: 72px;
}

/* Icon sits left of the fact, aligned with its heading. The traced SVGs carry wide
   internal margins, so the image is drawn larger than its tile and clipped. */
.medi-home-trust__icon {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--mt-radius-card);
    background: var(--mt-green-soft);
    overflow: hidden;
}

.medi-home-trust__icon img {
    flex: none;
    width: 66px;
    max-width: none;
    /* black line art -> #007d32 */
    filter: invert(29%) sepia(86%) saturate(1530%) hue-rotate(129deg) brightness(92%) contrast(101%);
}

.medi-home-trust dt {
    margin: 0 0 6px;
    color: var(--mt-ink);
    font-weight: 700;
    line-height: 1.3;
}

.medi-home-trust dd {
    margin: 0;
    color: var(--mt-muted);
    font-size: var(--mt-text-14);
    line-height: 1.5;
}

.medi-home--sheet .medi-home-contact {
    grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
    gap: 32px 48px;
    align-items: start;
    padding: 32px;
    border-radius: var(--mt-radius-card);
    background: var(--mt-surface);
}

.medi-home--sheet .medi-home-contact h2 {
    margin: 0 0 10px;
    color: var(--mt-ink);
}

.medi-home--sheet .medi-home-contact p {
    max-width: 60ch;
    margin: 0 0 20px;
    color: var(--mt-muted);
}

.medi-home-contact__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    margin: 0;
}

.medi-home-contact__facts dt {
    margin: 0 0 2px;
    color: var(--mt-muted);
    font-size: var(--mt-text-13);
    font-weight: 700;
}

.medi-home-contact__facts dd {
    margin: 0;
    font-weight: 700;
    line-height: 1.45;
}

.medi-home-contact__facts > div:last-child dd {
    font-weight: 400;
}

@media only screen and (max-width: 64em) {
.medi-home-install {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.medi-home-install__col:nth-child(3) {
        border-left: 0;
    }

.medi-home-install__col:nth-child(n + 3) {
        border-top: 1px solid var(--mt-line);
    }

.medi-home-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }

.medi-home--sheet .medi-home-contact {
        grid-template-columns: 1fr;
    }

.medi-home--sheet .medi-home-grid--categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 34em) {
.medi-home--sheet .medi-home-section {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 32px;
        padding-bottom: 32px;
    }

.medi-home--sheet .medi-home-section__head p {
        margin-top: 8px;
    }

.medi-home--sheet .medi-home-hero__panel-block {
        padding: 16px;
    }

.medi-home-facts {
        flex-direction: column;
    }

.medi-home-facts li,
    .medi-home-facts li:first-child {
        padding: 0;
        border: 0;
    }

.medi-home--sheet .medi-home-hero-search input {
        font-size: var(--mt-text-14);
        padding-left: 14px;
    }

.medi-home--sheet .medi-home-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

.medi-home--sheet .medi-home-hero-card {
        min-height: 104px;
        padding: 14px;
    }

.medi-home--sheet .medi-home-hero-card span {
        max-width: 100%;
        font-size: var(--mt-text-14);
    }

.medi-home--sheet .medi-home-hero-card img {
        width: 46%;
        height: 60%;
        bottom: -6px;
    }

.medi-home--sheet .medi-home-hero-card em {
        left: 14px;
        bottom: 12px;
    }

.medi-home--sheet .medi-home-category-card__image {
        aspect-ratio: 4 / 3;
        height: auto;
    }

.medi-home--sheet .medi-home-category-card__body {
        min-height: 0;
        padding: 12px 36px 12px 12px;
    }

.medi-home--sheet .medi-home-category-card__body > span {
        display: none;
    }

.medi-home--sheet .medi-home-category-card em {
        right: 10px;
        width: 20px;
        height: 20px;
    }

.medi-home--sheet .medi-home-category-card em svg {
        width: 20px;
        height: 20px;
    }

.medi-home-install {
        grid-template-columns: 1fr;
    }

.medi-home-install__photo {
        aspect-ratio: 16 / 9;
        max-height: 150px;
    }

.medi-home-install__col + .medi-home-install__col {
        border-left: 0;
        border-top: 1px solid var(--mt-line);
    }

.medi-home-trust {
        grid-template-columns: 1fr;
    }

.medi-home--sheet .medi-home-contact {
        padding: 20px;
    }

.medi-home-contact__facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 549px) {
    /* Homepage hero: shortcuts reach the first screen. */
    .medi-home--sheet .medi-home-hero__inner {
        padding-top: 22px !important;
        padding-bottom: 22px !important;
    }

.medi-home--sheet h1 {
        margin-bottom: 12px;
        font-size: var(--mt-text-30);
    }

.medi-home--sheet .medi-home-lead {
        margin-bottom: 14px;
        font-size: var(--mt-text-15);
        line-height: 1.5;
    }

.medi-home--sheet .medi-home-facts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
        margin-bottom: 16px;
        font-size: var(--mt-text-13);
    }

    /* "Przejdź do kategorii" only scrolled to the tiles right below; the header search
       replaces the hero search on phones. */
    .medi-home--sheet .medi-home-actions .medi-home-button:not(.medi-home-button--ghost),
    .medi-home--sheet .medi-home-hero__panel-block:has(.medi-home-hero-search) {
        display: none;
    }

.medi-home--sheet .medi-home-hero__panel {
        margin-top: 4px;
    }
}

/* ---------- Hero with the company sphere ("kulka", functions.php meditronik_home_sphere_svg;
   owner's choice 2026-11-28): the whole sphere, as in the logo, quiet (24%), centred on the
   quick-access panel — it sits inside the panel, so its centre is the panel's centre at every
   width — and a little larger, so the outer hexagons show all round it. One authored moment:
   it settles into place once. ---------- */
html body .medi-home-hero__panel {
    position: relative;
    isolation: isolate;
    overflow: visible; /* the panel clipped the sphere to its own box; the hero still clips it */
}

html body .medi-home-sphere {
    --medi-hex-face: var(--mt-brand-lime);
    --medi-hex-side: var(--mt-green-text);
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -1;
    display: block;
    width: min(620px, 46vw);
    height: auto;
    opacity: .24;
    pointer-events: none;
    translate: -50% -50%;
    animation: mediSphereAppear 1100ms cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes mediSphereAppear {
    from {
        opacity: 0;
        scale: .94;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .medi-home-sphere {
        animation: none;
    }
}

@media (max-width: 849px) {
    html body .medi-home-sphere {
        width: 118vw;
        opacity: .14;
    }
}
