/* Container: Responsive Grid-Layout (Mobile First) */
ul.udg-filecards-container {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 Spalte */
    gap: 15px;
    width: 100%;
}

@media (min-width: 768px) {
    ul.udg-filecards-container {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 Spalten */
    }
}

@media (min-width: 1024px) {
    ul.udg-filecards-container {
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Spalten */
    }
}

/* Clean Card Design (für Modul und Plugin) */
a.udg-filecard-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    background-color: #ffffff;
    border-radius: 6px;
    padding: 15px;
    text-decoration: none !important;
    color: #333333;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #FFD700;
    box-sizing: border-box;
    width: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden; /* Verhindert Ausbrechen */
    margin-bottom: 10px; /* Abstand, wenn es im Fließtext steht */
}

/* Im Grid brauchen wir keinen extra margin-bottom, das macht der gap */
ul.udg-filecards-container a.udg-filecard-box {
    margin-bottom: 0;
}

/* Hover-Effekte */
a.udg-filecard-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    color: #333333;
}

/* Fokus-Styles für Barrierefreiheit */
a.udg-filecard-box:focus-visible {
    outline: 2px solid #333333;
    outline-offset: 2px;
}

/* Icon Styling */
.udg-filecard-box .udg-filecard-icon-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.udg-filecard-box .udg-filecard-icon-wrapper i {
    font-size: 1.6rem;
    color: #333;
}

/* Content Container (verhindert Text-Overflow) */
.udg-filecard-box .udg-filecard-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    width: 100%;
}

/* Typografie */
.udg-filecard-box .udg-filecard-title {
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.3;
    color: #333333;
    margin: 0 0 4px 0;
    width: 100%;
    /* Lange Wörter sauber abschneiden (Ellipsis) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.udg-filecard-box .udg-filecard-meta {
    font-size: 0.85rem;
    color: #666666;
    line-height: 1.2;
}

/* Screenreader */
.udg-filecard-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
