@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

* {
    margin:0;
    padding: 0;
}

h1 {
    font-size: 1.5em;
}

h2{
    font-size: 1.3em;
}


a {
    color:#3390ec;
    text-decoration: none;
}
a:hover{
    text-decoration: underline;
}

p {
    padding-bottom: 0.25em;
}

html{
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
}

body {
    background-image:linear-gradient(to bottom right, rgb(228 255 222 / 80%), rgb(201 217 147 / 70%)), /* Градиент */ url(img/pattern2.svg);
    background-size: cover, 360px; /* Градиент покрывает весь экран, а SVG мельче */
    background-position: center, top left;
    background-repeat: no-repeat, repeat; /* SVG повторяется */
    background-attachment: fixed; /* Фиксируем фон */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* Позволяет контенту растягиваться */
    min-height: 100vh;
}

.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1em;
}

.page{
    height: 100vh;
}

main{
    flex: 1;
}

.box{
    background-color: #ffffff;
    padding: 1em;
    border: 1px solid #eee;   
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1em;
}

/* Фиксированный header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    background: rgba(255, 255, 255, .95);
}

/* Отступ, чтобы контент не прилипал к хедеру */
.content-padding {
    height: 95px;
}

/* Обертка */
.wrap-header {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5em 0;
}

/* Левая часть (логотип и название) */
.header-left {
    display: flex;
    align-items: center;
    position: relative;
}


.site-url:hover{
    text-decoration: none;
}
.site-url {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-logo {
    margin-right: 10px;
}

.site-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 160px;
}

.site-subtitle {
    font-size: 12px;
    color: #777;
}


/* Правая часть (меню + поиск) */
.header-right {
    display: flex;
    align-items: center;
}

/* Гамбургер-меню */
.menu-btn {
    border: none;
    background:none;
    font-size: 26px;
    cursor: pointer;
    padding: 10px;
    margin-right: 0.3em;
    color:#333;
}

.promo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: .3em 0;
    background: #f8f9fa;
    text-decoration: none;
    transition: background 0.3s;
}

.promo-link:hover {
    background: #e9ecef;
    text-decoration: none;
}

.promo-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}

.promo-text {
    font-size: 16px;
    font-weight: 600;
    color: #0088cc;
}

/* Выпадающее меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.8em); /* Отступ вниз */
    left: 0;
    background: rgb(255 255 255 / 40%); /* Прозрачный белый */
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Тень */
    border-radius: 5px;
    width: 180px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
    transform: translateY(-10px);
    z-index: 999;
}

/* Размытие при наведении на ссылки */
.dropdown-menu ul li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 15px;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.dropdown-menu ul li a:hover {
    background: rgba(11, 11, 11, 0.1); /* Лёгкий цветовой акцент */
    border-radius: 5px;
}

/* Меню внутри */
.dropdown-menu ul {
    list-style: none;
    padding: 10px;
    margin: 0;
}


/* Активное меню */
.dropdown-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.divider {
    height: 1px;
    background-color: #ddd; /* Цвет разделителя */
    margin: 8px 0; /* Отступы сверху и снизу */
}



/* Кнопка поиска */
.search-btn {
    border: none;
    background: none;
    font-size: 26px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center; /* Центрируем иконку внутри кнопки */
}

/* Иконка поиска */
.search-icon {
    width: 26px;
    height: 26px;
}

.search{
    padding: 10px 15px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cecece;
    border-radius: 4px;
    font-size: 15px;
}

.search:focus{
    outline: none;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 5px;
    display: none;
    transition: opacity 0.3s ease-in-out;
    box-sizing: border-box;
    background: rgb(255 255 255 / 40%); 
    backdrop-filter: blur(12px);
}

/* Показываем инпут поиска при клике на кнопку */
.search-input.show {
    display: block; /* Теперь он занимает 100% ширины */
    opacity: 1;
}


.text-center {
    text-align: center;
}

.text-muted{
    color:#00000080;
}

.text-small{
    font-size: 0.8em;
}

.glass{
    background: rgb(255 255 255 / 40%);
    backdrop-filter: blur(5px);
}


.category-header{
    padding-left:0.35em;
    margin-bottom: 1em;
}

.emoji-header {
    text-align: center;
    margin-bottom: 1em;
}

.emoji-info {
    display: flex;
    width: 100%;
    gap: 20px;
    margin-bottom: 1em;
}

.emoji-description,
.emoji-count {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.emoji-description {
    flex: 4; /* 80% */
    background: #fff;
    font-size: 16px;
}

.emoji-count {
    flex: 1; /* 20% */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.count-number {
    font-size: 24px;
    font-weight: bold;
}

.count-label {
    font-size: 14px;
}


/* Сетка для постов */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 1em;
}

/* Оформление блока поста */
.post-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.post-item:hover {
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


/* Заголовок поста */
.post-item h2 {
    font-size: 18px;
}

.post-item:hover h2{
    color:#3390ec;
}

/* Контейнер эмодзи/стикеров */
.emoji-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: .5em;
}

/* Элементы эмодзи */
.emoji-item {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}

/* Ячейка с оставшимися элементами */
.emoji-more {
    font-size: 16px;
    font-weight: bold;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Убедитесь, что картинки или анимации внутри карточки тоже растягиваются */
.emoji-item img,
.emoji-item video,
.emoji-item lottie-player,
.lottie-animation {
    max-width: 100%;
    height: auto;
    display: block;
}


/* Сетка для стикеров */
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .7em;
    margin-bottom: 1em;
}

/* Карточка поста */
.sticker-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.sticker-item:hover {
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Заголовок */
.sticker-item h2 {
    font-size: 16px;
    margin-top: .35em;
}

.sticker-item:hover h2 {
    color: #3390ec;
}

/* Контейнер стикера */
.sticker-preview {
    min-width: 150px;
    min-height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f7f7f7;
    border-radius: 4px;
    margin-bottom: .5em;
}


.sticker-preview img,
.sticker-preview video,
.sticker-preview tgs-player,
.sticker-preview lottie-player,
.sticker-preview .lottie-animation {
    max-width: 100px;
    min-height: 100px;
    width: 100px;
    height: 100px;
    display: block;
    object-fit: contain;
    pointer-events: none;
}

@media (max-width: 768px) {
    .stickers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 480px) {
    .stickers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sticker-preview {
        min-width: 119px;
        min-height: 119px;
    }
    .sticker-preview img,
    .sticker-preview video,
    .sticker-preview tgs-player,
    .sticker-preview lottie-player,
    .sticker-preview .lottie-animation {
        max-width: 132px;
        max-height: 132px;
        width: 100%;
        height: auto;
    }
}

/* Хлебные крошки с большей прозрачностью и темным текстом */
#breadcrumbs {    
    padding: 10px 15px;
    border-radius: 8px;
    display: block;
    font-weight: 500;
    color: #333333;
    margin-bottom: 1em;
}

/* Стили ссылок в хлебных крошках */
#breadcrumbs a {
    color: #333333; /* Темный цвет ссылок */
    transition: color 0.3s ease-in-out;
}

#breadcrumbs a:hover {
    color: #555555; /* Немного светлее при наведении */
}




.btn {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none; /* Для ссылки */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    border: 0;
}

.btn:hover{
    text-decoration: none;
}

/* Кнопка в стиле Телеграма */
.btn-tg {
    background-color: #0088cc;  /* Телеграм синий */
    color: #ffffff;
}

.btn-tg:hover {
    background-color: #0078b0; /* Немного темнее при наведении */
}

.btn-tg:active {
    transform: scale(0.98); /* Эффект нажатия */
}

/* Кнопка по умолчанию (серая) */
.btn-default {
    background-color: #d1d3d8; /* Светло-серый */
    color: #495057; /* Темный серый текст */
}

.btn-default:hover {
    background-color: #b0b3b8; /* Немного темнее серый */
}

.btn-default:active {
    transform: scale(0.98);
}

/* Для ссылок, стилизованных как кнопки */
a.btn {
    display: inline-block;
}

button.btn{
    height: 48px;
}

/* Центрируем кнопки по горизонтали */
.btn {
    margin: 20px auto;
    text-align: center;
    width: auto; /* Автоматическая ширина */
}

/* Добавим фильтр для изменения цвета SVG */
.btn-tg-icon {
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(0deg); /* Преобразуем SVG в белый цвет */
    width: 15px;
    height: 15px;
    position: relative;
    right: 5px;
    top: 2px;
}






.category-container {
    display: flex;
    gap: 10px;
    padding: .5em;
    border-radius: 5px;
    margin-bottom: 1em;
}

.filter-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.category-list {
    display: flex;
    gap: 15px;
}

.category-link {
    text-decoration: none;
    font-size: 16px;
    color: #333;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #3390ec;
    text-decoration: none;
}

.category-link.active {
    font-weight: bold;
    color: #333;
}



.page-wrapper {
    min-height: 100vh;
    position: relative;
    padding-bottom: 50px; /* Место для пагинации внизу */
}

.pagination {
    display: flex;
    justify-content: center; /* Центрирование пагинации */
    margin: 1em 0 .5em 0; /* Отступ сверху */
    gap: 5px; /* Отступы между элементами */
}

.pagination a, 
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    font-size: 15px;
    color: #111;
    background-color: #fff;
    border: 1px solid #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pagination a:hover {
    background-color: #3390ec;
    border: 1px solid #3390ec;
    color: #fff;
}

.pagination .current {
    font-weight: bold;
    color: #fff;
    background-color: #3390ec;
    border: 1px solid #3390ec;
}

.pagination .dots {
    width: auto;
    height: 40px;
    color: #666;
    background: none;
    border: none;
    padding: 0 10px;
}


footer {
    background-color: #fff;
    width: 100%;
    position: relative;
    margin-top: auto;
}

.tags-list{
    padding: .5em 1em;
    margin-bottom: 1em;
    border-radius: 5px;
}

.tags-list a{
    margin-right: .5em;
}

.home-description{
    background-color: #ffffff;
    padding: 1em;
    border: 1px solid #eee;   
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1em;
}


.search-form{
    width: 100%;
    position: relative;
    margin-bottom: 1em;
}

/* Контейнер выпадающего списка */
.autocomplete-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    position: absolute;
    z-index: 998;
    width: 100%; /* Ширина на весь блок */
    border-radius: 4px;
    background: rgb(255 255 255 / 100%); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Элементы списка */
.autocomplete-list li {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 16px;
    color: #000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid #dbdbdb;
}

.autocomplete-list li:last-child{
    border-bottom: none;
}

/* Элемент при наведении */
.autocomplete-list li:hover {
    background: rgba(11, 11, 11, 0.1);
}

/* По умолчанию скрываем список */
.autocomplete-list {
    display: none;
}

/* Показываем список с рамкой при фокусе и наличии текста */
#search-input:focus:not(:placeholder-shown) ~ .autocomplete-list {
    display: block;
    border: 1px solid #ddd;
}

/* Скрыть крестик в поле поиска */
.search-form input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.search-form input[type="search"]::-moz-search-clear-button {
    display: none;
}



/* Адаптивность */
@media screen and (min-width:300px) and (max-width:768px){


    .category-list{
        gap:10px;
    }

    

    .post-grid {
        grid-template-columns: 1fr;
    }

    .emoji-item {
        width: 45px;
        height: 45px;
    }

    #breadcrumbs {
        padding: 8px 12px;
    }

    .emoji-info {
        flex-direction: column;
        gap: 10px;
    }

    .emoji-list,
    .category-list,
    .category-container{
        gap:5px;
    }

    .emoji-description,
    .emoji-count {
        flex: 1;
    }

    .btn {
        font-size: 15px;
    }
    button.btn{
        height: 46px;
    }
}

.ad-left,.ad-right{position:fixed;top:120px;width:160px;height:auto;z-index:1000;}
.ad-left{left:10px}
.ad-right{right:10px}
.ad-article{display:none}
.ad-article2{grid-column: 1 / -1}
@media screen and (min-width:300px) and (max-width:768px){.ad-article{display:block;grid-column: 1 / -1;}}
@media (max-width: 1200px){.ad-left,.ad-right{display:none}}
@media (min-width: 1400px){.ad-left{left: calc(50% - 680px);}.ad-right{right: calc(50% - 680px);}}
