:root {
    --pub-bg: #fff8f2;
    --pub-card: #ffffff;
    --pub-text: #30251f;
    --pub-muted: #81746b;
    --pub-accent: #f07824;
    --pub-accent-hover: #e96512;
    --pub-accent-light: #fff0e2;
    --pub-border: #f0dfd1;
    --pub-dark: #2d211b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--pub-bg);
    color: var(--pub-text);
    font-family: Inter, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================
   ШАПКА
   ========================================= */

.site-header {
    background: #ffffff;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 5%;
    background: #fff0e2;
    font-size: 13px;
}

.top-bar-right {
    display: flex;
    gap: 18px;
}

.top-bar a:hover,
.menu a:hover {
    color: var(--pub-accent-hover);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 22px 5%;
}

.logo {
    flex-shrink: 0;
    font-family: Georgia, serif;
    font-size: 25px;
    font-weight: 600;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12px;
    letter-spacing: .04em;
}

/* Оранжевая промополоса */

.promo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 5%;
    background: linear-gradient(100deg, #ed6b16, #ff922e);
    color: #ffffff;
    font-size: 13px;
}

.promo-shop-btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 5px;
    color: #ffffff;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.promo-shop-btn:hover {
    background: #ffffff;
    color: var(--pub-accent-hover);
}

/* =========================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================= */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px 6%;
    color: var(--pub-muted);
    font-size: 13px;
}

.breadcrumbs a {
    transition: color .2s;
}

.breadcrumbs a:hover {
    color: var(--pub-accent-hover);
}

/* =========================================
   ЗАГОЛОВОК СТРАНИЦЫ
   ========================================= */

.publications-page {
    width: min(1240px, 92%);
    min-height: 60vh;
    margin: 0 auto;
    padding: 20px 0 80px;
}

.publications-heading {
    max-width: 760px;
    margin: 0 auto 38px;
    text-align: center;
}

.eyebrow {
    color: var(--pub-accent-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.publications-heading h1 {
    margin: 10px 0;
    font-family: Georgia, serif;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 500;
}

.publications-heading > p:last-child {
    color: var(--pub-muted);
    line-height: 1.7;
}

/* =========================================
   ПОИСК
   ========================================= */

.publication-search {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 18px 0;
    background: var(--pub-bg);
}

.publication-search label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
}

.search-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 16px;
    border: 1px solid var(--pub-border);
    border-radius: 10px;
    background: #ffffff;
    transition: border-color .2s, box-shadow .2s;
}

.search-control:focus-within {
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(240, 120, 36, .13);
}

.search-control > span {
    color: var(--pub-accent);
    font-size: 28px;
}

.search-control input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--pub-text);
    font: inherit;
    font-size: 14px;
}

.search-control button {
    border: 0;
    background: transparent;
    color: var(--pub-accent-hover);
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s;
}

.search-control button:hover {
    color: #bf4d08;
}

.search-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--pub-muted);
    font-size: 12px;
}

/* =========================================
   СЕТКА КАРТОЧЕК
   ========================================= */

.publication-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin-top: 20px;
}

.publication-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    background: var(--pub-card);
    transition: transform .22s, box-shadow .22s, border-color .22s;
}

.publication-card:hover {
    transform: translateY(-4px);
    border-color: #f4c39e;
    box-shadow: 0 12px 32px rgba(183, 89, 25, .12);
}

.publication-card-link {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.publication-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #ffead8;
}

.publication-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.publication-card:hover .publication-card-image img {
    transform: scale(1.035);
}

.publication-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--pub-accent-hover);
    font-family: Georgia, serif;
    font-size: 22px;
}

/* Метка рекомендуемой публикации */

.publication-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 5px;
    background: linear-gradient(100deg, #ed6b16, #ff922e);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(183, 89, 25, .15);
}

/* Содержимое карточки */

.publication-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.publication-product {
    margin-bottom: 8px;
    color: var(--pub-accent-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.publication-card h2 {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 500;
    line-height: 1.3;
    transition: color .2s;
}

.publication-card:hover h2 {
    color: var(--pub-accent-hover);
}

.publication-card-subtitle {
    margin: 0;
    color: var(--pub-muted);
    font-size: 13px;
    line-height: 1.7;
}

/* Нижняя часть карточки */

.publication-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 0 20px 20px;
}

.publication-views {
    color: var(--pub-muted);
    font-size: 12px;
}

.publication-read {
    color: var(--pub-accent-hover);
    font-size: 13px;
    font-weight: 600;
    transition: color .2s;
}

.publication-card:hover .publication-read {
    color: #bf4d08;
    text-decoration: underline;
}

/* =========================================
   ПУСТОЕ СОСТОЯНИЕ И ОШИБКИ
   ========================================= */

.empty-state,
.error-state {
    padding: 55px 20px;
    text-align: center;
}

.empty-state h2 {
    font-family: Georgia, serif;
    font-weight: 500;
}

.empty-state p {
    color: var(--pub-muted);
    font-size: 14px;
    line-height: 1.7;
}

.empty-icon {
    color: var(--pub-accent);
    font-size: 40px;
}

.error-state button {
    display: block;
    margin: 18px auto 0;
    padding: 12px 20px;
    border: 0;
    border-radius: 6px;
    background: var(--pub-accent);
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.error-state button:hover {
    background: var(--pub-accent-hover);
    transform: translateY(-1px);
}

/* =========================================
   ФУТЕР
   ========================================= */

.footer {
    padding: 40px 5%;
    background: var(--pub-dark);
    color: #fff0e2;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    max-width: 1240px;
    margin: 0 auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.footer-column h3,
.footer-column h4 {
    margin: 0 0 8px;
    color: #ffffff;
}

.footer-column p {
    margin: 0;
    line-height: 1.7;
}

.footer-column a {
    transition: color .2s;
}

.footer-column a:hover {
    color: #ff922e;
}

/* =========================================
   ПЛАНШЕТЫ
   ========================================= */

@media (max-width: 950px) {
    .publication-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .main-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .menu {
        justify-content: flex-start;
    }
}

/* =========================================
   ТЕЛЕФОНЫ
   ========================================= */

@media (max-width: 600px) {
    .top-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .top-bar-right {
        flex-wrap: wrap;
        gap: 12px;
    }

    .main-nav {
        padding: 18px 5%;
    }

    .logo {
        font-size: 22px;
    }

    .menu {
        gap: 12px;
        font-size: 11px;
    }

    .promo-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        font-size: 12px;
    }

    .breadcrumbs {
        padding: 18px 5%;
    }

    .publications-page {
        width: 92%;
        padding-top: 8px;
    }

    .publications-heading {
        margin-bottom: 22px;
    }

    .publication-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .publication-card-image {
        aspect-ratio: 5 / 3;
    }

    .publication-card h2 {
        font-size: 22px;
    }

    .search-control {
        min-height: 52px;
        padding: 0 12px;
    }

    .search-control input {
        font-size: 13px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}


/* =========================================
   ANNACOS PREMIUM COLLECTION
   КАТЕГОРИИ ПУБЛИКАЦИЙ
   DESKTOP + TABLET + MOBILE
========================================= */

/* Контейнер всех категорий */

#publicationCategories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;

    gap: 12px;

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

    margin: 25px auto 35px;
    padding: 0 20px;

    box-sizing: border-box;
}


/* =========================================
   КНОПКИ КАТЕГОРИЙ — DESKTOP
========================================= */

#publicationCategories button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 11px 20px;

    background: #ffffff;
    color: #222222;

    border: 1px solid #dedede;
    border-radius: 30px;

    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.2px;

    text-align: center;
    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


/* Наведение мышью */

@media (hover: hover) {

    #publicationCategories button:hover {
        background: #fff3e8;
        border-color: #ff7b00;
        color: #000000;

        transform: translateY(-2px);

        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    }

}


/* =========================================
   АКТИВНАЯ КАТЕГОРИЯ
========================================= */

#publicationCategories button.active,
#publicationCategories button.active:hover {
    background: #ff7b00;
    color: #000000;

    border-color: #ff7b00;

    font-weight: 700;
    transform: none;

    box-shadow: 0 3px 10px rgba(255, 123, 0, 0.18);
}


/* Доступность при управлении клавиатурой */

#publicationCategories button:focus-visible {
    outline: 2px solid #ff7b00;
    outline-offset: 3px;
}


/* =========================================
   ПЛАНШЕТЫ
   ДВЕ КНОПКИ В РЯДУ
========================================= */

@media (max-width: 1024px) {

    #publicationCategories {
        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;

        max-width: 760px;
        padding: 0 20px;

        margin: 20px auto 30px;
    }

    #publicationCategories button {
        width: 100%;
        min-width: 0;
        min-height: 48px;

        padding: 12px 14px;

        border-radius: 10px;

        font-size: 13px;
        line-height: 1.35;

        white-space: normal;
    }

}


/* =========================================
   МОБИЛЬНЫЕ ТЕЛЕФОНЫ
   ДВЕ КНОПКИ В РЯДУ
========================================= */

@media (max-width: 600px) {

    #publicationCategories {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 9px;

        width: 100%;
        max-width: 100%;

        margin: 18px auto 25px;
        padding: 0 12px;
    }

    #publicationCategories button {
        min-width: 0;
        width: 100%;
        min-height: 48px;

        padding: 10px 7px;

        background: #faf8f5;
        color: #222222;

        border: 1px solid #e5ded5;
        border-radius: 8px;

        font-size: 11px;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: 0;

        white-space: normal;
        overflow-wrap: anywhere;

        box-shadow: none;
    }

    #publicationCategories button.active,
    #publicationCategories button.active:hover {
        background: #ff7b00;
        color: #000000;

        border-color: #ff7b00;
        box-shadow: none;
    }

}


/* =========================================
   ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   320px — 360px
========================================= */

@media (max-width: 360px) {

    #publicationCategories {
        gap: 7px;
        padding: 0 8px;
    }

    #publicationCategories button {
        min-height: 46px;
        padding: 8px 5px;

        font-size: 10px;
        line-height: 1.3;
    }

}
/* =========================================
   ANNACOS — ЛОГОТИП СЛЕВА В ШАПКЕ
========================================= */

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: 250px;
    height: 44px;

    padding: 0;
    margin: 0;

    flex-shrink: 0;
    overflow: visible;

    cursor: pointer;
    text-decoration: none;
}

.logo-img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: left center;

    transform: scale(1.35);
    transform-origin: left center;
}

/* МОБИЛЬНАЯ ВЕРСИЯ */

@media (max-width: 768px) {
    .logo {
        width: 150px;
        height: 38px;
    }

    .logo-img {
        transform: scale(1.1);
        transform-origin: left center;
    }
}
