:root {
    --color-primary: #0071B9;
    --color-secondary: #7C9EB2;
    --color-accent: #ff7f7f;
    --color-accent-light: #fcf3f2;
    --color-contrast: #71D7D1;
    --color-yellow: #f4a460;
    --color-links: #007bff;
    --color-links2: rgb(0, 170, 0);
    --color-text: #333333;
    --color-text-light: #5a738e;
    --color-background: #fafbfc;
    --color-background-deep: #00000010;
    --color-background-footer: #1a5270;
    --color-border: #e9ecef;
    --color-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}    
* {
    box-sizing: border-box;
}
html, body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
/* Типография */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6; 
    color: var(--color-text);
    background: var(--color-background);
}


h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
    
}

   
p {
    font-size: 16px;
    word-spacing: 0.1em;
}

a, sup {
    color: var(--color-primary);
    transition: var(--transition);
    font-weight: 500;
}

a:hover {
    color: var(--color-links);
}
hr {
  border: none;           
  height: 2px;            
  background-color: var(--color-accent);
}
strong, b {
    font-weight: 600;
}

/* ХЕДЕР */
.header-sticky-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header {
    background: var(--color-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

@media (max-width: 875px) {
    .header {
        padding: 8px 0;
        background: var(--color-primary);
    }
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 30px;
    flex-wrap: nowrap;
     max-width: 900px;
}

/* =================== */
/* ЛЕВАЯ ЧАСТЬ: БУРГЕР + ПОИСК */
/* =================== */
.header-stack-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Бургер-кнопка */
.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text);
    padding: 5px;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.hamburger-btn:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

.hamburger-open-icon,
.hamburger-close-icon {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hamburger-close-icon {
    position: absolute;
    opacity: 0;
    transform: rotate(-90deg);
}

.hamburger-btn.active .hamburger-open-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.hamburger-btn.active .hamburger-close-icon {
    opacity: 1;
    transform: rotate(0);
}

/* Кнопка поиска */
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-text);
    padding: 5px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.search-btn:hover {
    color: var(--color-primary);
    transform: scale(1.1);
}

/* =================== */
/* ЛОГОТИП (ПО ЦЕНТРУ) */
/* =================== */
.logo-area {
    text-align: center;
    flex: 1;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    font-family: 'prata', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-primary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.logo:hover {
    color: var(--color-accent);
    transform: scale(1.05);
}

.logo-subtitle {
    font-size: 0.9rem;
    margin: 4px 0 0;
    font-weight: 400;
    color: var(--color-text-light);
    display: block;
}

/* =================== */
/* ПРАВАЯ ЧАСТЬ: ССЫЛКИ */
/* =================== */
.header-stack-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-stack-right a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
    position: relative;
}

.header-stack-right a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.header-stack-right a:hover {
    color: var(--color-primary);
}

.header-stack-right a:hover::after {
    width: 100%;
}

/* Скрываем правые ссылки на мобильных */
@media (max-width: 875px) {
    .header-stack-right {
        display: none;
    }
}

/* =================== */
/* МОДАЛЬНОЕ ОКНО ПОИСКА */
/* =================== */
.modal-search-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.modal-search-wrapper.active {
    display: flex;
}

.modal-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-search-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    z-index: 1;
    animation: searchFadeIn 0.3s ease;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-search-close {
    position: absolute;
    top: 2px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.3s ease, transform 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-search-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.modal-search-form {
    width: 100%;
}

.modal-search-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-search-input:focus {
    border-color: var(--color-primary);
}

.modal-search-submit {
    padding: 14px 24px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.modal-search-submit:hover {
    background: var(--color-primary-dark);
}

/* =================== */
/* МЕНЮ-ШТОРКА */
/* =================== */
.nav-list {
    position: fixed;
    top: 0;
    left: -100%;
    width: 350px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    align-items: stretch;
    gap: 0;
    padding: 15px 0 20px;
    transition: left 0.3s ease;
    z-index: 1500;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
    list-style: none;
    margin: 0;
}

.nav-list.active {
    left: 0;
}

.nav-list .nav-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-list .nav-close-btn:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--color-border-light);
}

.nav-list a {
    color: var(--color-text);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-list a:hover {
    background: var(--color-background-deep);
    color: var(--color-primary);
}

.nav-list a.active {
    color: var(--color-primary);
    background: var(--color-background-deep);
    font-weight: 600;
}

/* Выпадающие в шторке */
.nav-list .dropdown > a {
    justify-content: space-between;
}

.nav-list .dropdown > a::after {
    content: "▾";
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-list .dropdown.open > a::after {
    transform: rotate(180deg);
}

.nav-list .dropdown-menu {
    display: none;
    background: var(--color-background);
    padding: 0;
    list-style: none;
}

.nav-list .dropdown.open .dropdown-menu {
    display: block;
}

.nav-list .dropdown-menu li {
    border-bottom: 1px solid var(--color-border-light);
}

.nav-list .dropdown-menu a {
    padding-left: 44px;
    font-size: 0.9rem;
    gap: 10px;
}

.nav-list .dropdown-menu i {
    width: 18px;
    text-align: center;
    color: var(--color-primary);
}

/* Оверлей меню */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}


/* МОБИЛЬНЫЕ */

@media (max-width: 875px) {
    .hamburger-btn {
        color: var(--color-white);
        font-size: 28px;
    }

    .search-btn {
        color: var(--color-white);
        font-size: 22px;
    }

    .logo {
        color: white;
        font-size: 1.5rem;
    }

    .logo-subtitle {
        color: rgba(255, 255, 255, 0.8);
    }

    .header .container {
        display: flex;
        justify-content: space-between;
    }
    
    .header .container::after {
        display: none;
    }

    .header-stack-left {
        display: contents;
    }

    .search-btn {
        order: 1;
    }

    .logo-area {
        order: 2;
    }

    .hamburger-btn {
        order: 3;
    }
}

/* НАВИГАЦИОННЫЙ БАННЕР */
.nav-banner {
    position: static;
    width: 100%;
    background: var(--color-primary);
    border-top: 1px solid var(--color-border);
    height: 50px;
}

.nav-banner-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5px;
    font-weight: 500;
}

.nav-banner-link {
    padding: 0 10px;
    line-height: 50px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100%;
    color: white;
    text-decoration: none;
}

.nav-banner-link:hover {
    color: var(--color-accent);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-banner-link.active {
    color: var(--color-accent);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-banner-dropdown {
    position: relative;
}

.nav-banner-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: white;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.nav-banner-dropdown:hover .nav-banner-submenu,
.nav-banner-submenu:hover {
    opacity: 1;
    visibility: visible;
}

.nav-banner-dropdown:hover .nav-banner-link {
    color: var(--color-accent);
    background-color: white;
}
.nav-list .nav-separator {
    display: block;
    width: 100%;
    border: none;
    border-bottom: 2px dashed var(--color-accent);
    margin: 10px 0;
    height: 1px;
    list-style: none;
    pointer-events: none;
    padding: 0;
}

.nav-banner-sublink {
    display: block;
    padding: 8px 15px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border);
}

.nav-banner-sublink:hover {
    background: var(--color-background-deep);
    color: var(--color-accent);
}
/* Поиск в шторке */
.nav-search-row {
     padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    margin-top: 40px;
}

.nav-search-form {
    display: flex;
    gap: 8px;
}

.nav-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.nav-search-input:focus {
    border-color: var(--color-primary);
}

.nav-search-submit {
    padding: 10px 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

@media (max-width: 875px) {
    .nav-banner {
        display: none;
    }
    .nav-list .dropdown .dropdown-menu {
        display: block !important;
    }
}

/* Скрываем старые элементы */
.desktop-link,
.header-highlight-block,
.header-search,
.mobile-menu-btn,
.mobile-search-btn {
    display: none !important;
}
/* Общие стили страниц с контентом */
.page-content {
    background: var(--color-white);
    padding: 1rem;
    padding-bottom: 3rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 10;
} 

/* Герой секция */
.hero {
    text-align: center;
    padding: 80px 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    background: rgba(243, 115, 32, 0.05);
}


.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--color-primary);
}


.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    min-height: 2.2rem;
    color: var(--color-text-light);
    font-weight: 300;
}

.hero p {
    font-size: 1.3rem;
    color: var(--color-text-light);
}

.typed-text {
    color: var(--color-accent);
    font-weight: 500;
}

.cursor {
    display: inline-block;
    background-color: var(--color-accent);
    margin-left: 0.1rem;
    width: 3px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.cta-button {
    padding: 1rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
    border: none;
}

.cta-primary:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    border: 2px solid var(--color-primary);
}

.cta-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.cta-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero-shapes__left,
.hero-shapes__right {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 100%;
    aspect-ratio: 1;
    position: absolute;
}

.hero-shapes__left {
    top: 0;
    left: 0;
}

.hero-shapes__right {
    bottom: 0;
    right: 0;
}

.hero-shape {
    background: #f37320;
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    opacity: 0;
}

/* Левая сетка */
.hero-shape--l1 { border-top-left-radius: 11.25rem; opacity: .1; transform: rotate(-90deg); }
.hero-shape--l2 {  border-radius: 50%; opacity: .03; }
.hero-shape--l3 { opacity: .05; }
.hero-shape--l4 { opacity: .03; }
.hero-shape--l5 { border-top-right-radius: 11.25rem; opacity: .05; }
.hero-shape--l6 { border-top-right-radius: 11.25rem; opacity: .1; transform: rotate(-90deg); }

/* Правая сетка */
.hero-shape--r1 { border-bottom-left-radius: 11.25rem; opacity: .05; grid-column: 3; }
.hero-shape--r2 { opacity: .1; grid-column: 2; }
.hero-shape--r3 { opacity: .05; }
.hero-shape--r4 { border-top-right-radius: 11.25rem; opacity: .05; }
.hero-shape--r5 { border-radius: 50%; opacity: .03; }
.hero-shape--r6 { border-top-left-radius: 11.25rem; opacity: .1; transform: rotate(-90deg); }

/* Блок категорий для главной */
.categories-preview {
    padding: 3rem 1rem;
}

.categories-preview h2 {
    text-align: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-photo {
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    border-radius: var(--border-radius); 
    margin-bottom: 1.5rem;
    display: block;
    transition: var(--transition);
    box-shadow: var(--shadow-sm); 
    border: 4px solid var(--color-white); 
    outline: 1px solid var(--color-border);
}

.category-card:hover .category-photo {
    transform: scale(1.03); 
    box-shadow: var(--shadow-md); 
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card h3 {
    color: var(--color-primary);
}

.category-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}
.category-card h3,
.category-card p {
    text-align: center; 
}

/* Для экранов компьютеров (больше 1024px) */
@media (min-width: 1025px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-left: auto;
        margin-right: auto;
    }
}
/* Для мобильных устройств - фото на весь блок с текстом поверх */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 100%;
    }
    
    .category-card {
        padding: 0;
        position: relative;
        overflow: hidden;
        border: none;
        box-shadow: var(--shadow-sm);
        min-height: 140px;
        display: flex;
        align-items: flex-end;
    }
       .category-card::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
        z-index: 1;
        pointer-events: none;
    }
    
    .category-photo {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        margin-bottom: 0;
        border-radius: 0;
        border: none;
        outline: none;
        object-fit: cover;
    }
    
    .category-card h3 {
        position: relative;
        z-index: 2;
        color: white;
        margin: 0;
        padding: 0.8rem;
        font-size: 1rem;
        text-align: left;
        width: 100%;
        font-weight: 700; 
        line-height: 1.2;
    }
    
    /* Скрываем описание и ссылку "перейти" */
    .category-card p,
    .category-link {
        display: none;
    }
    
    /* Убираем стандартные hover-эффекты */
    .category-card::before {
        display: none;
    }
    
    .category-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .category-card:hover .category-photo {
        transform: none;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .categories-grid {
        gap: 0.6rem;
    }
    
    .category-card {
        min-height: 120px;
    }
    
    .category-card h3 {
        font-size: 1.2rem;
        padding: 0.6rem;
        font-weight: 600;
        
    }
}

/* Для экстремально маленьких экранов */
@media (max-width: 360px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .category-card {
        min-height: 110px;
    }
    
    .category-card h3 {
        font-size: 0.8rem;
        padding: 0.5rem;
        font-weight: bold; 
    }
}


/* ПОДКАТЕГОРИИ НА СТРАНИЦЕ КАТЕГОРИИ */
.subcategories-navigation {
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    margin-bottom: 30px;
}

.subcategories-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 колонок на десктопе */
    gap: 10px; 
    align-items: stretch;
}

.subcategories-list strong {
    color: #495057;
    font-weight: 600;
}

.subcategory-link {
    padding: 20px 12px; 
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius); 
    font-size: 0.9rem;
    text-align: center; 
    height: 100%;          
    display: flex;         
    align-items: center;   
    justify-content: center; 
}
/* Планшеты */
@media (max-width: 991px) {
    .subcategories-list {
        grid-template-columns: repeat(4, 1fr); /* 4 колонки */
    }
}

/* Мобильные */
@media (max-width: 576px) {
    .subcategories-list {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки */
    }
}
.subcategory-link:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Страницы Категорий */

/* Hero-секция категории */
.category-hero {
    position: relative;
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    overflow: hidden;
}

.category-hero::before {
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
    bottom: 0;
    content: "";
    height: 50%;
    position: absolute;
    right: 0;
    width: 100%;
}

.category-hero .container {
    position: relative;
    height: 100%;
    z-index: 2;
}

/* Кнопка поделиться в правом верхнем углу */
.share-icon {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    text-decoration: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-icon:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.share-icon svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Контент hero (заголовок) */
.category-hero-content {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 0 15px;
    z-index: 5;
}

/* БЛОК ЗАГОЛОВКА */

.category-hero-title {
    color: #ffffff;
    font-size: 42px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
     white-space: normal;        
    overflow: visible;          
    text-overflow: clip;
    max-width: 70%;             
    word-break: break-word;
}

/* ИСТОЧНИК ИЗОБРАЖЕНИЯ - отдельно в правом нижнем углу */
.hero-image-source {
    position: absolute;
    bottom: 20px;
    right: 30px;
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 8px 18px;
    border-radius: 40px;
    backdrop-filter: blur(4px);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    line-height: 1.4;
    z-index: 10;
}

.hero-image-source:hover {
    background-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-image-source .source-label {
    opacity: 0.8;
    margin-right: 6px;
    font-weight: 400;
}

.hero-image-source .source-link {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-underline-offset: 2px;
    font-weight: 500;
    transition: text-decoration-color 0.2s ease;
}

.hero-image-source .source-link:hover {
    text-decoration-color: #fff;
}

.hero-image-source .source-text {
    font-weight: 500;
}

/* ========== АДАПТИВНОСТЬ ========== */

/* Планшеты и небольшие десктопы */
@media (max-width: 992px) {
    .share-icon {
        top: 20px;
        right: 20px;
        padding: 8px 18px;
        font-size: 15px;
    }
    .category-hero-title {
        font-size: 20px;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .category-hero {
        height: 350px;
    }
    
    .share-icon {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 14px;
        backdrop-filter: blur(4px);
    }
    
    .share-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .category-hero-content {
        bottom: 20px;
    }

    .category-hero-title {
        font-size: 18px;
        white-space: normal;
        max-width: 100%;
    }
    
    .hero-image-source {
        bottom: 15px;
        right: 20px;
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

/* Маленькие мобильные */
@media (max-width: 480px) {
    .category-hero {
        height: 300px;
    }
    
    .share-icon {
        top: 12px;
        right: 12px;
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .share-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .hero-image-source {
        bottom: 12px;
        right: 15px;
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    
    /* На очень маленьких экранах прячем текст кнопки, оставляем только иконку */
    .share-icon span {
        display: none;
    }
    
    .share-icon {
        padding: 8px;
        border-radius: 50%;
    }
    
    .share-icon svg {
        margin: 0;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .category-hero {
        height: 280px;
    }
  
    .category-hero-title {
        font-size: 16px;
    }
}

/* Стили для хлебных крошек */
.breadcrumbs {
    padding-top: 20px;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.95rem;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
    position: relative;
    margin: 2px 0;
}

.breadcrumbs-link {
    display: flex;
    align-items: center;
    color: var(--color-text);
    text-decoration: none;
    padding: 8px 10px 8px 25px;
    background: var(--color-background-deep);
    position: relative;
    transition: var(--transition);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}

.breadcrumbs-link[href="/"] {
    font-weight: 600;
    color: var(--color-accent);
    font-size: 1rem;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 0 50%);
    padding-left: 10px;
}

.breadcrumbs-link:hover {
    color: var(--color-white);
    background: var(--color-accent);
}

.breadcrumbs-current {
    color: var(--color-text-light);
    padding: 8px 10px 8px 25px;
    background: transparent;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .breadcrumbs-list {
        font-size: 0.85rem;
    }

    .breadcrumbs-link {
        padding: 6px 8px 6px 20px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
    }

    .breadcrumbs-link[href="/"] {
        padding-left: 8px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 0 50%);
    }

    .breadcrumbs-current {
        padding: 6px 8px 6px 20px;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%);
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        padding: 1rem 0;
    }

    .breadcrumbs-list {
        font-size: 0.8rem;
    }

    .breadcrumbs-link {
        padding: 4px 6px 4px 16px;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%);
    }

    .breadcrumbs-link[href="/"] {
        padding-left: 6px;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 0 50%);
    }

    .breadcrumbs-current {
        padding: 4px 6px 4px 16px;
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
    }
}

/* Основной контент */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5px;
}
.main-content {
    background: var(--color-background);
}
.main-content-area {
    width: 100%;
}

/* Секция разделов */
.features-section {
    margin-bottom: 3rem;
}

.features-section h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-border);
    transition: var(--transition);
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.feature-item strong {
    display: block;
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.feature-item a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.feature-item a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.feature-item p {
    margin: 0;
    color: var(--color-text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* === СЕКЦИЯ ПОСЛЕДНИХ ЗАПИСЕЙ НА ГЛАВНОЙ === */
.home-posts-section {
    padding: 3rem 0;
    margin: 0 auto;
}

.home-posts-header {
    margin-bottom: 2rem;
}



/* === ГЛАВНАЯ БОЛЬШАЯ КАРТОЧКА === */
.home-posts-main-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    margin-bottom: 30px;
}

.home-posts-main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.home-post-main-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 400px;
}

.home-post-main-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.home-post-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.home-posts-main-card:hover .home-post-main-image img {
    transform: scale(1.05);
}

.home-post-main-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 1;
}

.home-post-main-title {
    color: var(--color-white);
    font-weight: 600;
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.2;
}

/* === ТРИ МАЛЕНЬКИЕ КАРТОЧКИ (как в Исследованиях) === */
.home-posts-small-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.home-post-small-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.home-post-small-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.home-post-small-image {
    height: 200px;
    overflow: hidden;
}

.home-post-small-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.home-post-small-card:hover .home-post-small-img {
    transform: scale(1.05);
}

.home-post-small-meta {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.home-post-small-meta .research-card-badge {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 10px;
    letter-spacing: 0.3px;
    width: fit-content;
    margin-bottom: 12px;
}

.home-post-small-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--color-text);
    transition: var(--transition);
}

.home-post-small-card:hover .home-post-small-title {
    color: var(--color-primary);
}

/* === СООБЩЕНИЯ === */
.home-posts-no-posts,
.home-posts-error-message {
    text-align: center;
    color: var(--color-text-light);
    padding: 2rem;
    grid-column: 1 / -1;
}
.home-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.home-posts-header h2 {
    font-size: 1.8rem;
    text-align: left;
    margin: 0;
}

/* === АДАПТИВ === */
@media (max-width: 1024px) {
    .home-post-main-link {
        height: 350px;
    }
    .home-post-main-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .home-posts-section {
        padding: 2rem 1rem;
    }
    
    .home-posts-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
 
    .home-posts-header h2 {
        text-align: center;
        font-size: 1.8rem;
    }
    
    .home-posts-header .btn,
    .home-posts-header a {
        width: auto;
        min-width: 200px;
    }
    
    .home-post-main-link {
        height: 300px;
    }
    .home-post-main-title {
        font-size: 1.8rem;
    }
    .home-posts-small-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .home-post-small-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .home-posts-section {
        padding: 1.5rem 1rem;
    }
    .home-post-main-link {
        height: 250px;
    }
    .home-post-main-title {
        font-size: 1.5rem;
    }
    .home-post-small-image {
        height: 180px;
    }
    .home-post-small-meta {
        padding: 1rem;
    }
    .home-post-small-title {
        font-size: 1rem;
    }
}
/* исследования */
.research-section {
    padding: 60px 0;
}

.research-section h2 {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 8px;
}

.research-subtitle {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.research-static-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 36px auto 0;
}

/* Карточка */
.research-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.research-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Изображение */
.research-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Контент */
.research-card-content {
    padding: 20px;
}

/* Бейдж */
.research-card-badge {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 10px;
    letter-spacing: 0.3px;
}

/* Дата */
.research-card-date {
    color: var(--color-text-light);
    font-size: 13px;
}

/* Заголовок */
.research-card-title {
    margin: 12px 0 8px;
    font-size: 17px;
    line-height: 1.4;
    font-weight: 600;
}

.research-card-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

.research-card-title a:hover {
    color: var(--color-primary);
}

/* Анонс */
.research-card-excerpt {
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .research-static-grid {
        grid-template-columns: 1fr;
    }
}

/* === СЕКЦИЯ ПРОЕКТОВ НА ГЛАВНОЙ === */
.home-projects-section {
    padding: 2rem 1rem;
    margin: 0 auto;
}

.home-projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.home-projects-section h2 {
    font-size: 1.8rem;
    
}


/* Сетка проектов на главной */
.home-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Базовые стили карточки проекта на главной */
.home-project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.home-project-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

.home-project-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.home-project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.home-project-card:hover .home-project-card-image img {
    transform: scale(1.05);
}

.home-project-card-info {
    padding: 2rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-project-card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.home-project-card-description {
    color: var(--color-text-light);
    line-height: 1.5;
    margin: 0;
    font-size: 0.95rem;
}

/* Цветовые варианты проектов на главной */
.home-project-card--green .home-project-card-info {
    background: var(--color-contrast);
    color: white;
}

.home-project-card--green .home-project-card-title {
    color: white;
}

.home-project-card--green .home-project-card-description {
    color: rgba(255, 255, 255, 0.9);
   
   
}

.home-project-card--blue .home-project-card-info {
    background: var(--color-primary);
    color: white;
}

.home-project-card--blue .home-project-card-title {
    color: white;
}

.home-project-card--blue .home-project-card-description {
    color: rgba(255, 255, 255, 0.9);
    
}

/* === АДАПТИВНОСТЬ ДЛЯ ГЛАВНОЙ === */

@media (max-width: 768px) {
    .home-projects-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        align-items: center;
    }
    
    .home-projects-section h2 {
        text-align: center;
    }
    
    .home-project-card-image {
        height: 200px;
    }
    
    .home-project-card-info {
        padding: 1.5rem;
    }
     .all-projects-link {
        margin: 0 auto; 
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .home-projects-section {
        padding: 2rem 0.5rem;
    }
    
    .home-project-card-image {
        height: 180px;
    }
    
    .home-project-card-info {
        padding: 1.25rem;
    }
    
    .home-project-card-title {
        font-size: 1.2rem;
    }
    
}
/* Сетка постов на странице статей */

.posts-content {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.posts-page-title {
    font-size: 2.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
}
/* Стили для пагинации */
.pagination-container {
    margin: 60px 0 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--color-white);
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 12px 18px;
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-right: none;
    transition: var(--transition);
    min-width: 48px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.pagination li:first-child a,
.pagination li:first-child span {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    padding-left: 24px;
}

.pagination li:last-child a,
.pagination li:last-child span {
    border-right: 1px solid var(--color-border);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding-right: 24px;
}

.pagination li a:hover {
    background-color: var(--color-background);
    color: var(--color-primary);
}

.pagination li.active span {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    font-weight: 600;
}

.pagination li.disabled span {
    color: var(--color-text-light);
    background-color: var(--color-background);
}

/* Адаптивность */
@media (max-width: 768px) {
    .pagination li a,
    .pagination li span {
        padding: 10px 14px;
        min-width: 42px;
        font-size: 15px;
    }
    
    .pagination li:first-child a,
    .pagination li:first-child span {
        padding-left: 18px;
    }
    
    .pagination li:last-child a,
    .pagination li:last-child span {
        padding-right: 18px;
    }
}

@media (max-width: 480px) {
    .pagination li a,
    .pagination li span {
        padding: 8px 10px;
        min-width: 38px;
        font-size: 14px;
    }
    
    .pagination li:first-child a,
    .pagination li:first-child span {
        padding-left: 14px;
    }
    
    .pagination li:last-child a,
    .pagination li:last-child span {
        padding-right: 14px;
    }
}


/* БЛОК КАТЕГОРИЙ В ОСНОВНОМ КОНТЕНТЕ */
.categories-navigation {
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #d1522a 100%);
    
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.categories-nav-title {
    
    font-size: 1rem;
    color: var(--color-text); 
    margin: 0.3rem 0 0.5rem 0; 
    text-align: center;
    font-weight: 600;
}

.categories-nav-list {
    display: flex;
    flex-wrap: nowrap; 
    justify-content: center;
    gap: 0.3rem;
    overflow-x: auto; 
    padding: 0.2rem 0;
}

.category-nav-item {
    display: block;
    padding: 0.4rem 0.8rem;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    transition: var(--transition);
    
    white-space: nowrap;
    line-height: 1.1;
    flex-shrink: 0;
}

.category-nav-item:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .categories-navigation {
        margin: 0.6rem 0 1rem 0;
        padding: 0.4rem 0.6rem;
    }
    
    .categories-nav-title {
        font-size: 1rem;
        margin: 0.2rem 0 0.4rem 0;
    }
    
    .categories-nav-list {
        flex-wrap: wrap; 
        justify-content: stretch; 
        gap: 0.8rem;
        overflow-x: visible; 
    }
    
    .category-nav-item {
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
        border-radius: 14px;
        flex: 1; 
        min-width: calc(50% - 0.4rem); 
        white-space: normal; 
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .categories-navigation {
        margin: 1rem 0 1rem 0;
        padding: 0.5rem 0.5rem;
    }
    
    .categories-nav-title {
        font-size: 1.2rem;
        margin: 0.15rem 0 0.3rem 0;
    }
    
    .categories-nav-list {
        gap: 0.6rem;
    }
    
    .category-nav-item {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 12px;
        min-width: calc(50% - 0.3rem); 
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .category-nav-item {
        min-width: calc(50% - 0.3rem); 
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}
.sort-filter {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--color-background);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-sizing: border-box; 
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-form label {
    
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    font-size: 1rem;
}

#sort-select {
    padding: 0.5rem 0.5rem;
    margin: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-white);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 220px;
    transition: var(--transition);
    box-sizing: border-box; 
}

#sort-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

#sort-select:hover {
    border-color: var(--color-primary);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .sort-filter {
        margin: 1.5rem 0;
        padding: 0.8rem;
        width: 100%;
    }
    
    .sort-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
    }
    
    .sort-form label {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    #sort-select {
        min-width: auto;
        width: 100%;
        margin: 0.5rem 0; 
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .sort-filter {
        margin: 1rem 0;
        padding: 0.5rem;
    }
    
    #sort-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        margin: 0.4rem 0; 
    }
    
    .sort-form label {
        font-size: 0.9rem;
    }
}

.post-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}


.post-card-content {
    padding: 0 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-title a {
    color: var(--color-tex);
    text-decoration: none;
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.post-excerpt {
    color: var(--color-text-light);
    flex-grow: 1;
}

.post-footer {
    margin-top: auto;
    text-align: right;
}
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
}

.no-posts h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.no-posts p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.error-message {
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    color: var(--color-text);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem 0;
}

.post-card-image {
    width: 100%;
    height: 220px;
    padding: 0 0 10px 0;
    overflow: hidden;
    border-radius: var(--border-radius) 0 0;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}
.post-footer {
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
}
/* Мета-информация в карточке */
.post-card .post-meta {
    justify-content: space-between;
    margin: 0.5rem 0 0.75rem 0;
    flex-wrap: nowrap;
    width: 100%;
}

.post-card .post-date {
    flex-shrink: 0;
    margin: 0;
}
.post-card .post-date-updated {
    color: var(--color-text-light);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.post-card .post-category {
    color: var(--color-accent);
    text-decoration: none;
    flex-shrink: 1;
    transition: var(--transition);
}

.post-card .post-category:hover {
    font-weight: 700;
    color: var(--color-text-light);
}

@media (max-width: 480px) {
    .post-card .post-meta {
        gap: 0.5rem;
    }
    
    .post-card .post-date,
    .post-card .post-category {
        font-size: 0.75rem; 
    }
     .post-card .post-date-updated {
        font-size: 0.75rem;
    }
}

/* Полный пост */

.post-full {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.post-header {
    margin-bottom: 1rem;
    text-align: center;
    padding: 0 1rem;
}

.post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--color-text-light);
    font-size: 0.8rem;
    margin: 1.5rem 0;
    align-items: center;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


.post-meta a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition);
}

.post-meta a:hover {
    text-decoration: underline;
}
.share-native-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
     margin-bottom: 12px;
    vertical-align: middle;
}

.share-native-btn:hover {
    background: #e0e0e0;
}
@media (max-width: 768px) {
    .share-native-btn {
        justify-content: center;
        font-size: 14px;
    }
    
    .share-native-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ ИЗОБРАЖЕНИЙ В СТАТЬЯХ ===== */

.unified-image {
    margin: 10px auto;
    cursor: zoom-in;
    max-width: 1200px;
    text-align: center;
}

.unified-image .featured-image {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    height: 450px; 
    width: 100%; 
    object-fit: cover; 
    aspect-ratio: auto;
}

.image-caption {
    margin-top: 5px;
    
    color: var(--color-text-light);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Стили для полноэкранного просмотра */
.image-viewer-overlay {
    animation: fadeIn 0.3s ease;
}

.image-viewer-overlay button:hover {
    background: rgba(255,255,255,0.2) !important;
}
/* ===== СТИЛИ ДЛЯ ПОЛНОЭКРАННОГО ПРОСМОТРА ===== */

.image-viewer-overlay {
    animation: fadeIn 0.3s ease;
}

.image-viewer-overlay button:hover {
    background: rgba(255,255,255,0.2) !important;
}
/* ===== АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 991px) {
    .unified-image .featured-image {
        max-height: 450px; 
    }
}

/* ===== АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 768px) {
    .unified-image .featured-image {
        max-height: 350px; 
    }
    
    /* Для совсем маленьких экранов  */
    @media (max-width: 480px) {
        .unified-image .featured-image {
            max-height: 250px;
        }
    }
}

/* Карусель изображений */
.image-carousel {
    position: relative;
    margin: 20px 0;
}
.carousel-wrapper {
    position: relative;
}
.carousel-slide {
    display: none;
}
.carousel-slide.active {
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
   background: var(--color-links);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 400;
    cursor: pointer;
    z-index: 20;
    color: white;
    display: flex;
    align-items: center;
     justify-content: center;
     
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    .carousel-nav.prev {
        left: 10px;
    }
    
    .carousel-nav.next {
        right: 10px;
    }
}
/* Контент поста */
.post-content {
    font-size: 1rem;
    margin-bottom: 3rem;
    position: relative; 
}

.post-content p {
    margin-bottom: 1.5rem;
}

/* Блок цитирования */
.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    position: relative;
    background: var(--color-background);
    border-radius: var(--border-radius);
    color: var(--color-text);
    line-height: 1.7;
  
}

.post-content blockquote::before {
    content: "“";
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 3rem;
    line-height: 1;
    color: var(--color-primary);
}

/* Стиль для ссылки-источника в цитатах */
.post-content blockquote a[target="_blank"] {
    color: var(--color-primary) !important;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-decoration: none;
    font-style: normal;
    border-bottom: 1px dashed var(--color-primary);
    padding-bottom: 1px;
    transition: var(--transition);
}
@media (max-width: 768px) {
    .post-content blockquote {
        padding: 1.25rem 1rem 1.25rem 2.5rem;
    }
    
    .post-content blockquote::before {
        font-size: 2rem;
        left: 0.5rem;
    }
}

@media (max-width: 480px) {
    .post-content blockquote {
        padding-left: 2.5rem; 
    }
    
    .post-content blockquote::before {
        font-size: 2rem; 
        left: 0.5rem; 
    }
}
.post-content blockquote a[target="_blank"]:hover {
    color: var(--color-accent) !important;
    border-bottom-color: var(--color-accent);
    border-bottom-style: solid;
}

.post-content quote {
    display: block; 
    background-color: #f0fdf4;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    font-style: normal;
}
/* Блок с примечаниями и замечаниями */
.asterisk {
    position: relative;
    background: var(--color-background-deep);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    border-radius: var(--border-radius);
    
}

/* Звездочка перед текстом */
.asterisk::before {
    content: "∗";
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: bold;
}
/* Блок предупреждения */
.warning {
    position: relative;
    background-color: var(--color-accent-light);
    border-left: 4px solid var(--color-accent);
    padding: 1.5rem 1.5rem 1.5rem 3.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    
}

/* Иконка предупреждения */
.warning::before {
    content: "⚠️";
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    font-size: 1.25rem;
}

.post-content .afisha {
    background: var(--color-background-deep);
    padding: 20px;
    margin: 25px 0;
}

/* Декоративные линии до и после */
.post-content .afisha::before,
.post-content .afisha::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

.post-content .afisha::before {
    margin-bottom: 25px;
}

.post-content .afisha::after {
    margin-top: 25px;
}
.cross-link {
    background: var(--color-white); 
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border); 
    transition: var(--transition); 
}

/* Стиль ссылки-термина, глоссарий */
.post-content a.glossary-term {
    color: var(--color-links2);
    border-bottom: 1px dotted var(--color-links2);
    text-decoration: none;
    cursor: help;
    position: relative;
     font-weight: bold;
}

.glossary-tooltip {
    position: fixed;
    background: var(--color-white);
    border: 1px solid #ccc;
    border-left: 4px solid var(--color-links2); 
    padding: 12px; 
    padding-left: 24px; 
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10000;
    font-size: 14px;
    line-height: 1.5;
    
    /* Автоматический перенос слов и максимальные размеры */
    max-width: 400px;
    max-height: 300px;
    overflow-wrap: break-word;
    overflow-y: auto;
    white-space: normal;
    word-break: normal;
    
    /* Анимация появления */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s;
}

.glossary-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Цитата-подзаголовок */
.author-quote {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 1.5rem 1rem 2rem;
    margin: 2rem 0;
    background-color: var(--color-background);
    
}

.author-quote .quote-author {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-style: normal;
    text-align: right;
    font-size: 1rem;
}

.cross-link:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

.cross-link::before {
    content: "Рекомендуем:";
    display: block;
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}


/* Списки */
.post-content ul {
    list-style: none;
}

.post-content ul ul {
    list-style: none;
}

.post-content ol,
.post-content ul {
    margin: 1.8rem 0;
    padding-left: 1.2rem;
}

/* Отдельно для ul li */
.post-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

/* Отдельно для ol li */
.post-content ol li {
    margin-bottom: 0.5rem;
}

/* Кастомная точка */
.post-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    transform: translateY(-50%);
}


.post-content ul ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    transform: translateY(-50%);
}

.post-content ol ul {
    margin-left: 1.2rem;
}

.lead-paragraph {
    font-size: 1.1em;
    font-weight: 400;
    margin: 1.5em 0;
}

/* Для таблиц */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #e0e0e0;
  background: #fff;
}

.comparison-table {
  width: 100%;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  position: sticky;
  left: 0;
  background-color: #f8f9fa;
  z-index: 2;
  box-shadow: 1px 0 0 #e0e0e0;
  min-width: 120px;
}

.comparison-table th {
  padding: 14px 12px;
  border-bottom: 2px solid #e0e0e0;
}

.comparison-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  min-width: 150px;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .comparison-table {
    min-width: 650px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 12px 10px;
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .comparison-table {
    min-width: 600px;
    font-size: 13px;
  }
  
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    min-width: 100px;
    background-color: #f8f9fa;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 10px 8px;
    min-width: 130px;
  }
}

@media (max-width: 480px) {
  .comparison-table {
    min-width: 550px;
    font-size: 12px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 8px 6px;
    min-width: 120px;
  }
  
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    min-width: 90px;
    background-color: #f8f9fa;
  }
}
/* Оглавление поста */
.table-of-contents {
    background: var(--color-background);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--color-primary);
}

.toc-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}
.toc-header:hover {
    background-color: #f8f9fa;
}
.toc-title {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text-light);
}

.toc-nav {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
}
.toc-list ul {
    list-style: none;
    padding-left: 15px;
    margin: 2px 0;
}

.toc-list a {
    display: block;
    padding: 6px 8px;
}

.toc-list a:hover {
    color: #2d3748;
    background-color: #e9ecef;
}

.toc-level-2 {
    font-weight: 500;
    margin-left: 0;
}
.toc-level-3 {
    margin-left: 20px;
    font-weight: 500;
    position: relative;
}

.toc-level-3::before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #adb5bd;
    font-size: 1.2em;
}
.toc-collapsed .toc-nav {
    display: none;
}
/* Источники */
.post-content .sources {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.post-content .sources-title {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 0.8rem;
    color: #666;
    font-style: italic;
}

.post-content .source-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-content .source-item {
    margin-bottom: 0.6rem;
    padding-left: 1.2rem;
    text-indent: -1.2rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
    color: #555;
}

.post-content .source-item a {
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
}

.post-content .source-item a:hover {
    color: #333;
    border-bottom-color: #333;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .post-content .sources {
        margin: 1.5rem 0;
        padding-top: 1rem;
    }
    
    .post-content .source-item {
        padding-left: 1rem;
        text-indent: -1rem;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }
    
    .post-content .sources-title {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
}

/* ===== АККОРДЕОН НА ЧЕКБОКСАХ ===== */
.accordion {
    margin: 2.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    background: var(--color-white);
    transition: var(--transition);
}

.accordion:hover {
    box-shadow: var(--shadow-md);
}

.accordion-item {
    margin: 0;
    border-bottom: 1px solid var(--color-border);
}

/* Скрываем чекбокс */
.accordion-toggle {
    display: none;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Заголовок аккордеона */
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--color-white);
    cursor: pointer;
    font-size: 1.1rem;
    text-align: left;
    transition: var(--transition);
    color: var(--color-primary);
}

.accordion-header:hover {
    background-color: var(--color-background-deep);
    color: var(--color-accent);
}

.accordion-title {
    flex-grow: 1;
    letter-spacing: 0.3px;
}

.accordion-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
    color: var(--color-accent);
}

.accordion-header:hover .accordion-icon {
    color: var(--color-accent);
}

/* Контент - скрыт по умолчанию */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    background: var(--color-white);
    transition: max-height 0.3s ease-out;
    opacity: 0;
}

/* Когда чекбокс отмечен (аккордеон открыт) */
.accordion-toggle:checked + .accordion-header {
    background-color: var(--color-background-deep);
    color: var(--color-accent);
}

.accordion-toggle:checked + .accordion-header .accordion-icon {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.accordion-toggle:checked + .accordion-header + .accordion-content {
    max-height: 1000px; /* Достаточно для любого контента */
    padding: 1.5rem;
    opacity: 1;
    border-top: 1px solid var(--color-border);
}

/* ===== УПРОЩЕННЫЕ СТИЛИ ДЛЯ КОНТЕНТА ===== */

/* Стили для источников */
.accordion .sources-content p {
    margin: 0 0 1rem 0;
    padding: 0.75rem 0;
    color: var(--color-text);
    line-height: 1.5;
    font-size: 0.95rem;
    border-left: none;
    background: transparent;
    transition: none;
}

.accordion .sources-content p:last-child {
    margin-bottom: 0;
}

/* Стили для ссылок */
.accordion .links-content p {
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-size: 0.95rem;
    border-left: none;
    background: transparent;
    transition: none;
}

.accordion .links-content p:last-child {
    margin-bottom: 0;
}

/* Стили для ссылок внутри контента */
.accordion .links-content a {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion .links-content a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}



/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 768px) {
    .accordion {
        margin: 1.5rem 0;
        border-radius: 10px;
    }
    
    .accordion-header {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .accordion-title {
        font-size: 1rem;
    }
    
    .accordion-toggle:checked + .accordion-header + .accordion-content {
        padding: 1.25rem;
    }
    
    .accordion-content {
        padding: 0 1.25rem;
    }
    
    .accordion .sources-content p,
    .accordion .links-content p {
        padding: 0.5rem 0;
        font-size: 0.9rem;
        margin-bottom: 0.875rem;
    }
    
    .accordion-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .accordion-header {
        padding: 0.875rem 1rem;
    }
    
    .accordion-toggle:checked + .accordion-header + .accordion-content {
        padding: 1rem;
    }
    
    .accordion-content {
        padding: 0 1rem;
    }
    
    .accordion .sources-content p,
    .accordion .links-content p {
        margin-bottom: 0.75rem;
    }
}

/* Социальные кнопки и лайк */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 5px;
    background: var(--color-background);
    border-radius: var(--border-radius);
}


.like-btn {
     position: relative;
    background: none;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.like-btn:hover {
    background-color: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.3rem;
    box-shadow: var(--shadow-sm);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.vk { background: #4a76a8; }
.share-btn.telegram { background: #0088cc; }
.share-btn.ok { background: #f7931e; }
.share-btn.mailru { background: #168de2; }

 .back-to-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    background-color: var(--color-white);
    color: var(--color-accent);
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-accent); 
    cursor: pointer;
    position: fixed;
    bottom: 2rem;
    right: 1rem; 
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.back-to-top-btn:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-white);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* Для десктопа сдвигаем правее */
@media (min-width: 1025px) {
    .back-to-top-btn {
        right: 25rem; 
    }
}

/* Стили для кнопки возврата в раздел */
.post-navigation .back-to-list {
    display: inline-flex;
    align-items: center;
    color: var(--color-accent);
    text-decoration: none;
    padding: 10px 25px 10px 12px;
    background: var(--color-background-deep);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}

.post-navigation .back-to-list:hover {
    color: var(--color-white);
    background: var(--color-accent);
}

.post-navigation .back-to-list i {
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .post-navigation .back-to-list {
        font-size: 0.85rem;
        padding: 8px 20px 8px 10px;
        clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
    }
}

@media (max-width: 480px) {
    .post-navigation .back-to-list {
        font-size: 0.8rem;
        padding: 6px 16px 6px 8px;
        clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
    }
}

/* ===== САЙДБАР ===== */

/* Основные стили сайдбара */
.sidebar {
    background: var(--color-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Заголовки виджетов */
.sidebar h3 {
    font-size: 1.2rem;
}

/* === ПРОЕКТЫ === */
.sidebar-projects {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    gap: 0.75rem;
}

.sidebar-project-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.sidebar-project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #cbd5e0;
}

.sidebar-project-link {
    display: block;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.sidebar-project-link:hover {
    color: var(--color-primary);
}

.sidebar-project-link::after {
    content: '›';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    font-size: 1.2rem;
    font-weight: bold;
}

.no-projects-message {
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
    border: 1px dashed #cbd5e0;
}

/* === ЧИТАЙТЕ ТАКЖЕ / RELATED POSTS === */
.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.related-post-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.related-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
}
.related-post-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--color-background);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-background), var(--color-secondary));
}

.related-post-image.placeholder span {
    font-size: 20px;
    opacity: 0.6;
}

.related-post-title {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}


/* === ОСНОВНАЯ СЕТКА === */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 992px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar-container {
        position: static;
        order: 2;
    }
    
    .posts-content {
        order: 1;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .related-post-image {
        width: 70px;
        height: 52px;
    }
    
    .related-post-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .related-post-link {
        gap: 10px;
    }
    
    .related-post-image {
        width: 60px;
        height: 45px;
    }
}

/* === ВИДЖЕТ ПРОЕКТОВ (старый стиль для совместимости) === */
.projects-widget {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.widget-title-link {
    color: #000;
    text-decoration: none;
}

/* === ТЕГИ В ПОСТАХ === */
.post-tags-container {
    margin: 10px 0;
    padding: 5px;
    background: var(--color-background);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.tags-label {
    margin-right: 10px;
    color: var(--color-text-light);
}

.post-tag {
    display: inline-block;
    padding: 3px 6px;
    margin: 4px;
    border-radius: var(--border-radius);
}

.footer {
    background: linear-gradient(145deg, var(--color-background-footer) 0%, var(--color-primary) 120%);
    color: var(--color-white);
    padding: 3rem 0 1rem;
    position: relative;
}

/* Опционально: тонкая линия сверху из акцентного цвета */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-yellow), var(--color-contrast));
    opacity: 0.5;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 1rem;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
}

/* Легкое свечение логотипа */
.footer-logo::after {
    content: 'ФэмКап';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent);
    opacity: 0.3;
    filter: blur(4px);
    pointer-events: none;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--color-accent);
    transform: translateX(8px);
}

.footer-links i {
    color: var(--color-accent);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.footer-links a:hover i {
    transform: rotate(360deg);
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-info i {
    color: var(--color-yellow); 
    font-size: 1.2rem;
    margin-top: 0.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.3rem;
}

.social-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(222, 82, 69, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0;
}

.footer-legal {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dotted transparent;
}

.footer-legal a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}
.footer {
    position: relative;
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.02) 0px,
        rgba(255,255,255,0.02) 20px,
        transparent 20px,
        transparent 40px
    );
    pointer-events: none;
}
/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Адаптивность */

@media (max-width: 992px) {
    
    .posts-content {
        order: 1;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
     .latest-posts-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    
    /* ===== HERO SECTION ===== */
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    /* ===== КОНТЕНТ И СТАТЬИ ===== */
    .features-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .latest-posts-section {
        padding: 2rem 1.5rem;
    }
    
    .latest-posts-list li {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .post-link {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .post-date {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .container {
        padding: 0 0px;
    }
    
    .post-content {
        max-width: 100%;
        margin: 0;
        padding: 0 2px;
        overflow-x: visible; 
    }
   .posts-content {
        overflow-x: hidden;
        padding: 0 2px; 
        margin: 0;
    }
    .main-content > div,
    .article-container,
    .content-wrapper {
         overflow-x: hidden;
    }
    
    .post-content pre {
         padding: 1rem; 
        margin: 1rem 0; 
        overflow-x: auto;
        max-width: 100%;
    }
    
    .post-content code {
        font-size: 0.85em;
    }
    
    .related-posts {
        margin: 30px 0;
        padding: 15px;
    }
    .post-content ul,
    .post-content ol {
        margin: 0.8rem 0;
    }
    
    .post-content ul {
        padding-left: 0.8rem;
    }
    
    .post-content ol {
        padding-left: 1.5rem; 
    }
    
    .post-content li {
        margin-bottom: 0.2rem;
        line-height: 1.65;
    }
    /* ===== FOOTER ===== */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 0.5rem;
    }
    
    .home-categories-list {
        flex-direction: column;
        gap: 4px;
    }
    
    .home-category-link {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        text-align: center;
    }
    
    
    /* ===== ТЕГИ И КАТЕГОРИИ ===== */
    .tag-page-container {
        margin: 20px 15px !important;
        padding: 20px 15px !important;
    }
    
    .tag-page-container h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    /* ===== КНОПКИ И ФОРМЫ ===== */
    .like-btn {
        padding: 8px 16px;
        font-size: 14px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .like-icon {
        font-size: 16px;
    }
    
    .view-all-link,
    .back-to-list,
    .read-more-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* ===== ИЗОБРАЖЕНИЯ ===== */
   
    
    .post-content img {
        max-width: 100%;
        height: auto;
    }
    .post-meta {
        flex-direction: row;
        gap: 10px;
   
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .posts-page-title {
        font-size: 1.8rem;
    }
    
    .post-header h1 {
        font-size: 2rem;
    }
    
     .lead-paragraph {
        
        margin: 1.2rem 0;
        font-size: 1 rem;
    }
    .posts-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .post-card-image {
        height: 200px;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .home-categories-nav {
        padding-bottom: 12px;
    }
}
@media (max-width: 480px) {
    .home-categories-list {
        padding: 0 12px;
        gap: 0;
    }
    
    .home-category-link {
        font-size: 0.8rem;
        padding: 8px 12px;
        min-height: 44px; 
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .lead-paragraph {
        padding: 10px 12px; 
        margin: 1rem 0; 
        font-size: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
        line-height: 1.65;
    }
    .latest-posts-section {
        padding: 1.5rem 1rem;
    }
    
    .latest-posts-section h2 {
        font-size: 1.5rem;
    }
    
    .latest-posts-list li {
        padding: 1.2rem;
    }
    
    .post-type-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Для устройств без ховера (тачскины) */
@media (hover: none) and (pointer: coarse) {
    .feature-item:hover,
    .post-card:hover,
    .posts-list li:hover {
        transform: none;
    }
    
    .nav-list a:hover {
        background: transparent;
    }
}

/* Анимация для связанных постов */
.related-posts-list li {
    animation: fadeInUp 0.5s ease forwards;
}

.related-posts-list li:nth-child(1) { animation-delay: 0.1s; }
.related-posts-list li:nth-child(2) { animation-delay: 0.2s; }
.related-posts-list li:nth-child(3) { animation-delay: 0.3s; }

/* (Убедитесь, что keyframes для fadeInUp определены где-то в ваших стилях) */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для страницы "О нас" */

.about-intro {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    padding-top: 20px;
    border-bottom: 2px solid var(--color-border);
}

.about-intro h1 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.lead {
    font-size: 1.2rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 3rem;
    padding: 2rem 1rem;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-yellow);
    border-radius: 2px;
}

.about-text p, ul, ol {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.values-section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.values-section h2 {
    text-align: center;
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.values-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-background), var(--color-white));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
    font-size: 2rem;
    transition: var(--transition);
}

.value-card:hover .value-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-white);
    transform: scale(1.1);
}

.value-card h3 {
    color: var(--color-text);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--color-text-light);
    line-height: 1.6;
}

.about-footer {
    border-top: 2px solid var(--color-border);
    padding-top: 3rem;
}

.passion-section {
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.passion-section h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.passion-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text);
}

.closing-message {
    background: linear-gradient(135deg, var(--color-background-deep), var(--color-accent-light));
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-left: 4px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.message-icon {
    color: var(--color-accent);
    font-size: 2rem;
}

.closing-message p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Адаптивность */
@media (max-width: 968px) {
    .about-text h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
   
    .about-intro h1 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .value-card {
        padding: 1.5rem;
    }
    
    .closing-message {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .about-intro h1 {
        font-size: 1.8rem;
    }
}
.photo-container {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

.family-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    max-height: 60vh;
    object-fit: cover;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .photo-container {
        margin-bottom: 1.5rem;
    }
    
    .family-photo {
        max-height: 50vh;
        border-radius: 10px;
    }
}
/* Страница project */
.project-header {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    text-align: center; 
}
.project-header h1{
    font-weight: 300;
}

.project-description {
    margin-bottom: 0.75rem;
    
}

.tags-filter {
    margin: 15px 0;
    padding: 10px;
    background: var(--color-background);
    border-radius: var(--border-radius);
}
.tags-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tags-form label {
    flex-shrink: 0;
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tag-filter {
    display: inline-block;
    padding: 4px 8px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 13px;
}
.tag-filter:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.tag-filter.active {
    background: var(--color-primary);
    color: white;
}

/* Кнопка возврата к проектам */
.projects-navigation {
     padding-top: 2rem;
}

.back-to-projects {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 1rem;
}

.back-to-projects:hover {
    background-color: #e5e7eb;
    transform: translateX(-3px);
    border-color: #d1d5db;
    color: var(--color-accent);
}

/* Палисадник — уютная полоса с этапами жизни */
.palisade-section {
    background: linear-gradient(to right, #faf7f2, #f5efe8);
    padding: 20px 0;
    border-top: 1px solid #e8ddd0;
    border-bottom: 1px solid #e8ddd0;
    margin-bottom: 30px;
}

.palisade-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px 25px;
}

.palisade-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #4a4a4a;
    padding: 8px 15px;
    border-radius: 40px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid #f0e4d5;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.palisade-item:hover {
    background: #fff9f0;
    border-color: var(--color-primary, #9e7b56);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(158, 123, 86, 0.1);
    color: var(--color-primary, #9e7b56);
}

.palisade-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.palisade-label {
    font-weight: 500;
}

.palisade-more {
    opacity: 0.6;
    background: #f5f5f5;
    border-style: dashed;
}

.palisade-more:hover {
    opacity: 0.8;
    background: #f0f0f0;
    border-color: #aaa;
}

/* Для мобильных */
@media (max-width: 768px) {
    .palisade-grid {
        gap: 10px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .palisade-item {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .palisade-icon {
        font-size: 1.2rem;
    }
    
    /* Индикатор скролла (необязательно) */
    .palisade-section {
        position: relative;
    }
    .palisade-section::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: white;
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 1.2rem;
        color: var(--color-primary);
        box-shadow: -10px 0 10px rgba(255,255,255,0.9);
        pointer-events: none;
        opacity: 0.7;
        display: none;
    }
    @media (max-width: 768px) {
        .palisade-section::after {
            display: block;
        }
    }
}

