/* =========================================================
   LAYOUT / HEADER / FOOTER / THEME / MOBILE NAV
   Собрано из рабочих файлов, чтобы убрать мелкие patch-CSS.
========================================================= */


/* ===== menu.css ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 2000;

    background: rgba(245, 247, 251, 0.88);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(229, 231, 235, 0.75);
    transition: 0.25s;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.header-row {
    min-height: 84px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}

.site-logo {
    display: flex;
    flex-direction: column;

    font-size: 31px;
    line-height: 0.9;
    font-weight: 900;

    color: #111827;
    text-decoration: none;
    letter-spacing: -1.4px;
}

.site-logo span {
    color: var(--blue);
}

.site-logo small {
    margin-top: 8px;

    color: var(--muted);

    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.desktop-nav a {
    position: relative;

    color: #111827;
    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
}

.desktop-nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -8px;

    width: 0;
    height: 3px;

    border-radius: 999px;
    background: var(--blue);

    transition: 0.2s;
}

.desktop-nav a:hover {
    color: var(--blue);
}

.desktop-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-round-btn,
.burger-btn {
    width: 48px;
    height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.82);
    color: #111827;

    text-decoration: none;
    font-size: 18px;

    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    cursor: pointer;
}

.burger-btn {
    flex-direction: column;
    gap: 5px;
}

.burger-btn span {
    width: 22px;
    height: 2px;

    border-radius: 999px;
    background: #111827;

    transition: 0.25s;
}

.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.search-panel {
    display: none;

    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.search-panel.open {
    display: block;
}

.search-panel-inner {
    padding: 18px 0;
}

.search-panel form {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 12px;
}

.search-panel input {
    width: 100%;

    padding: 15px 18px;

    border: 1px solid var(--line);
    border-radius: 999px;

    font-size: 16px;
    outline: none;
}

.search-panel button {
    border: 0;
    border-radius: 999px;

    background: var(--blue);
    color: #fff;

    font-weight: 800;
    cursor: pointer;
}

/* DRAWER */

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 4500;

    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);

    opacity: 0;
    pointer-events: none;

    transition: 0.25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.site-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 5000;

    width: min(420px, 92vw);
    height: 100vh;

    background: #ffffff;
    box-shadow: -24px 0 70px rgba(15, 23, 42, 0.22);

    transform: translateX(105%);
    transition: 0.28s ease;

    display: flex;
    flex-direction: column;
}

.site-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 24px 26px;

    border-bottom: 1px solid #edf0f3;
}

.drawer-header h2 {
    margin: 0;

    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.drawer-header p {
    margin: 4px 0 0;

    color: #6b7280;
    font-weight: 600;
}

.drawer-close {
    width: 48px;
    height: 48px;

    border: 0;
    border-radius: 999px;

    background: #f3f4f6;
    color: #111827;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;
}

.drawer-body {
    padding: 24px 26px 34px;
    overflow-y: auto;
}

.drawer-section {
    padding: 18px 0;
    border-bottom: 1px solid #edf0f3;
}

.drawer-section:first-child {
    padding-top: 0;
}

.drawer-section:last-child {
    border-bottom: 0;
}

.drawer-section-title {
    margin-bottom: 12px;

    color: #9ca3af;

    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 54px;

    padding: 0 14px;

    border-radius: 16px;

    color: #111827;
    text-decoration: none;

    font-size: 17px;
    font-weight: 800;

    transition: 0.18s;
}

.drawer-link span {
    width: 26px;

    color: var(--blue);

    text-align: center;
    font-size: 18px;
}

.drawer-link:hover {
    background: #f8fafc;
    color: var(--blue);
}

.drawer-link-accent {
    margin-top: 8px;

    background: var(--blue);
    color: #ffffff;
}

.drawer-link-accent span {
    color: #ffffff;
}

.drawer-link-accent:hover {
    background: var(--blue-dark);
    color: #ffffff;
}

/* FOOTER */

.site-footer {
    margin-top: 60px;
    padding: 54px 0;

    background: rgba(255, 255, 255, 0.72);
    border-top: 1px solid rgba(229, 231, 235, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
}

.footer-logo {
    display: inline-block;

    margin-bottom: 14px;

    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1.4px;

    text-decoration: none;
}

.footer-logo span {
    color: var(--blue);
}

.footer-brand p,
.footer-col p {
    max-width: 360px;

    margin: 0;

    color: var(--muted);
    line-height: 1.75;
}

.footer-col h4 {
    margin: 0 0 18px;

    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-col a {
    display: block;

    margin-bottom: 11px;

    color: #374151;
    text-decoration: none;
    font-weight: 550;
}

.footer-col a:hover {
    color: var(--blue);
}

.footer-socials {
    display: flex;
    gap: 12px;

    margin-bottom: 18px;
}

.footer-socials a {
    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);
    border-radius: 999px;

    background: #fff;
    color: #111827;

    font-weight: 800;
}

.footer-copy {
    font-size: 14px;
}

/* ===== layout.css ===== */
.site-footer {
    margin-top: 50px;
    background: #111827;
    color: #d1d5db;
}

.site-footer__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 46px 16px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-column h3 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1px;
}

.footer-logo:hover {
    text-decoration: none;
}

.footer-description {
    margin: 0 0 18px;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-socials a {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.footer-socials a:hover {
    background: #0b5ed7;
    text-decoration: none;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #d1d5db;
    font-weight: 700;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: none;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.footer-tags a:hover {
    background: #0b5ed7;
    text-decoration: none;
}

.footer-empty {
    color: #9ca3af;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer__bottom-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-footer__bottom-inner p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-bottom-links a {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 700;
}

.footer-bottom-links a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* ===== media.css ===== */
.post-card-slider {
    position: relative;
    width: 100%;
    min-height: 150px;
    overflow: hidden;
    border-radius: 12px;
    background: #eef2f7;
}

.post-card-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.post-card-slide.active {
    display: block;
}

.post-card-slider .post-card__image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.post-card-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 5;

    display: flex;
    gap: 6px;
}

.post-card-slider-dots span {
    width: 8px;
    height: 8px;

    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);

    cursor: pointer;
}

.post-card-slider-dots span.active {
    width: 18px;
    background: #ffffff;
}

.article-cover img,
.article-content img,
.article-gallery img {
    cursor: zoom-in;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.article-gallery {
    margin-top: 36px;
}

.article-gallery h2 {
    margin-bottom: 18px;
}

.article-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.article-gallery-item {
    margin: 0;
}

.article-gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;

    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);

    transition: 0.22s ease;
}

.article-gallery-item img:hover {
    transform: translateY(-2px) scale(1.015);
}

.article-gallery-item figcaption {
    margin-top: 8px;
    color: #6b7280;
    font-size: 14px;
}

.article-embed {
    margin: 28px auto;
    width: 100%;
    max-width: 780px;
}

.article-embed-youtube {
    position: relative;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 20px;
    background: #111827;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.16);
}

.article-embed-youtube iframe {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.article-embed-open-link {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;

    padding: 8px 12px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.92);
    color: #111827;

    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.article-embed-open-link:hover {
    background: #ffffff;
    color: #0b5ed7;
}

.article-embed-telegram,
.article-embed-twitter,
.article-embed-facebook,
.article-embed-instagram {
    display: flex;
    justify-content: center;

    width: 100%;
    max-width: 780px;

    padding: 14px;

    border: 1px solid #e5e7eb;
    border-radius: 20px;

    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);

    overflow: hidden;
}

.article-embed-telegram iframe,
.article-embed-twitter iframe,
.article-embed-facebook iframe,
.article-embed-instagram iframe {
    max-width: 100% !important;
}

.article-embed-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 24px auto;
    padding: 18px;

    width: 100%;
    max-width: 780px;

    border: 1px solid #e5e7eb;
    border-radius: 18px;

    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.article-embed-card strong {
    display: block;
    margin-bottom: 6px;
}

.article-embed-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.article-embed-card a {
    flex: 0 0 auto;

    padding: 10px 14px;

    border-radius: 999px;

    background: #0b5ed7;
    color: #ffffff;

    text-decoration: none;
    font-weight: 800;
}

/* LIGHTBOX */

.site-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
}

.site-lightbox.open {
    display: flex;
}

.site-lightbox-inner {
    position: relative;

    max-width: min(1120px, 92vw);
    max-height: 88vh;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-lightbox img {
    max-width: 100%;
    max-height: 76vh;

    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);

    user-select: none;
}

.site-lightbox-caption {
    max-width: min(900px, 92vw);

    margin: 14px 0 0;

    color: #ffffff;
    text-align: center;
    font-size: 17px;
}

.site-lightbox-counter {
    margin-top: 8px;

    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 800;
}

.site-lightbox-close {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 3;

    width: 52px;
    height: 52px;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;

    font-size: 38px;
    line-height: 1;

    cursor: pointer;
}

.site-lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;

    width: 58px;
    height: 58px;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;

    font-size: 54px;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);
    transition: 0.2s;
}

.site-lightbox-arrow:hover,
.site-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.site-lightbox-prev {
    left: 24px;
}

.site-lightbox-next {
    right: 24px;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-enabled {
    cursor: zoom-in;
}

@media (max-width: 760px) {
    .post-card-slider,
    .post-card-slider .post-card__image {
        height: 210px;
    }

    .article-gallery-grid {
        grid-template-columns: 1fr;
    }

    .article-gallery-item img {
        height: 240px;
    }

    .article-embed-card {
        align-items: stretch;
        flex-direction: column;
    }

    .article-embed-card a {
        text-align: center;
    }

    .site-lightbox {
        padding: 14px;
    }

    .site-lightbox img {
        max-height: 72vh;
        border-radius: 16px;
    }

    .site-lightbox-close {
        top: 14px;
        right: 14px;

        width: 48px;
        height: 48px;
    }

    .site-lightbox-arrow {
        width: 46px;
        height: 46px;

        font-size: 42px;

        background: rgba(255, 255, 255, 0.18);
    }

    .site-lightbox-prev {
        left: 10px;
    }

    .site-lightbox-next {
        right: 10px;
    }

    .site-lightbox-caption {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .post-card-slider,
    .post-card-slider .post-card__image {
        height: 180px;
    }

    .article-gallery-item img {
        height: 220px;
    }
}

/* ===== portal_live.css ===== */
/* PORTAL LIVE FEATURES */

.portal-live-card {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid #dfe7ef;
    border-radius: 28px;
    background: radial-gradient(circle at 90% 10%, rgba(37,99,235,.10), transparent 32%), rgba(255,255,255,.94);
    box-shadow: 0 14px 38px rgba(15,23,42,.07);
}

.portal-live-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.portal-live-head span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eaf3ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.portal-live-head h2 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.portal-live-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.portal-live-column {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 14px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.portal-live-column h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.portal-live-row,
.portal-live-user {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    color: #101827;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.portal-live-row:hover,
.portal-live-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15,23,42,.08);
    text-decoration: none;
}

.portal-live-row strong {
    line-height: 1.25;
}

.portal-live-row small,
.portal-live-user small {
    color: #64748b;
    font-weight: 750;
}

.portal-live-user {
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
}

.portal-live-user img,
.portal-live-user > span {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #eaf3ff;
}

.portal-live-user > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-weight: 950;
}

.mobile-app-nav {
    display: none;
}

@media (max-width: 760px) {
    body {
        padding-bottom: 82px;
    }

    .portal-live-card {
        padding: 16px;
        border-radius: 24px;
    }

    .portal-live-grid {
        grid-template-columns: 1fr;
    }

    .mobile-app-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 9000;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 8px;
        border-radius: 24px;
        background: rgba(255,255,255,.92);
        border: 1px solid rgba(203,213,225,.9);
        box-shadow: 0 18px 50px rgba(15,23,42,.24);
        backdrop-filter: blur(16px);
    }

    .mobile-app-nav__item {
        position: relative;
        min-width: 0;
        display: grid;
        place-items: center;
        gap: 2px;
        min-height: 52px;
        border-radius: 18px;
        color: #334155;
        text-decoration: none;
        font-weight: 900;
    }

    .mobile-app-nav__item span {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-app-nav__item small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px;
        white-space: nowrap;
    }

    .mobile-app-nav__item--plus {
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(37,99,235,.28);
    }

    .mobile-app-nav__item b {
        position: absolute;
        top: 3px;
        right: 9px;
        min-width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #ef4444;
        color: #ffffff;
        font-size: 11px;
        font-weight: 950;
    }
}


/* ===== portal_theme.css ===== */
/* SzczecinTut Theme Layer: dark mode + app polish */

:root {
    --portal-accent: #2563eb;
    --portal-bg-dark: #0b1220;
    --portal-card-dark: #111c2e;
    --portal-border-dark: rgba(148, 163, 184, .22);
    --portal-text-dark: #e5edf7;
    --portal-muted-dark: #94a3b8;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
    cursor: pointer;
    font-size: 20px;
}

body.portal-dark {
    background: radial-gradient(circle at 20% 0%, rgba(37,99,235,.18), transparent 30%), var(--portal-bg-dark) !important;
    color: var(--portal-text-dark);
}

body.portal-dark .site-header,
body.portal-dark .header,
body.portal-dark .main-header {
    background: rgba(11,18,32,.82) !important;
    border-color: var(--portal-border-dark) !important;
    backdrop-filter: blur(16px);
}

body.portal-dark .theme-toggle-btn,
body.portal-dark .header-round-btn,
body.portal-dark .burger-btn,
body.portal-dark .mobile-app-nav {
    background: rgba(17,28,46,.92) !important;
    color: var(--portal-text-dark) !important;
    border-color: var(--portal-border-dark) !important;
}

body.portal-dark .news-section,
body.portal-dark .news-city-section,
body.portal-dark .news-side-card,
body.portal-dark .news-article,
body.portal-dark .news-comments,
body.portal-dark .news-top-strip,
body.portal-dark .news-story-chip,
body.portal-dark .news-category-bar,
body.portal-dark .portal-live-card,
body.portal-dark .editor-pro-card,
body.portal-dark .editor-pro-side-card,
body.portal-dark .classified-card,
body.portal-dark .ads-hero,
body.portal-dark .ads-search,
body.portal-dark .report-card {
    background: rgba(17,28,46,.92) !important;
    border-color: var(--portal-border-dark) !important;
    color: var(--portal-text-dark) !important;
    box-shadow: 0 18px 50px rgba(0,0,0,.22) !important;
}

body.portal-dark h1,
body.portal-dark h2,
body.portal-dark h3,
body.portal-dark strong,
body.portal-dark .news-article-title,
body.portal-dark .news-section-head h2,
body.portal-dark .news-feed-card h3 a,
body.portal-dark .classified-card h3,
body.portal-dark .classified-card-price {
    color: var(--portal-text-dark) !important;
}

body.portal-dark p,
body.portal-dark small,
body.portal-dark .news-article-content,
body.portal-dark .news-article-lead,
body.portal-dark .news-feed-card p,
body.portal-dark .classified-card-desc,
body.portal-dark .image-credit-caption,
body.portal-dark .editor-pro-card p,
body.portal-dark .editor-pro-field small {
    color: var(--portal-muted-dark) !important;
}

body.portal-dark input,
body.portal-dark textarea,
body.portal-dark select {
    background: rgba(15,23,42,.92) !important;
    border-color: var(--portal-border-dark) !important;
    color: var(--portal-text-dark) !important;
}

body.portal-dark .news-city-card,
body.portal-dark .news-feed-card,
body.portal-dark .news-small-card a,
body.portal-dark .portal-live-column,
body.portal-dark .portal-live-row,
body.portal-dark .portal-live-user,
body.portal-dark .editor-pro-check,
body.portal-dark .image-credit-caption {
    background: rgba(15,23,42,.72) !important;
    border-color: var(--portal-border-dark) !important;
}

body.portal-dark a {
    color: #7db2ff;
}

.install-app-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(37, 99, 235, .22);
}

.install-app-banner.is-visible {
    display: flex;
}

.install-app-banner strong {
    color: #ffffff !important;
}

.install-app-banner span {
    display: block;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    font-weight: 750;
}

.install-app-banner button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #2563eb;
    font-weight: 950;
    cursor: pointer;
}

@media (max-width: 760px) {
    .theme-toggle-btn { width: 44px; height: 44px; }
    .install-app-banner { margin: 10px 0 14px; border-radius: 18px; }
}


/* ===== portal_theme_fix.css ===== */
/* Dark mode readability + theme button position fix */

body > div[style*="position:fixed"][style*="right:72px"][style*="top:86px"] {
    display: none !important;
}

.portal-theme-fixed {
    position: fixed;
    right: 74px;
    top: 82px;
    z-index: 9100;
    pointer-events: none;
}

.portal-theme-fixed .theme-toggle-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    border: 1px solid rgba(203,213,225,.9);
    box-shadow: 0 12px 30px rgba(15,23,42,.12);
    backdrop-filter: blur(14px);
}

@media (max-width: 760px) {
    .portal-theme-fixed {
        top: 142px;
        right: 18px;
    }

    .portal-theme-fixed .theme-toggle-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* DARK THEME READABILITY */

body.portal-dark {
    background: #08111f !important;
}

body.portal-dark .news-section,
body.portal-dark .news-city-section,
body.portal-dark .news-side-card,
body.portal-dark .news-article,
body.portal-dark .news-comments,
body.portal-dark .news-top-strip,
body.portal-dark .news-story-chip,
body.portal-dark .news-category-bar,
body.portal-dark .portal-live-card,
body.portal-dark .editor-pro-card,
body.portal-dark .editor-pro-side-card,
body.portal-dark .classified-card,
body.portal-dark .ads-hero,
body.portal-dark .ads-search,
body.portal-dark .report-card,
body.portal-dark .site-footer,
body.portal-dark footer {
    background: #101b2d !important;
    border-color: rgba(148,163,184,.24) !important;
    color: #e8f0fb !important;
}

body.portal-dark .news-small-card a,
body.portal-dark .news-feed-card,
body.portal-dark .news-city-card,
body.portal-dark .portal-live-column,
body.portal-dark .portal-live-row,
body.portal-dark .portal-live-user,
body.portal-dark .editor-pro-check,
body.portal-dark .image-credit-caption,
body.portal-dark .news-article-rating,
body.portal-dark .news-article-lead,
body.portal-dark .news-article-content blockquote,
body.portal-dark .news-tags a,
body.portal-dark .news-article-tags a,
body.portal-dark .news-article-share a,
body.portal-dark .news-article-share button {
    background: #16243a !important;
    border-color: rgba(148,163,184,.25) !important;
    color: #e8f0fb !important;
}

body.portal-dark h1,
body.portal-dark h2,
body.portal-dark h3,
body.portal-dark h4,
body.portal-dark .news-section-head h2,
body.portal-dark .news-article-title,
body.portal-dark .news-main-hero h1,
body.portal-dark .news-feed-card h3,
body.portal-dark .news-feed-card h3 a,
body.portal-dark .news-small-card h3,
body.portal-dark .news-city-card strong,
body.portal-dark .news-side-card h2,
body.portal-dark .portal-live-head h2,
body.portal-dark .classified-card h3,
body.portal-dark .classified-title,
body.portal-dark .classified-card-price,
body.portal-dark .site-footer h2,
body.portal-dark footer h2,
body.portal-dark footer h3 {
    color: #f8fbff !important;
    opacity: 1 !important;
}

body.portal-dark p,
body.portal-dark li,
body.portal-dark dd,
body.portal-dark .news-article-content,
body.portal-dark .news-article-content p,
body.portal-dark .news-article-lead,
body.portal-dark .news-feed-card p,
body.portal-dark .news-city-card small,
body.portal-dark .news-small-card small,
body.portal-dark .news-meta,
body.portal-dark .news-feed-card__meta,
body.portal-dark .news-feed-card__footer,
body.portal-dark .classified-card-desc,
body.portal-dark .image-credit-caption,
body.portal-dark .editor-pro-card p,
body.portal-dark .editor-pro-field small,
body.portal-dark .site-footer p,
body.portal-dark footer p {
    color: #cbd8ea !important;
    opacity: 1 !important;
}

body.portal-dark small,
body.portal-dark .muted,
body.portal-dark .text-muted,
body.portal-dark .news-side-card small,
body.portal-dark .news-article-meta,
body.portal-dark .news-article-breadcrumbs,
body.portal-dark .image-credit-caption small,
body.portal-dark .site-footer a,
body.portal-dark footer a {
    color: #9fb0c7 !important;
    opacity: 1 !important;
}

body.portal-dark a {
    color: #83b7ff !important;
}

body.portal-dark a:hover {
    color: #b7d5ff !important;
}

body.portal-dark .news-section-kicker,
body.portal-dark .news-pill,
body.portal-dark .news-card-category,
body.portal-dark .news-tags a,
body.portal-dark .news-article-tags a {
    background: rgba(37,99,235,.18) !important;
    color: #9ec8ff !important;
    border-color: rgba(37,99,235,.28) !important;
}

body.portal-dark .news-pill--danger {
    background: #ef4444 !important;
    color: #ffffff !important;
}

body.portal-dark .news-main-hero h1,
body.portal-dark .news-main-hero p,
body.portal-dark .news-main-hero .news-meta,
body.portal-dark .news-meta--light {
    color: #ffffff !important;
    text-shadow: 0 2px 18px rgba(0,0,0,.45);
}

body.portal-dark .site-footer,
body.portal-dark footer {
    background: #0b1220 !important;
}

body.portal-dark .site-footer *,
body.portal-dark footer * {
    opacity: 1 !important;
}

body.portal-dark input,
body.portal-dark textarea,
body.portal-dark select {
    background: #0f1a2b !important;
    color: #e8f0fb !important;
    border-color: rgba(148,163,184,.28) !important;
}

body.portal-dark input::placeholder,
body.portal-dark textarea::placeholder {
    color: #7f8fa7 !important;
}


/* ===== theme_button_header_fix.css ===== */

.portal-theme-fixed,
body > div[style*="position:fixed"][style*="right:72px"][style*="top:86px"] {
    display: none !important;
}

.header-theme-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.header-theme-slot .theme-toggle-btn,
.theme-toggle-btn {
    position: static !important;
}

.header-theme-slot .theme-toggle-btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.94);
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(15,23,42,.08);
    backdrop-filter: blur(14px);
    font-size: 20px;
    cursor: pointer;
}

body.portal-dark .header-theme-slot .theme-toggle-btn {
    background: rgba(17,28,46,.92) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(148,163,184,.24);
}

@media (max-width: 760px) {
    .header-theme-slot .theme-toggle-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}




.menu-logout-form{
    margin:0;
}

.menu-link-btn{
    display:flex;
    align-items:center;
    gap:12px;

    width:100%;
    padding:14px 0;

    background:none;
    border:none;

    color:#1f2937;
    font-size:18px;
    font-weight:500;

    cursor:pointer;
    text-align:left;
}


/* Staff service notification bell */
.staff-bell-menu{
    position:relative;
    display:inline-flex;
}
.staff-bell-menu summary{
    list-style:none;
    cursor:pointer;
}
.staff-bell-menu summary::-webkit-details-marker{display:none;}
.staff-bell-dropdown{
    position:absolute;
    right:0;
    top:calc(100% + 10px);
    width:min(340px, calc(100vw - 24px));
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:18px;
    box-shadow:0 18px 50px rgba(15,23,42,.16);
    padding:10px;
    z-index:2000;
}
.staff-bell-title{
    padding:8px 10px 10px;
    font-weight:800;
    color:#111827;
}
.staff-bell-item{
    display:block;
    padding:10px;
    border-radius:12px;
    color:#111827;
    text-decoration:none;
}
.staff-bell-item:hover{background:#f5f7f8;}
.staff-bell-item.unread{background:#ecfdf5;}
.staff-bell-item strong{
    display:block;
    font-size:14px;
    line-height:1.25;
}
.staff-bell-item span{
    display:block;
    margin-top:3px;
    color:#4b5563;
    font-size:13px;
    line-height:1.3;
}
.staff-bell-item small{
    display:block;
    margin-top:4px;
    color:#9ca3af;
    font-size:12px;
}
.staff-bell-empty{
    padding:12px 10px;
    color:#6b7280;
    font-size:14px;
}
.staff-bell-all{
    display:flex;
    justify-content:center;
    padding:10px;
    margin-top:4px;
    border-radius:12px;
    background:#f3f4f6;
    color:#047857;
    font-weight:700;
    text-decoration:none;
}
@media (max-width: 768px){
    .staff-bell-dropdown{
        right:-90px;
    }
}

/* v26: real portal navigation with dropdowns and hierarchical drawer */
.desktop-nav .nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.desktop-nav .nav-dropdown > summary {
    list-style: none;
    cursor: pointer;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    user-select: none;
}

.desktop-nav .nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.desktop-nav .nav-dropdown > summary::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--blue);
    transition: .2s;
}

.desktop-nav .nav-dropdown:hover > summary,
.desktop-nav .nav-dropdown[open] > summary {
    color: var(--blue);
}

.desktop-nav .nav-dropdown:hover > summary::after,
.desktop-nav .nav-dropdown[open] > summary::after {
    width: 100%;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    z-index: 2300;
    min-width: 250px;
    max-width: min(340px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .14);
}

.nav-dropdown-menu a,
.nav-dropdown-menu .nav-empty {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.nav-dropdown-menu a:hover {
    background: #f3f6fb;
    color: var(--blue);
}

.nav-dropdown-menu .nav-empty {
    color: #9ca3af;
    font-weight: 700;
}

.nav-dropdown-group {
    position: relative;
}

.nav-submenu {
    display: none;
    margin: 2px 0 8px 12px;
    padding-left: 10px;
    border-left: 2px solid #eef2f7;
}

.nav-dropdown-group:hover .nav-submenu,
.nav-dropdown-group:focus-within .nav-submenu {
    display: block;
}

.nav-tags-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 320px;
}

.nav-tags-menu a {
    display: inline-flex;
    padding: 8px 10px;
    background: #f8fafc;
}

.user-bell-menu,
.staff-bell-menu {
    position: relative;
    display: inline-flex;
}

.user-bell-menu summary {
    list-style: none;
    cursor: pointer;
}

.user-bell-menu summary::-webkit-details-marker {
    display: none;
}

.header-icon-with-badge {
    position: relative;
}

.header-badge,
.drawer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff !important;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.drawer-badge {
    margin-left: auto;
}

.drawer-tree {
    margin: 6px 0;
}

.drawer-tree > summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-radius: 16px;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.drawer-tree > summary::-webkit-details-marker {
    display: none;
}

.drawer-tree > summary:hover,
.drawer-tree[open] > summary {
    background: #f8fafc;
    color: var(--blue);
}

.drawer-tree[open] > summary span {
    transform: rotate(90deg);
}

.drawer-tree-body {
    display: grid;
    gap: 4px;
    margin: 4px 0 10px 44px;
    padding-left: 12px;
    border-left: 2px solid #eef2f7;
}

.drawer-tree-body a {
    padding: 9px 10px;
    border-radius: 12px;
    color: #374151;
    text-decoration: none;
    font-weight: 750;
}

.drawer-tree-body a:hover {
    background: #f3f6fb;
    color: var(--blue);
}

.drawer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.drawer-tags a {
    display: inline-flex;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f8fafc;
    color: #111827;
    text-decoration: none;
    font-weight: 800;
}

.drawer-tags a:hover {
    background: #eaf2ff;
    color: var(--blue);
}

@media (max-width: 980px) {
    .desktop-nav {
        display: none !important;
    }
}

/* v29: cleaner drawer/menu taxonomy + account block */
.nav-parent-group > a::after{
    content:"›";
    float:right;
    color:#94a3b8;
}

.drawer-live-search{
    position:sticky;
    top:-24px;
    z-index:5;
    padding:0 0 14px;
    background:#fff;
}

.drawer-live-search input{
    width:100%;
    height:48px;
    padding:0 16px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    background:#f8fafc;
    color:#111827;
    font-size:16px;
    font-weight:750;
    outline:none;
}

.drawer-live-search input:focus{
    border-color:rgba(37,99,235,.45);
    box-shadow:0 0 0 4px rgba(37,99,235,.08);
    background:#fff;
}

.drawer-root-tree{
    margin:8px 0;
}

.drawer-root-tree > summary{
    background:#f8fafc;
    color:#111827;
}

.drawer-root-tree[open] > summary{
    background:#eef5ff;
}

.drawer-child-tree{
    margin:4px 0;
}

.drawer-child-tree > summary{
    min-height:42px;
    padding-left:10px;
    font-size:16px;
}

.drawer-child-tree .drawer-tree-body{
    margin-left:26px;
}

.drawer-muted{
    display:block;
    padding:10px 12px;
    color:#94a3b8;
    font-weight:800;
}

.drawer-tag-list a::before{
    content:"";
}

.drawer-account-card{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:12px;
    padding:14px;
    border:1px solid #e8edf3;
    border-radius:22px;
    background:linear-gradient(135deg,#ffffff,#f8fbff);
    color:#111827;
    text-decoration:none;
    box-shadow:0 12px 26px rgba(15,23,42,.06);
}

.drawer-account-avatar{
    flex:0 0 54px;
    width:54px;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:linear-gradient(135deg,#2563eb,#60a5fa);
    color:#fff;
    font-size:22px;
    font-weight:950;
    overflow:hidden;
}

.drawer-account-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.drawer-account-info{
    min-width:0;
    display:grid;
    gap:3px;
}

.drawer-account-info strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:18px;
    font-weight:950;
}

.drawer-account-info small{
    color:#64748b;
    font-weight:800;
}

.drawer-account-stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    margin:0 0 12px;
}

.drawer-account-stats span{
    display:grid;
    gap:2px;
    padding:10px 6px;
    border-radius:16px;
    background:#f8fafc;
    text-align:center;
}

.drawer-account-stats strong{
    color:#2563eb;
    font-size:20px;
    font-weight:950;
}

.drawer-account-stats small{
    color:#64748b;
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.drawer-account-minirow{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:10px 0;
}

.drawer-account-minirow a{
    padding:12px 10px;
    border-radius:16px;
    background:#f8fafc;
    color:#2563eb;
    text-align:center;
    text-decoration:none;
    font-weight:900;
}

.drawer-guest-card{
    display:grid;
    gap:4px;
    margin-bottom:12px;
    padding:16px;
    border-radius:20px;
    background:#f8fafc;
}

.drawer-guest-card strong{
    color:#111827;
    font-size:18px;
    font-weight:950;
}

.drawer-guest-card span{
    color:#64748b;
    line-height:1.45;
}

.menu-link-btn{
    min-height:54px;
    padding:0 14px;
    border:1px solid #e5e7eb;
    border-radius:16px;
    font-size:17px;
    font-weight:900;
}

.drawer-link.is-filter-hidden,
.drawer-tree.is-filter-hidden,
.drawer-section.is-filter-hidden,
.drawer-tree-body > a.is-filter-hidden{
    display:none !important;
}

/* v31: drawer taxonomy as real menu items: click text = page, click plus = expand */
.drawer-main-menu .drawer-section-title{
    margin-bottom:10px;
}

.drawer-tree-block{
    display:grid;
    gap:6px;
    margin:8px 0;
}

.drawer-tree-row{
    display:grid;
    grid-template-columns:42px 1fr;
    align-items:center;
    gap:6px;
    min-height:54px;
    border-radius:18px;
    background:#fff;
}

.drawer-tree-row-root{
    margin-top:6px;
    background:#f8fafc;
}

.drawer-tree-toggle{
    width:38px;
    height:38px;
    border:0;
    border-radius:14px;
    background:#eef5ff;
    color:#2563eb;
    font-size:20px;
    line-height:1;
    font-weight:950;
    cursor:pointer;
    transition:transform .16s ease, background .16s ease, color .16s ease;
}

.drawer-tree-toggle:hover{
    background:#2563eb;
    color:#fff;
}

.drawer-tree-block.is-open > .drawer-tree-row .drawer-tree-toggle{
    transform:rotate(45deg);
    background:#2563eb;
    color:#fff;
}

.drawer-tree-link,
.drawer-tree-plain-link,
.drawer-tree-child-link{
    display:flex;
    align-items:center;
    min-height:44px;
    padding:0 12px;
    border-radius:14px;
    color:#111827;
    text-decoration:none;
    font-size:17px;
    font-weight:900;
}

.drawer-tree-link:hover,
.drawer-tree-plain-link:hover,
.drawer-tree-child-link:hover{
    background:#f3f7ff;
    color:#2563eb;
}

/* v32: taxonomy blocks must be closed by default.
   The HTML uses the hidden attribute; keep it stronger than display:grid/flex below. */
.drawer-tree-panel[hidden],
.drawer-tags-panel[hidden]{
    display:none !important;
}

.drawer-tree-panel{
    display:grid;
    gap:4px;
    margin:0 0 8px 52px;
    padding-left:12px;
    border-left:2px solid #eef2f7;
}

.drawer-tree-subpanel{
    margin-left:22px;
}

.drawer-tree-plain-link{
    margin-left:52px;
}

.drawer-tags-panel{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-left:52px;
    padding-left:0;
    border-left:0;
}

.drawer-tag-pill{
    display:inline-flex;
    align-items:center;
    min-height:38px;
    padding:0 13px;
    border-radius:999px;
    background:#f8fafc;
    color:#111827;
    text-decoration:none;
    font-weight:900;
}

.drawer-tag-pill:hover{
    background:#eaf2ff;
    color:#2563eb;
}

.drawer-tree-block.is-filter-hidden,
.drawer-tree-row.is-filter-hidden,
.drawer-tree-link.is-filter-hidden,
.drawer-tree-plain-link.is-filter-hidden,
.drawer-tree-child-link.is-filter-hidden,
.drawer-tag-pill.is-filter-hidden{
    display:none !important;
}

/* v-newspaper-ui: desktop dropdown must open cleanly on hover, without a dead gap */
.desktop-nav .nav-dropdown > summary {
    position: relative;
}

.desktop-nav .nav-dropdown[open] > .nav-dropdown-menu,
.desktop-nav .nav-dropdown:hover > .nav-dropdown-menu {
    display: block;
}

.desktop-nav .nav-dropdown > .nav-dropdown-menu {
    top: calc(100% + 8px);
    border-radius: 6px;
}

.desktop-nav .nav-dropdown > .nav-dropdown-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}
