/* Стили для страницы терапевтических сказок */
.fairy-tales-hero {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.fairy-tales-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.fairy-tales-hero-content {
    position: relative;
    z-index: 2;
}

.search-filters {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Двухуровневая система фильтров */
.filter-level {
    background: #f8f9fa;
    border: 1px solid #e3e6ea;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-level-title {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 2rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    background: #fff;
    flex: 0 0 auto; /* Не растягиваться */
}

.filter-tag:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78, 205, 196, 0.2);
}

.filter-tag.active {
    border-color: #4ecdc4;
    background: #4ecdc4;
    color: white;
}

.filter-tag .emoji {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* Скрытие категорий (после 5-й) */
.filter-tag.category-extra {
    display: none;
}

.filter-tag.category-extra.show {
    display: inline-flex;
}

/* Скрытие целей (после 5-й) */
.filter-tag.goal-extra {
    display: none;
}

.filter-tag.goal-extra.show {
    display: inline-flex;
}

/* Скрытие/показ блока целей */
.goals-filter.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.goals-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.goals-content.expanded {
    max-height: 500px;
    transition: max-height 0.4s ease-in;
}

/* ЦЕНТРИРОВАННАЯ ЗАМЕТНАЯ КНОПКА */
.toggle-more-btn {
    display: block;
    width: fit-content;
    margin: 1rem auto 0;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.65rem 1.75rem;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
}

.toggle-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.5);
    background: linear-gradient(135deg, #44a08d 0%, #4ecdc4 100%);
}

.toggle-more-btn i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.toggle-more-btn.expanded i {
    transform: rotate(180deg);
}

.fairy-tale-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    overflow: visible;
    transition: all 0.3s ease;
    height: 100%;
    margin-top: 10px;
}

.fairy-tale-image {
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: hidden;
}

.fairy-tale-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #4ecdc4;
}

.fairy-tale-image {
    position: relative;
    aspect-ratio: 16/10;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0.8;
}

/* Ярлычок "НОВОЕ" */
.badge-new {
    position: absolute;
    top: -10px;
    left: 12px;
    background: linear-gradient(135deg, #FF6B9D 0%, #FF1744 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.4);
    z-index: 10;
    animation: badgeNew 0.5s ease-out;
}

@keyframes badgeNew {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.fairy-tale-content {
    padding: 1.5rem;
}

.fairy-tale-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.fairy-tale-title:hover {
    color: #4ecdc4;
}

.fairy-tale-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.age-badge {
    display: inline-block;
    background: #e8f4fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.price-badge {
    display: inline-block;
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.price-badge.free {
    background: #fff3e0;
    color: #f57c00;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@media (max-width: 768px) {
    .fairy-tales-hero {
        padding: 2rem 1rem;
    }
    
    .search-filters {
        padding: 1rem;
    }
    
    .filter-tags {
        justify-content: flex-start; /* Выравнивание слева для компактности */
        gap: 0.4rem; /* Уменьшенный зазор */
    }
    
    .filter-tag {
        padding: 0.3rem 0.6rem; /* Ещё компактнее! */
        font-size: 0.75rem; /* Ещё меньше шрифт */
        border-width: 1.5px; /* Тоньше рамка */
        flex: 0 0 auto; /* Не растягиваться, ширина по содержимому */
        max-width: fit-content; /* Максимальная ширина по содержимому */
    }
    
    .filter-tag .emoji {
        font-size: 0.9rem; /* Ещё меньше эмодзи */
        margin-right: 0.35rem;
    }
    
    .filter-level-title {
        font-size: 0.85rem; /* Меньше заголовок */
        margin-bottom: 0.6rem;
    }
    
    .toggle-more-btn {
        font-size: 0.8rem; /* Меньше кнопка */
        padding: 0.5rem 1.25rem;
        margin-top: 0.75rem;
    }
}

/* Стили баннера поддержки */
.support-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.support-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.support-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
}

.support-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
}

.support-icon {
    font-size: 4rem;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

.support-text {
    flex: 1;
}

.support-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.support-text p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
    line-height: 1.5;
}

.support-action {
    flex-shrink: 0;
}

.btn-support {
    background: white;
    color: #667eea;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-support:hover {
    background: #ffd700;
    color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
    text-decoration: none;
}

/* Адаптивность баннера */
@media (max-width: 768px) {
    .support-banner {
        padding: 1.5rem;
    }

    .support-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .support-icon {
        font-size: 3rem;
    }

    .support-text h3 {
        font-size: 1.2rem;
    }

    .support-text p {
        font-size: 0.9rem;
    }

    .btn-support {
        font-size: 1rem;
        padding: 0.65rem 1.5rem;
        width: 100%;
        justify-content: center;
    }
}
