/* Zeng template — modern rebuild of the classic zeng.ro (gameon-fjt) look */
:root {
    --zeng-accent: #78ae2a;
    --zeng-accent-dark: color-mix(in srgb, var(--zeng-accent) 75%, #000);
    --zeng-accent-soft: color-mix(in srgb, var(--zeng-accent) 18%, #fff);
    --zeng-bg: #e1e1e1;
    --zeng-text: #555;
    --zeng-muted: #999;
    --zeng-line: #e1e1e1;
    --zeng-side: #f1f1f1;
    --zeng-width: 980px;
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-y: scroll; scroll-behavior: smooth; }

body {
    margin: 0;
    font: 15px/1.5 Helvetica, Arial, sans-serif;
    color: var(--zeng-text);
    background: linear-gradient(#f7f7f7, var(--zeng-bg) 220px) var(--zeng-bg);
    min-height: 100vh;
}

a { color: var(--zeng-accent); text-decoration: none; }
a:hover { color: var(--zeng-text); text-decoration: underline; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .5em;
    font-family: 'Cuprum', Arial, Helvetica, sans-serif;
    font-weight: normal;
    color: #797979;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--zeng-line); padding: 4px 8px; }

/* Header */
.zeng-header-inner {
    position: relative;
    max-width: var(--zeng-width);
    margin: 0 auto;
    padding: 12px 16px 36px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.zeng-logo { display: block; max-height: 64px; width: auto; }
.zeng-slogan { color: #494949; font-size: .8rem; align-self: flex-end; padding-bottom: 6px; }
.zeng-topbar {
    margin-left: auto;
    align-self: flex-start;
    background: var(--zeng-bg);
    border: 1px solid #fff;
    border-top: 0;
    border-radius: 0 0 7px 7px;
    padding: 5px;
}
.zeng-topbar input[type="text"], .zeng-topbar input[type="search"] {
    border: 1px solid #aaa; padding: 2px 6px; font-size: .8rem; width: 180px;
}
.zeng-topbar button {
    background: #555; color: #fff; border: 0; border-radius: 3px; padding: 3px 10px; cursor: pointer;
}

/* Panel */
.zeng-panel {
    max-width: var(--zeng-width);
    margin: 0 auto 24px;
    background: #fff;
    border: 1px solid #fff;
    border-radius: 12px;
    box-shadow: 0 0 0 1px #cfcfcf, 0 6px 22px rgba(0, 0, 0, .18);
    overflow: visible;
}

/* Main menu (also styles a vertical-less sidebar menu in cards below) */
.zeng-nav {
    background: linear-gradient(#fdfdfd, #ececec);
    border-bottom: 1px solid #d6d6d6;
    border-radius: 12px 12px 0 0;
    padding: 6px 10px;
    font-family: 'Cuprum', Arial, sans-serif;
    position: relative;
    z-index: 10;
}
.zeng-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.zeng-nav li { position: relative; }
.zeng-nav a {
    display: block;
    padding: 0 16px;
    line-height: 40px;
    font-size: 1.1rem;
    color: var(--zeng-text);
    border-right: 1px solid var(--zeng-line);
    border-radius: 6px;
}
.zeng-nav a:hover, .zeng-nav .active > a, .zeng-nav .current > a {
    background: linear-gradient(var(--zeng-accent), var(--zeng-accent-dark));
    color: #fff;
    text-decoration: none;
}
.zeng-nav ul ul {
    display: none;
    position: absolute;
    left: 0; top: 100%;
    min-width: 190px;
    flex-direction: column;
    background: #555;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .25);
}
.zeng-nav li:hover > ul, .zeng-nav li:focus-within > ul { display: flex; }
.zeng-nav ul ul a { line-height: 28px; font-size: .85rem; color: #d1d1d1; border: 0; border-bottom: 1px solid #3a3a3a; border-radius: 0; }
.zeng-nav ul ul a:hover { background: #343434; color: #fff; }
.zeng-nav ul ul ul { left: 100%; top: 0; }

/* Content area */
.zeng-content { padding: 9px; }
.zeng-hero { margin-bottom: 8px; border-radius: 6px; overflow: hidden; background: #111; text-align: center; }
.zeng-hero img { display: block; }
.zeng-hero img { width: 100%; max-height: 260px; object-fit: cover; }
.zeng-breadcrumbs { font-size: .7rem; padding: 2px 4px; color: var(--zeng-muted); }
.zeng-breadcrumbs ol, .zeng-breadcrumbs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.zeng-breadcrumbs a { color: var(--zeng-muted); }

.zeng-columns { display: block; margin-top: 10px; }
.zeng-columns.has-sidebar { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
.zeng-main { min-width: 0; padding: 3px 3px 3px 8px; font-size: 1.05rem; }

/* Sidebar */
.zeng-sidebar .zeng-module { border: 0; margin-bottom: 15px; }
.zeng-sidebar .module-title {
    font: 1.05rem 'Cuprum', Arial, sans-serif;
    background: var(--zeng-accent-soft);
    padding: 2px 8px;
    color: var(--zeng-text);
}
.zeng-sidebar ul { list-style: none; margin: 5px 0 0; padding: 0; }
.zeng-sidebar li a {
    display: block;
    background: var(--zeng-side);
    border-bottom: 1px solid #fff;
    color: #575757;
    padding: 3px 15px 3px 6px;
}
.zeng-sidebar li a:hover { background: #fff; text-decoration: none; box-shadow: inset 3px 0 var(--zeng-accent); }
.zeng-sidebar li.active > a, .zeng-sidebar li.current > a { color: #058ca1; font-weight: bold; }
.zeng-sidebar .mod-languages ul { display: flex; gap: 6px; }
.zeng-sidebar .mod-languages li a { background: none; padding: 0; }
.zeng-sidebar .mod-languages li a:hover { box-shadow: none; }

/* Joomla article bits */
.zeng-main .page-header h1, .zeng-main .page-header h2 { border-bottom: 1px dotted var(--zeng-line); padding-bottom: 3px; }
.zeng-main .item-title a, .zeng-main h2 a { color: #0a9410; }
.zeng-main .btn, .zeng-main button, .zeng-main .readmore a {
    background: var(--zeng-accent); color: #fff; border: 0; border-radius: 4px; padding: 5px 12px; cursor: pointer; display: inline-block;
}
.zeng-main .btn:hover, .zeng-main button:hover { background: var(--zeng-accent-dark); text-decoration: none; }
.zeng-main input, .zeng-main select, .zeng-main textarea { max-width: 100%; padding: 4px 6px; border: 1px solid #ccc; border-radius: 3px; }
.zeng-main blockquote { background: #eee; border-left: 4px solid #ccc; margin: 8px 0; padding: 6px 12px; font-style: italic; }
#system-message-container .alert { padding: 8px 12px; border-radius: 4px; background: var(--zeng-accent-soft); margin-bottom: 10px; }

/* Bottom modules */
.zeng-bottom { display: grid; gap: 20px; padding: 10px 18px 14px; border-top: 1px solid var(--zeng-line); }
.zeng-bottom.cols-2 { grid-template-columns: repeat(2, 1fr); }
.zeng-bottom.cols-3 { grid-template-columns: repeat(3, 1fr); }
.zeng-module { margin-bottom: 12px; }
.zeng-bottom .module-title, .zeng-top-modules .module-title { font: 1.05rem 'Cuprum', Arial, sans-serif; background: var(--zeng-accent-soft); padding: 2px 8px; }
.zeng-bottom-item { min-width: 0; font-size: .9rem; }

/* Footer */
.zeng-footer {
    border-top: 1px solid var(--zeng-line);
    padding: 10px 18px;
    font-size: .75rem;
    color: var(--zeng-muted);
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}
.zeng-footer p { margin: 0; }

/* Back to top */
.zeng-top {
    position: fixed; right: 30px; bottom: 10px;
    width: 34px; height: 34px; line-height: 32px; text-align: center;
    background: #fff; border: 1px solid #555; border-radius: 3px;
    opacity: .7; color: #555;
}
.zeng-top:hover { opacity: 1; text-decoration: none; }

/* Responsive */
@media (max-width: 760px) {
    .zeng-columns.has-sidebar { grid-template-columns: 1fr; }
    .zeng-bottom.cols-2, .zeng-bottom.cols-3 { grid-template-columns: 1fr; }
    .zeng-topbar { margin-left: 0; width: 100%; border-radius: 7px; }
    .zeng-nav ul { flex-direction: column; }
    .zeng-nav a { border-right: 0; }
    .zeng-nav ul ul { position: static; box-shadow: none; }
    .zeng-header-inner { padding-bottom: 16px; }
    .zeng-panel { border-radius: 0; }
}

/* menu-right (old social-bookmark bar) and top-a/b/c */
.zeng-nav { display: flex; flex-wrap: wrap; align-items: center; }
.zeng-nav-right { margin-left: auto; padding: 0 8px; }
.zeng-top-modules { display: grid; gap: 20px; padding: 6px 4px 0; }
.zeng-top-modules.cols-2 { grid-template-columns: repeat(2, 1fr); }
.zeng-top-modules.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
    .zeng-top-modules.cols-2, .zeng-top-modules.cols-3 { grid-template-columns: 1fr; }
    .zeng-nav-right { margin-left: 0; }
}

.zeng-logo { border-radius: 8px; }

/* Gallery: <div class="zeng-gallery"> with images inside (see js/gallery.js) */
.zeng-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.zeng-gallery p, .zeng-gallery figure { margin: 0; }
.zeng-gallery img {
    display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    border-radius: 6px; border: 1px solid var(--zeng-line);
    cursor: zoom-in; transition: transform .15s, box-shadow .15s;
}
.zeng-gallery img:hover, .zeng-gallery img:focus-visible { transform: scale(1.03); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); outline: 2px solid var(--zeng-accent); }
.zeng-gallery figcaption { font-size: .75rem; color: var(--zeng-muted); padding-top: 3px; }

.zeng-lightbox {
    border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
    width: 100vw; height: 100vh; overflow: hidden;
}
.zeng-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.zeng-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.zeng-lightbox figure { margin: 0; text-align: center; color: #fff; max-width: 88vw; }
.zeng-lightbox figure img { max-width: 88vw; max-height: 82vh; border-radius: 4px; box-shadow: 0 8px 40px rgba(0, 0, 0, .6); }
.zeng-lightbox figcaption { padding-top: 8px; font-size: .9rem; }
.zeng-lightbox button {
    position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; cursor: pointer;
    width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1;
}
.zeng-lightbox button:hover { background: var(--zeng-accent); }
.zeng-lightbox .zl-close { top: 16px; right: 16px; }
.zeng-lightbox .zl-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.zeng-lightbox .zl-next { right: 16px; top: 50%; transform: translateY(-50%); }
.zeng-lightbox.single .zl-prev, .zeng-lightbox.single .zl-next { display: none; }

/* Language switcher (mod_languages): works without Bootstrap CSS - dropdown and flag list */
.mod-languages ul { list-style: none; margin: 0; padding: 0; }
.mod-languages .lang-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mod-languages img { display: inline-block; vertical-align: middle; }
.zeng-topbar .mod-languages .lang-block { display: flex; gap: 8px; }
.mod-languages__select { position: relative; display: inline-block; }
.mod-languages__select .dropdown-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; color: var(--zeng-text); border: 1px solid #aaa; border-radius: 3px;
    padding: 3px 10px; font-size: .85rem; cursor: pointer;
}
.mod-languages__select .dropdown-toggle::after {
    content: ""; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.mod-languages__select .dropdown-menu {
    display: none; position: absolute; right: 0; top: 100%; z-index: 50; min-width: 10rem;
    margin: 2px 0 0; padding: 4px 0; background: #fff; border: 1px solid #ccc; border-radius: 4px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}
.mod-languages__select .dropdown-menu.show,
.mod-languages__select:hover .dropdown-menu,
.mod-languages__select:focus-within .dropdown-menu { display: block; }
.mod-languages__select .dropdown-menu a {
    display: flex; align-items: center; gap: 8px; padding: 4px 12px; color: var(--zeng-text);
    background: none; border: 0; box-shadow: none;
}
.mod-languages__select .dropdown-menu a:hover,
.mod-languages__select .dropdown-menu .lang-active a { background: var(--zeng-accent-soft); text-decoration: none; }
.zeng-sidebar .mod-languages li a { padding: 0; }

/* Bootstrap utilities that core modules rely on (the template does not load Bootstrap CSS) */
.visually-hidden, .visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
    margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}
.d-none { display: none !important; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 3px; background: #777; color: #fff; font-size: .75rem; }
.btn-group { display: inline-flex; position: relative; }

/* Hide the topbar pill when its module rendered nothing (e.g. language switcher with no languages) */
.zeng-topbar:not(:has(a, li, input, button, select)) { display: none; }

/* Link cards: {zenglink https://...} (plugin zenggallery) - preview image, opens in a new tab */
.zeng-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 12px 0; }
.zeng-link-card {
    display: flex; flex-direction: column; background: #fff; color: var(--zeng-text);
    border: 1px solid var(--zeng-line); border-radius: 8px; overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.zeng-link-card:hover, .zeng-link-card:focus-visible {
    transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); text-decoration: none; color: var(--zeng-text);
}
.zeng-link-card .zl-thumb { display: block; aspect-ratio: 16 / 9; background: var(--zeng-accent-soft); overflow: hidden; }
.zeng-link-card .zl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zeng-link-card .zl-noimg {
    display: flex; align-items: center; justify-content: center; height: 100%;
    font: 3rem 'Cuprum', Arial, sans-serif; color: var(--zeng-accent);
}
.zeng-link-card .zl-title { display: block; padding: 8px 10px 0; font-weight: 600; line-height: 1.3; color: var(--zeng-accent-dark); }
.zeng-link-card .zl-desc {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    padding: 4px 10px 0; font-size: .85rem; color: var(--zeng-text);
}
.zeng-link-card .zl-host { display: block; padding: 6px 10px 10px; margin-top: auto; font-size: .75rem; color: var(--zeng-muted); }

/* Link with own image: {zenglink https://... | images/x.jpg} */
.zeng-links-image { display: block; }
.zeng-link-image { display: inline-block; max-width: 100%; line-height: 0; border-radius: 8px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.zeng-link-image:hover, .zeng-link-image:focus-visible { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.zeng-link-image img { max-width: 100%; height: auto; display: block; }
