/* ==========================================================================
   Kontejneri — Catalog index (6 model families)
   ========================================================================== */

/* ===== HERO — Slagalica (modular index) ===== */
.mm-ct-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--mm-dark);
    color: #fff;
    padding: 140px 0 80px;
}
.mm-ct-hero__bg { position: absolute; inset: 0; z-index: 1; }
.mm-ct-hero__bg img,
.mm-ct-hero__bg picture { width: 100%; height: 100%; }
.mm-ct-hero__bg img {
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
    filter: saturate(.7) contrast(1.05);
}
.mm-ct-hero__overlay {
    position: absolute; inset: 0; z-index: 2;
    background:
        linear-gradient(180deg, rgba(12,25,28,.7) 0%, rgba(12,25,28,.85) 60%, rgba(12,25,28,.95) 100%),
        radial-gradient(ellipse at top right, rgba(32,119,189,.18) 0%, transparent 55%);
}
.mm-ct-hero__grain {
    position: absolute; inset: 0; z-index: 3;
    pointer-events: none;
    opacity: .06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mm-ct-hero .mm-container { position: relative; z-index: 5; width: 100%; }

.mm-ct-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 72px;
    align-items: center;
}

/* Left — editorial copy */
.mm-ct-hero__copy { max-width: 540px; }
.mm-ct-hero__overline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.6);
    margin-bottom: 28px;
}
.mm-ct-hero__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: linear-gradient(135deg, #5bb8f5, var(--mm-light-blue));
    color: #fff;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.mm-ct-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: #fff;
    margin-bottom: 24px;
}
.mm-ct-hero__title em {
    font-style: normal;
    background: linear-gradient(135deg, #5bb8f5, var(--mm-light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mm-ct-hero__subtitle {
    color: rgba(255,255,255,.7);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
}
.mm-ct-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Right — 6-tile modular grid */
.mm-ct-hero__tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.mm-ct-hero__tile { list-style: none; min-width: 0; }
.mm-ct-hero__tile-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    color: #fff;
    aspect-ratio: 4 / 3;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s ease;
}
.mm-ct-hero__tile-img {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.mm-ct-hero__tile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .82;
    transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
.mm-ct-hero__tile-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(12,25,28,.1) 0%, rgba(12,25,28,.4) 50%, rgba(12,25,28,.92) 100%);
    pointer-events: none;
    transition: background .35s ease;
}
.mm-ct-hero__tile-link:hover {
    transform: translateY(-4px);
    border-color: rgba(91,184,245,.5);
}
.mm-ct-hero__tile-link:hover .mm-ct-hero__tile-img img {
    transform: scale(1.06);
    opacity: 1;
}
.mm-ct-hero__tile-link:hover::after {
    background: linear-gradient(180deg, rgba(12,25,28,0) 0%, rgba(32,119,189,.25) 60%, rgba(12,25,28,.95) 100%);
}

.mm-ct-hero__tile-num {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 3;
    font-family: 'Montserrat', sans-serif;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,255,255,.7);
}
.mm-ct-hero__tile-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.75);
    transition: background .35s ease, color .35s ease, transform .35s ease;
}
.mm-ct-hero__tile-arrow .mm-icon { width: 14px; height: 14px; }
.mm-ct-hero__tile-link:hover .mm-ct-hero__tile-arrow {
    background: var(--mm-light-blue);
    color: #fff;
    transform: rotate(-45deg);
}

.mm-ct-hero__tile-meta {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mm-ct-hero__tile-label {
    font-family: 'Montserrat', sans-serif;
    font-size: .9375rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.mm-ct-hero__tile-tag {
    font-size: .6875rem;
    color: rgba(255,255,255,.6);
    letter-spacing: .3px;
}

/* Stagger entry animation */
@media (prefers-reduced-motion: no-preference) {
    .mm-ct-hero__tile {
        opacity: 0;
        transform: translateY(12px);
        animation: mm-ct-tile-in .55s cubic-bezier(.2,.8,.2,1) forwards;
    }
    .mm-ct-hero__tile:nth-child(1) { animation-delay: .05s; }
    .mm-ct-hero__tile:nth-child(2) { animation-delay: .12s; }
    .mm-ct-hero__tile:nth-child(3) { animation-delay: .19s; }
    .mm-ct-hero__tile:nth-child(4) { animation-delay: .26s; }
    .mm-ct-hero__tile:nth-child(5) { animation-delay: .33s; }
    .mm-ct-hero__tile:nth-child(6) { animation-delay: .40s; }
}
@keyframes mm-ct-tile-in {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== INTRO STRIP ===== */
.mm-ct-intro {
    padding: 88px 0 64px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.mm-ct-intro__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.mm-ct-intro__copy h2 {
    margin-top: 8px;
    margin-bottom: 20px;
    line-height: 1.15;
}
.mm-ct-intro__copy p {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}
.mm-ct-intro__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.mm-ct-intro__stat {
    padding: 28px 20px;
    text-align: left;
    line-height: 1.3;
    border-right: 1px solid #e5e7eb;
}
.mm-ct-intro__stat:last-child { border-right: none; }
.mm-ct-intro__stat strong {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--mm-dark);
    margin-bottom: 6px;
    background: var(--mm-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mm-ct-intro__stat span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.3;
    color: #888;
}

/* ===== CATALOG GRID ===== */
.mm-ct-catalog {
    padding: 0 0 88px;
    background: #fff;
}

.mm-ct-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #e5e7eb;
}

.mm-ct-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    transition: background .35s ease;
    overflow: hidden;
}

/* Remove trailing right-borders on rightmost column */
.mm-ct-card:nth-child(3n) { border-right: none; }

.mm-ct-card:hover {
    background: #f7f8fa;
}

/* ----- Image area (aspect 4/3 with soft brand gradient, like homepage slider) ----- */
.mm-ct-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(145deg, #edf0f4 0%, #f8f9fb 50%, #e8ebf0 100%);
    overflow: hidden;
    border-bottom: 1px solid #e5e7eb;
}
.mm-ct-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}
.mm-ct-card:hover .mm-ct-card__image img { transform: scale(1.06); }

.mm-ct-card__num {
    position: absolute;
    top: 20px;
    left: 24px;
    z-index: 2;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(var(--mm-dark-rgb), .4);
}
.mm-ct-card__num::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: rgba(var(--mm-dark-rgb), .3);
    vertical-align: middle;
    margin-right: 10px;
    transition: width .35s ease, background .35s ease;
}
.mm-ct-card:hover .mm-ct-card__num::before {
    width: 36px;
    background: var(--mm-light-blue);
}

/* ----- Body ----- */
.mm-ct-card__body {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mm-ct-card__tagline {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--mm-light-blue);
    margin-bottom: 10px;
}

.mm-ct-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mm-dark);
    margin-bottom: 10px;
}

.mm-ct-card__desc {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ----- Model list ----- */
.mm-ct-card__models {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.mm-ct-card__models li {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #555;
    background: #f3f5f8;
    border: 1px solid #e5e7eb;
    transition: all .25s ease;
}
.mm-ct-card:hover .mm-ct-card__models li {
    background: #fff;
    border-color: rgba(var(--mm-light-blue-rgb), .3);
    color: var(--mm-dark);
}

/* ----- Meta row ----- */
.mm-ct-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}
.mm-ct-card__dim {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #999;
}
.mm-ct-card__dim .mm-icon { width: 14px; height: 14px; color: #bbb; }

.mm-ct-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mm-light-blue);
    transition: gap .25s ease;
}
.mm-ct-card:hover .mm-ct-card__more { gap: 12px; color: var(--mm-indigo); }
.mm-ct-card__more .mm-icon { width: 16px; height: 16px; }

/* Accent bar on hover */
.mm-ct-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--mm-gradient);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    z-index: 3;
}
.mm-ct-card:hover::after { transform: scaleX(1); }

/* ===== CUSTOM / CTA SECTION ===== */
.mm-ct-custom {
    padding: 96px 0;
    background: #f7f8fa;
    position: relative;
    overflow: hidden;
}
.mm-ct-custom::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--mm-light-blue-rgb), .06), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.mm-ct-custom__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: center;
}
.mm-ct-custom__text h2 {
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1.15;
}
.mm-ct-custom__text p {
    color: #555;
    font-size: 1.0625rem;
    line-height: 1.8;
    max-width: 560px;
}
.mm-ct-custom__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}
.mm-ct-custom__actions .mm-btn { width: 100%; justify-content: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .mm-ct-catalog__grid { grid-template-columns: repeat(2, 1fr); }
    .mm-ct-card:nth-child(3n) { border-right: 1px solid #e5e7eb; }
    .mm-ct-card:nth-child(2n) { border-right: none; }
}

@media (max-width: 1024px) {
    .mm-ct-intro { padding: 64px 0 48px; }
    .mm-ct-intro__inner { grid-template-columns: 1fr; gap: 40px; }
    .mm-ct-intro__stat { padding: 20px 16px; }
    .mm-ct-intro__stat strong { font-size: 1.875rem; }

    .mm-ct-custom { padding: 72px 0; }
    .mm-ct-custom__inner { grid-template-columns: 1fr; gap: 32px; }
    .mm-ct-custom__actions { flex-direction: row; flex-wrap: wrap; }
    .mm-ct-custom__actions .mm-btn { width: auto; }
}

@media (max-width: 1024px) {
    .mm-ct-hero { padding: 130px 0 72px; }
    .mm-ct-hero__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .mm-ct-hero__copy { max-width: 100%; }
    .mm-ct-hero__subtitle { max-width: 640px; }
}

/* ===== MOBILE — "Štampani katalog" editorial index =====
   Completely different visual language from desktop:
   no background photo, no overlay, no images on tiles —
   just a numbered editorial list with outline numerals and
   dotted dividers. Each row stays a tap target leading to
   the family. Unique to this page on mobile. */
@media (max-width: 720px) {
    .mm-ct-hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 110px 0 56px;
        align-items: flex-start;
        background: var(--mm-dark);
    }
    /* Strip away the photographic skin — let typography speak alone */
    .mm-ct-hero__bg,
    .mm-ct-hero__overlay,
    .mm-ct-hero__grain { display: none; }

    .mm-ct-hero__layout {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }
    /* Editorial header on top, list below */
    .mm-ct-hero__copy   { order: 1; max-width: 100%; }
    .mm-ct-hero__tiles  { order: 2; }

    /* Header */
    .mm-ct-hero__overline {
        margin-bottom: 20px;
        font-size: .6875rem;
        letter-spacing: 2.5px;
    }
    .mm-ct-hero__title {
        font-size: clamp(2.25rem, 10vw, 3rem);
        line-height: 1;
        letter-spacing: -0.03em;
        margin-bottom: 0;
    }
    .mm-ct-hero__title::after {
        content: '';
        display: block;
        width: 56px;
        height: 2px;
        background: linear-gradient(90deg, #5bb8f5, var(--mm-light-blue));
        margin-top: 24px;
    }
    /* Subtitle and CTAs out — the list is the navigation */
    .mm-ct-hero__subtitle,
    .mm-ct-hero__actions { display: none; }

    /* The index list — full-bleed, numbered, dotted dividers */
    .mm-ct-hero__tiles {
        display: block;
        grid-template-columns: none;
        gap: 0;
        margin: 0 -20px;
        padding: 0;
        overflow: visible;
        scroll-snap-type: none;
    }
    .mm-ct-hero__tile {
        flex: none;
        scroll-snap-align: none;
        animation: none;
        opacity: 1;
        transform: none;
    }

    .mm-ct-hero__tile-link {
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 18px;
        aspect-ratio: auto;
        padding: 22px 24px;
        background: transparent;
        border: 0;
        border-bottom: 1px dashed rgba(255,255,255,.14);
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        transition: background .3s ease, border-color .3s ease;
    }
    .mm-ct-hero__tile-link::after { display: none; }
    .mm-ct-hero__tile:first-child .mm-ct-hero__tile-link {
        border-top: 1px dashed rgba(255,255,255,.14);
    }
    .mm-ct-hero__tile-link:hover,
    .mm-ct-hero__tile-link:active {
        background: rgba(91,184,245,.06);
        transform: none;
    }

    /* No images on mobile — pure editorial */
    .mm-ct-hero__tile-img { display: none; }

    /* Big outline numeral — the editorial signature */
    .mm-ct-hero__tile-num {
        position: static;
        font-family: 'Montserrat', sans-serif;
        font-size: 2.75rem;
        font-weight: 800;
        letter-spacing: -0.04em;
        line-height: 1;
        color: transparent;
        -webkit-text-stroke: 1.5px rgba(255,255,255,.28);
        transition: color .3s ease, -webkit-text-stroke-color .3s ease;
    }
    .mm-ct-hero__tile-link:hover .mm-ct-hero__tile-num,
    .mm-ct-hero__tile-link:active .mm-ct-hero__tile-num {
        color: var(--mm-light-blue);
        -webkit-text-stroke-color: var(--mm-light-blue);
    }

    /* Meta block in the middle */
    .mm-ct-hero__tile-meta {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 4px;
        text-align: left;
        min-width: 0;
    }
    .mm-ct-hero__tile-label {
        font-family: 'Montserrat', sans-serif;
        font-size: .9375rem;
        font-weight: 800;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: #fff;
        line-height: 1.15;
    }
    .mm-ct-hero__tile-tag {
        font-size: .75rem;
        font-weight: 400;
        letter-spacing: 0;
        color: rgba(255,255,255,.5);
        text-transform: none;
    }

    /* Arrow on the right */
    .mm-ct-hero__tile-arrow {
        position: static;
        width: 34px;
        height: 34px;
        background: transparent;
        border: 1px solid rgba(255,255,255,.18);
        color: rgba(255,255,255,.55);
    }
    .mm-ct-hero__tile-arrow .mm-icon { width: 14px; height: 14px; }
    .mm-ct-hero__tile-link:hover .mm-ct-hero__tile-arrow,
    .mm-ct-hero__tile-link:active .mm-ct-hero__tile-arrow {
        background: var(--mm-light-blue);
        border-color: var(--mm-light-blue);
        color: #fff;
        transform: rotate(-45deg);
    }

    /* Intro: tighter vertical rhythm */
    .mm-ct-intro { padding: 56px 0 44px; }
    .mm-ct-intro__inner { gap: 32px; }
    .mm-ct-intro__copy h2 {
        font-size: 1.625rem;
        line-height: 1.2;
    }
    .mm-ct-intro__copy p {
        font-size: .9375rem;
        line-height: 1.7;
    }
    .mm-ct-intro__stats { grid-template-columns: repeat(3, 1fr); }
    .mm-ct-intro__stat {
        padding: 18px 10px;
        text-align: center;
    }
    .mm-ct-intro__stat strong { font-size: 1.375rem; }
    .mm-ct-intro__stat span {
        font-size: .625rem;
        letter-spacing: 1.2px;
        line-height: 1.2;
    }

    /* Catalog */
    .mm-ct-catalog { padding-bottom: 64px; }
    .mm-ct-catalog__grid { grid-template-columns: 1fr; }
    .mm-ct-card:nth-child(n) { border-right: none; }
    .mm-ct-card__body { padding: 24px; }
    .mm-ct-card__title { font-size: 1.25rem; }
    .mm-ct-card__image img { padding: 24px; }

    /* Custom CTA */
    .mm-ct-custom__actions { flex-direction: column; width: 100%; }
    .mm-ct-custom__actions .mm-btn { width: 100%; }
}
