/* ===========================================
   Filatelie.cz Template - Joomla 6
   Targeting actual J6 HTML output classes
   =========================================== */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Times New Roman', Georgia, 'Noto Serif', serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    background: url('../images/bg.gif') repeat;
}

a { color: #3E9CC9; text-decoration: none; }
a:hover { color: #543610; text-decoration: underline; }

h1 { font-family: 'Times New Roman', Georgia, serif; color: #353535; font-size: 28px; margin: 0 0 15px; }
h2 { font-family: 'Times New Roman', Georgia, serif; color: #555; font-size: 22px; margin: 0 0 10px; }
h3 { font-family: 'Times New Roman', Georgia, serif; font-weight: bold; font-size: 22px; margin: 0 0 10px; }
h4 { font-family: 'Times New Roman', Georgia, serif; font-weight: bold; font-size: 18px; margin: 0 0 8px; }

p { font-family: 'Times New Roman', Georgia, serif; font-size: 16px; line-height: 1.5; }

img { max-width: 100%; height: auto; }

ul, ol { font-family: 'Times New Roman', Georgia, serif; }

/* --- GRID SYSTEM --- */
.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 5px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}

[class*="col-"] { padding: 0 5px; }
.col-12 { width: 100%; }

@media (min-width: 992px) {
    .col-lg-9 { width: 77%; }
    .col-lg-3 { width: 22%; margin-left: 1%; }
}

@media (min-width: 768px) {
    .col-md-4 { width: 33.333%; }
}

/* =============================================
   HEADER
   ============================================= */
.header-row {
    padding: 1.25rem 0 0.75rem;
    border-bottom: 1px solid #ebe3d2;
    margin-bottom: 1.5rem;
    position: relative;
}

body.home .header-row {
    border-bottom: none;
    margin-bottom: 0;
}

.header-row > .col-12 {
    position: relative;
    min-height: 69px;
}

/* Search — top-right, pulled in from edge */
.header-search {
    position: absolute;
    right: 15px;
    top: 5px;
    width: 196px;
    text-align: right;
}

.header-search .js-finder-searchform {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.header-search label { display: none; }

.header-search input[type="text"] {
    border: none;
    border-bottom: 1px solid #ebe3d2;
    padding: 5px 8px 5px 0;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    width: 100%;
    outline: none;
    background: transparent;
    color: #555;
}

.header-search input[type="text"]:focus {
    border-bottom-color: #cfae84;
}

/* Magnifying glass icon */
.header-search .js-finder-searchform::after {
    content: '';
    display: block;
    width: 21px;
    height: 21px;
    background: url('../images/ico-search.png') no-repeat center center;
    background-size: 17px 17px;
    opacity: 0.5;
    flex-shrink: 0;
    margin-right: 4px;
}

/* Logo — image contains stamp icon + "Filatelie.cz" text */
.logo {
    width: 40%;
    margin-left: 10px;
}

.logo a {
    color: #000;
    text-decoration: none;
    position: relative;
    display: block;
}

.logo img {
    height: auto;
    width: auto;
    max-height: 67px;
}

.logo .slogan {
    position: absolute;
    left: 69px;
    bottom: 2px;
    display: block;
    width: 345px;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 14px;
    color: #858585;
    white-space: nowrap;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: #858585;
    color: #fff;
    border: none;
    padding: 13px 12px;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    z-index: 99;
}
.menu-toggle:hover { background: #717171; }

/* =============================================
   MAIN NAVIGATION (targets J6 mod_menu output)
   ============================================= */
/* Main nav — aligned with slogan baseline, right-aligned */
.main-nav {
    position: absolute;
    right: 15px;
    bottom: 0;
    width: 65%;
    text-align: right;
}

/* J6 mod_menu generates: ul.mod-menu.mod-list.nav */
.main-nav .mod-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.main-nav .mod-menu > .nav-item {
    position: relative;
}

.main-nav .mod-menu > .nav-item > a {
    display: inline-block;
    padding: 5px 6px;
    color: #000;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

/* Home icon in menu */
.main-nav .mod-menu > .nav-item > a img.menu-home-icon {
    width: 21px;
    height: 21px;
    vertical-align: baseline;
    position: relative;
    top: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.main-nav .mod-menu > .nav-item > a:hover img.menu-home-icon,
.main-nav .mod-menu > .nav-item.active > a img.menu-home-icon {
    opacity: 1;
}

@media (min-width: 1200px) {
    .main-nav .mod-menu > .nav-item > a { font-size: 17px; padding: 5px 8px; }
    .main-nav .mod-menu > .nav-item > a img.menu-home-icon { width: 20px; height: 20px; }
}

.main-nav .mod-menu > .nav-item > a:hover,
.main-nav .mod-menu > .nav-item.active > a,
.main-nav .mod-menu > .nav-item.current > a {
    color: #cfae84;
    text-decoration: none;
}

/* J6 dropdown toggle button */
.main-nav .mod-menu__toggle-sub {
    display: none;
}

/* Dropdown submenu — dark elegant, left-aligned, flips right if needed */
.main-nav .mod-menu > .nav-item > .mod-menu__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background: #2c2a27;
    min-width: 220px;
    z-index: 1000;
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* First 3 items in HTML = rightmost visually (row-reverse) — flip dropdown left to prevent overflow */
.main-nav .mod-menu > .nav-item:nth-child(-n+3) > .mod-menu__sub {
    left: auto;
    right: 0;
}

.main-nav .mod-menu > .nav-item:hover > .mod-menu__sub {
    display: block;
}

.main-nav .mod-menu__sub > .nav-item > a {
    display: block;
    padding: 0.5rem 1.35rem;
    color: #d5cfc5;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 1.01rem;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.main-nav .mod-menu__sub > .nav-item > a:hover {
    background: #3d3a35;
    color: #cfae84;
    text-decoration: none;
}

/* J6 chevron icon in dropdown parents */
.main-nav .icon-chevron-down { display: none; }

/* =============================================
   BREADCRUMBS (matches production style)
   ============================================= */
.breadcrumb-row {
    padding: 0;
    margin: 15px 0 0;
}

/* J6 breadcrumb: ol.mod-breadcrumbs.breadcrumb */
.breadcrumb-row .mod-breadcrumbs {
    list-style: none;
    margin: 0;
    padding: 0 0 10px 0;
    background: transparent;
    border-bottom: 1px solid #f1f1f1;
    border-radius: 0;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* "Jste zde:" label */
.breadcrumb-row .mod-breadcrumbs__here {
    color: #999;
    margin-right: 5px;
    list-style: none;
}

/* Breadcrumb items */
.breadcrumb-row .mod-breadcrumbs__item {
    list-style: none;
    padding: 0;
}

/* Override Bootstrap breadcrumb-item ::before divider */
.breadcrumb-row .breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    padding: 0 8px;
    color: #ccc;
    font-size: 16px;
    opacity: 0.7;
}

.breadcrumb-row .mod-breadcrumbs__item a {
    color: #858585;
    text-decoration: none;
}

.breadcrumb-row .mod-breadcrumbs__item a:hover {
    color: #3E9CC9;
    text-decoration: underline;
}

/* Active (last) item */
.breadcrumb-row .mod-breadcrumbs__item.active span {
    color: #555;
}

/* Remove Bootstrap default padding/margin on .breadcrumb */
.breadcrumb-row .breadcrumb.px-3 { padding-left: 0 !important; padding-right: 0 !important; }
.breadcrumb-row .breadcrumb.py-2 { padding-top: 0 !important; padding-bottom: 10px !important; }

/* =============================================
   HERO / MAIN BOX (homepage)
   Elegant gradient, watermark stamp, compact
   ============================================= */
.item-main-box {
    position: relative;
    background: linear-gradient(135deg, #faf8f4 0%, #f3ede3 40%, #ebe3d2 100%);
    margin-bottom: 2rem;
    overflow: hidden;
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Watermark stamp F — fills full height of hero, right side */
.item-main-box::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 35%;
    background: url('../images/bg_main_text.png') no-repeat right center;
    background-size: contain;
    opacity: 0.18;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.item-main-box .moduletable.main-text {
    position: relative;
    z-index: 1;
    padding: 0;
    background: none;
    flex: 1;
}

.item-main-box h1 {
    font-size: clamp(1.6rem, 2.2vw, 1.85rem);
    margin-bottom: 0.1rem;
    color: #2a2a2a;
    letter-spacing: 0.01em;
}

.item-main-box h2 {
    font-size: clamp(0.85rem, 1.15vw, 0.97rem);
    font-weight: normal;
    color: #7a7a7a;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.item-main-box p {
    font-size: clamp(0.9rem, 1.25vw, 1.02rem);
    line-height: 1.6;
    color: #3a3a3a;
    margin-bottom: 0.4rem;
}

/* Hero cover — magazine issue */
.item-main-box .moduletable.hero-cover {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    text-align: center;
    padding: 0;
    background: none;
    align-self: center;
}

.item-main-box .moduletable.hero-cover img {
    max-height: 10rem;
    width: auto;
    box-shadow: 2px 3px 12px rgba(0,0,0,0.15);
    border: 1px solid #e0d8c8;
}

.hero-cover-label {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #8B7355;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* =============================================
   HOMEPAGE BOXES (3+3) — production-accurate
   ============================================= */
.items-box { margin-bottom: 0; }
.items-box.row { margin: 0 calc(-0.5 * var(--box-gap, 10px)); }
.items-box .col-md-4 { padding: 0 calc(0.5 * var(--box-gap, 10px)); }

:root {
    --box-gap: 10px;
    --box-border: #ebe1d3;
    --box-hover: #cfae84;
    --stamp-brown: #765d3e;
    --link-green: #7f9d67;
    --link-green-hover: #6c904f;
    --teal: #5f8489;
}

/* Base box — equal height via flex stretch */
.box-item { display: flex; }

.box-item .moduletable {
    background: #fff;
    border: 1px solid var(--box-border);
    padding: 1.45rem 1.75rem 1.45rem;
    width: 100%;
    min-height: 16rem;
    margin-bottom: var(--box-gap);
    cursor: pointer;
    background-repeat: no-repeat;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.box-item .moduletable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Heading with icon space */
.box-item .moduletable > h3 {
    font-size: clamp(1.24rem, 2.15vw, 1.45rem);
    padding: 0.3rem 0 0 4.5rem;
    min-height: 4.5rem;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
}

/* Stamp icons — all same size: 63px (70% of native 90px) */
.box-item .moduletable.news,
.box-item .moduletable.magazine,
.box-item .moduletable.auction,
.box-item .moduletable.pofis {
    background-position: 1.45rem 1.45rem;
    background-size: auto 63px;
}
.box-item .moduletable.news { background-image: url('../images/bg/news.png'); }
.box-item .moduletable.magazine { background-image: url('../images/bg/magazine.png'); }
.box-item .moduletable.auction { background-image: url('../images/bg/auction.png'); }
.box-item .moduletable.pofis { background-image: url('../images/bg/pofis.png'); }

/* --- Repurchase — photo top, content below (no overlay) --- */
.box-item .moduletable.repurchase {
    background-color: #fff;
    border-color: var(--box-border);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.box-item .moduletable.repurchase::before {
    content: '';
    display: block;
    height: 8rem;
    background: url('../images/bg/repurchase.png') no-repeat center -2rem;
    background-size: 100% auto;
    flex-shrink: 0;
}

.box-item .moduletable.repurchase > h3 {
    padding: 0.4rem 0.75rem 0;
    margin-bottom: -0.15rem;
    min-height: auto;
    margin-bottom: 0;
    font-size: clamp(1.24rem, 2.15vw, 1.45rem);
    background: #e2f1f3;
}

.box-item .moduletable.repurchase .mod-custom {
    padding: 0 0.75rem 0.75rem;
    background: #e2f1f3;
    flex: 1;
}

.box-item .moduletable.repurchase .mod-custom > a.more {
    display: block;
    text-align: right;
    padding-right: 1.25rem;
    margin-top: 0.5rem;
    font-size: 1.08rem;
    font-family: 'Times New Roman', Georgia, serif;
    color: #8B7355;
}
.box-item .moduletable.repurchase .mod-custom > a.more:hover { color: #6d5a3f; }

/* --- Membership — number left, text right --- */
.box-item .moduletable.membership { background-image: none; display: flex; flex-direction: column; }
.box-item .moduletable.membership .mod-custom { flex: 1; display: flex; flex-direction: column; }

.box-item .moduletable.membership > h3 {
    padding: 0.75rem 0.75rem 0.25rem 0.25rem;
    text-align: left;
    justify-content: flex-start;
    font-size: clamp(1.24rem, 2.15vw, 1.45rem);
    min-height: auto;
    margin-bottom: 0;
}

/* Membership: number left, text column right */
.moduletable.membership .mod-custom > p {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 0.75rem;
    align-items: start;
    padding: 0.75rem 1rem;
    margin: 0;
}

.moduletable.membership .number {
    font-size: clamp(5.2rem, 7.5vw, 6.7rem);
    font-weight: bold;
    color: var(--stamp-brown);
    line-height: 0.85;
    grid-row: 1 / 6;
}

.moduletable.membership .text1,
.moduletable.membership .text2,
.moduletable.membership .text3,
.moduletable.membership .text4 {
    display: block;
    font-family: 'Times New Roman', Georgia, serif;
    color: var(--stamp-brown);
    line-height: 1.4;
}
.moduletable.membership .text1 { font-size: 1.02rem; font-weight: bold; letter-spacing: 0.05em; }
.moduletable.membership .text2 { font-size: 0.92rem; }
.moduletable.membership .text3 { font-size: 0.97rem; font-weight: bold; }
.moduletable.membership .text4 { font-size: 0.86rem; }

.moduletable.membership .mod-custom a.more {
    display: block;
    text-align: right;
    padding: 0 0.5rem 0.25rem 0;
    margin-top: auto;
    color: #8B7355;
    font-size: 1.08rem;
}
.moduletable.membership .mod-custom a.more:hover { color: #6d5a3f; }

/* Equal widths for all three columns */
@media (min-width: 768px) {
    .items-box .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}

/* --- News — items below heading, clear of icon --- */
.box-item .moduletable.news { cursor: default; position: relative; }

.box-item .moduletable.news > h3 {
    min-height: auto;
    margin-bottom: 0;
    padding-bottom: 0;
}

.box-item .moduletable.news .newsflash {
    clear: both;
    padding-top: 0;
}

.box-item .newsflash-more {
    display: block;
    position: static;
    padding-left: 4.5rem;
    margin: 0.1rem 0 0.75rem;
    font-size: 0.86rem;
    color: #8B7355;
    text-decoration: none;
}
.box-item .newsflash-more:hover { color: #6d5a3f; }
.box-item .newsflash-more strong { font-weight: bold; }

/* Newsflash items — date on own line, link below */
.box-item .mod-articlesnews__item {
    padding: 0.35rem 0;
    margin-bottom: 0.4rem;
    border-bottom: 1px dotted #ddd;
    font-family: 'Times New Roman', Georgia, serif;
}
.box-item .mod-articlesnews__item:last-child { margin-bottom: 0; border-bottom: none; }

.newsflash-date {
    display: block;
    color: var(--teal);
    font-weight: bold;
    font-size: 0.86rem;
    margin-bottom: 0.1rem;
}

.box-item .mod-articlesnews__item p {
    display: block;
    font-size: 0.94rem;
    padding: 0;
    margin: 0;
    line-height: 1.4;
}

.box-item .mod-articlesnews__item a {
    color: #2c2c2c;
    text-decoration: none;
    font-size: 0.94rem;
}
.box-item .mod-articlesnews__item a:hover { color: #3E9CC9; }

/* --- Sub-link right under heading --- */
a.more.sub {
    display: block;
    padding-left: 4.5rem;
    margin: 0.1rem 0 0.75rem;
    font-size: 0.86rem;
    color: #8B7355;
    text-decoration: none;
}
a.more.sub strong { font-weight: bold; }
a.more.sub:hover { color: #6d5a3f; }

/* --- "More" links & buttons --- */
a.more { display: inline-block; margin-top: 0.4rem; color: var(--link-green); font-family: 'Times New Roman', Georgia, serif; font-size: 0.875rem; text-decoration: none; }
a.more:hover { color: var(--link-green-hover); text-decoration: none; }

.button, a.button {
    display: inline-block; background: var(--link-green); color: #fff;
    padding: 0.5rem 1.25rem; font-family: 'Times New Roman', Georgia, serif; font-weight: bold;
    text-decoration: none; border: none; cursor: pointer; font-size: 0.875rem;
}
.button:hover, a.button:hover { background: var(--link-green-hover); color: #fff; text-decoration: none; }

/* Box text */
.box-item .moduletable p {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: clamp(0.92rem, 1.5vw, 1.02rem);
    line-height: 1.55;
    color: #444;
    text-align: justify;
}

/* Bottom row: heading + sub-link as one visual block */
.items-box-second .box-item .moduletable > h3 {
    font-size: clamp(1.08rem, 1.85vw, 1.29rem);
    min-height: auto;
    margin-bottom: 0;
    padding-bottom: 0;
}

.items-box-second .box-item .moduletable .mod-custom > p {
    text-align: justify;
}

/* =============================================
   ACTION BAR (subscription CTA)
   ============================================= */
.action-bar .subscription {
    background: #FFF1BA; border: 1px solid #F9E3Ad;
    padding: 15px 20px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.action-bar .subscription .title { color: #84633C; font-family: 'Times New Roman', Georgia, serif; }
.action-bar .subscription .out { color: #84633C; font-family: 'Times New Roman', Georgia, serif; font-size: 13px; }

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content { min-height: 400px; }

/* Article pages */
.com_content .item-page,
.com_content .blog,
.com_content .category-list {
    background: #fff;
    border: 1px solid #ebe1d3;
    padding: 12px 15px;
    margin-bottom: 20px;
}

body.home .main-content > .com_content .blog-featured,
body.home .main-content > .blog-featured {
    background: none; border: none; padding: 0;
}

.item-page .article-info,
.item-page .article-info-term {
    font-family: 'Times New Roman', Georgia, serif; font-size: 13px; color: #858585;
}

/* Hide article prev/next navigation */
.pagenavigation { display: none; }

/* Content text justify */
.item-page,
.item-page p {
    text-align: justify;
}

/* Category blog */
.blog .items-leading { margin-bottom: 20px; }
.blog .items-row { margin-bottom: 15px; }
.blog .item { background: #fff; border: 1px solid #ebe1d3; padding: 20px; margin-bottom: 15px; }

/* Category list table */
.category-list table { width: 100%; border-collapse: collapse; }
.category-list th { background: #ebe3d2; padding: 8px 12px; text-align: left; font-family: 'Times New Roman', Georgia, serif; }
.category-list td { padding: 8px 12px; border-bottom: 1px solid #ebe3d2; }
.category-list tr:nth-child(even) td { background: #fffaf4; }

/* Readmore */
a.readmore, .readmore a {
    display: inline-block; background: #a5be91; color: #576749;
    padding: 5px 15px; font-family: 'Times New Roman', Georgia, serif; font-size: 13px; font-weight: bold; text-decoration: none;
}
a.readmore:hover, .readmore a:hover { background: #99b185; text-decoration: none; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar .moduletable {
    background: #fff; border: 1px solid #ebe3d2;
    padding: 15px; margin-bottom: 15px;
}

.sidebar .moduletable > h3 {
    font-size: 18px; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 1px solid #ebe3d2;
}

/* Sidebar newsflash */
.sidebar .mod-articlesnews__item {
    padding: 8px 0; border-bottom: 1px dotted #ebe3d2;
    font-family: 'Times New Roman', Georgia, serif; font-size: 14px;
}
.sidebar .mod-articlesnews__item:last-child { border-bottom: none; }

/* Sidebar banner boxes (via moduleclass_sfx) */
.sidebar .right-box {
    padding: 12px 12px 12px 55px; min-height: 50px;
    background-repeat: no-repeat; background-position: 10px center;
    cursor: pointer;
}
.sidebar .right-box a { text-decoration: none; display: block; }

.sidebar .subscription-filatelie {
    background-color: #B8DDE2;
    border-color: #B8DDE2;
    background-image: none;
    padding: 14px 18px;
}
.sidebar .subscription-filatelie > h3 { display: none; }
.sidebar .subscription-filatelie a {
    color: #20535a;
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 1rem;
}
.sidebar .subscription-filatelie a::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background: url('../images/book2.png') no-repeat center center;
    background-size: contain;
    grid-row: 1 / 3;
}
.sidebar .subscription-filatelie .sidebar-title {
    display: block;
    font-size: 1.38rem;
    font-weight: bold;
    line-height: 1.2;
}
.sidebar .subscription-filatelie .sidebar-subtitle {
    display: block;
    font-size: 1.02rem;
    font-weight: normal;
}

.sidebar .archiv-filatelie {
    background-color: #E7D8C5;
    border-color: #E7D8C5;
    background-image: none;
    padding: 14px 18px;
}
.sidebar .archiv-filatelie > h3 { display: none; }
.sidebar .archiv-filatelie a {
    color: #725c3f;
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 1rem;
}
.sidebar .archiv-filatelie a::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background: url('../images/book.png') no-repeat center center;
    background-size: contain;
    grid-row: 1 / 3;
}
.sidebar .archiv-filatelie .sidebar-title {
    display: block;
    font-size: 1.38rem;
    font-weight: bold;
    line-height: 1.2;
}
.sidebar .archiv-filatelie .sidebar-subtitle {
    display: block;
    font-size: 1.02rem;
    font-weight: normal;
}

.sidebar .nejcastejsi-dotazy {
    background-color: #D1A5A5;
    border-color: #AC6F6F;
    background-image: none;
    padding: 14px 18px;
}
.sidebar .nejcastejsi-dotazy > h3 { display: none; }
.sidebar .nejcastejsi-dotazy a {
    color: #694646;
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 1rem;
}
.sidebar .nejcastejsi-dotazy a::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background: url('../images/book3.png') no-repeat center center;
    background-size: contain;
    grid-row: 1 / 3;
}
.sidebar .nejcastejsi-dotazy .sidebar-title {
    display: block;
    font-size: 1.38rem;
    font-weight: bold;
    line-height: 1.2;
}
.sidebar .nejcastejsi-dotazy .sidebar-subtitle {
    display: block;
    font-size: 1.02rem;
    font-weight: normal;
}

.sidebar .back-filatelie { background-color: #a5be91; border-color: #a5be91; background-image: url('../images/back.png'); }
.sidebar .back-filatelie a { color: #576749; }

/* =============================================
   ARTICLE IMAGES (from shortcode conversion)
   ============================================= */
.left-img, .left-img-small { float: left; margin: 0 20px 15px 0; }
.left-img img { max-width: 300px; }
.left-img-small img { max-width: 150px; }
.right-img { float: right; margin: 0 0 15px 20px; }
.right-img img { max-width: 300px; }

/* =============================================
   ARCHIVE PAGE — stamp-edge year blocks
   ============================================= */

/* Archive main listing: hide subcategory h1 descriptions, show only year links as grid */
body.archive .cat-children > h3,
.pageclass_sfx-archive .cat-children > h3 {
    display: none; /* hide "Podkategorie" heading */
}

body.archive .cat-children,
.pageclass_sfx-archive .cat-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.archive .com-content-category-blog__child,
.pageclass_sfx-archive .com-content-category-blog__child {
    width: 16%;
    min-width: 100px;
}

body.archive .com-content-category-blog__child .page-header.item-title,
.pageclass_sfx-archive .com-content-category-blog__child .page-header.item-title {
    margin: 0;
    border: none;
    padding: 0;
}

body.archive .com-content-category-blog__child .page-header.item-title a,
.pageclass_sfx-archive .com-content-category-blog__child .page-header.item-title a {
    display: block;
    padding: 50px 10px 35px;
    text-align: center;
    font-size: 24px;
    line-height: 30px;
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    background-color: #d9d4ce;
    background-image: url('../images/okraj1.png'), url('../images/okraj2.png');
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right bottom;
    transition: background-color 0.2s;
}

body.archive .com-content-category-blog__child .page-header.item-title a:hover,
.pageclass_sfx-archive .com-content-category-blog__child .page-header.item-title a:hover {
    background-color: #b2a698;
    background-image: url('../images/okraj1.png'), url('../images/okraj2.png');
    color: #000;
    text-decoration: none;
}

/* Hide badge "Počet článků" and category descriptions in archive grid */
body.archive .com-content-category-blog__child .badge,
body.archive .com-content-category-blog__child .category-desc,
.pageclass_sfx-archive .com-content-category-blog__child .badge,
.pageclass_sfx-archive .com-content-category-blog__child .category-desc {
    display: none;
}

/* Archive: article links list (items-more / com-content-category-blog__items-more) */
body.archive .com-content-category-blog__items-more,
.pageclass_sfx-archive .com-content-category-blog__items-more {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

body.archive .com-content-category-blog__items-more li,
.pageclass_sfx-archive .com-content-category-blog__items-more li {
    width: 16%;
    min-width: 100px;
}

body.archive .com-content-category-blog__items-more li a,
.pageclass_sfx-archive .com-content-category-blog__items-more li a {
    display: block;
    padding: 50px 10px 35px;
    text-align: center;
    font-size: 22px;
    line-height: 28px;
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    background-color: #d9d4ce;
    background-image: url('../images/okraj1.png'), url('../images/okraj2.png');
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right bottom;
    transition: background-color 0.2s;
}

body.archive .com-content-category-blog__items-more li a:hover,
.pageclass_sfx-archive .com-content-category-blog__items-more li a:hover {
    background-color: #b2a698;
    color: #000;
    text-decoration: none;
}

/* Individual archive year page — article list */
.item-page.archive ul { margin: 0; list-style: none; padding: 0; }
.item-page.archive ul li {
    font-family: 'Times New Roman', Georgia, serif;
    line-height: 26px;
    padding: 4px 8px;
}
.item-page.archive ul li:nth-child(2n) { background: #fffaf4; }
.item-page.archive ul li:hover { background: #f5eac8; }
.item-page.archive ul li strong { float: right; }
.item-page.archive ul li strong::before { content: "("; }
.item-page.archive ul li strong::after { content: ")"; }

@media (max-width: 991px) {
    body.archive .com-content-category-blog__child,
    body.archive .com-content-category-blog__items-more li {
        width: 24%;
    }
}

@media (max-width: 520px) {
    body.archive .com-content-category-blog__child,
    body.archive .com-content-category-blog__items-more li {
        width: 48%;
    }
}

/* =============================================
   TABS (converted from {tab} shortcodes)
   Uses accordion HTML restyled as horizontal tabs
   ============================================= */
.accordion {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

/* Tab buttons row */
.accordion-item {
    border: none;
    margin: 0;
    display: contents;
}

.accordion-header {
    margin: 0;
    order: -1;
}

.accordion-button {
    background: #fffaf4;
    color: #858585;
    font-family: 'Times New Roman', Georgia, serif;
    font-weight: bold;
    font-size: 15px;
    padding: 10px 20px;
    border: 1px solid #ebe3d2;
    border-bottom: none;
    width: auto;
    text-align: center;
    cursor: pointer;
    position: relative;
    margin-right: -1px;
    margin-bottom: -1px;
    transition: background 0.2s, color 0.2s;
}

.accordion-button::after { display: none; }

.accordion-button:hover {
    background: #f5eac8;
    color: #543610;
}

.accordion-button:not(.collapsed) {
    background: #fff;
    color: #353535;
    border-bottom: 1px solid #fff;
    z-index: 1;
}

/* Tab content panels */
.accordion-collapse {
    display: none;
    width: 100%;
    order: 99;
}

.accordion-collapse.show {
    display: block;
}

.accordion-body {
    padding: 20px;
    background: #fff;
    border: 1px solid #ebe3d2;
    border-top: 1px solid #ebe3d2;
    margin-top: -1px;
}

.accordion-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.accordion-body ul li {
    font-family: 'Times New Roman', Georgia, serif;
    line-height: 26px;
    padding: 3px 8px;
}

.accordion-body ul li:nth-child(2n) {
    background: #fffaf4;
}

.accordion-body ul li:hover {
    background: #f5eac8;
}

.accordion-body ul li strong {
    float: right;
}

.accordion-body ul li strong::before { content: "("; }
.accordion-body ul li strong::after { content: ")"; }

.accordion-body img {
    margin: 5px;
    border: 1px solid #ebe3d2;
    max-width: 180px;
}

/* Mobile: stack tabs vertically */
@media (max-width: 480px) {
    .accordion-header { width: 100%; }
    .accordion-button {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #ebe3d2;
        margin-right: 0;
    }
}

/* =============================================
   FAQ STYLES
   ============================================= */
.question { background: #fffbf5; padding: 15px; border: 1px solid #d9c4a9; margin-bottom: 15px; }
.answer { background: #fff url('../images/answer.png') repeat-x top; padding: 15px; border: 1px solid #ebe3d2; margin-bottom: 20px; }

/* =============================================
   FOOTER
   ============================================= */
.footer-row {
    border-top: 2px solid #ebe3d2;
    padding: 15px 0;
    margin-top: 20px;
}

.footer-content {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 10px;
}

.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left img { height: 30px; width: auto; }
.footer-left span { font-family: 'Times New Roman', Georgia, serif; font-size: 12px; color: #858585; }

.footer-right { font-family: 'Times New Roman', Georgia, serif; font-size: 12px; }
.footer-right a { color: #858585; }
.footer-right a:hover { color: #3E9CC9; }
.footer-right .sep { color: #ccc; margin: 0 5px; }

/* =============================================
   SYSTEM MESSAGES
   ============================================= */
joomla-alert { margin-bottom: 15px; }

/* =============================================
   PAGINATION (J6 generates .pagination)
   ============================================= */
.pagination { display: flex; list-style: none; padding: 0; margin: 20px 0; gap: 3px; font-family: 'Times New Roman', Georgia, serif; }
.pagination li a, .pagination li span { display: block; padding: 5px 12px; background: #ebe3d2; color: #543610; text-decoration: none; font-size: 14px; }
.pagination li a:hover { background: #cfae84; color: #fff; }
.pagination li.active span, .page-item.active .page-link { background: #cfae84; color: #fff; }

/* =============================================
   GLOSSARY / ENCYCLOPEDIA
   ============================================= */

/* Search bar — sticky above table, border on glossary-body instead */
.glossary-search {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    padding: 0.5rem 0;
    margin-bottom: 0;
    border-bottom: none;
}

.glossary-body {
}
.glossary-search input {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ebe3d2;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    outline: none;
}
.glossary-search input:focus { border-color: #cfae84; }

.glossary-search-clear {
    display: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    padding: 0 6px;
}
.glossary-search-clear:hover { color: #543610; }

.glossary-no-results {
    padding: 20px 10px;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 16px;
    color: #999;
    font-style: italic;
}

.glossary-alpha a.disabled {
    color: #ccc;
    pointer-events: none;
    opacity: 0.4;
}

/* Body: content left, alphabet right — grid instead of flex (flex breaks sticky) */
.glossary-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 0.75rem;
    align-items: start;
}
.glossary-content { min-width: 0; }

/* Each letter section */
.glossary-section {
    margin-bottom: 1rem;
}
.glossary-fixed-letter {
    position: fixed;
    z-index: 200;
    background: #ebe3d2;
    padding: 6px 12px;
    font-size: 1.08rem;
    line-height: 1.3;
    font-weight: bold;
    color: #543610;
    border-bottom: 2px solid #d9c4a9;
    font-family: 'Times New Roman', Georgia, serif;
    display: none;
    box-sizing: border-box;
}

.glossary-section .glossary-letter {
    background: #ebe3d2;
    margin: 0;
    padding: 6px 12px;
    font-size: 1.08rem;
    line-height: 1.3;
    font-weight: bold;
    color: #543610;
    border-bottom: 2px solid #d9c4a9;
    font-family: 'Times New Roman', Georgia, serif;
}

/* Definition list entries — two columns: term left, definition right */
.glossary-entries {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 30% 1fr;
}
.glossary-entries dt {
    font-weight: bold;
    color: #543610;
    padding: 4px 10px;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    border-bottom: 1px solid #f0ebe3;
    text-align: left;
}
.glossary-entries dd {
    margin: 0;
    padding: 4px 10px;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    border-bottom: 1px solid #f0ebe3;
    color: #333;
    text-align: left;
}
.glossary-entries dt:hover, .glossary-entries dt:hover + dd { background: #fffaf4; }

/* Alphabet sidebar */
.glossary-alpha {
    position: sticky;
    top: 42px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ebe3d2;
    border-radius: 3px;
    padding: 6px 3px;
    flex-shrink: 0;
}
.glossary-alpha a {
    display: block;
    width: 32px;
    text-align: center;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 16px;
    font-weight: bold;
    color: #725c3f;
    text-decoration: none;
    line-height: 1.8;
    border-radius: 2px;
}
.glossary-alpha-spacer {
    display: block;
    height: 31px;
    text-align: center;
    line-height: 31px;
    font-size: 14px;
    color: #cfae84;
}
.glossary-alpha a:hover { background: #ebe3d2; color: #543610; }
.glossary-alpha a.active { background: #cfae84; color: #fff; }

/* Scroll offset — compensate sticky search + sticky letter header */
.glossary-section { scroll-margin-top: 45px; }

@media (max-width: 767px) {
    .glossary-body {
        display: block;
    }
    .glossary-alpha {
        position: sticky;
        top: 42px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        background: #ebe3d2;
        border: 1px solid #d9c4a9;
        border-radius: 3px;
        padding: 6px 4px;
        gap: 3px 5px;
        margin-bottom: 0;
        z-index: 150;
    }
    .glossary-alpha a { width: auto; padding: 4px 6px; font-size: 14px; line-height: 1.4; }
    .glossary-alpha-spacer { display: none; }
    .glossary-section { scroll-margin-top: 120px; }
}

/* =============================================
   AUCTION RESULTS
   ============================================= */
.auction-results p { margin-bottom: 0.5rem; }

.auction-filter {
    margin: 1rem 0;
    position: sticky;
    top: 0;
    background: #fff;
    padding: 0.5rem 0;
    z-index: 10;
}

.auction-filter input {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #ebe3d2;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 14px;
    outline: none;
}
.auction-filter input:focus { border-color: #cfae84; }

.auction-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 14px;
}

.auction-table thead { position: sticky; top: 45px; z-index: 9; }
.auction-table th {
    background: #ebe3d2;
    padding: 6px 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #d9c4a9;
}

.auction-table td {
    padding: 4px 12px;
    border-bottom: 1px solid #f0ebe3;
}

.auction-table tbody tr:nth-child(even) td { background: #fffaf4; }
.auction-table tbody tr:hover td { background: #f5eed9; }

.auction-table tr.unsold td { color: #c0392b; font-style: italic; }
.auction-table tr.withdrawn td { color: #999; font-style: italic; }

/* =============================================
   FORMS
   ============================================= */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
textarea, select {
    border: 1px solid #ebe3d2; padding: 8px 12px;
    font-family: 'Times New Roman', Georgia, serif; font-size: 14px; outline: none;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="search"]:focus, textarea:focus { border-color: #cfae84; }

input[type="submit"], button.btn-primary, .btn-primary {
    background: #7f9d67; color: #fff; border: none;
    padding: 10px 25px; font-family: 'Times New Roman', Georgia, serif; font-weight: bold; font-size: 14px; cursor: pointer;
}
input[type="submit"]:hover, button.btn-primary:hover, .btn-primary:hover { background: #6c904f; }

/* =============================================
   SMART SEARCH RESULTS
   ============================================= */
.com_finder .search-results { list-style: none; padding: 0; }
.com_finder .search-results li { padding: 15px; border-bottom: 1px solid #ebe3d2; }
.com_finder .search-results h3 a { color: #3E9CC9; }

/* =============================================
   CHRONOFORM PLACEHOLDER
   ============================================= */
.chronoform-placeholder {
    background: #fffaf4; border: 1px solid #ebe3d2;
    padding: 30px; text-align: center; margin: 20px 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    .col-lg-9, .col-lg-3 { width: 100%; }
    .sidebar { margin-top: 20px; }
    .item-main-box { padding: 12px 18px; }
    .item-main-box p { max-width: 100%; }
    .item-main-box::after { width: 100px; opacity: 0.1; right: 5px; }
}

@media (max-width: 767px) {
    .col-md-4 { width: 100%; }
    .header-row > .col-12 { min-height: auto; }

    .header-row > .col-12 { display: flex; flex-wrap: wrap; align-items: center; position: relative; }
    .logo { width: auto; flex: 1; }
    .logo .slogan { display: none; }
    .header-search { display: none; }
    .menu-toggle { display: block; order: 2; margin-left: auto; }

    .main-nav {
        position: absolute;
        right: 0;
        top: 100%;
        width: 25%;
        min-width: 200px;
        display: none;
        z-index: 999;
        order: 3;
    }
    .main-nav.open { display: block; }

    .main-nav .mod-menu {
        flex-direction: column;
        align-items: flex-start;
        background: #000;
        padding: 25px 30px;
        box-shadow: 0 2px 3px rgba(0,0,0,0.2);
    }
    .main-nav .mod-menu > .nav-item > a {
        color: #fff;
        padding: 5px 0;
        background: transparent;
        border: none;
        font-size: 16px;
        text-align: left;
        justify-content: flex-start;
    }
    .main-nav .mod-menu > .nav-item > a:hover,
    .main-nav .mod-menu > .nav-item.active > a {
        color: #cfae84;
        background: transparent;
    }
    .main-nav .mod-menu > .nav-item.parent {
        border-bottom: 1px dashed #828282;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    .main-nav .mod-menu > .nav-item > .mod-menu__sub {
        position: relative;
        display: block;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0 0 5px 12px;
        min-width: auto;
    }
    .main-nav .mod-menu__sub > .nav-item > a {
        color: #fff;
        padding: 4px 0;
        font-size: 14px;
    }
    .main-nav .mod-menu__sub > .nav-item > a:hover { color: #cfae84; background: transparent; }

    .item-main-box { padding: 10px 15px; flex-direction: column; gap: 1rem; }
    .item-main-box p { max-width: 100%; font-size: 13px; }
    .item-main-box::after { width: 30%; opacity: 0.1; }
    .item-main-box h1 { font-size: 20px; }
    .item-main-box .moduletable.hero-cover { order: 1; }
    .item-main-box .moduletable.main-text { order: 0; }
    .item-main-box .moduletable.hero-cover img { max-height: 8rem; }

    .box-item .moduletable { min-height: auto; }
    .box-item .moduletable > h3 { padding-left: 4.5rem; }
    a.more.sub, .box-item .newsflash-more { padding-left: 4.5rem; }

    .footer-content { flex-direction: column; text-align: center; }
    .com_content .item-page, .com_content .blog { padding: 15px; }
    .left-img, .right-img { float: none; margin: 0 0 15px 0; }
}

@media (max-width: 480px) {
    .logo img { height: 40px; }
    h1 { font-size: 20px; }
    h2 { font-size: 16px; }
    .item-main-box h1 { font-size: 18px; }
    .item-main-box h2 { font-size: 12px; }
    .btn-hero { padding: 6px 16px; font-size: 12px; }
}

/* Bootstrap utility: visually hidden (for accessibility) */
.visually-hidden {
    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;
}

/* Clearfix */
.clearfix::after { content: ''; display: table; clear: both; }
