/**
 * Icon Grid CSS - Icon-Kacheln
 *
 * Quadratische Schnellzugriff-Kacheln: weißes Icon + Versal-Label auf
 * Farbfläche. Farben nach Design: Grün flach #2b957e, Blau/Rot als
 * CD-Verläufe. Ganze Kachel ist Link (Touch-Ziel).
 *
 * Konsumiert Theme-Tokens (--aktd-*) mit Fallbacks.
 */

/* Grid: mittig, Kacheln mit fester Maximalbreite (Design: 3 × ~400px) */
.akt-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 35px; /* Design */
    margin: 0 0 32px;
}

/* Kachel */
.akt-icon-grid__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 24px;
    background: var(--aktd-color-script-heading, #2b957e);
    color: var(--aktd-color-white, #ffffff);
    text-align: center;
    text-decoration: none !important; /* Astra unterstreicht Content-Links */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.akt-icon-grid__tile:hover,
a.akt-icon-grid__tile:focus {
    color: var(--aktd-color-white, #ffffff);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

/* Farbvarianten */
.akt-icon-grid__tile--color-gruen {
    background: var(--aktd-color-script-heading, #2b957e);
}

.akt-icon-grid__tile--color-blau {
    background: linear-gradient(135deg, var(--aktd-color-blue, #466fb5) 0%, var(--aktd-color-blue-dark, #3062a6) 100%);
}

.akt-icon-grid__tile--color-rot {
    background: var(--aktd-gradient-red, linear-gradient(90deg, #ff1f29 0%, #ff6142 100%));
}

/* Script-Schriftzug (optional, z. B. „Tipp") */
.akt-icon-grid__script {
    font-family: var(--aktd-font-script, cursive);
    font-size: clamp(24px, 3.6vw, 46px); /* Design 43px @1200 */
    line-height: 1.1;
    margin-bottom: 4px;
}

/* Icon */
.akt-icon-grid__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    /* `width: 100%` ist nötig — als Flex-Item in einer Spalte schrumpft der
       Container sonst auf Bildbreite und das Icon wird viel zu klein. */
    width: 100%;
    height: 48%; /* Design: Icon 118px hoch (Prozent bezieht sich auf die Innenfläche) */
    margin-bottom: 11%;
}

.akt-icon-grid__icon img {
    max-height: 100%;
    max-width: 49%; /* Design: Icon 121px breit */
    width: auto;
    height: auto;
}

/* Kachel mit Schriftzug: Icon kleiner, damit Schriftzug + Icon + Beschriftung
   in das Quadrat passen (Design „Tipp": Icon ≈72 statt 118px hoch). */
.akt-icon-grid__tile--has-script .akt-icon-grid__icon {
    height: 30%;
    margin-bottom: 7%;
}

/* Beschriftung */
.akt-icon-grid__label {
    font-family: var(--aktd-font-accent, sans-serif);
    font-weight: 400;
    font-size: 21px; /* Design */
    line-height: 1.25;
    letter-spacing: 0.1em; /* Design-Tracking 100 */
    text-transform: uppercase;
    max-width: 90%;
}

/* Leerzustand (nur für Redakteure sichtbar) */
.akt-icon-grid__no-content {
    padding: 16px;
    border: 2px dashed #c3c4c7;
    border-radius: 3px;
    color: #646970;
    font-size: 14px;
    text-align: center;
}

/* Responsive */
@media (max-width: 921px) {

    .akt-icon-grid {
        gap: 24px;
    }

    .akt-icon-grid__label {
        font-size: 15px;
        letter-spacing: 0.07em;
    }

    .akt-icon-grid__script {
        font-size: 22px;
    }
}

@media (max-width: 544px) {

    .akt-icon-grid {
        grid-template-columns: minmax(0, 400px);
        gap: 16px;
        margin-bottom: 24px;
    }

    .akt-icon-grid__tile {
        aspect-ratio: auto;
        flex-direction: row;
        gap: 20px;
        padding: 18px 20px;
        text-align: left;
    }

    .akt-icon-grid__icon {
        height: 56px;
        flex: 0 0 72px;
        margin-bottom: 0;
    }

    .akt-icon-grid__icon img {
        max-width: 100%;
    }

    .akt-icon-grid__script {
        display: none;
    }
}

/* Barrierefreiheit / Print */
@media (prefers-reduced-motion: reduce) {

    .akt-icon-grid__tile {
        transition: none;
    }

    a.akt-icon-grid__tile:hover,
    a.akt-icon-grid__tile:focus {
        transform: none;
    }
}

@media print {

    .akt-icon-grid__tile {
        background: none;
        color: #000;
        border: 1px solid #000;
    }
}
