/* =========================================================
   kachel – Mobilista Motors Design
   Nutzt die globalen Design-Tokens aus layout.css (--red, --panel,
   --line, --font-display, --font-ui, --paper ...), fällt aber auf
   feste Werte zurück, falls der Block mal ohne dieses Stylesheet läuft.
========================================================= */

.kachel-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;

    background: var(--panel, #131313);

    border-radius: 2px;
    border: 1px solid var(--line, rgba(242,242,240,0.14));
    overflow: hidden;

    transition:
        transform .25s ease,
        border-color .25s ease;

    height: 100%;
    box-sizing: border-box;
}

.kachel-image {
    flex: 0 0 auto;
}

.kachel-body {
    /* wichtig: 1 1 auto statt 1 0 auto, damit der Body bei kurzem
       Text nicht auf seine min-content-Höhe zurückfällt, sondern
       den verfügbaren Platz der (per Grid/Flex gestreckten) Kachel
       ausfüllt */
    flex: 1 1 auto;
    min-height: 0;
}

a.kachel-item:hover,
a.kachel-item:focus-visible {
    transform: translateY(-4px);
    border-color: var(--red-soft, #ff2f3c);
}

/* Bild */
.kachel-image {
    width: 100%;
    overflow: hidden;
}

/* Bildformat (Backend-Auswahlfeld imageRatio) */
.kachel-image--widescreen { aspect-ratio: 16 / 9; }
.kachel-image--square     { aspect-ratio: 1 / 1; }

.kachel-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}

/* Bildausrichtung (Backend-Auswahlfeld imagePosition) */
.kachel-image--center img { object-position: center; }
.kachel-image--top img    { object-position: top; }
.kachel-image--bottom img { object-position: bottom; }
.kachel-image--left img   { object-position: left; }
.kachel-image--right img  { object-position: right; }

/* Body */
.kachel-body {
    padding: 34px;
}

.kachel-item .kachel-title {
    margin: 0 0 14px;
    font-family: var(--font-display, 'Oswald', sans-serif);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--paper, #f2f2f0);
    font-size: 1.25rem;
    line-height: 1.2;
}

.kachel-item p {
    margin: 0;

    color: rgba(242,242,240,0.72);
    font-family: var(--font-ui, 'Jost', sans-serif);

    font-size: 16px;
    line-height: 1.55;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 720px) {

    .kachel-body {
        padding: 28px;
    }

    .kachel-item p {
        font-size: 15px;
    }

}


/* =========================================================
   wenn Containeritems: Spalten-Grid --> dann gleiche Höhe
========================================================= */

.frame-type-container.c-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;   /* macht alle Spalten gleich hoch */
}

.frame-type-container.c-columns > .col {
    display: flex;          /* Inhalt (z.B. Kachel) kann sich strecken */
}

.frame-type-container.c-columns > .col > * {
    width: 100%;            /* Kachel füllt die ganze Spalte aus */
}
