/* =====================================================================
   Motyw „modern" — artykuły (com_content).

   Lista artykułów to w tym serwisie strumień powiadomień o nowych plikach:
   tytuł, autor, data i tabelka szczegółów pliku. Dotąd wszystko leżało
   płasko na tle strony, bez podziału na pozycje. Nadajemy im formę kart
   z makiety, a tabelkę szczegółów układamy w dwie kolumny.

   Kolejność: … → theme-bootstrap.css → theme-content.css
   ===================================================================== */

/* --- Pozycja listy jako karta ------------------------------------------ */
.theme-modern .com-content-category-blog__item,
.theme-modern .com-content-category-blog__items > div {
    margin-bottom: 14px;
    padding: 20px 22px;
    background: var(--m-surface);
    border: 1px solid var(--m-border);
    border-radius: var(--m-radius-lg);
}

/* Reguła z przeniesionego user.css dodawała kreskę pod każdą pozycją -
   wewnątrz karty jest zbędna. */
.theme-modern .com-content-category-blog__items.blog-items > div {
    border-bottom: 1px solid var(--m-border);
    padding-bottom: 20px;
}

.theme-modern .com-content-category-blog__item .page-header {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Tytuł ogłoszenia o pliku jest odnośnikiem do strony pliku (override layoutu
   joomla.content.blog_style_default_item_title). Ma wyglądać jak nagłówek,
   nie jak link w treści - stąd kolor tekstu i brak podkreślenia. */
.theme-modern .com-content-category-blog__item h2 .article-file-link {
    color: inherit;
    text-decoration: none;
}

.theme-modern .com-content-category-blog__item h2 .article-file-link:hover,
.theme-modern .com-content-category-blog__item h2 .article-file-link:focus-visible {
    color: var(--m-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.theme-modern .com-content-category-blog__item h2 {
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.theme-modern .com-content-category-blog__item h2 a {
    color: var(--m-text);
    text-decoration: none;
}

.theme-modern .com-content-category-blog__item h2 a:hover {
    color: var(--m-primary);
}

/* --- Metryka: autor i data --------------------------------------------- */
.theme-modern .article-info.text-muted {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--m-muted);
}

.theme-modern .article-info dd {
    margin: 0;
}

.theme-modern .article-info [class^="icon-"] {
    margin-right: 6px;
    color: var(--m-gray-dot);
}

/* --- Tabelka szczegółów pliku (remositoryfilesummary) -------------------
   Domyślnie to układ na floatach: etykieta 30% wyrównana do prawej,
   wartość 65% na szarym tle. Zamieniamy na dwie kolumny siatki - etykieta
   przy tekście, nie pod przeciwną krawędzią ekranu. */
.theme-modern .remositoryfilesummary dl {
    display: grid;
    grid-template-columns: minmax(120px, 190px) 1fr;
    gap: 0;
    margin: 16px 0 0;
    padding: 0;
    border-top: 1px solid var(--m-divider);
}

.theme-modern .remositoryfilesummary dl > dt,
.theme-modern .remositoryfilesummary dl > dd {
    float: none;
    width: auto;
    margin: 0;
    padding: 6px 0;
    border-top: 0;
    border-bottom: 1px solid var(--m-divider);
    background: transparent;
}

.theme-modern .remositoryfilesummary dl > dt {
    color: var(--m-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3px;
    text-align: left;
    text-transform: none;
    padding-right: 16px;
}

.theme-modern .remositoryfilesummary dl > dd {
    font-size: 14px;
    color: var(--m-text);
}

.theme-modern .remositoryfilesummary dl > dd a {
    color: var(--m-primary);
    text-decoration: none;
    font-weight: 500;
}

.theme-modern .remositoryfilesummary dd a:hover {
    text-decoration: underline;
}

/* --- Pojedynczy artykuł ------------------------------------------------ */
.theme-modern .com-content-article {
    padding: 0;
    background: transparent;
    border: 0;
}

.theme-modern .com-content-article__body {
    font-size: 14px;
    line-height: 1.65;
}

.theme-modern .com-content-article__body a {
    color: var(--m-primary);
}

/* --- Odnośniki „czytaj dalej" i nawigacja ------------------------------ */
.theme-modern .com-content-blog__links a,
.theme-modern .readmore .btn {
    font-size: 14px;
}

.theme-modern .com-content-category-blog__navigation {
    margin-top: 8px;
}

/* --- Nagłówek strony kategorii ----------------------------------------- */
.theme-modern .com-content-category-blog > .page-header h1,
.theme-modern .blog > .page-header h1 {
    font-size: var(--m-fs-h1);
    font-weight: 600;
    letter-spacing: -.2px;
    margin: 0 0 20px;
}

/* Ikona edycji Super Usera nad kartą, nie w treści */
.theme-modern .com-content-category-blog__item .icons {
    float: right;
    font-size: 13px;
}

.theme-modern .com-content-category-blog__item .icons a {
    color: var(--m-muted);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .theme-modern .remositoryfilesummary dl {
        grid-template-columns: 1fr;
    }

    .theme-modern .remositoryfilesummary dl > dt {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

/* Opis pliku bywa akapitem - bez dodatkowych marginesów w komórce */
.theme-modern .remositoryfilesummary dl > dd p {
    margin: 0;
}
