/* Native eMJey source. Historical import: ops/maintenance/visual-parity/port-manifest.json. Edit here directly. */
.emjey-menu {
    width: 220px;
    background-color: #333;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.emjey-menu li {
    list-style: none;
    padding: 10px 20px;
    margin: 5px 0;
    background: linear-gradient(to right, #999999, #FFFFFF, #CCCCCC, #000000);
    color: #000;
    font-size: 14px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emjey-menu li::before {
    content: '';
    position: absolute;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 10px solid #333;
}

.emjey-menu li::after {
    content: '';
    position: absolute;
    right: 10px;
    width: 10px;
    height: 10px;
    background-color: #000;
}

.emjey-menu li:hover {
    background: #555;
    cursor: pointer;
}

.emjey-menu a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.emjey-menu a:hover {
    color: #fff;
}

.emjey-menu li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 10px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

/*
 * mod_articles compact: date–title as one continuous line (no flex “columns”, no date wrap, full title).
 * RTL: inline flow keeps date, en-dash, and title adjacent like normal text.
 */
[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title {
    display: block !important;
    line-height: 1.45;
    min-height: 0;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title .emjey-article-date,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title .emjey-article-date {
    display: inline;
    max-width: none;
    font-size: inherit;
    font-weight: 500;
    opacity: 0.88;
    white-space: nowrap;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title .emjey-date-title-sep,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title .emjey-date-title-sep {
    display: inline;
    opacity: 0.65;
    margin: 0;
    padding: 0;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title span[property="headline"],
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title span[property="headline"] {
    display: inline;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title span[property="headline"] .emjey-link-reset,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title span[property="headline"] .emjey-link-reset {
    display: inline !important;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title .emjey-link-reset,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title .emjey-link-reset {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title::before,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title::before {
    content: "";
    display: inline-block;
    vertical-align: 0.2em;
    width: 6px;
    height: 6px;
    margin-inline-end: 0.4em;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.45;
}

[data-emjey-news="compact"] .emjey-article .emjey-article-meta,
.mod-articles-items--compact .emjey-article .emjey-article-meta {
    margin-top: 0.15rem !important;
    margin-bottom: 0.22rem !important;
    font-size: 0.78rem;
    line-height: 1.3;
    opacity: 0.88;
}

/*
 * Intro block: theme adds a medium top margin on [property="text"].
 * Do NOT use lh here — on a wrapper div it can inherit a huge line-height and look like a paragraph gap.
 * Use rem for ~1 tight line under the title row.
 */
[data-emjey-news="compact"] .emjey-article [property="text"],
.mod-articles-items--compact .emjey-article [property="text"] {
    margin-top: 0.45rem !important;
    padding-top: 0 !important;
    margin-bottom: 0.35rem !important;
}

[data-emjey-news="compact"] .emjey-article [property="text"][class*="emjey-margin"],
.mod-articles-items--compact .emjey-article [property="text"][class*="emjey-margin"],
[data-emjey-news="compact"] .emjey-article [property="text"].emjey-margin-top,
.mod-articles-items--compact .emjey-article [property="text"].emjey-margin-top,
[data-emjey-news="compact"] .emjey-article [property="text"][class*="emjey-margin-"][class*="-top"],
.mod-articles-items--compact .emjey-article [property="text"][class*="emjey-margin-"][class*="-top"] {
    margin-top: 0.45rem !important;
}

/* Space between news items: shrink emjey-grid gap + kill trailing article margin */
[data-emjey-news="compact"].emjey-grid,
.mod-articles-items--compact.emjey-grid {
    gap: 0.65rem 1rem !important;
}

[data-emjey-news="compact"] > li,
.mod-articles-items--compact > li {
    margin-block: 0 !important;
    padding-block: 0 !important;
}

[data-emjey-news="compact"] > li > .emjey-article,
.mod-articles-items--compact > li > .emjey-article {
    margin-block: 0 !important;
    padding-block: 0 !important;
}

/* Joomla frontend edit + legacy icon row — often sits under excerpt with large margins */
[data-emjey-news="compact"] .emjey-article ul.emjey-subnav,
.mod-articles-items--compact .emjey-article ul.emjey-subnav {
    margin-top: 0.2rem !important;
    margin-bottom: 0 !important;
}

[data-emjey-news="compact"] .emjey-article .btn.jmodedit,
.mod-articles-items--compact .emjey-article .btn.jmodedit,
[data-emjey-news="compact"] .emjey-article a[href*="task=article.edit"],
.mod-articles-items--compact .emjey-article a[href*="task=article.edit"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

[data-emjey-news="compact"] .emjey-article [property="text"] > :first-child,
.mod-articles-items--compact .emjey-article [property="text"] > :first-child {
    margin-top: 0 !important;
}

[data-emjey-news="compact"] .emjey-article [property="text"] p:first-of-type,
.mod-articles-items--compact .emjey-article [property="text"] p:first-of-type {
    margin-block-start: 0 !important;
}

[data-emjey-news="compact"] .emjey-article h2.emjey-mod-article-title,
.mod-articles-items--compact .emjey-article h2.emjey-mod-article-title {
    margin-bottom: 0 !important;
}

/* mod_articles “Title only”: numbered list, bold headlines, date – title (RTL-safe) */
.emjey-news-title-list[data-emjey-news="titles"] {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    counter-reset: emjey-news-index;
}

.emjey-news-title-list[data-emjey-news="titles"] > li {
    counter-increment: emjey-news-index;
    display: grid !important;
    grid-template-columns: minmax(2.25rem, 3rem) minmax(0, 1fr);
    align-items: stretch;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.emjey-news-title-list[data-emjey-news="titles"] > li:last-child {
    border-bottom: 0;
}

.emjey-news-title-list[data-emjey-news="titles"] > li::before {
    content: counter(emjey-news-index, decimal-leading-zero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(0, 0, 0, 0.42);
    background: rgba(0, 0, 0, 0.035);
    border-inline-end: 1px solid rgba(0, 0, 0, 0.06);
}

.emjey-news-title-list[data-emjey-news="titles"] > li.emjey-active::before {
    color: rgba(255, 149, 0, 0.95);
    background: rgba(255, 149, 0, 0.08);
}

.emjey-news-title-list[data-emjey-news="titles"] > li > a {
    display: block !important;
    flex-direction: unset !important;
    min-width: 0;
    padding: 0.65rem 1rem !important;
    font-size: 15px;
    line-height: 1.45;
    color: inherit !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.emjey-news-title-list[data-emjey-news="titles"] > li > a:hover {
    background: rgba(0, 0, 0, 0.04);
}

.emjey-news-title-list[data-emjey-news="titles"] > li.emjey-active > a {
    background: rgba(255, 149, 0, 0.06);
}

.emjey-news-title-list[data-emjey-news="titles"] .emjey-title-one-line {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    gap: 0.35em;
    max-width: 100%;
    min-width: 0;
}

.emjey-news-title-list[data-emjey-news="titles"] .emjey-article-date {
    flex: 0 0 auto;
    font-size: 0.82em;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.52);
    white-space: nowrap;
}

.emjey-news-title-list[data-emjey-news="titles"] .emjey-date-title-sep {
    flex: 0 0 auto;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 400;
}

.emjey-news-title-list[data-emjey-news="titles"] .emjey-news-title-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700 !important;
    color: rgba(0, 0, 0, 0.88);
}

.emjey-news-title-list[data-emjey-news="titles"] > li > a:hover .emjey-news-title-text {
    color: rgba(0, 0, 0, 0.95);
}

/* mod_articles_category: date – title on one line (e.g. «آرشیو تصادفی خبرها») */
.category-module.mod-list > li > .emjey-ac-date-title-line.emjey-title-one-line {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    gap: 0.35em;
    max-width: 100%;
    min-width: 0;
}

.category-module.mod-list > li > .emjey-ac-date-title-line .emjey-article-date,
.category-module.mod-list > li > .emjey-ac-date-title-line .mod-articles-category-date {
    flex: 0 0 auto;
    font-size: 0.82em;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.52);
    white-space: nowrap;
}

.category-module.mod-list > li > .emjey-ac-date-title-line .emjey-date-title-sep {
    flex: 0 0 auto;
    color: rgba(0, 0, 0, 0.35);
    font-weight: 400;
}

.category-module.mod-list > li > .emjey-ac-date-title-line .mod-articles-category-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-module.mod-list > li > .emjey-ac-date-title-line .emjey-news-title-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.88);
}

/* English section joins: move the corners, never mirror the artwork.
   Override the builder's whole-background ::before flips in one place. */
html[dir="ltr"] body #emjey-home-forum-panel::before,
html[dir="ltr"] body #emjey-home-copyright-panel::before {
    content: none !important;
}
/* These three backgrounds intentionally mirror within their own columns.
   Match Persian's sizing first, then reflect only the painted layer. */
html[dir="ltr"] body #emjey-home-login,
html[dir="ltr"] body #emjey-home-band-portrait,
html[dir="ltr"] body #emjey-home-band-faq {
    background-image: none !important;
    position: relative;
    isolation: isolate;
}
html[dir="ltr"] body #emjey-home-login { background-color: #ccc; }
html[dir="ltr"] body #emjey-home-login::before {
    /* This layer is mirrored below: fade its LEFT edge to black so the
       rendered RIGHT edge meets the black page without a grey seam. */
    background-image: linear-gradient(to right, #000 0, transparent 32px),
        url("../images/loginbgper.svg");
    background-size: 100% 100%, auto;
    background-position: left top, left top;
    background-repeat: no-repeat, repeat-y;
}
html[dir="ltr"] body #emjey-home-band-portrait::before {
    background-image: url("../images/mjbw_up.jpg");
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
}
html[dir="ltr"] body #emjey-home-band-faq::before {
    background-image: url("../images/mjfaq.svg");
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
}
html[dir="ltr"] body #emjey-home-login::before,
html[dir="ltr"] body #emjey-home-band-portrait::before,
html[dir="ltr"] body #emjey-home-band-faq::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: scaleX(-1);
    pointer-events: none;
    z-index: -1;
}
/* The tile paints above its parent: fix the visible image, not a hidden layer. */
html[dir="ltr"] body #emjey-home-forum-panel [data-src$="/forumbgmain.svg"] {
    background-image: url("../images/forumbgmain-ltr.svg") !important;
}
html[dir="ltr"] body #emjey-home-copyright-panel {
    background: #000 url("../images/copyrightmain-ltr.svg") center / 100% 100% no-repeat;
}
/* This photograph's corner is baked into the JPEG. Cover that corner and
   draw the matching one at the opposite edge; the photograph is untouched. */
html[dir="ltr"] body #emjey-home-modified-panel {
    position: relative;
    background: #666 url("../images/mj2bg_up.jpg") right top / auto 200px no-repeat;
}
html[dir="ltr"] body #emjey-home-modified-panel::before,
html[dir="ltr"] body #emjey-home-modified-panel::after {
    content: "" !important;
    position: absolute;
    inset: 0 0 auto auto;
    width: 37px;
    height: 37px;
    background: #000 !important;
    transform: none !important;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    pointer-events: none;
}
html[dir="ltr"] body #emjey-home-modified-panel::after {
    left: 0;
    right: auto;
    background: #a29f92 !important;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
/* Keep the login fields inside the narrow panel in both reading directions. */
body #emjey-home-login-card {
    padding-inline: clamp(10px, 1.4vw, 22px);
    text-align: start;
}
body #emjey-home-login-card .klogin-vert .center {
    text-align: start !important;
}
body #emjey-home-login-card .input-prepend,
body #emjey-home-login-card .controls { min-width: 0; }
body #emjey-home-login-card input[type="text"],
body #emjey-home-login-card input[type="password"] {
    box-sizing: border-box;
    width: 100%; max-width: 100%; min-width: 0;
    min-height: 40px; padding: 8px;
    border: 1px solid #777; border-radius: 3px;
    background: #fff; color: #222;
}
body #emjey-home-login-card .control-group { margin-bottom: 12px; }
body #emjey-home-login-card .btn { width: 100%; min-height: 42px; padding: 8px; }
body #emjey-home-login-card .control-label { display: inline; }
body #emjey-home-login-card a { line-height: 1.7; }
body .emjey-styled-persian-menu a:focus-visible,
body #emjey-home-login-card :is(input, button, a):focus-visible {
    outline: 3px solid #ff9500; outline-offset: 2px;
}
/* Let dates and titles wrap naturally without running into one another. */
.category-module .mod-articles-category-date { margin-inline-end: .4em; }
.category-module > li { margin-block-end: .8rem; }

/* Archive roots keep articles in year/month subcategories; see the child blog override. */
.emjey-archive-years {
    margin: clamp(28px, 5vw, 56px) 0 0;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(162, 159, 146, .58);
    background: rgba(255, 255, 255, .7);
}
.emjey-archive-years__title {
    margin: 0 0 18px;
    color: #383832;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 500;
    letter-spacing: .02em;
}
.emjey-archive-years__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.emjey-archive-years__list a {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid #a29f92;
    color: #383832;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.emjey-archive-years__list a:hover,
.emjey-archive-years__list a:focus-visible {
    background: #383832;
    color: #fff;
    transform: translateY(-2px);
}
.emjey-archive-years__list a:focus-visible {
    outline: 3px solid #ff9500;
    outline-offset: 2px;
}
@media (max-width: 639px) {
    body #emjey-home-login-card { top: 0 !important; padding: 20px; }
}
