/* Основные стили */
html, body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
}

h1, h2 {
  font-family: 'Philosopher', sans-serif;
}

@font-face {
    font-family: 'Marck Script';
    src: url('/includes/MarckScript-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Segoe Print';
    src: url('/includes/segoeprint_bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.marck {
    font-family: 'Marck Script', cursive;
}

.segoe {
    font-family: 'Segoe Print', cursive;
}

.philo {
    font-family: 'Philosopher', cursive;
}

.logo-bounce span {
  display: inline-block;
  font-family: 'Segoe Print', cursive;
  animation: bounce 1.4s infinite ease-in-out;
}

.logo-bounce span:nth-child(1) { animation-delay: 0s; }
.logo-bounce span:nth-child(2) { animation-delay: 0.1s; }
.logo-bounce span:nth-child(3) { animation-delay: 0.2s; }
.logo-bounce span:nth-child(4) { animation-delay: 0.3s; }
.logo-bounce span:nth-child(5) { animation-delay: 0.4s; }
.logo-bounce span:nth-child(6) { animation-delay: 0.5s; }
.logo-bounce span:nth-child(7) { animation-delay: 0.6s; }
.logo-bounce span:nth-child(8) { animation-delay: 0.7s; }

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  40% {
    transform: translateY(5px);
  }
}

.gradient-title {
  font-family: 'Philosopher', sans-serif;
  font-size: 2.8rem;
  text-align: center;
  background: linear-gradient(
    90deg,
    #ffffff,
    #4fc3f7,
    #81d4fa,
    #a18cd1,
    #29b6f6,
    #84fab0,
    #ffffff
  );
  background-size: 400% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
  margin-bottom: 30px;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 400% center;
  }
}


.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

/* Шапка */
.main-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
	
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
	
}
.main-header {
    position: fixed; /* Фиксируем хедер всегда */
    width: 100%;
    top: 0;
    z-index: 1000;
}

.main-content {
    padding-top: 70px; /* Отступ = высота хедера */
}

.logo a {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

/* Герой-секция */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Сетка услуг */
.services-preview {
    padding: 80px 0;
}

.services-preview h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    margin-bottom: 20px;
    color: #666;
}

/* Избранные работы */
.featured-works {
    padding: 80px 0;
    background-color: #f1f1f1;
}

.featured-works h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.work-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.work-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.work-item h3 {
    padding: 20px;
    text-align: center;
}

/* Подвал */
.main-footer {
    background-color: var(--dark-color);
    color: var(--text-light);
    padding: 50px 0 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-column p {
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Мобильное меню */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-button span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-button span:nth-child(1) {
    top: 0;
}

.mobile-menu-button span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-button span:nth-child(3) {
    bottom: 0;
}

.mobile-menu-button.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Адаптация меню */
@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--primary-color);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav ul li {
        margin: 15px 0;
    }
    
    .main-header .container {
        position: relative;
    }
	


}

/* Кнопка "Наверх" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.back-to-top i {
    font-size: 20px;
}

/* Добавляем в медиа-запрос для мобильных */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/*Посты*/
/* Основные стили страницы поста */
.post-page {
    padding: 40px 0;
}

.post-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin-bottom: 30px;
}

/* Заголовок поста */
.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-size: 0.9rem;
}

.updated {
    font-size: 0.85rem;
    color: #95a5a6;
}

/* Изображение поста */
.post-image-wrapper {
    margin: 30px 0;
    text-align: center;
}

.post-main-image {
    max-width: 60%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Видео */
.post-video-wrapper {
    margin: 30px 0;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.post-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Контент поста */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    margin: 30px 0;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

/* Лайки */
.post-actions {
    margin: 40px 0;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.like-form {
    display: flex;
    justify-content: center;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    color: #7f8c8d;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.like-btn:hover {
    background: #f1f2f3;
    color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.like-btn.liked {
    background: #fff0f0;
    color: #e74c3c;
}

.like-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.like-btn i {
    font-size: 1.1rem;
}

.likes-count {
    font-weight: 600;
}

.like-text {
    font-family: 'Philosopher', sans-serif;
}

/* Навигация между постами */
.post-navigation {
    margin: 50px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex: 1;
    max-width: calc(50% - 10px);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
    justify-content: flex-end;
}

.nav-prev:hover,
.nav-next:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-prev.disabled,
.nav-next.disabled {
    background: #f8f9fa;
    color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.nav-title {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Комментарии */
.post-comments {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.comments-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.comments-title i {
    color: #3498db;
}

.comments-count {
    background: #3498db;
    color: #fff;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-left: 5px;
	
}

.comments-list {
    margin-bottom: 30px;
}

.comment {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #f5f7f9;
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 1.5rem;
}

.comment-body {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-date {
    font-size: 0.85rem;
    color: #95a5a6;
}

.comment-text {
    color: #34495e;
    line-height: 1.6;
    font-size: 0.95rem;
}

.no-comments {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
}

.no-comments i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #bdc3c7;
    display: block;
}

.no-comments p {
    margin: 0;
}

/* Форма комментария */
.comment-form {
    margin-top: 40px;
}

.form-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(41, 128, 185, 0.3);
}

.btn-submit i {
    font-size: 0.9rem;
}

/* Сайдбар */
.post-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-block {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.sidebar-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title i {
    color: #3498db;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.category-link {
    color: #34495e;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.category-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.popular-post {
    display: flex;
	margin: 0 auto;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f7f9;
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-image {
    flex-shrink: 0;
    width: 150px;
    /*height: 60px;*/
    border-radius: 6px;
    overflow: hidden;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-post-image:hover img {
    transform: scale(1.05);
}

.popular-post-content {
    flex-grow: 1;
}

.popular-post-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.popular-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
}

.popular-post-title a:hover {
    color: #3498db;
}

/* Адаптивность */
@media (max-width: 992px) {
    .post-main-image {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .post-container {
        padding: 25px;
    }
    
    .post-title {
        font-size: 2.2rem;
    }
    
    .post-main-image {
        max-width: 100%;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-prev,
    .nav-next {
        max-width: 100%;
    }
    
    .post-sidebar {
        margin-top: 50px;
    }
}

@media (max-width: 576px) {
    .post-container {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-bottom: 10px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-date {
        margin-left: 0;
    }
}

/* Подчеркивание заголовка */
.title-wrapper {
    position: relative;
    display: inline-block; /* Чтобы линия была по ширине текста */
    margin-bottom: 15px;
}

.post-title {
    margin: 0;
    padding-bottom: 10px;
}

/* Голубая линия с анимацией */
.post-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #1e88e5, #64b5f6);
  
}

.title-wrapper:hover .post-title::after {
    transform: scaleX(1); /* Анимация при наведении */
}

/* Альтернатива — линия всегда видна (без анимации) */
/*
.post-title::after {
    transform: scaleX(1);
}
*/

.title-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: #1e88e5; /* Голубой цвет */
}

/* Расположение элементов мета-данных */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

/* Блок лайков и шаринга */
.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
}

.like-form {
    margin: 0;
}

.share-block {
    margin-left: auto;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .post-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .share-block {
        margin-left: 0;
        margin-top: 15px;
    }
}


/* Кнопка скачивания */
.download-btn-wrapper {
    text-align: right;
    margin-top: 10px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #1e88e5;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Звёздный рейтинг */
.rating-block {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
	align-items: center;
}

.star-rating {
    font-size: 24px;
    margin: 10px 0;
}

.star-rating i {
    color: #FFD700;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 2px;
}

.star-rating.disabled i {
    cursor:pointer;
}

.rating-info {
    font-size: 14px;
    color: #666;
}

.avg-rating {
    font-weight: bold;
    color: #333;
}

.rating-notice {
    margin-top: 10px;
    color: #1e88e5;
    font-size: 13px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.action-group {
    flex: 1;
    display: flex;
    justify-content: center;
}

.rating-group {
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .post-actions {
        flex-direction: column;
    }
    .rating-group {
        border: none;
        padding: 15px 0;
    }
}

/* Кнопка загрузки комментариев */
.load-more-wrapper {
    text-align: center;
    margin: 25px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: #f5f5f5;
    border: none;
    border-radius: 30px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: #1e88e5;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.comments-count {
    margin-top: 10px;
    font-size: 13px;
    color: #fff;
	margin-top: 0px;
}

/*Подгрузка комментов*/
.load-more-comments-wrapper {
    text-align: center;
    margin: 20px 0;
}

.load-more-btn {
    background: #1e88e5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.load-more-btn:hover {
    background: #1565c0;
}

.load-more-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.comments-count {
    margin-top: 10px;
    font-size: 14px;
    color: #fff;
	margin-top: 0px;
}

/*эмоджи*/

.emoji-picker {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.emoji {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s;
}
.emoji:hover {
    transform: scale(1.2);
}

/*капча коммент*/

.captcha-block {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e1e4e8;
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.captcha-image-wrapper {
    margin: 10px 0;
    text-align: center;
	
}

.captcha-image {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 100%;

}

.refresh-captcha {
    background: none;
    border: none;
    color: #1e88e5;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s;
}

.refresh-captcha:hover {
    transform: rotate(180deg);
}

.captcha-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}

.captcha-error {
    color: #e53935;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

/*инфо каптча*/
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/*главная картинки*/
@import url('https://fonts.googleapis.com/css2?family=Philosopher:wght@400;700&display=swap');

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.work-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 4px solid transparent;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    background: #f9f9f9;
}

.work-card:hover {
    border-color: #3498db;
    background-color: #f0f0f0;
}

.work-img img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 0;
}

.work-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 20px;
    font-weight: bold;
    padding: 12px 16px;
    background: rgba(0,0,0,0.03);
    transition: background-color 0.3s ease;
}

.work-card:hover .work-title {
    background-color: #3498db;
    color: #fff;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 16px 16px;
    font-size: 14px;
    color: #666;
}

.work-meta span {
    margin-right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/*подгрузка картинки*/
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.work-card {
    display: block;
    text-decoration: none;
    border: 2px solid transparent;
    transition: 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.work-card:hover {
    border-color: #00aaff;
}

.work-img img {
    width: 100%;
    height: auto;
    display: block;
}

.work-title {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.2rem;
    padding: 10px;
    background: #f0f8ff;
    text-align: center;
}

.work-meta {
    font-size: 0.85rem;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    background: #fafafa;
}

.load-more-wrapper {
display: flex;
    justify-content: center;
    margin-top: 30px;
}

#loadMoreBtn {
    padding: 10px 25px;
    background: #00aaff;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
#loadMoreBtn:hover {
    background: #008ecc;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px; /* фиксированная высота */
    padding: 0 16px; /* равные отступы слева и справа */
    background-color: #e0f3ff;
    border-radius: 20px;
    color: #0077aa;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap; /* чтобы не ломался текст */
    line-height: 1; /* устранение смещения */
}

.category-item:hover {
    background-color: #cceaff;
    color: #005577;
}

.category-item img {
    height: 20px;
    margin-right: 8px;
}

.category-item.active {
    background-color: #00aaff;
    color: #fff;
    font-weight: 600;
}

/* Главное меню */
.main-nav ul li.has-dropdown {
    position: relative;
}

.main-nav ul li.has-dropdown > ul.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
}

.main-nav ul li.has-dropdown:hover > ul.dropdown {
    display: block;
}

.dropdown-item {
    position: relative;
}

.dropdown-submenu {
    display: none;
    position: absolute;
    top: 0;
    left: -100%; /* Показывается слева от родителя */
    background: #fff;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-item:hover > .dropdown-submenu {
    display: block;
}

.dropdown a {
    display: block;
    padding: 10px 15px;
    color: #000 !important;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown a:hover {
    background: #e3f2fd;
}

/* Сбрасываем flex только для выпадающих меню */
.main-nav ul.dropdown,
.main-nav ul.dropdown-submenu {
    display: block;
    position: absolute;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0;
    margin: 0;
    list-style: none;
    z-index: 999;
}

/* Прячем по умолчанию */
.dropdown,
.dropdown-submenu {
    display: none;
}

/* Показываем главное меню при ховере */
.has-dropdown:hover > .dropdown {
    display: block;
}

/* Показываем подменю при ховере на пункт */
.dropdown-item {
    position: relative;
}

.dropdown-item:hover > .dropdown-submenu {
    display: block;
}

/* Отображаем подкатегории слева от родителя */
.dropdown-submenu {
    top: 0;
    left: -100%;
}

/* Ссылки в выпадающих меню */
.dropdown a, .dropdown-submenu a {
    display: block;
    padding: 10px 15px;
    color: #000 !important;
    text-decoration: none;
    white-space: nowrap;
}

.dropdown a:hover, .dropdown-submenu a:hover {
    background: #e3f2fd;
}

/* Обнуляем flex в выпадающем меню */
.dropdown li, .dropdown-submenu li {
    margin: 0;
}

/*гостева книга*/
.review-form-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto 40px auto;
}

.review-form .form-group {
    margin-bottom: 20px;
}

.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

.review-form textarea {
    min-height: 120px;
    resize: vertical;
}

.review-card a.vk-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #4a76a8;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.review-card a.vk-profile:hover {
    background-color: #375a94;
}

.review-card a.vk-profile svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.page-content {
    font-size: 1.1rem;
    line-height: 1.6;
}


/*Популярное*/
.popular-posts-wrapper {
  display: flex;
  gap: 15px;
  overflow-x: auto; /* Горизонтальный скролл при необходимости */
  padding-bottom: 10px;
}

.popular-post {
  flex: 0 0 auto;
  width: 200px; /* ширина плитки фиксирована */
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* чтобы заголовок под картинкой */
  align-items: center; /* центрируем содержимое */
  padding: 10px;
}

.popular-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}



.popular-post-content {
  margin-top: 10px;
  width: 100%;
  text-align: center;
}

.popular-post-title {
  font-size: 15px;
  margin: 0;
  line-height: 1.2em;
  max-height: 2.4em; /* примерно 2 строки */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* обрезка по строкам */
  -webkit-box-orient: vertical;
}

.popular-post-title a {
  color: #333;
  text-decoration: none;
}

.popular-post-title a:hover {
  text-decoration: underline;
}

/*всплывающее окно при наведении на картинку*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
}


/*поиск*/
/* Стили для формы поиска */
.desktop-search {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.mobile-search {
    display: none;
    padding: 15px 15px 0;
    margin-bottom: 10px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s;
    width: 180px;
}

.search-input:focus {
    outline: none;
    border-color: #333;
    width: 200px;
}

.search-button {
    background: none;
    border: none;
    margin-left: -35px;
    cursor: pointer;
    color: #333;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .desktop-search {
        display: none;
    }
    
    .mobile-search {
        display: block;
    }
    
    .search-input {
        width: 100%;
    }
    
    .search-input:focus {
        width: 100%;
    }
}

/*разметка для поиска*/
/* Добавьте эти стили в ваш CSS файл */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    justify-content: center;
}

.work-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Для случаев, когда результатов очень мало (1-2) */
.works-grid.few-results {
    grid-template-columns: repeat(auto-fit, minmax(300px, 400px));
    justify-content: center;
}

.search-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
}
