* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 100%; }

body {
    font-family: sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #202122;
    background-color: #fff;
}

a { color: #3366cc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== FIXED SIDE AD RAILS ===== */
.ad-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.ad-rail.left  { left: 0;  border-right: 1px solid #e6e6e6; }
.ad-rail.right { right: 0; border-left: 1px solid #e6e6e6; }

.ad-inner { width: 100%; padding: 0 10px; }
.ad-label {
    font-size: 10px;
    color: #b0b0b0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.ad-box {
    width: 100%;
    height: 600px;
    background: #ededed;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    text-align: center;
}

/* ===== SELF-PROMO BANNER ===== */
.promo {
    display: flex;
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    position: relative;
    color: #fff;
    flex-direction: column;
    justify-content: space-between;
    padding: 26px 22px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.promo:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.18); text-decoration: none; }
.promo .promo-tag { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .8; }
.promo .promo-logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}
.promo .promo-logo img { width: 40px; height: 40px; border-radius: 8px; }
.promo h3 { font-size: 24px; line-height: 1.15; font-weight: 800; margin-bottom: 10px; letter-spacing: -.5px; }
.promo p { font-size: 13.5px; line-height: 1.55; opacity: .92; }
.promo .promo-stat {
    font-size: 13px; font-weight: 600;
    margin-top: 14px; padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.18);
    opacity: .95;
}
.promo .promo-btn {
    margin-top: 18px;
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: #111;
    font-weight: 700; font-size: 14px;
    padding: 11px 18px; border-radius: 100px;
    align-self: flex-start;
}
.promo.yuxor { background: linear-gradient(160deg, #6d28d9 0%, #4c1d95 55%, #2e1065 100%); }
.promo.menzi { background: linear-gradient(160deg, #0f766e 0%, #115e59 55%, #134e4a 100%); }

/* ===== LAYOUT ===== */
.layout { display: flex; max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

.toc-column { width: 230px; flex-shrink: 0; padding: 8px 12px; font-size: 0.8125rem; }
.toc-column.sticky-toc { position: sticky; top: 16px; align-self: flex-start; max-height: calc(100vh - 32px); overflow-y: auto; }
.toc-title { font-weight: bold; margin-bottom: 8px; }
.toc-column ul { list-style: none; }
.toc-column > ul ul { margin-left: 16px; }
.toc-column li { padding: 4px 0; line-height: 1.4; }
.toc-column .toc-num { color: #54595d; margin-right: 6px; }

.article-body { flex: 1; min-width: 0; padding: 0 8px 16px 24px; border-left: 1px solid #eaecf0; }

/* ===== TITLE ===== */
.mw-first-heading {
    font-family: 'Linux Libertine','Georgia',serif;
    font-size: 1.8rem; font-weight: normal; line-height: 1.3;
    padding-bottom: 6px; border-bottom: 1px solid #a2a9b1; margin-bottom: 16px;
}

/* ===== CONTENT ===== */
.mw-parser-output p { margin: 0.5em 0 0.8em; }
.mw-parser-output > p { line-height: 1.65; }
.mw-parser-output h2 {
    font-family: 'Linux Libertine','Georgia',serif;
    font-size: 1.5rem; font-weight: normal;
    margin: 1em 0 0.25em; padding-bottom: 4px; border-bottom: 1px solid #a2a9b1;
}
.mw-parser-output h3 {
    font-family: 'Linux Libertine','Georgia',serif;
    font-size: 1.2rem; font-weight: bold; margin: 0.9em 0 0.3em;
}
.mw-parser-output ul, .mw-parser-output ol { margin: 0.3em 0 0.8em 1.6em; }
.mw-parser-output li { margin-bottom: 0.1em; line-height: 1.65; }

.reference { font-size: 0.7rem; vertical-align: super; line-height: 1; }

.flag-az { vertical-align: -1px; margin-right: 4px; border: 1px solid #c8ccd1; }

/* ===== QUICK SUMMARY ===== */
.quick-summary {
    background: #f8f9fa; border: 1px solid #c8ccd1; border-left: 4px solid #3366cc;
    border-radius: 2px; padding: 12px 16px; margin: 0 0 18px 0;
    font-size: 0.9rem; line-height: 1.65;
}
.quick-summary strong { color: #202122; }

/* ===== FAQ ===== */
.faq-item {
    border: 1px solid #c8ccd1; border-radius: 6px; margin-bottom: 10px;
    overflow: hidden; background: #fff; transition: box-shadow .15s ease;
}
.faq-item[open] { box-shadow: 0 1px 4px rgba(0,0,0,.08); border-color: #3366cc; }
.faq-q {
    list-style: none; cursor: pointer; font-weight: 600; font-size: 1rem; color: #202122;
    padding: 12px 44px 12px 16px; position: relative; user-select: none; background: #f8f9fa;
}
.faq-item[open] .faq-q { background: #eaf0fb; color: #1a3a8f; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 1.4rem; font-weight: 400; color: #3366cc; transition: transform .2s ease;
}
.faq-item[open] .faq-q::after { content: "−"; transform: translateY(-50%) rotate(180deg); }
.faq-a { margin: 0; line-height: 1.7; padding: 12px 16px 14px; border-top: 1px solid #eaecf0; color: #202122; }

/* ===== INFOBOX ===== */
.infobox {
    float: right; clear: right; width: 22em; margin: 0 0 1em 1.5em;
    background: #f8f9fa; border: 1px solid #a2a9b1;
    font-size: 0.875rem; line-height: 1.4; border-spacing: 3px;
}
.infobox-title { background: #cedff2; text-align: center; font-weight: bold; font-size: 1.1rem; padding: 8px 6px; line-height: 1.3; }
.infobox-image-cell { text-align: center; padding: 8px; background: #f8f9fa; }
.infobox-photo {
    width: 220px; height: 270px; object-fit: cover; object-position: center top;
    display: block; margin: 0 auto; border: 1px solid #c8ccd1;
}
.infobox-caption { font-size: 0.8rem; padding: 6px 8px; text-align: center; color: #202122; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox-section-header { background: #cedff2; text-align: center; font-weight: bold; padding: 4px 6px; }
.infobox th.label { text-align: left; vertical-align: top; padding: 6px 8px; font-weight: bold; width: 40%; }
.infobox td.data { text-align: left; vertical-align: top; padding: 6px 8px; }
.infobox tr { border-top: 1px solid #eaecf0; }

/* ===== SITE HEADER ===== */
.site-header {
    background: #fff; border-bottom: 1px solid #a2a9b1; padding: 10px 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto;
}
.site-header .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #202122; }
.site-header .brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #c8ccd1; }
.site-header .brand .brand-text { line-height: 1.2; }
.site-header .brand .brand-name { font-family: 'Linux Libertine','Georgia',serif; font-size: 1.25rem; font-weight: 700; }
.site-header .brand .brand-sub { font-size: 0.75rem; color: #54595d; }
.site-header .header-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-header nav a { font-size: 0.9rem; color: #3366cc; }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher { display: flex; gap: 4px; align-items: center; }
.lang-switcher a {
    font-size: 0.8rem; font-weight: 600; padding: 4px 9px; border-radius: 4px;
    color: #3366cc; border: 1px solid #c8ccd1; line-height: 1;
}
.lang-switcher a:hover { background: #eaf0fb; text-decoration: none; }
.lang-switcher a.active { background: #3366cc; color: #fff; border-color: #3366cc; }

/* ===== SITE FOOTER ===== */
.site-footer { background: #f8f9fa; border-top: 1px solid #a2a9b1; padding: 24px; margin-top: 32px; font-size: 0.85rem; color: #54595d; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; max-width: 1000px; margin: 0 auto; }
.footer-col { flex: 1; min-width: 180px; }
.footer-col h4 { font-size: 0.95rem; color: #202122; margin-bottom: 8px; font-weight: 700; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 5px; }
.footer-col a { color: #3366cc; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; color: #3366cc; }
.footer-bottom { text-align: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e0e0e0; font-size: 0.8rem; color: #72777d; }

/* ===== RESPONSIVE ===== */
@media (min-width: 1400px) { body { padding: 0 320px; } }
@media (max-width: 1399px) { .ad-rail { display: none; } }
@media (max-width: 1000px) {
    .toc-column { display: none; }
    .article-body { border-left: none; padding-left: 8px; }
    .infobox { float: none; width: 100%; max-width: 22em; margin: 16px auto; }
}
