/* Ryszewo: original graphic links to thematic sections. */
/* Reserve a usable menu button beside the mobile logo. */
.tm-header-mobile .uk-navbar { gap: 12px; }
.tm-header-mobile .uk-navbar-left { flex: 1 1 auto; min-width: 0; }
.tm-header-mobile .uk-logo { min-width: 0; max-width: 100%; }
.tm-header-mobile .uk-navbar-right { flex: 0 0 44px; margin-left: 0; }
.tm-header-mobile .uk-navbar-toggle { flex: 0 0 44px; min-width: 44px; padding: 0; }

/* Keep the desktop menu beside the logo in a single row. */
@media (min-width: 960px) {
    .tm-header .uk-navbar > .uk-navbar-left {
        width: auto;
        flex: 0 0 auto;
        margin: 0;
    }
    .tm-header .uk-logo { width: clamp(220px, 28vw, 350px); }
    .tm-header .uk-navbar > .uk-navbar-right {
        flex: 1 1 auto;
        min-width: 0;
        margin-left: 24px;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
    .tm-header .uk-navbar-nav {
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: clamp(10px, 1.5vw, 24px);
    }
    .tm-header .uk-navbar-nav > li { flex-shrink: 0; }
    .tm-header .uk-navbar-nav > li > a { white-space: nowrap; }
}

.ryszewo-topic-nav { border: 1px solid #a4b68d; background: #fafbf8; padding: 24px; }
.ryszewo-topic-nav h2 { margin: 0 0 22px; }
.ryszewo-topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ryszewo-topic-link { display: flex; align-items: center; background: #fff; border: 1px solid #e3e6df; padding: 5px; transition: border-color .2s, box-shadow .2s; }
.ryszewo-topic-link:hover, .ryszewo-topic-link:focus-visible { border-color: #738355; box-shadow: 0 3px 10px #35433718; }
.ryszewo-topic-link img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
    .ryszewo-topic-nav { padding: 18px; }
    .ryszewo-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Contact list: compact portraits, keep original proportions. */
#contactList img.contact-thumbnail {
    width: 120px;
    max-width: 100%;
    height: auto;
}

/* Contact list: left aligned portraits and borderless striped rows. */
#contactList,
#contactList > thead > tr > th,
#contactList > tbody > tr > th,
#contactList > tbody > tr > td {
    border: 0 !important;
}

#contactList #categorylist_header_title,
#contactList .list-title {
    text-align: left;
}

#contactList .list-title > a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
}

#contactList img.contact-thumbnail {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none;
    background: transparent;
}

/* Contact list: show contacts without column headings. */
#contactList > thead {
    display: none;
}

/* Contact list: tighter row spacing. */
#contactList {
    border-collapse: collapse;
    border-spacing: 0;
}

#contactList > tbody > tr > th,
#contactList > tbody > tr > td {
    padding: 4px 8px;
    line-height: 1.3;
    vertical-align: middle;
}

#contactList .list-title > a {
    vertical-align: middle;
}

#contactList img.contact-thumbnail {
    display: block;
}
/* Ryszewo: szare tło modułów informacyjnych. */
#tm-main .background-ms {
    background: #f2f2f2;
    padding: 24px;
    box-sizing: border-box;
    height: 100%;
}
