/* === Стиль в духе pravda.com.ua === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --blue: #1a5fb4;
    --blue-dark: #124d94;
    --black: #111111;
    --text: #222222;
    --gray: #666666;
    --gray-light: #999999;
    --border: #e0e0e0;
    --bg: #ffffff;
    --bg-gray: #f5f5f5;
  /* Montserrat ≈ Proxima Nova (шрифт Правды), PT Serif — для текстов статей */
    --font-sans: 'Montserrat', Arial, Helvetica, sans-serif;
    --font-serif: 'PT Serif', Georgia, 'Times New Roman', serif;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--black);
    text-decoration: none;
}

a:hover {
    color: var(--blue);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

/* === Шапка === */
.site-header {
    background: var(--bg);
    border-bottom: 3px solid var(--blue);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-top {
    border-bottom: 1px solid var(--border);
}

.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--blue);
}

.logo-img {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    display: flex;
    border: 1px solid var(--border);
}

.header-search input {
    border: none;
    padding: 6px 10px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    width: 160px;
    outline: none;
}

.header-search button {
    border: none;
    border-left: 1px solid var(--border);
    background: var(--bg-gray);
    padding: 6px 12px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: var(--black);
}

.header-search button:hover {
    background: var(--blue);
    color: #fff;
}

.header-ads {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.header-ads:hover {
    color: var(--blue-dark);
}

.header-rss,
.header-admin {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.04em;
}

.header-rss:hover,
.header-admin:hover {
    color: var(--blue);
}

/* Рубрики */
.category-nav {
    background: var(--bg);
}

.category-nav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.cat-link {
    display: inline-block;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
}

.cat-link:hover,
.cat-link:focus,
.cat-link:active,
.cat-link:visited {
    text-decoration: none;
    color: var(--blue);
}

.cat-link.active,
.cat-link.active:hover,
.cat-link.active:focus,
.cat-link.active:active,
.cat-link.active:visited {
    color: var(--blue);
    background: var(--bg-gray);
}

/* === Макет === */
.page-main {
    flex: 1;
    padding: 20px 0 40px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

.content-col {
    min-width: 0;
}

/* === Главная новость === */
.featured-section {
    margin-bottom: 28px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--black);
}

.featured-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.featured-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.featured-block-secondary .featured-image {
    max-height: 320px;
}

.featured-title-secondary {
    font-size: 24px;
}

.featured-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.featured-link:hover .featured-title {
    color: var(--blue);
}

.featured-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.featured-title {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--black);
    margin: 0 0 12px;
    letter-spacing: -0.03em;
    transition: color 0.15s;
}

.featured-lead {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.55;
    color: var(--gray);
    margin: 0;
}

.featured-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: 4px;
    background: var(--bg-gray);
}

.article-image {
    margin: 0 0 24px;
}

.article-photo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-gray);
}

.image-preview {
    margin-bottom: 8px;
}

.image-preview img {
    display: block;
    max-width: 320px;
    max-height: 200px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.form-hint {
    margin: -6px 0 8px;
    font-size: 12px;
    color: var(--gray);
}

.admin-thumb {
    width: 56px;
    padding: 8px !important;
}

.admin-thumb img {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.no-thumb {
    color: var(--gray-light);
    font-size: 12px;
}

/* === Главное сегодня === */
.headlines-block {
    margin-bottom: 28px;
}

.block-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--black);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue);
    letter-spacing: 0.04em;
}

.headlines-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.headlines-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.headlines-list li:last-child {
    border-bottom: none;
}

.headlines-list a {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--black);
}

.headlines-list a:hover {
    color: var(--blue);
}

/* === Лента новостей (как на Правде) === */
.latest-block {
    margin-bottom: 24px;
}

.news-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-feed-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}

.news-feed-item:last-child {
    border-bottom: none;
}

.news-time {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.news-sep {
    color: var(--gray-light);
    flex-shrink: 0;
}

.news-rubric {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    flex-shrink: 0;
}

.news-rubric:hover {
    color: var(--blue);
}

.news-headline {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--black);
    flex: 1;
    min-width: 200px;
}

.news-headline:hover {
    color: var(--blue);
}

/* === Секции === */
.section-head {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--blue);
}

.section-title {
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--black);
}

.section-meta {
    margin: 0;
    font-size: 13px;
    color: var(--gray);
}

.section-meta a {
    color: var(--blue);
    font-weight: 700;
}

/* === Сайдбар === */
.sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-box {
    background: var(--bg-gray);
    padding: 16px;
    margin-bottom: 16px;
    border-top: 3px solid var(--blue);
}

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
    color: var(--black);
}

.sidebar-cats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-cats li {
    border-bottom: 1px solid var(--border);
}

.sidebar-cats li:last-child {
    border-bottom: none;
}

.sidebar-cats a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
}

.sidebar-cats a:hover,
.sidebar-cats a.active {
    color: var(--blue);
    font-weight: 700;
}

.sidebar-popular {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-popular li {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

.sidebar-popular li:last-child {
    border-bottom: none;
}

.pop-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1;
    min-width: 20px;
}

.sidebar-popular a {
    font-size: 13px;
    line-height: 1.4;
    color: var(--black);
}

.sidebar-popular a:hover {
    color: var(--blue);
}

.sidebar-latest {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-latest li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-latest li:last-child {
    border-bottom: none;
}

.sidebar-latest time {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray);
    margin-bottom: 2px;
}

.sidebar-latest a {
    font-size: 13px;
    line-height: 1.4;
    color: var(--black);
}

.sidebar-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
}

/* === Статья === */
.layout-article {
    grid-template-columns: 1fr 260px;
}

.article-col {
    max-width: 720px;
}

.article-rubric {
    margin-bottom: 8px;
}

.article-rubric a {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue);
    letter-spacing: 0.06em;
}

.article-title {
    font-family: var(--font-sans);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--black);
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.article-meta {
    font-size: 13px;
    color: var(--gray);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.article-body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
}

.article-body p {
    margin: 0 0 1em;
}

.article-source {
    margin-top: 24px;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray);
}

.article-source a {
    color: var(--blue);
    text-decoration: none;
}

.article-source a:hover {
    text-decoration: underline;
}

.share-bar {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 2px solid var(--border);
    font-size: 13px;
    color: var(--gray);
}

.share-bar span {
    font-weight: 700;
    margin-right: 8px;
}

.share-bar a {
    display: inline-block;
    margin-right: 12px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* === Пагинация === */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.pagination a {
    padding: 6px 12px;
    border: 1px solid var(--border);
    color: var(--black);
    font-weight: 700;
}

.pagination a:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.pagination-current {
    padding: 6px 12px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}

/* === Кнопки === */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--blue-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
}

.btn-outline:hover {
    background: var(--blue);
    color: #fff;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-danger {
    background: #333;
}

.btn-danger:hover {
    background: var(--blue);
}

/* === Пустое состояние === */
.empty-state {
    padding: 40px 0;
    text-align: center;
    color: var(--gray);
}

.empty-state h1 {
    font-size: 22px;
    color: var(--black);
}

/* === Админка === */
.admin-shell {
    background: #f4f6f9;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-brand {
    padding: 20px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.admin-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--black);
}

.admin-sidebar-logo img {
    flex-shrink: 0;
    border-radius: 6px;
}

.admin-menu {
    flex: 1;
    padding: 12px 10px;
}

.admin-menu-group {
    margin-bottom: 18px;
}

.admin-menu-group-title {
    margin: 0 0 6px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray);
}

.admin-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    transition: background 0.15s, color 0.15s;
}

.admin-menu-link:hover {
    background: #eef4fc;
    color: var(--blue);
}

.admin-menu-link.active {
    background: var(--blue);
    color: #fff;
}

.admin-menu-link.active .admin-menu-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.admin-menu-badge {
    min-width: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e8f0fb;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.admin-menu-link-muted {
    font-weight: 500;
    color: var(--gray);
}

.admin-menu-link-muted:hover {
    color: var(--blue);
}

.admin-sidebar-footer {
    padding: 12px 10px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-content {
    padding: 24px 28px 40px;
    max-width: 1100px;
}

.admin-content-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--blue);
}

.admin-content-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--black);
}

.admin-section[id] {
    scroll-margin-top: 20px;
}

.admin-page h1,
.admin-page h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--blue);
}

.admin-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.admin-section-header h2 {
    margin: 0;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 640px;
}

.admin-form label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 8px 10px;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 14px;
    width: 100%;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--blue);
}

.admin-form button[type="submit"] {
    width: fit-content;
    padding: 10px 24px;
    background: var(--blue);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
}

.admin-form button[type="submit"]:hover {
    background: var(--blue-dark);
}

.admin-search {
    display: flex;
    gap: 6px;
}

.admin-search input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    font-size: 13px;
}

.admin-search button {
    padding: 6px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table td.actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.message {
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
    border-left: 4px solid;
}

.message-success {
    background: #f0faf0;
    border-color: #2e7d32;
    color: #2e7d32;
}

.message-error {
    background: #fff5f5;
    border-color: var(--blue);
    color: var(--blue);
}

/* === Вход === */
.login-page .page-main,
.login-page main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--blue);
    padding: 40px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.login-logo {
    margin: 0 auto 16px;
    border-radius: 4px;
}

.login-card h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Admin uses old main.container - override */
main.container,
.login-page main.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* === Подвал === */
.site-footer {
    background: var(--black);
    color: rgba(255, 255, 255, 0.6);
    padding: 24px 0;
    margin-top: auto;
    font-size: 12px;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
}

.footer-logo:hover {
    color: #fff;
    opacity: 0.85;
}

.footer-nav {
    display: flex;
    gap: 16px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-contact {
    margin: 0 0 8px;
    font-size: 13px;
    color: #fff;
}

.footer-contact a {
    color: #fff;
}

.footer-contact a:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.footer-copy {
    margin: 0;
    font-size: 11px;
}

/* === Адаптив === */
@media (max-width: 900px) {
    .layout,
    .layout-article {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .featured-title {
        font-size: 26px;
    }

    .article-title {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .header-top-inner {
        flex-wrap: wrap;
        padding: 10px 0;
        min-height: auto;
    }

    .header-search input {
        width: 120px;
    }

    .logo-name {
        font-size: 15px;
    }

    .logo-tagline {
        display: none;
    }

    .logo-img {
        width: 100px;
        height: 100px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .featured-title {
        font-size: 22px;
    }

    .headlines-list a {
        font-size: 15px;
    }

    .news-feed-item {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .news-sep {
        display: none;
    }

    .news-rubric::after {
        content: ' ·';
    }

    .article-title {
        font-size: 22px;
    }

    .article-body {
        font-size: 16px;
    }
}

/* === Объявления === */
.ads-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.ads-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--gray);
}

.ads-breadcrumb a {
    color: var(--blue);
    font-weight: 600;
}

.ads-breadcrumb a:hover {
    text-decoration: underline;
}

.ads-breadcrumb-current {
    color: var(--black);
    font-weight: 700;
}

.ads-breadcrumb-sep {
    color: var(--gray-light);
}

.article-col .ads-breadcrumb {
    margin-bottom: 12px;
}

.article-col .ads-breadcrumb + .article-meta {
    margin-top: 0;
}

.ads-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 20px;
}

.ads-search {
    display: flex;
    flex: 1 1 240px;
    border: 1px solid var(--border);
}

.ads-search input {
    flex: 1;
    border: none;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
}

.ads-search button {
    border: none;
    border-left: 1px solid var(--border);
    background: var(--bg-gray);
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.ads-search button:hover {
    background: var(--blue);
    color: #fff;
}

.ads-cat-jump {
    flex: 0 1 280px;
    margin: 0;
}

.ads-cat-select {
    width: 100%;
    height: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 14px;
    background: var(--bg);
    cursor: pointer;
}

.ads-cat-select:focus {
    outline: none;
    border-color: var(--blue);
}

.ads-subnav {
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
}

.ads-subnav-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
}

.ads-subnav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ads-subnav-link {
    display: inline-block;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    background: var(--bg);
    border: 1px solid var(--border);
}

.ads-subnav-link:hover,
.ads-subnav-link.active {
    color: var(--blue);
    border-color: var(--blue);
    background: #fff;
}

.ads-cat-roots {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ads-cat-root {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    border-bottom: 1px solid var(--border);
}

.ads-cat-root:hover,
.ads-cat-root.active {
    color: var(--blue);
    background: var(--bg-gray);
}

.ads-cat-roots li:last-child .ads-cat-root {
    border-bottom: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ads-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ads-list-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.ads-list-item:first-child {
    border-top: 1px solid var(--border);
}

.ads-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 6px;
    font-size: 12px;
    color: var(--gray);
}

.ads-list-cat {
    color: var(--blue);
    font-weight: 600;
}

.ads-number {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ads-up-arrow {
    display: inline-block;
    width: auto;
    height: 0.95em;
    vertical-align: -0.1em;
}

.ads-bump-label {
    margin-left: 4px;
}

.ads-bump-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.ads-bump-link:hover {
    color: var(--blue);
}

.ads-bump-link:hover .ads-up-arrow {
    opacity: 0.85;
}

.ads-list-item-pinned {
    background: #fff9c4;
    border: 2px solid #c62828;
    border-radius: 4px;
    margin-bottom: 8px;
    padding: 16px;
}

.ads-list-item-pinned + .ads-list-item {
    border-top: none;
}

.ad-bump-price-box {
    margin: 0 0 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-gray);
}

.ad-bump-price-label {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--gray);
}

.ad-bump-price-value {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
}

.ad-bump-price-note,
.ad-bump-active {
    margin: 0;
    font-size: 14px;
    color: var(--gray);
}

.ad-bump-active {
    margin-bottom: 16px;
    color: #2e7d32;
}

.ad-bump-ad {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.ad-bump-ad-preview-pinned {
    background: #fff9c4;
    border: 2px solid #c62828;
}

.ad-bump-pay-title {
    margin: 0 0 8px;
    font-size: 20px;
}

.ad-bump-form {
    display: grid;
    gap: 12px;
    max-width: 360px;
    margin-top: 16px;
}

.ad-bump-form label {
    font-size: 14px;
    font-weight: 600;
}

.ad-bump-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
}

.ads-list-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.ads-list-text a:hover {
    color: var(--blue);
}

.ads-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.ads-gallery-item {
    margin: 0;
}

.ads-gallery-photo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
}

.ads-list-thumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.ads-list-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-gray);
}

.ads-list-thumbs-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

.ad-images-admin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.ad-images-admin-item {
    width: 120px;
}

.ad-images-admin-item img {
    display: block;
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 6px;
}

.form-label {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.ads-body {
    font-size: 18px;
    line-height: 1.6;
}

.ads-contacts {
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-gray);
    border-left: 3px solid var(--blue);
}

.ads-contacts-title {
    margin: 0 0 10px;
    font-size: 16px;
}

.ads-form {
    max-width: 640px;
}

.admin-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-tabs a {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--border);
    color: var(--black);
}

.admin-tabs a.active,
.admin-tabs a:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.admin-tabs-inline {
    margin-bottom: 0;
}

.admin-cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-cat-row {
    margin-bottom: 8px;
}

.admin-cat-row input[type="text"] {
    min-width: 220px;
}

.admin-ad-excerpt {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .admin-menu {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .admin-menu-group {
        flex: 0 0 auto;
        margin-bottom: 0;
        min-width: 170px;
    }

    .admin-sidebar-footer {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-content {
        padding: 16px;
    }
}

@media (max-width: 900px) {
    .ads-sidebar {
        order: -1;
    }

    .ads-page .layout {
        display: flex;
        flex-direction: column;
    }

    .ads-cat-jump {
        flex: 1 1 100%;
    }
}
