/* ========================================
ArtemPortal Mobile 
- one style source (no inline styles in tpl)
- optimized, no duplicates
- supports UImages PRO picture/img
- accessibility & reduced motion support
======================================== */

/* ========== TOKENS / THEME ========== */
:root{
--bg-primary:#fff;
--bg-secondary:#f5f5f7;
--bg-card:#fff;
--text-primary:#000;
--text-secondary:#6e6e73;
--text-tertiary:#8e8e93;
--border-color:#e5e5ea;
--accent:#007aff;
--accent-dark:#0056cc;
--error:#ff3b30;
--success:#34c759;
--warning:#ff9500;
--shadow-sm:0 1px 2px rgba(0,0,0,.05);
--shadow-md:0 4px 10px rgba(0,0,0,.08);
--shadow-lg:0 14px 30px rgba(0,0,0,.14);
--radius:12px;
--radius-lg:16px;
--safe-bottom: env(safe-area-inset-bottom, 0px);
--touch-target: 44px;
}
[data-theme="dark"]{
--bg-primary:#000;
--bg-secondary:#1c1c1e;
--bg-card:#2c2c2e;
--text-primary:#fff;
--text-secondary:#98989d;
--text-tertiary:#636366;
--border-color:#38383a;
--accent:#0a84ff;
--accent-dark:#0056cc;
--shadow-sm:0 1px 2px rgba(0,0,0,.30);
--shadow-md:0 4px 10px rgba(0,0,0,.35);
--shadow-lg:0 14px 30px rgba(0,0,0,.50);
}

/* ========== RESET / BASE ========== */
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
background:var(--bg-secondary);
color:var(--text-primary);
line-height:1.5;
overflow-x:hidden;
padding-bottom:calc(60px + var(--safe-bottom));
transition:background-color .25s ease,color .25s ease;
}
a{color:inherit;text-decoration:none}
a:hover{color:var(--accent)}
img{max-width:100%;height:auto;display:block}
button{font-family:inherit;cursor:pointer;min-height:var(--touch-target);min-width:var(--touch-target)}
/* Icons */
.icon{width:24px;height:24px;display:inline-block;fill:currentColor}
/* Fallback для изображений */
.img-fallback{display:none!important}
.news-image-placeholder{display:none}
.img-fallback + .news-image-placeholder,
.news-image-wrapper:has(.img-fallback) .news-image-placeholder{display:grid!important}

/* ========== LAYOUT ========== */
.main-content{
max-width:1200px;
margin:0 auto;
padding:16px;
}
/* Desktop content width */
@media (min-width:1024px){
body{padding-bottom:0}
.bottom-nav{display:none}
}

/* ========== HEADER ========== */
.top-header{
position:sticky;top:0;
background:var(--bg-primary);
border-bottom:1px solid var(--border-color);
z-index:100;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
}
.header-content{
display:flex;align-items:center;justify-content:space-between;
padding:12px 16px;
max-width:1200px;margin:0 auto;
}
.logo a{display:flex;align-items:center;gap:8px}
.logo img{height:40px;width:auto}
.header-actions{display:flex;align-items:center;gap:8px}
.header-btn{
width:40px;height:40px;border-radius:50%;
background:var(--bg-secondary);
border:0;
display:flex;align-items:center;justify-content:center;
color:var(--text-primary);
transition:transform .12s ease, background .2s ease;
}
.header-btn:hover{background:var(--border-color)}
.header-btn:active{transform:scale(.95)}
.header-btn .icon{width:20px;height:20px}
/* Theme icons: rely on data-theme only */
.theme-toggle .sun-icon{display:block}
.theme-toggle .moon-icon{display:none}
[data-theme="dark"] .theme-toggle .sun-icon{display:none}
[data-theme="dark"] .theme-toggle .moon-icon{display:block}

/* Search */
.search-bar{
max-height:0; overflow:hidden;
background:var(--bg-secondary);
transition:max-height .25s ease, padding .25s ease;
padding:0 16px;
position:relative;
}
.search-bar.active{max-height:80px;padding:12px 16px}
.search-form{display:flex;gap:8px}
.search-input{
flex:1;
padding:10px 14px;
border:1px solid var(--border-color);
border-radius:var(--radius);
background:var(--bg-card);
color:var(--text-primary);
font-size:16px;
outline:none;
}
.search-input:focus{
border-color:var(--accent);
box-shadow:0 0 0 3px rgba(0,122,255,.12);
}
.search-btn{
padding:10px 18px;
background:var(--accent);
color:#fff;border:0;
border-radius:var(--radius);
font-weight:700;
}
.search-btn:hover{background:var(--accent-dark)}

/* Autocomplete */
.search-suggestions{
position:absolute;
top:100%;left:0;right:0;
background:var(--bg-card);
border:1px solid var(--border-color);
border-radius:var(--radius);
box-shadow:var(--shadow-lg);
z-index:1000;
margin-top:8px;
max-height:380px;
overflow:auto;
}
.suggestion-item{
padding:12px 14px;
border-bottom:1px solid var(--border-color);
cursor:pointer;
}
.suggestion-item:last-child{border-bottom:0}
.suggestion-item:hover,.suggestion-item.active{background:var(--bg-secondary)}
.suggestion-title{font-weight:700;font-size:14px;line-height:1.3;margin-bottom:4px;word-break:break-word}
.suggestion-meta{font-size:12px;color:var(--text-secondary)}

/* ========== SIDE MENU ========== */
.side-menu{
position:fixed;inset:0;
z-index:200;
visibility:hidden;opacity:0;
transition:opacity .25s ease, visibility .25s ease;
}
.side-menu.active{visibility:visible;opacity:1}
.menu-overlay{position:absolute;inset:0;background:rgba(0,0,0,.5)}
.menu-content{
position:absolute;top:0;left:0;height:100%;
width:85%;max-width:320px;
background:var(--bg-primary);
transform:translateX(-100%);
transition:transform .25s ease;
overflow:auto;
display:flex;flex-direction:column;
}
.side-menu.active .menu-content{transform:translateX(0)}
.menu-header{
position:sticky;top:0;z-index:10;
background:var(--bg-primary);
border-bottom:1px solid var(--border-color);
padding:16px;
display:flex;align-items:center;justify-content:space-between;
}
.close-menu{
width:36px;height:36px;border-radius:50%;
background:var(--bg-secondary);border:0;
display:flex;align-items:center;justify-content:center;
}
.close-menu:hover{background:var(--border-color)}

/* Profile block */
.menu-profile{padding:16px;border-bottom:1px solid var(--border-color)}
.profile-guest,.profile-logged{display:flex;gap:12px;align-items:center}
.profile-avatar{
width:48px;height:48px;border-radius:50%;
background:var(--accent);color:#fff;
display:flex;align-items:center;justify-content:center;
overflow:hidden;flex-shrink:0;
}
.profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-name{font-weight:800;font-size:15px;line-height:1.2;word-break:break-word}
.profile-group{font-size:13px;color:var(--text-secondary);margin-top:2px}
.profile-links,.profile-actions{font-size:13px;color:var(--text-secondary)}
.profile-links a,.profile-actions a{color:var(--accent);font-weight:700}

/* menu items */
.menu-nav{padding:12px 0;flex:1}
.menu-section{
padding:12px 16px 8px;
color:var(--text-secondary);
font-size:12px;font-weight:800;
text-transform:uppercase;
letter-spacing:.04em;
}
.menu-item{display:block;padding:12px 16px;font-size:15px;word-break:break-word}
.menu-item:hover{background:var(--bg-secondary);color:var(--accent)}
.menu-item.admin{color:var(--warning);font-weight:800}
.badge{
display:inline-flex;align-items:center;justify-content:center;
min-width:20px;height:20px;padding:0 6px;
background:var(--error);color:#fff;border-radius:999px;
font-size:11px;font-weight:800;
}
.menu-social{padding:16px;border-top:1px solid var(--border-color);border-bottom:1px solid var(--border-color)}
.social-title{font-size:12px;font-weight:800;color:var(--text-secondary);text-transform:uppercase;margin-bottom:12px}
.social-btn{
display:flex;gap:12px;align-items:center;
border-radius:var(--radius);
padding:10px 12px;
color:#fff;
font-weight:700;
margin-bottom:8px;
transition:transform .15s ease, filter .15s ease;
}
.social-btn:last-child{margin-bottom:0}
.social-btn:hover{transform:translateY(-1px);filter:brightness(1.08)}
.social-btn.tg{background:#0088cc}
.social-btn.vk{background:#0077ff}
.social-btn.max{background:#ff3b30}
.social-icon{width:20px;height:20px}
.menu-footer{padding:16px}
.menu-footer .menu-item{padding:10px 0;font-size:14px}
.menu-copyright{
padding:16px;margin-top:12px;
border-top:1px solid var(--border-color);
font-size:12px;color:var(--text-tertiary);
text-align:center;line-height:1.6;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav{
position:fixed;left:0;right:0;bottom:0;
background:var(--bg-primary);
border-top:1px solid var(--border-color);
z-index:100;
display:flex;justify-content:space-around;
padding:8px 0 calc(8px + var(--safe-bottom));
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
}
.nav-item{
display:flex;flex-direction:column;align-items:center;
gap:4px;
color:var(--text-secondary);
font-size:11px;font-weight:700;
padding:4px 12px;
min-height:var(--touch-target);
}
.nav-item.active{color:var(--accent)}
.nav-item:active{transform:scale(.92)}
.nav-icon{width:24px;height:24px}
.nav-item.advertise{color:var(--success)}
.nav-item.advertise .nav-icon{color:var(--success)}

/* ========== HOMEPAGE SECTIONS ========== */
.homepage-section{margin-bottom:32px}
.section-header{
display:flex;align-items:center;justify-content:space-between;
margin-bottom:14px;padding:0 4px;
}
.section-title{font-size:20px;font-weight:900;word-break:break-word}
.section-link{font-size:14px;color:var(--accent);font-weight:800}
.section-link:hover{color:var(--accent-dark)}
.news-grid{display:grid;grid-template-columns:1fr;gap:18px}
@media (min-width:768px){.news-grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1024px){.news-grid{grid-template-columns:repeat(3,1fr)}}
.ad-block{margin:28px 0}
.ad-block-main-1,.ad-block-main-2,.ad-block-inline{background:transparent;padding:0;border:0}

/* ========== NEWS CARD ========== */
.news-card {
border-radius: 16px;
overflow: hidden;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
background: var(--bg-card);
margin-bottom: 16px;
}
.news-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
.news-image-wrapper{
position:relative;
width:100%;
aspect-ratio: 16 / 9;
overflow:hidden;
background:var(--bg-secondary);
}
.news-image-link{position:absolute;inset:0;display:block}
.news-image{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.news-image-link:hover .news-image{transform:scale(1.05)}
.news-image-placeholder{
width:100%;height:100%;
display:grid;place-items:center;
font-size:48px;color:var(--text-tertiary);
}
/* UImages PRO picture support */
.news-image-wrapper picture{position:absolute;inset:0}
.news-image-wrapper picture img{width:100%;height:100%;object-fit:cover}
.news-category{
position:absolute;top:12px;left:12px;
padding:6px 12px;border-radius:999px;
background:rgba(0,122,255,.95);color:#fff;
font-size:12px;font-weight:800;
z-index:2;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.news-badge{
position:absolute;top:12px;right:12px;
padding:6px 12px;border-radius:999px;
background:rgba(255,59,48,.95);color:#fff;
font-size:12px;font-weight:800;
z-index:2;
}
.news-badge.video{background:rgba(0,122,255,.95)}
.news-body{padding:14px 16px;display:flex;flex-direction:column;gap:10px;flex:1}
.news-title{font-size:16px;font-weight:900;line-height:1.25;word-break:break-word}
.news-meta{display:flex;gap:12px;font-size:13px;color:var(--text-secondary)}
.news-excerpt{font-size:15px;color:var(--text-secondary);line-height:1.5;flex:1;word-break:break-word}
.news-actions{
display:flex;align-items:center;gap:8px;
padding-top:12px;
border-top:1px solid var(--border-color);
}
.action-btn{
display:inline-flex;align-items:center;gap:6px;
padding:8px 10px;border-radius:12px;
background:transparent;border:0;
color:var(--text-secondary);
font-size:14px;font-weight:800;
transition:background .2s ease, color .2s ease, transform .12s ease;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
max-width:120px;
}
.action-btn:hover{background:var(--bg-secondary);color:var(--text-primary)}
.action-btn:active{transform:scale(.96)}
.action-btn .icon{width:18px;height:18px}
.action-btn.share-btn{margin-left:auto}
/* Compact card */
.news-card.compact{
display:grid;
grid-template-columns:110px 1fr;
gap:12px;
padding:12px;
}
.news-card.compact .news-image-wrapper{aspect-ratio:auto;height:86px;border-radius:12px}
.news-card.compact .news-body{padding:0}
.news-card.compact .news-title{font-size:14px}
.news-card.compact .news-meta{font-size:12px}

/* ========== FULL STORY ========== */
.full-news{
background:var(--bg-card);
border-radius:var(--radius-lg);
box-shadow:var(--shadow-md);
padding:20px;
margin-bottom:20px;
max-width:900px;
margin-left:auto;
margin-right:auto;
}
.full-news-title{font-size:24px;font-weight:900;line-height:1.25;margin:12px 0;word-break:break-word}
@media (max-width:767px){.full-news-title{font-size:20px}}
.full-news-meta{display:flex;flex-wrap:wrap;gap:14px;font-size:14px;color:var(--text-secondary)}
.full-news-content{font-size:16px;line-height:1.7}
.full-news-content p{margin-bottom:14px}
.full-news-content a{color:var(--accent);text-decoration:underline}
.full-news-content img,
.full-news-content picture img{
width:100%;
border-radius:var(--radius);
margin:14px 0;
}
.full-news-content table{width:100%;display:block;overflow:auto}
.full-news-actions{
display:flex;gap:12px;
margin-top:22px;padding-top:18px;
border-top:1px solid var(--border-color);
}
@media (max-width:767px){.full-news-actions{flex-direction:column}}

/* ========== BUTTONS ========== */
.btn-primary {
background: var(--accent);
color: #fff;
padding: 14px 24px;
border-radius: 14px;
font-weight: 700;
font-size: 15px;
box-shadow: 0 4px 12px rgba(0,122,255,0.25);
transition: transform 0.12s ease, box-shadow 0.2s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.btn-primary:hover{background:var(--accent-dark)}
.btn-primary:active {
transform: scale(0.98);
box-shadow: 0 2px 6px rgba(0,122,255,0.15);
}
.btn-secondary{background:var(--bg-secondary);color:var(--text-primary)}
.btn-secondary:hover{background:var(--border-color)}
.btn-block{width:100%}

/* ========== PEOPLE (premium) ========== */
.people-section{
background:linear-gradient(135deg, rgba(0,122,255,.06), rgba(94,92,230,.06));
padding:18px;
border-radius:var(--radius-lg);
margin:32px 0;
}
.people-grid{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:14px;
align-items:stretch;
}
@media (min-width:768px){.people-grid{grid-template-columns:repeat(4,1fr)}}
.person-card{
background:var(--bg-card);
border-radius:var(--radius-lg);
overflow:hidden;
box-shadow:var(--shadow-md);
display:flex;flex-direction:column;
transition:transform .2s ease, box-shadow .2s ease;
}
.person-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg)}
.person-media{
position:relative;
display:block;
aspect-ratio:1/1;
background:var(--bg-secondary);
overflow:hidden;
}
.person-image{width:100%;height:100%;object-fit:cover;transform:scale(1.02);transition:transform .3s ease}
.person-card:hover .person-image{transform:scale(1.06)}
.person-image-placeholder{
width:100%;height:100%;
display:grid;place-items:center;
font-size:52px;
background:linear-gradient(135deg, rgba(0,122,255,.22), rgba(94,92,230,.22));
}
.person-badges{
position:absolute;left:12px;right:12px;bottom:12px;
display:flex;gap:8px;
}
.person-badge{
display:inline-flex;align-items:baseline;gap:8px;
padding:8px 10px;
border-radius:999px;
background:rgba(0,0,0,.55);
color:#fff;
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.person-badge-value{font-weight:900;font-size:14px;line-height:1}
.person-badge-label{font-size:12px;opacity:.85}
.person-info{padding:14px 14px 16px;display:flex;flex-direction:column;gap:6px;flex:1}
.person-name{font-size:15px;font-weight:900;line-height:1.25;word-break:break-word}
.person-subtitle{font-size:13px;color:var(--accent);font-weight:800;line-height:1.3}
.person-meta{font-size:12px;color:var(--text-secondary)}
.person-actions{
margin-top:auto;
display:grid;grid-template-columns:1fr 1fr;
gap:10px;
padding-top:12px;
border-top:1px solid var(--border-color);
}
.person-like-btn,.person-open-btn{
height:40px;border-radius:12px;
display:inline-flex;align-items:center;justify-content:center;gap:8px;
font-weight:900;font-size:13px;
border:1px solid var(--border-color);
background:var(--bg-secondary);
color:var(--text-primary);
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.person-like-btn{
background:rgba(255,59,48,.10);
border-color:rgba(255,59,48,.18);
color:var(--error);
}
.person-like-btn:hover{background:rgba(255,59,48,.14)}
.person-open-btn:hover{background:var(--border-color)}
.person-like-btn.loading{opacity:.6;pointer-events:none}


/* ========== PAGINATION ========== */
.pagination-wrapper{
width:100%;
display:flex;
justify-content:center;
padding:22px 0;
}
.pagination{
display:flex;
gap:6px;
flex-wrap:wrap;
justify-content:center;
}
.pagination a,
.pagination span{
min-width:36px;height:36px;
padding:0 10px;
border-radius:10px;
background:var(--bg-card);
color:var(--text-primary);
display:inline-flex;align-items:center;justify-content:center;
font-size:14px;font-weight:900;
transition:background .2s ease, color .2s ease;
}
.pagination a:hover{background:var(--accent);color:#fff}
.pagination .current{background:var(--accent);color:#fff}
.pagination .nav_ext{
background:transparent !important;
color:var(--text-secondary);
min-width:auto;
padding:0 4px;
}

/* ========== SYSTEM MESSAGE ========== */
.system-message{
padding:16px 18px;
border-radius:var(--radius);
margin:16px 0;
font-size:15px;
}
.system-message.info{background:rgba(0,122,255,.10);border-left:4px solid var(--accent)}
.system-message.error{background:rgba(255,59,48,.10);border-left:4px solid var(--error)}
.system-message.success{background:rgba(52,199,89,.10);border-left:4px solid var(--success)}

/* ========== AUTH / FORMS ========== */
.auth-page{
min-height:calc(100vh - 200px);
display:flex;align-items:center;justify-content:center;
padding:20px;
}
.auth-container{
width:100%;max-width:420px;
background:var(--bg-card);
border-radius:var(--radius-lg);
box-shadow:var(--shadow-md);
padding:28px;
}
.auth-container h1{font-size:26px;font-weight:900;margin-bottom:8px}
.auth-subtitle{color:var(--text-secondary);margin-bottom:18px}
.auth-form{display:flex;flex-direction:column;gap:14px}
.form-group{display:flex;flex-direction:column;gap:6px}
.form-group label{font-weight:900;font-size:13px}
.form-input{
padding:12px 14px;
border:1px solid var(--border-color);
border-radius:var(--radius);
background:var(--bg-card);
color:var(--text-primary);
outline:none;
}
.form-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(0,122,255,.12)}
.security-code{display:flex;gap:12px;align-items:center}
.security-code img{border-radius:var(--radius)}
.security-code a{color:var(--accent);font-weight:800;font-size:13px}
.auth-footer{
margin-top:18px;padding-top:18px;
border-top:1px solid var(--border-color);
text-align:center;
color:var(--text-secondary);
}

/* ========== MODAL ========== */
.modal{
display:none;
position:fixed;inset:0;
background:rgba(0,0,0,.5);
z-index:300;
align-items:center;justify-content:center;
padding:20px;
}
.modal.active{display:flex}
.modal-content{
width:100%;max-width:420px;
background:var(--bg-primary);
border-radius:var(--radius-lg);
overflow:auto;
max-height:90vh;
box-shadow:var(--shadow-lg);
}
.modal-header{
display:flex;align-items:center;justify-content:space-between;
padding:16px 18px;
border-bottom:1px solid var(--border-color);
}
.modal-header h2{font-size:18px;font-weight:900}
.modal-close{
width:34px;height:34px;border-radius:50%;
background:var(--bg-secondary);border:0;
display:flex;align-items:center;justify-content:center;
}
.modal-close:hover{background:var(--border-color)}
.modal-body{padding:18px}

/* ========== RELATED NEWS ========== */
.related-news{
margin-top:28px;
padding-top:24px;
border-top:1px solid var(--border-color);
max-width:900px;
margin-left:auto;margin-right:auto;
}
.related-news h3{font-size:18px;font-weight:900;margin-bottom:14px}
.related-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media (max-width:767px){.related-grid{grid-template-columns:1fr}}
.related-item{
background:var(--bg-secondary);
border-radius:var(--radius);
overflow:hidden;
transition:transform .2s ease, box-shadow .2s ease;
}
.related-item:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.related-image{width:100%;aspect-ratio:16/9;object-fit:cover}
.related-title{padding:10px;font-size:14px;font-weight:900;line-height:1.25;word-break:break-word}

/* ========== TOAST ========== */
.toast{
position:fixed;
bottom:calc(80px + var(--safe-bottom));
left:50%;
transform:translateX(-50%);
background:rgba(0,0,0,.82);
color:#fff;
padding:12px 16px;
border-radius:12px;
z-index:1000;
font-size:14px;
max-width:92%;
text-align:center;
word-break:break-word;
}

/* ========== ACCESSIBILITY & MOTION ========== */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Универсальная сетка: работает и когда карточки прямые дети .news-grid,
   и когда DLE оборачивает их в #dle-content */
.news-grid,
.news-grid > #dle-content {
display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width:768px){
  .news-grid,
  .news-grid > #dle-content { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (min-width:1024px){
  .news-grid,
  .news-grid > #dle-content { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
/* COMMENTS extras for DLE tags */
.comment-news-title{
  margin: 6px 0 10px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.3;
}
.comment-news-title a{ color: var(--accent); }

.comment-signature{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
}
.signature-sep{ opacity: .6; margin-bottom: 6px; }

.comment-ip{
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.question-box{
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.recaptcha-box{ overflow:auto; }
/* ===== DLE / jQuery UI Dialog (alerts, votes, errors) ===== */

/* затемнение фона (overlay) */
.ui-widget-overlay{
  background: rgba(0,0,0,.55) !important;
  opacity: 1 !important;
  position: fixed !important;
  inset: 0 !important;
}

/* само окно */
.ui-dialog.dle-popup-alert,
.ui-dialog.ui-widget{
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-primary) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* шапка */
.ui-dialog .ui-dialog-titlebar{
  position: relative !important;
  min-height: 44px !important;
  padding: 10px 44px 10px 14px !important; /* справа место под крестик */
}

.ui-dialog .ui-dialog-title{
  font-weight: 900 !important;
  font-size: 14px !important;
  color: var(--text-primary) !important;
}

/* крестик закрытия */
.ui-dialog .ui-dialog-titlebar-close{
  position: absolute !important;
  right: 10px !important;
  top: 10px !important;
  transform: none !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 10px !important;
}
.ui-dialog .ui-dialog-titlebar-close:hover{
  background: var(--border-color) !important;
}

/* прячем стандартную иконку ui-icon, делаем свою */
.ui-dialog .ui-dialog-titlebar-close .ui-icon{
  display: none !important;
}
.ui-dialog .ui-dialog-titlebar-close::before{
  content: "✕";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 900;
  color: var(--text-primary);
}

/* тело */
.ui-dialog .ui-dialog-content{
  padding: 14px !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* панель кнопок */
.ui-dialog .ui-dialog-buttonpane{
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--border-color) !important;
  margin: 0 !important;
  padding: 12px 14px !important;
}
.ui-dialog .ui-dialog-buttonset{
  float: none !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

/* кнопки */
.ui-dialog .ui-button{
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}
.ui-dialog .ui-button:hover{
  background: var(--border-color) !important;
}
.ui-dialog .ui-button .ui-button-text{
  padding: 0 !important;
}

/* на мобилках окно не должно вылезать за экран */
@media (max-width: 520px){
  .ui-dialog{
    width: calc(100% - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    top: 80px !important;
  }
}
/* ===== Profile logged buttons (compact) ===== */

.profile-logged .logged-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* делаем кнопки компактными именно в профиле */
.profile-logged .logged-actions .btn-primary,
.profile-logged .logged-actions .btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  width: auto;         /* важно: не растягивать */
  max-width: 100%;
}

/* если глобально где-то стоит btn-block или width:100% — перебиваем */
.profile-logged .logged-actions .btn-primary.btn-block,
.profile-logged .logged-actions .btn-secondary.btn-block{
  width: auto !important;
}

/* “Выйти” делаем заметнее и аккуратнее */
.profile-logged .logged-actions a[href*="logout"]{
  background: rgba(255,59,48,.10);
  border: 1px solid rgba(255,59,48,.25);
  color: var(--error);
}
.profile-logged .logged-actions a[href*="logout"]:hover{
  background: rgba(255,59,48,.15);
}
/* ===== Modern News Actions (premium, compact) ===== */
.news-actions--modern{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* базовая кнопка */
.na-btn{
  -webkit-tap-highlight-color: transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  height:38px;
  padding:0 12px;
  border-radius:999px;

  border:1px solid transparent;
  background: rgba(255,255,255,.06);              /* для тёмной темы мягко */
  color: var(--text-primary);

  font-weight: 800;
  font-size: 13px;
  line-height: 1;                                  /* фикс от “пляски” */
  letter-spacing: .2px;

  transition: background .15s ease, border-color .15s ease, transform .05s ease, opacity .15s ease;
  user-select:none;
  white-space:nowrap;
}

body.light-theme .na-btn{
  background: rgba(0,0,0,.04);
}

.na-btn:hover{
  background: rgba(255,255,255,.10);
}
body.light-theme .na-btn:hover{
  background: rgba(0,0,0,.06);
}
.na-btn:active{
  transform: translateY(1px);
}

/* иконка */
.na-ic{
  width:18px;
  height:18px;
  flex: 0 0 18px;
  opacity:.92;
}

/* текст у вторичных кнопок */
.na-text{
  position: relative;
  top: 0; /* на всякий — чтобы не уезжал baseline */
}

/* счётчик */
.na-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  background: rgba(255,255,255,.10);
  color: var(--text-primary);
}
body.light-theme .na-count{
  background: rgba(0,0,0,.06);
}

/* лайк/дизлайк — слегка “семантика”, но без детского зелёного/красного */
.na-btn--like{
  border-color: rgba(34,197,94,.18);
}
.na-btn--like:hover{
  background: rgba(34,197,94,.10);
}

.na-btn--dislike{
  padding: 0 12px; /* icon-only */
  border-color: rgba(255,59,48,.18);
}
.na-btn--dislike:hover{
  background: rgba(255,59,48,.08);
}

/* ghost (Подробнее/Поделиться) */
.na-btn--ghost{
  border-color: rgba(255,255,255,.08);
}
body.light-theme .na-btn--ghost{
  border-color: rgba(0,0,0,.08);
}

/* На маленьких экранах можно скрыть текст у “Поделиться”, оставив иконку */
@media (max-width: 380px){
  .na-btn--ghost .na-text{ display:none; }
  .na-btn{ padding: 0 10px; }
}

/* на очень узких экранах можно чуть уменьшить */
@media (max-width: 380px){
  .logo img{ height:30px; }
  .header-social__link{ width:32px; height:32px; }
  .header-social__link .icon{ width:17px; height:17px; }
}
/* ===== Header left layout ===== */
.header-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

/* Соцкнопки рядом с лого */
.header-social{
  display:flex;
  align-items:center;
  gap:8px;
}

/* Кнопки-соцсети не должны сжиматься/прятаться */
.header-social-btn{
  flex: 0 0 auto;
}

/* Важно: чтобы ссылки точно нажимались (часто перекрывает контейнер/лого) */
.header-content,
.header-left,
.logo,
.header-social,
.header-actions{
  position: relative;
  z-index: 2;
}

/* Если у header есть псевдоэлемент/оверлей — он может блокировать клики */
.top-header::before,
.top-header::after{
  pointer-events: none;
}

/* ===== SVG: универсальная совместимость ===== */
svg.icon, svg.na-ic{
  display:inline-block;
  vertical-align: middle;
}


/* Иногда темы задают .icon {fill:...} — перебиваем */
.icon use, .na-ic use{ pointer-events:none; }
.bottom-nav{
  padding-bottom: env(safe-area-inset-bottom);
}

.icon{ fill: currentColor; }

.top-header .header-btn .icon{
  width:20px;
  height:20px;
  fill: currentColor;
  stroke: none;
}
.top-header .header-btn .icon use[href^="#i-"],
.top-header .header-btn .icon use[xlink\\:href^="#i-"]{
}
.top-header .header-btn .icon:has(use[href^="#i-"]),
.top-header .header-btn .icon:has(use[xlink\\:href^="#i-"]){
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.15 !important;   /* тонко */
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  vector-effect: non-scaling-stroke;
  opacity: .92;
}
/* 1) Comments width same as article */
.full-news,
#commentsBlock.comments-section{
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* 2) Make DLE editor look modern */
.editorcomm--styled .bb-editor{
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.editorcomm--styled .bb-pane{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.editorcomm--styled .bb-btn{
  width:34px;
  height:34px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.editorcomm--styled textarea{
  width:100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
}
/* ========== SPEEDBAR / BREADCRUMBS ========== */
.speedbar{
  /* Занимает всю ширину grid, не ломая сетку */
  grid-column: 1 / -1;
  width: 100%;
  
  padding: 12px 4px 8px;
  margin-bottom: 16px;
  box-sizing: border-box;
  
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.speedbar::-webkit-scrollbar{
  display: none;
}

/* Контейнер Schema.org от DLE */
.speedbar span[itemtype="https://schema.org/BreadcrumbList"]{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
}

/* Ссылки — жирные, чёрные */
.speedbar a{
  color: var(--text-primary);
  font-weight: 800;
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.speedbar a:hover{
  color: var(--accent);
  background: rgba(0,122,255,.08);
}

/* Разделитель */
.speedbar span:not([itemprop]):not([itemscope]){
  color: var(--text-tertiary);
  opacity: .6;
  user-select: none;
}

/* Текущая страница */
.speedbar span[itemprop="name"]{
  color: var(--text-primary);
  font-weight: 700;
}

/* ВАЖНО: #dle-content должен быть выведен из grid или занимать всю ширину */
.news-grid > #dle-content{
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 768px){
  .news-grid > #dle-content{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px){
  .news-grid > #dle-content{
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Адаптив для speedbar */
@media (max-width: 380px){
  .speedbar{
    padding: 8px 2px 6px;
    font-size: 13px;
  }
}
.pagination-wrapper{
  grid-column: 1 / -1;
  width: 100%;
  padding: 22px 0;
  display: flex;
  justify-content: center;
}
.pagination{ display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
/* ========== FIX: Content under bottom nav ========== */
body{
  padding-bottom: calc(60px + var(--safe-bottom));
}

.main-content{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(80px + var(--safe-bottom)); /* Добавлен отступ снизу */
}

/* Desktop: убираем отступы и скрываем навигацию */
@media (min-width: 1024px){
  body{
    padding-bottom: 0;
  }
  
  .main-content{
    padding-bottom: 40px; /* Отступ на десктопе */
  }
  
  .bottom-nav{
    display: none;
  }
}

/* Убедимся что pagination видна */
.pagination-wrapper{
  padding-bottom: 20px;
}

@media (min-width: 1024px){
  .pagination-wrapper{
    padding-bottom: 40px;
  }
}
/* Placeholder фон для карточек новостей */
.news-image-wrapper{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-secondary);
  /* Легкий placeholder фон (градиент или SVG) */
  background-image: url("https://artemportal.ru/uploads/fon-news-artem.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Тёмная тема placeholder */
[data-theme="dark"] .news-image-wrapper{
  background-image: url("https://artemportal.ru/uploads/fon-news-artem.jpg");
}

/* Скрываем placeholder когда картинка загрузилась */
.news-image-wrapper.loaded{
  background-image: none;
}

/* Стили для news-image */
.news-image{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Скрыто пока не загрузится */
  transition: opacity 0.3s ease;
}

/* Показываем когда загрузилось */
.news-image.loaded,
.news-image:not(.img-fallback){
  opacity: 1;
}

/* Фолбэк иконка при ошибке */
.news-image.img-fallback{
  display: none;
}

/* Опционально: показываем иконку при ошибке */
.news-image-wrapper.has-error::after{
  content: "📷";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  opacity: 0.3;
}
/* ========== SEARCH PAGE  ========== */
.content-fullwidth{
width:100%;
max-width:100%;
}
.search-page-card{
background:var(--bg-card);
border-radius:var(--radius-lg);
box-shadow:var(--shadow-md);
padding:24px;
margin:0 auto;
max-width:900px;
width:100%;
}
/* На десктопе центрируем и делаем шире */
@media (min-width:1024px){
.search-page-card{
max-width:1000px;
padding:32px;
}
}
.search-page-header{
text-align:center;
margin-bottom:28px;
}
.search-icon-wrapper{
width:64px;
height:64px;
margin:0 auto 16px;
background:var(--bg-secondary);
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
}
.search-page-icon{
width:32px;
height:32px;
color:var(--accent);
}
.search-page-title{
font-size:26px;
font-weight:900;
margin-bottom:8px;
color:var(--text-primary);
}
.search-page-subtitle{
font-size:14px;
color:var(--text-secondary);
}

/* Переключатель режима поиска */
.search-mode-toggle{
display:flex;
gap:12px;
margin-bottom:24px;
background:var(--bg-secondary);
padding:6px;
border-radius:var(--radius);
}
.search-mode-btn{
flex:1;
display:flex;
align-items:center;
justify-content:center;
gap:8px;
padding:12px 16px;
border:0;
background:transparent;
color:var(--text-secondary);
font-weight:700;
font-size:14px;
border-radius:calc(var(--radius) - 4px);
cursor:pointer;
transition:all .2s ease;
min-height:44px;
}
.search-mode-btn:hover{
background:var(--bg-card);
color:var(--text-primary);
}
.search-mode-btn.active{
background:var(--bg-card);
color:var(--accent);
box-shadow:var(--shadow-sm);
}
.search-mode-btn .icon{
width:18px;
height:18px;
}

/* Секции формы */
.search-form-section{
animation:fadeIn .3s ease;
}
@keyframes fadeIn{
from{opacity:0;transform:translateY(10px);}
to{opacity:1;transform:translateY(0);}
}
.form-section{
background:var(--bg-secondary);
border-radius:var(--radius);
padding:16px;
margin-bottom:16px;
}
.form-section-header{
display:flex;
align-items:center;
gap:10px;
margin-bottom:14px;
padding-bottom:12px;
border-bottom:1px solid var(--border-color);
}
.section-icon{
width:20px;
height:20px;
color:var(--accent);
}
.section-title{
font-size:15px;
font-weight:800;
color:var(--text-primary);
margin:0;
}
.form-section-content{
display:flex;
flex-direction:column;
gap:14px;
}

/* Сетка для расширенного поиска */
.form-row{
display:grid;
grid-template-columns:1fr;
gap:16px;
margin-bottom:16px;
}
@media (min-width:768px){
.form-row{grid-template-columns:repeat(2,1fr);}
}
.form-col{
display:flex;
flex-direction:column;
gap:16px;
}

/* Поля ввода в поиске */
.search-field-wrapper{
display:flex;
gap:12px;
}
.search-field-wrapper .form-input,
.search-input-field{
flex:1;
padding:12px 14px;
border:1px solid var(--border-color);
border-radius:var(--radius);
background:var(--bg-card);
color:var(--text-primary);
font-size:15px;
outline:none;
min-height:44px;
}
.search-field-wrapper .form-input:focus,
.search-input-field:focus{
border-color:var(--accent);
box-shadow:0 0 0 3px rgba(0,122,255,.12);
}
.search-submit-btn{
display:flex;
align-items:center;
gap:8px;
padding:12px 20px;
white-space:nowrap;
min-height:44px;
}
.search-submit-btn .icon{
width:20px;
height:20px;
}

/* Подсказки */
.search-hint{
margin-top:16px;
padding:14px;
background:rgba(0,122,255,.06);
border-radius:var(--radius);
border-left:3px solid var(--accent);
}
.search-hint p{
margin:0;
font-size:13px;
color:var(--text-secondary);
}

/* Кнопки действий */
.search-actions{
display:flex;
flex-wrap:wrap;
gap:12px;
margin-top:24px;
padding-top:24px;
border-top:1px solid var(--border-color);
}
.search-actions .btn-primary,
.search-actions .btn-secondary{
display:flex;
align-items:center;
gap:8px;
}
.search-actions .icon{
width:18px;
height:18px;
}

/* Сообщение о результатах */
.search-result-message{
margin-top:24px;
padding:16px;
background:var(--bg-secondary);
border-radius:var(--radius);
display:flex;
align-items:center;
gap:12px;
}
.message-icon{
width:24px;
height:24px;
color:var(--accent);
flex-shrink:0;
}
.message-text{
font-size:14px;
color:var(--text-secondary);
margin:0;
}

/* Стили для DLE элементов формы поиска */
.searchtable fieldset{
border:0;
padding:0;
margin:0;
}
.searchtable legend{
display:none;
}
.searchtable select,
.searchtable input[type="text"],
.searchtable input[type="radio"],
.searchtable input[type="checkbox"]{
padding:10px 12px;
border:1px solid var(--border-color);
border-radius:var(--radius);
background:var(--bg-card);
color:var(--text-primary);
font-size:14px;
outline:none;
min-height:44px;
}
.searchtable select:focus,
.searchtable input[type="text"]:focus{
border-color:var(--accent);
box-shadow:0 0 0 3px rgba(0,122,255,.12);
}
.searchtable select{
width:100%;
min-height:44px;
}
.searchtable input[type="radio"],
.searchtable input[type="checkbox"]{
width:auto;
margin-right:8px;
min-height:auto;
}
.searchtable label{
font-size:14px;
color:var(--text-primary);
display:flex;
align-items:center;
gap:8px;
margin-bottom:8px;
}
.searchtable .form-hint{
font-size:12px;
color:var(--text-tertiary);
margin-top:4px;
}

/* Адаптив для мобильных */
@media (max-width:600px){
.search-page-card{padding:16px;}
.search-page-title{font-size:22px;}
.search-mode-toggle{flex-direction:column;}
.search-mode-btn{width:100%;}
.search-field-wrapper{flex-direction:column;}
.search-submit-btn{width:100%;justify-content:center;}
.search-actions{flex-direction:column;}
.search-actions .btn-primary,
.search-actions .btn-secondary{width:100%;justify-content:center;}
}

/* ========== РЕКЛАМНЫЙ БАННЕР  ========== */
.news-card-banner{
position:relative;
overflow:hidden;
border-radius:var(--radius-lg);
box-shadow:var(--shadow-md);
margin-bottom:16px;
background:var(--bg-card);
transition:transform .2s ease, box-shadow .2s ease;
aspect-ratio:4/5;
}
@media (min-width:768px){
.news-card-banner{aspect-ratio:16/20;}
}
.news-card-banner:hover{
transform:translateY(-2px);
box-shadow:var(--shadow-lg);
}
/* Ссылка на весь баннер */
.banner-link{
position:absolute;
inset:0;
z-index:50;
display:block;
}
/* Изображение баннера */
.news-card-banner .news-image-wrapper{
position:absolute;
inset:0;
width:100%;
height:100%;
overflow:hidden;
}
.news-card-banner .news-image{
width:100%;
height:100%;
object-fit:cover;
transition:transform .4s ease;
}
.news-card-banner:hover .news-image{
transform:scale(1.05);
}
/* Градиентный оверлей */
.banner-overlay{
position:absolute;
inset:0;
background:linear-gradient(
to bottom,
rgba(0,0,0,0.1) 0%,
rgba(0,0,0,0.2) 40%,
rgba(0,0,0,0.6) 100%
);
z-index:10;
pointer-events:none;
}
/* Контент поверх изображения */
.banner-overlay-content{
position:absolute;
inset:0;
z-index:20;
padding:16px;
display:flex;
flex-direction:column;
gap:10px;
pointer-events:none;
}
/* Пузыри с текстом */
.banner-title-bubble,
.banner-price-bubble,
.banner-phone-bubble,
.banner-delivery-bubble,
.banner-note-bubble{
background:rgba(255,255,255,0.95);
color:#000;
padding:10px 14px;
border-radius:12px;
font-weight:800;
font-size:15px;
line-height:1.3;
box-shadow:0 4px 12px rgba(0,0,0,0.15);
max-width:90%;
align-self:flex-start;
backdrop-filter:blur(10px);
-webkit-backdrop-filter:blur(10px);
}
.banner-title-bubble{
font-size:18px;
font-weight:900;
}
.banner-price-bubble{
background:rgba(255,255,255,0.98);
font-size:16px;
}
.banner-phone-bubble{
background:rgba(0,0,0,0.75);
color:#fff;
align-self:flex-end;
text-align:right;
}
.banner-phone-bubble .bubble-label{
display:block;
font-size:11px;
font-weight:700;
opacity:0.9;
margin-bottom:4px;
}
.banner-phone-bubble .bubble-text{
display:block;
font-size:16px;
font-weight:900;
}
.banner-delivery-bubble{
background:rgba(255,255,255,0.9);
font-size:13px;
font-weight:700;
align-self:flex-end;
text-align:right;
}
.banner-note-bubble{
background:rgba(255,255,255,0.85);
font-size:12px;
font-weight:700;
align-self:flex-start;
}
/* Рекламный дисклеймер (внизу) */
.banner-disclaimer{
position:absolute;
bottom:16px;
left:16px;
right:16px;
z-index:30;
display:flex;
flex-wrap:wrap;
gap:8px;
pointer-events:none;
}
.erid-badge,
.company-badge{
background:rgba(0,0,0,0.6);
color:rgba(255,255,255,0.9);
padding:6px 12px;
border-radius:999px;
font-size:11px;
font-weight:700;
backdrop-filter:blur(10px);
-webkit-backdrop-filter:blur(10px);
}
/* Бейдж "Реклама" */
.banner-ad-badge{
position:absolute;
top:16px;
right:16px;
z-index:40;
display:inline-flex;
align-items:center;
gap:6px;
padding:8px 14px;
background:rgba(255,193,7,0.95);
color:#000;
border-radius:999px;
font-size:12px;
font-weight:900;
text-transform:uppercase;
letter-spacing:.04em;
pointer-events:none;
backdrop-filter:blur(10px);
-webkit-backdrop-filter:blur(10px);
}
.banner-ad-badge .icon{
width:16px;
height:16px;
}
/* Адаптив для мобильных */
@media (max-width:767px){
.news-card-banner{
margin-left:-16px;
margin-right:-16px;
border-radius:0;
aspect-ratio:4/5;
}
.banner-overlay-content{
padding:12px;
gap:8px;
}
.banner-title-bubble{
font-size:16px;
padding:8px 12px;
}
.banner-price-bubble{
font-size:14px;
padding:8px 12px;
}
.banner-phone-bubble .bubble-text{
font-size:14px;
}
.erid-badge,
.company-badge{
font-size:10px;
padding:4px 10px;
}
.banner-ad-badge{
top:12px;
right:12px;
padding:6px 12px;
font-size:11px;
}
}
/* Адаптив для десктопа */
@media (min-width:1024px){
.banner-title-bubble{
font-size:20px;
padding:12px 16px;
}
.banner-price-bubble{
font-size:18px;
padding:10px 14px;
}
}
/* ========== AD BLOCK LIMITS ========== */
.ad-block{
  margin: 28px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-block-main-1,
.ad-block-main-2,
.ad-block-inline{
  background: transparent;
  padding: 0;
  border: 0;
  max-width: 100%;
  overflow: hidden;
}

/* Ограничение контейнера рекламы */
#ad-block-main-1,
#ad-block-main-2,
#ad-block-inline,
[id^="yandex_rtb_"]{
  max-width: 728px;
  max-height: 180px;
  margin: 0 auto;
  display: block;
  overflow: hidden;
}

/* Мобильная версия: 320×50 или 320×100 */
@media (max-width: 767px){
  .ad-block{
    margin: 20px 0;
  }
  
  #ad-block-main-1,
  #ad-block-main-2,
  #ad-block-inline,
  [id^="yandex_rtb_"]{
    max-width: 320px;
    max-height: 200px;
  }
  
  /* Для очень узких экранов (iPhone SE и т.п.) */
  @media (max-width: 360px){
    [id^="yandex_rtb_"]{
      max-width: 300px;
      max-height: 200px;
    }
  }
}

/* Планшет: 300×250 */
@media (min-width: 768px) and (max-width: 1023px){
  #ad-block-main-1,
  #ad-block-main-2,
  #ad-block-inline,
  [id^="yandex_rtb_"]{
    max-width: 300px;
    max-height: 250px;
  }
}

/* Десктоп: 728×90 */
@media (min-width: 1024px){
  #ad-block-main-1,
  #ad-block-main-2,
  #ad-block-inline,
  [id^="yandex_rtb_"]{
    max-width: 728px;
    max-height: 180px;
  }
}

/* Если Яндекс рендерит iframe больше контейнера */
[id^="yandex_rtb_"] iframe{
  max-width: 100% !important;
  max-height: 100% !important;
}
/* Тёмная тема: рамка для видимости блока */
[data-theme="dark"] .ad-block{
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 8px;
}
/* Адаптация VK комментариев под темную тему */
[data-theme="dark"] .vk-comments-container,
[data-theme="dark"] #vk_comments,
[data-theme="dark"] .vk_widget_comments {
  filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9);
}

/* Исправление для изображений (чтобы не инвертировались) */
[data-theme="dark"] .vk-comments-container img,
[data-theme="dark"] #vk_comments img,
[data-theme="dark"] .vk_widget_comments img {
  filter: invert(1) hue-rotate(180deg);
}

/* Исправление для аватарок */
[data-theme="dark"] .vk-comments-container .vk_avatar,
[data-theme="dark"] #vk_comments .vk_avatar {
  filter: invert(1) hue-rotate(180deg);
}
/* ========== BUS SCHEDULE (внутри новости) ========== */
.full-news-content .bus-schedule{
  margin: 20px 0;
}

.full-news-content .bus-schedule h1,
.full-news-content .bus-schedule h2{
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  margin: 24px 0 12px;
  line-height: 1.3;
}

.full-news-content .bus-schedule h1{
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.full-news-content .bus-schedule p{
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 12px 0;
}

.full-news-content .bus-schedule strong{
  color: var(--text-primary);
  font-weight: 800;
}

/* Карточка с контактами */
.full-news-content .schedule-contacts{
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px 0;
  border-left: 4px solid var(--warning);
}

.full-news-content .schedule-contacts p{
  margin: 0 0 12px;
  font-size: 14px;
}

.full-news-content .schedule-contacts ul{
  list-style: none;
  padding: 0;
  margin: 0;
}

.full-news-content .schedule-contacts li{
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  line-height: 1.5;
}

.full-news-content .schedule-contacts li:last-child{
  border-bottom: none;
}

.full-news-content .schedule-contacts a{
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  padding: 4px 8px;
  background: rgba(0,122,255,.08);
  border-radius: 8px;
  display: inline-block;
  margin: 2px;
  transition: background .2s ease;
}

.full-news-content .schedule-contacts a:hover{
  background: rgba(0,122,255,.15);
}

/* Расписание рейсов */
.full-news-content .schedule-route{
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 16px 0;
}

.full-news-content .schedule-route h3{
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.full-news-content .schedule-time-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.full-news-content .schedule-time-list li{
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  font-family: 'Inter', monospace;
  border: 1px solid var(--border-color);
  min-width: 60px;
  text-align: center;
}

/* Предупреждения */
.full-news-content .schedule-warning{
  background: rgba(255,59,48,.08);
  border-left: 4px solid var(--error);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.full-news-content .schedule-warning strong{
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Советы */
.full-news-content .schedule-tip{
  background: rgba(52,199,89,.08);
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.full-news-content .schedule-tip strong{
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* Мобильная адаптация */
@media (max-width: 480px){
  .full-news-content .schedule-time-list li{
    min-width: 55px;
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .full-news-content .bus-schedule h1{
    font-size: 18px;
  }
  
  .full-news-content .schedule-contacts a{
    display: block;
    margin: 4px 0;
    text-align: center;
  }
}

/* Тёмная тема */
[data-theme="dark"] .full-news-content .schedule-contacts{
  background: rgba(255,149,0,.08);
}

[data-theme="dark"] .full-news-content .schedule-warning{
  background: rgba(255,59,48,.12);
}

[data-theme="dark"] .full-news-content .schedule-tip{
  background: rgba(52,199,89,.12);
}