/* ============================================
   ОСНОВНЫЕ СТИЛИ ДЛЯ ТЕМЫ "ТАТАРСКИЕ ПОЗДРАВЛЕНИЯ"
   ============================================ */
:root {
    --color-primary: #006B5F;
    --color-primary-light: #00897B;
    --color-secondary: #D4AF37;
    --color-accent: #8B0000;
    --color-light: #F5F5DC;
    --color-dark: #2C3E50;
    --color-white: #FFFFFF;
    --color-gray: #F8F9FA;
    --color-gray-dark: #6C757D;
    --font-heading: 'Roboto Slab', Georgia, serif;
    --font-body: 'PT Sans', 'Roboto', 'Segoe UI', sans-serif;
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .hero-title, .site-logo-text {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

button, .btn, a.button {
    font-family: var(--font-body);
    font-weight: 700;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   ШАПКА
   ============================================ */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.site-title a:hover {
    color: var(--color-accent);
}

.site-description {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    font-style: italic;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

.header-search {
    display: flex;
    align-items: center;
    background-color: var(--color-gray);
    border-radius: var(--border-radius-sm);
    padding: 5px;
    width: 300px;
}

.header-search input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
}

.header-search button {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.header-search button:hover {
    background-color: var(--color-primary-light);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 5px;
}

/* ============================================
   НАВИГАЦИЯ
   ============================================ */
.main-navigation {
    background-color: var(--color-primary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
}

#primary-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    margin: 0;
    padding: 0;
}

#primary-menu li {
    position: relative;
}

#primary-menu a {
    display: block;
    color: var(--color-white);
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 500;
    transition: var(--transition);
}

#primary-menu a:hover,
#primary-menu .current-menu-item > a {
    background-color: rgba(255, 255, 255, 0.1);
}

#primary-menu i {
    margin-right: 8px;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */
.site-main {
    padding: 40px 0;
}

/* Герой-секция */
.hero {
    font-family: "PT Mono", monospace;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-gray) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
    opacity: 0.1;
}

.hero-content h2 {
    font-family: "PT Mono", monospace;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background-color: #A00000;
}

.hero-image {
    position: relative;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

/* Секции */
.section-title {
    font-family: "PT Mono", monospace;
    font-size: 2rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--color-secondary);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    text-align: center;
}

/* Категории */
.categories-section {
    margin-bottom: 60px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.category-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 25px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--color-secondary);
}

.category-icon {
    width: 70px;
    height: 70px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.category-card p {
    color: var(--color-gray-dark);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.count {
    display: inline-block;
    background-color: var(--color-gray);
    color: var(--color-gray-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Поздравления */
.congratulations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.congrat-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.congrat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-lg);
}

.congrat-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.congrat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.random-congratulations,
.popular-congratulations {
    max-width: 800px;
    margin: 0 auto;
}

.congrat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.congrat-actions,
.random-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.congrat-actions button,
.random-actions button {
    padding: 8px 15px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.copy-btn:hover {
    background-color: var(--color-primary-light);
}

.read-more-btn,
.congrat-actions .read-more-btn,
.cat-pane .read-more-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--border-radius-sm);
}

.read-more-btn:hover,
.congrat-actions .read-more-btn:hover,
.cat-pane .read-more-btn:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

.category-badge {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.views,
.likes,
.date {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.congrat-meta {
    display: flex;
    gap: 15px;
}

.congrat-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.congrat-title a {
    color: inherit;
    text-decoration: none;
}

.congrat-title a:hover {
    color: var(--color-accent);
}

.congrat-content {
    color: var(--color-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.congrat-content p {
    margin-bottom: 0;
}

.congrat-tags {
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    background-color: var(--color-gray);
    color: var(--color-gray-dark);
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

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

.tag:hover {
    background-color: var(--color-primary-light);
    color: var(--color-white);
}

/* Хлебные крошки */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 5px;
    color: var(--color-gray-dark);
}

.breadcrumbs .current {
    color: var(--color-gray-dark);
}

/* Навигация между поздравлениями */
.congrat-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-gray);
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 15px;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-dark);
    transition: var(--transition);
    border: 1px solid var(--color-gray);
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.nav-subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    margin-bottom: 5px;
}

.nav-previous a:hover .nav-subtitle,
.nav-next a:hover .nav-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.nav-title {
    display: block;
    font-weight: 500;
}

.nav-next {
    text-align: right;
}

.related-congratulations {
    margin-top: 60px;
}

/* Преимущества */
.features-section {
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.feature-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
}

/* ============================================
   ПОДВАЛ
   ============================================ */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column .widget {
    margin-bottom: 20px;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-secondary);
}

.widget p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    margin-bottom: 10px;
}

.widget a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.widget a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info i {
    color: var(--color-secondary);
    margin-top: 3px;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.site-info p {
    margin-bottom: 5px;
}

.footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 50px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-secondary);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-secondary);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 5px;
}

/* Пагинация */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 5px;
    flex-direction: row;
}

.page-numbers {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--color-white);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    border: 1px solid var(--color-gray);
    color: var(--color-dark);
}

.page-numbers:hover,
.page-numbers.current {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Боковая панель */
.sidebar {
    margin-top: 40px;
}

.widget {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.widget:last-child {
    margin-bottom: 0;
}

/* ============================================
   🔍 ФОРМА ПОИСКА (ИСПРАВЛЕННАЯ)
   ============================================ */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-form label {
    display: flex;
    flex: 1;
    margin: 0;
}

.search-form .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.search-form .search-field {
    flex: 1;
    border: none;
    background: var(--color-white);
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    min-width: 0;
    width: 100%;
}

.search-form .search-field:focus {
    box-shadow: 0 0 0 2px rgba(0, 107, 95, 0.2) inset;
}

.search-form .search-submit {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    padding: 10px 18px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.search-form .search-submit:hover {
    background-color: var(--color-primary-light);
}

/* ============================================
   📱 МОБИЛЬНЫЙ ПОИСК
   ============================================ */
.mobile-search {
    display: none;
}

/* ============================================
   КОММЕНТАРИИ
   ============================================ */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--color-gray);
}

.comments-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.comment {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.comment-author .fn {
    font-weight: 500;
    color: var(--color-primary);
}

.comment-metadata a {
    color: var(--color-gray-dark);
    text-decoration: none;
}

.comment-metadata a:hover {
    color: var(--color-primary);
}

.comment-content {
    line-height: 1.6;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.comment-reply-link:hover {
    background-color: var(--color-primary-light);
}

.comment-respond {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-top: 35px;      /* ← отступ от предыдущего блока */
    margin-bottom: 20px;
}

/* Если комментариев ещё нет — форма не прилипает к заголовку */
.comments-title + .comment-respond {
    margin-top: 25px;
}

.comment-reply-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--color-dark);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 107, 95, 0.1);
}

.comment-form .submit {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .submit:hover {
    background-color: var(--color-primary-light);
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow);
    z-index: 3000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Загрузка */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Пустая страница */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results .page-title {
    margin-bottom: 20px;
}

.no-results .page-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Страница 404 */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 .page-title {
    font-size: 6rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.error-404 .page-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Админ-бар */
.admin-bar .site-header {
    top: 32px;
}

/* Экран входа */
.login h1 a {
    background-image: url('../images/logo.png');
    background-size: contain;
    width: 200px;
    height: 100px;
}

.login form {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.login .button-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.login .button-primary:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

/* ============================================
   БРЕНДИНГ С ЛОГОТИПОМ
   ============================================ */
.branding-with-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.branding-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.branding-site-title {
    font-size: 45px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.branding-site-title a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   🍔 БУРГЕР-МЕНЮ
   ============================================ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
    width: 40px;
    height: 40px;
    outline: none;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle span::before {
    top: -9px;
}

.menu-toggle span::after {
    top: 9px;
}

.menu-toggle.toggled span {
    background-color: transparent;
}

.menu-toggle.toggled span::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.toggled span::after {
    top: 0;
    transform: rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   🎨 ОТКРЫТКИ
   ============================================ */
.postcards-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    margin-bottom: 60px;
}

.postcards-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.postcards-section .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
    letter-spacing: -0.5px;
}

.postcards-section .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 18px auto 0;
    border-radius: 4px;
}

.postcards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.postcard-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.postcard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.postcard-preview-wrap {
    position: relative;
    width: 100%;
    padding-top: 133.33%;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.postcard-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.postcard-card:hover .postcard-preview {
    transform: scale(1.08);
}

.postcard-card::after {
    content: '🔍 Открыть';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 76.5%;
    background: rgba(102, 126, 234, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(2px);
}

.postcard-card:hover::after {
    opacity: 1;
}

.postcard-preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.postcard-info {
    padding: 14px 12px;
    text-align: center;
    background: #fff;
}

.postcard-info h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.postcard-info span {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f2f5;
    border-radius: 12px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

/* ============================================
   🖼️ МОДАЛЬНОЕ ОКНО ОТКРЫТОК
   ============================================ */
.postcard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    padding: 40px 20px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.postcard-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.postcard-modal-content {
    background: #fff;
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.postcard-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.postcard-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.postcard-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.postcard-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.postcard-gallery {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    background: #fafbfc;
}

.postcard-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    background: #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.postcard-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.postcard-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.postcard-item:hover img {
    transform: scale(1.05);
}

.postcard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 40%, rgba(102, 126, 234, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.postcard-item:hover .postcard-overlay {
    opacity: 1;
}

.postcard-zoom {
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(5px);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.postcard-item:hover .postcard-zoom {
    transform: translateY(0);
}

.postcard-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.no-postcards {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 16px;
}

/* ============================================
   🔦 ЛАЙТБОКС
   ============================================ */
.postcard-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
}

.postcard-lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.postcard-lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.postcard-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.postcard-lightbox img {
    max-width: 70%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.postcard-lightbox-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.btn-lightbox-download {
    padding: 12px 28px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-lightbox-download:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-lightbox-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   📐 АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
        padding: 0 15px;
    }

    .postcards-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .postcard-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .site-main {
        padding: 30px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 25px;
        gap: 30px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        height: 250px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .congratulations-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .page-numbers {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .postcards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .postcard-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .postcard-info h3 {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    /* Бургер */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-navigation {
        display: block !important;
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        z-index: 999;
        transition: right 0.35s ease;
        overflow-y: auto;
        padding-top: 80px;
        margin-bottom: 0;
        border-radius: 0;
    }

    .main-navigation.toggled {
        right: 0;
    }

    #primary-menu {
        flex-direction: column;
        padding: 0;
    }

    #primary-menu li {
        border-bottom: 1px solid rgba(0, 107, 95, 0.1);
    }

    #primary-menu a {
        color: var(--color-dark);
        padding: 15px 25px;
        font-size: 1rem;
        border-bottom: none;
        background-color: transparent;
    }

    #primary-menu a:hover,
    #primary-menu .current-menu-item > a {
        background-color: rgba(0, 107, 95, 0.08);
        color: var(--color-primary);
    }

    #primary-menu i {
        margin-right: 10px;
        color: var(--color-primary);
    }

    /* Скрываем десктопный поиск */
    .header-search.desktop-only {
        display: none !important;
    }

    /* Показываем мобильный поиск */
    .mobile-search {
        display: flex !important;
        width: 100% !important;
        margin: 0 0 12px 0;
        background-color: var(--color-gray);
        border-radius: var(--border-radius-sm);
        padding: 5px;
    }

    .mobile-search .search-form {
        width: 100%;
    }

    /* Шапка и брендинг */
    .header-top {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .site-branding {
        flex: 1;
        min-width: 0;
    }

    .branding-with-logo {
        flex-wrap: nowrap;
        gap: 10px;
        justify-content: flex-start;
    }

    .branding-logo img {
        max-height: 40px;
        max-width: 120px;
        width: auto;
        height: auto;
        transition: all 0.3s ease;
    }

    .branding-site-title {
        font-size: clamp(18px, 5vw, 32px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: font-size 0.3s ease;
    }

    /* Контент */
    .site-title {
        font-size: 1.5rem;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .section-title,
    .page-title {
        font-size: 1.6rem;
    }

    .categories-grid,
    .congratulations-grid,
    .features-grid,
    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .congrat-actions {
        flex-direction: column;
    }

    .congrat-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Открытки на мобильных */
    .postcards-section {
        padding: 50px 0;
    }

    .postcards-section .section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .postcards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 0 10px;
    }

    .postcard-modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }

    .postcard-modal {
        padding: 20px 10px;
    }

    .postcard-modal-header {
        padding: 15px 20px;
    }

    .postcard-modal-header h2 {
        font-size: 18px;
    }

    .postcard-gallery {
        padding: 15px;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .postcard-lightbox img {
        max-width: 95%;
        max-height: 75vh;
    }

    .postcard-lightbox {
        padding: 20px;
    }

    .postcard-lightbox-actions {
        flex-direction: column;
        width: 90%;
    }

    .btn-lightbox-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.3rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section-title,
    .page-title {
        font-size: 1.4rem;
    }

    .main-navigation {
        width: 100%;
        right: -100%;
    }

    .branding-logo img {
        max-height: 32px;
        max-width: 90px;
    }

    .branding-site-title {
        font-size: clamp(16px, 4.5vw, 26px);
        max-width: 180px;
    }

    .branding-with-logo {
        gap: 8px;
    }

    .postcards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .postcard-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .postcard-info {
        padding: 10px 8px;
    }

    .postcard-info h3 {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .postcards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .postcard-info h3 {
        font-size: 11px;
    }

    .postcard-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

/* Горизонтальная ориентация на телефонах */
@media (max-height: 500px) and (orientation: landscape) {
    .postcard-lightbox img {
        max-height: 70vh;
        max-width: 75%;
    }

    .postcard-lightbox-actions {
        flex-direction: row;
        margin-top: 15px;
    }

    .postcard-modal-content {
        max-height: 80vh;
    }

    .postcard-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 12px;
    }
}

/* Touch-устройства */
@media (hover: none) and (pointer: coarse) {
    .postcard-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .postcard-card:active {
        transform: scale(0.97);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
}

/* Accessibility */
.postcard-card:focus-visible,
.postcard-modal-close:focus-visible,
.postcard-lightbox-close:focus-visible,
.postcard-lightbox-actions button:focus-visible {
    outline: 3px solid #4A90D9;
    outline-offset: 2px;
}

/* ============================================
   ✨ ДОПОЛНИТЕЛЬНО
   ============================================ */
::selection {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: var(--color-gray);
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-primary-light);
}

/* Анимация появления карточек */
.category-card,
.congrat-card,
.feature-card,
.widget {
    animation: fadeIn 0.5s ease-out;
}

/* Админ-бар на мобильных */
@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* ============================================
   🎯 ИКОНКИ В МЕНЮ
   ============================================ */

/* Десктоп: иконки в строку с текстом */
#primary-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
}

#primary-menu a i {
    font-size: 0.95em;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Анимация иконки при наведении */
#primary-menu a:hover i {
    transform: scale(1.2);
}

/* Мобильные: иконки крупнее и с отступом */
@media (max-width: 768px) {
    #primary-menu a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 15px 25px;
    }

    #primary-menu a i {
        font-size: 1.15em;
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 107, 95, 0.08);
        border-radius: 8px;
        color: var(--color-primary);
        flex-shrink: 0;
    }

    #primary-menu a:hover i,
    #primary-menu .current-menu-item > a i {
        background: var(--color-primary);
        color: var(--color-white);
    }
}

/* ============================================
   📅 КАЛЕНДАРЬ ПРАЗДНИКОВ
   ============================================ */
.holiday-calendar {
    padding: 60px 0;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    margin-bottom: 60px;
}

/* Главная карточка ближайшего праздника */
.holiday-hero-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 30px;
    background: var(--color-white);
    border-radius: 20px;
    padding: 35px 40px;
    margin-bottom: 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-left: 6px solid var(--holiday-color, #006B5F);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.holiday-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--holiday-color) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.holiday-hero-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.holiday-hero-card:hover::before {
    opacity: 0.06;
}

.holiday-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--holiday-color, #006B5F);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.holiday-hero-card:hover .holiday-hero-icon {
    transform: scale(1.1) rotate(-5deg);
}

.holiday-hero-info h3 {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
    margin: 4px 0 2px;
}

.holiday-hero-date {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--holiday-color, #006B5F);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.holiday-hero-rus {
    font-size: 15px;
    color: #7f8c8d;
    margin: 0;
}

/* Обратный отсчёт */
.holiday-countdown {
    text-align: center;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    min-width: 110px;
}

.countdown-number {
    display: block;
    font-size: 42px;
    font-weight: 800;
    color: var(--holiday-color, #006B5F);
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
    white-space: nowrap;
}

/* Кнопка CTA */
.holiday-hero-cta {
    padding: 12px 24px;
    background: var(--holiday-color, #006B5F);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.holiday-hero-card:hover .holiday-hero-cta {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Лента праздников с горизонтальным скроллом */
.holiday-scroll-wrapper {
    position: relative;
}

.holiday-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 5px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) transparent;
}

.holiday-scroll::-webkit-scrollbar {
    height: 6px;
}

.holiday-scroll::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

/* Карточка праздника в ленте */
.holiday-card {
    flex: 0 0 170px;
    scroll-snap-align: start;
    background: var(--color-white);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-top: 4px solid var(--holiday-color, #006B5F);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.holiday-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.holiday-card-date {
    margin-bottom: 12px;
}

.holiday-day {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--holiday-color, #006B5F);
    line-height: 1;
}

.holiday-month {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #95a5a6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.holiday-card-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--holiday-color, #006B5F);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.holiday-card:hover .holiday-card-icon {
    transform: scale(1.15) rotate(5deg);
}

.holiday-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    margin-bottom: 10px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.holiday-days-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
}

/* ============================================
   📅 АДАПТИВНОСТЬ КАЛЕНДАРЯ
   ============================================ */
@media (max-width: 992px) {
    .holiday-hero-card {
        grid-template-columns: auto 1fr;
        gap: 20px;
        padding: 25px;
    }

    .holiday-countdown {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .countdown-number {
        font-size: 32px;
    }

    .holiday-hero-cta {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .holiday-calendar {
        padding: 40px 0;
    }

    .holiday-hero-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
        padding: 25px 20px;
    }

    .holiday-hero-icon {
        margin: 0 auto;
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .holiday-hero-info h3 {
        font-size: 22px;
    }

    .holiday-card {
        flex: 0 0 150px;
        padding: 16px 12px;
    }

    .holiday-day {
        font-size: 26px;
    }
}

/* ============================================
   📤 ШАРИНГ В MAX И ВКОНТАКТЕ
   ============================================ */

/**
 * Открыть окно шаринга
 */
function openShareWindow(social, url, title, text) {
    var shareUrl = '';

    if (social === 'max') {
        shareUrl = 'https://max.ru/share?url=' + encodeURIComponent(url);
    } else if (social === 'vk') {
        shareUrl = 'https://vk.com/share.php?url=' + encodeURIComponent(url)
                 + '&title=' + encodeURIComponent(title)
                 + '&description=' + encodeURIComponent(text);
    }

    if (shareUrl) {
        var w = 640, h = 560;
        var left = (window.innerWidth - w) / 2;
        var top = (window.innerHeight - h) / 2;
        window.open(shareUrl, 'shareWindow',
            'width=' + w + ',height=' + h + ',top=' + top + ',left=' + left + ',scrollbars=yes,resizable=yes');
    }
}

/* Делегирование кликов по кнопкам шаринга поздравлений */
document.addEventListener('click', function(e) {
    var btn = e.target.closest('.share-btn[data-url]');
    if (!btn) return;

    var social = btn.classList.contains('share-max') ? 'max' : 'vk';
    var url = btn.getAttribute('data-url') || window.location.href;
    var title = btn.getAttribute('data-title') || document.title;
    var text = btn.getAttribute('data-text') || '';

    openShareWindow(social, url, title, text);
});

/* Шаринг открытки из лайтбокса */
function sharePostcard(social) {
    var lightboxImage = document.getElementById('lightboxImage');
    if (!lightboxImage || !lightboxImage.src) return;

    var pageTitle = document.title || 'Открытка';
    var text = 'Смотри, какую открытку я нашёл!';

    // Для картинок делимся URL изображения
    openShareWindow(social, lightboxImage.src, pageTitle, text);
}

/* ============================================
   🎯 ПОДПИСКА НА MAX-КАНАЛ
   ============================================ */

/* --- БОЛЬШАЯ СЕКЦИЯ НА ГЛАВНОЙ --- */
.max-subscribe-section {
    padding: 40px 0 60px;
    background: transparent;
}

.max-subscribe-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, #2AA5E0 0%, #7B68EE 100%);
    border-radius: 24px;
    padding: 45px 50px;
    box-shadow: 0 20px 50px rgba(123, 104, 238, 0.25);
    position: relative;
    overflow: hidden;
}

/* Декоративные круги */
.max-subscribe-card::before,
.max-subscribe-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.max-subscribe-card::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -80px;
}

.max-subscribe-card::after {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: 30%;
}

.max-subscribe-left {
    display: flex;
    align-items: center;
    gap: 25px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.max-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-5deg); }
}

.max-label {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.max-info h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}

.max-info p {
    margin: 0 0 16px;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 480px;
}

.max-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.max-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.95;
}

.max-stat i {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Правая часть — кнопка */
.max-subscribe-right {
    text-align: center;
    position: relative;
    z-index: 1;
}

.max-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 42px;
    background: #fff;
    color: #2AA5E0;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.max-subscribe-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background: #FFD700;
    color: #2c3e50;
}

.max-subscribe-btn i {
    font-size: 20px;
    animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
    50% { transform: rotate(0); }
}

.max-channel-name {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* --- ПЛАВАЮЩАЯ КНОПКА --- */
.max-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px 14px 14px;
    background: linear-gradient(135deg, #2AA5E0 0%, #7B68EE 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(123, 104, 238, 0.5);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    animation: slideInFloat 0.8s cubic-bezier(0.4, 0, 0.2, 1) 3s backwards;
}

@keyframes slideInFloat {
    from {
        transform: translateX(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.max-floating-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(123, 104, 238, 0.7);
}

.max-floating-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Пульсация */
.max-floating-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(135deg, #2AA5E0 0%, #7B68EE 100%);
    transform: translate(-50%, -50%);
    animation: pulse 2.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* Бейдж NEW */
.max-floating-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FF4757;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4);
    animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* --- МИНИ-ВИДЖЕТ В ФУТЕРЕ --- */
.max-footer-widget {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2AA5E0 0%, #7B68EE 100%);
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(42, 165, 224, 0.3);
}

.max-footer-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(42, 165, 224, 0.5);
}

.max-footer-widget > i {
    font-size: 26px;
    flex-shrink: 0;
}

.max-footer-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.max-footer-text strong {
    font-size: 15px;
    font-weight: 700;
}

.max-footer-text span {
    font-size: 12px;
    opacity: 0.9;
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
    .max-subscribe-card {
        grid-template-columns: 1fr;
        padding: 35px 30px;
        gap: 25px;
        text-align: center;
    }

    .max-subscribe-left {
        flex-direction: column;
        text-align: center;
    }

    .max-info p {
        margin-left: auto;
        margin-right: auto;
    }

    .max-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .max-subscribe-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .max-logo {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .max-info h3 {
        font-size: 22px;
    }

    .max-subscribe-btn {
        padding: 16px 32px;
        font-size: 16px;
        width: 100%;
        justify-content: center;
    }

    .max-floating-btn {
        bottom: 80px; /* выше, чтобы не перекрывать мобильный поиск */
        right: 15px;
        padding: 10px 20px 10px 10px;
        font-size: 14px;
    }

    .max-floating-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .max-floating-label {
        display: none;
    }

    .max-floating-btn {
        padding: 10px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }

    .max-floating-icon {
        width: 100%;
        height: 100%;
        background: transparent;
    }

    .max-floating-badge {
        top: -5px;
        right: -5px;
    }
}

/* ============================================
🎧 АУДИО-ПРОИЗНОШЕНИЕ ПОЗДРАВЛЕНИЙ
============================================ */

/* --- Общий контейнер плеера --- */
.audio-player-block {
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfa 100%);
    border: 1px solid rgba(0, 107, 95, 0.12);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(0, 107, 95, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Декоративная полоска сверху */
.audio-player-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 100%;
    animation: audioGradientMove 4s linear infinite;
}

@keyframes audioGradientMove {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* --- Шапка плеера --- */
.audio-player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

/* Иконка наушников с эффектом волны */
.audio-player-icon {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 16px rgba(0, 107, 95, 0.3);
}

/* Звуковые волны при воспроизведении */
.audio-player-block.is-playing .audio-player-icon::before,
.audio-player-block.is-playing .audio-player-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0;
}

.audio-player-block.is-playing .audio-player-icon::before {
    animation: audioWave 1.8s ease-out infinite;
}

.audio-player-block.is-playing .audio-player-icon::after {
    animation: audioWave 1.8s ease-out infinite 0.9s;
}

@keyframes audioWave {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Лёгкая пульсация самой иконки */
.audio-player-block.is-playing .audio-player-icon i {
    animation: audioIconBeat 1s ease-in-out infinite;
}

@keyframes audioIconBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* --- Заголовок --- */
.audio-player-info h4 {
    margin: 0 0 3px;
    font-size: 1.15rem;
    color: var(--color-dark);
    font-weight: 700;
}

.audio-player-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

/* --- Блок управления --- */
.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Кнопки управления */
.audio-play-btn,
.audio-pause-btn,
.audio-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.audio-play-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 107, 95, 0.3);
}

.audio-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 107, 95, 0.4);
}

.audio-pause-btn {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #e6c558 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.audio-pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(212, 175, 55, 0.45);
}

.audio-stop-btn {
    background: #fff;
    color: var(--color-gray-dark);
    border: 1px solid #e0e0e0;
}

.audio-stop-btn:hover {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}

.audio-play-btn i,
.audio-pause-btn i,
.audio-stop-btn i {
    font-size: 0.95em;
}

/* --- Прогресс-бар --- */
.audio-progress-wrap {
    flex: 1;
    min-width: 180px;
}

.audio-progress-bar {
    height: 8px;
    background: rgba(0, 107, 95, 0.12);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.audio-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    transition: width 0.2s linear;
    position: relative;
}

/* Блик на прогресс-баре при воспроизведении */
.audio-player-block.is-playing .audio-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: audioShimmer 1.5s linear infinite;
}

@keyframes audioShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Время */
.audio-time {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--color-gray-dark);
    font-variant-numeric: tabular-nums;
}

.audio-time-current {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Бейдж способа озвучивания --- */
.audio-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 6px 14px;
    background: rgba(0, 107, 95, 0.07);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 500;
}

.audio-player-badge i {
    font-size: 0.9em;
}

/* Скрытый audio элемент */
.audio-player-block audio {
    display: none;
}

/* ============================================
🎧 АДАПТИВНОСТЬ АУДИО-ПЛЕЕРА
============================================ */
@media (max-width: 768px) {
    .audio-player-block {
        padding: 18px;
    }

    .audio-player-header {
        gap: 12px;
        margin-bottom: 15px;
    }

    .audio-player-icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .audio-player-info h4 {
        font-size: 1.05rem;
    }

    .audio-player-controls {
        gap: 10px;
    }

    .audio-play-btn,
    .audio-pause-btn,
    .audio-stop-btn {
        padding: 11px 18px;
        font-size: 0.9rem;
        flex: 1;
        justify-content: center;
    }

    .audio-progress-wrap {
        width: 100%;
        min-width: 0;
        order: 3;
    }
}

@media (max-width: 480px) {
    .audio-player-controls {
        flex-wrap: wrap;
    }

    .audio-stop-btn span,
    .audio-pause-btn span {
        display: none;
    }

    .audio-stop-btn,
    .audio-pause-btn {
        flex: 0 0 auto;
        padding: 11px 16px;
    }

    .audio-play-btn {
        flex: 1;
    }
}

/* Уважение к настройкам пользователя (уменьшенная анимация) */
@media (prefers-reduced-motion: reduce) {
    .audio-player-block::before,
    .audio-player-block.is-playing .audio-player-icon::before,
    .audio-player-block.is-playing .audio-player-icon::after,
    .audio-player-block.is-playing .audio-player-icon i,
    .audio-player-block.is-playing .audio-progress-fill::after {
        animation: none;
    }
}

/* Отступ между текстом поздравления и аудио-плеером */
.audio-player-block {
    margin-top: 40px;
}

/* ============================================
🎒 СЕКЦИЯ "1 СЕНТЯБРЬ — БЕЛЕМ БӘЙРӘМЕ"
============================================ */

/* --- Общая обёртка секции --- */
.belem-section {
    position: relative;
    padding: 80px 0 70px;
    background: linear-gradient(160deg, #FDF8EF 0%, #FBF3E4 45%, #F7EAD8 100%);
    overflow: hidden;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.belem-section.belem-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Декоративное осеннее свечение по углам */
.belem-section::before,
.belem-section::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.belem-section::before {
    top: -120px;
    right: -120px;
    background: radial-gradient(circle, rgba(230, 126, 34, 0.16), transparent 70%);
}
.belem-section::after {
    bottom: -140px;
    left: -140px;
    background: radial-gradient(circle, rgba(0, 107, 95, 0.12), transparent 70%);
}

/* --- Падающие листья и школьные эмодзи --- */
.belem-falling-items {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.belem-falling-items span {
    position: absolute;
    top: -60px;
    font-size: 26px;
    opacity: 0;
    animation-name: belemFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12));
}

@keyframes belemFall {
    0%   { transform: translateY(-60px) translateX(0) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.75; }
    50%  { transform: translateY(48vh) translateX(25px) rotate(180deg); opacity: 0.75; }
    95%  { opacity: 0.6; }
    100% { transform: translateY(96vh) translateX(-15px) rotate(340deg); opacity: 0; }
}

/* --- Заголовок --- */
.belem-header {
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.belem-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #E67E22, #F39C12);
    color: #fff;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.35);
    margin-bottom: 20px;
    animation: belemPulse 2.5s ease-in-out infinite;
}

@keyframes belemPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

.belem-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 14px;
    line-height: 1.2;
}

.belem-title span {
    background: linear-gradient(135deg, #E67E22, #F39C12, var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.belem-subtitle {
    font-size: 1.05rem;
    color: var(--color-gray-dark);
    max-width: 560px;
    margin: 0 auto;
}

/* --- Обратный отсчёт --- */
.belem-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.countdown-item {
    background: #fff;
    border-radius: 16px;
    padding: 18px 32px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(230, 126, 34, 0.2);
    transition: var(--transition);
}

.countdown-item:hover {
    transform: translateY(-4px);
    border-color: #E67E22;
}

.countdown-num {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 6px;
}

.countdown-txt {
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.countdown-divider {
    font-size: 2rem;
    color: var(--color-secondary);
}

/* --- Табы --- */
.belem-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.belem-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    border: 2px solid rgba(0, 107, 95, 0.15);
    background: #fff;
    color: var(--color-dark);
    border-radius: 40px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.belem-tab:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.belem-tab.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 107, 95, 0.3);
}

/* --- Панели табов --- */
.belem-content {
    position: relative;
    z-index: 2;
}

.belem-pane {
    display: none;
    animation: belemPaneIn 0.5s ease;
}

.belem-pane.active {
    display: block;
}

@keyframes belemPaneIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- ТАБ 1: Поздравления (тетрадные листы) --- */
.belem-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
}

.belem-card {
    position: relative;
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 28px 26px 26px 58px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
    overflow: hidden;
}

/* Тетрадные линии */
.belem-card-lines {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 30px,
        rgba(0, 107, 95, 0.07) 31px
    );
    pointer-events: none;
}

/* Красная линия полей, как в тетради */
.belem-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 40px;
    width: 2px;
    background: rgba(230, 126, 34, 0.35);
}

.belem-card:hover {
    transform: translateY(-7px) rotate(-0.5deg);
    box-shadow: 0 16px 35px rgba(0, 107, 95, 0.18);
}

.belem-card h3 {
    position: relative;
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.belem-card-excerpt {
    position: relative;
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.belem-card-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #E67E22;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.3s ease;
}

.belem-card:hover .belem-card-more {
    gap: 12px;
}

/* --- ТАБ 2: Стихи --- */
.belem-poems {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.belem-poem {
    position: relative;
    display: block;
    background: linear-gradient(150deg, #FFFDF8, #FDF6E9);
    border-radius: 16px;
    padding: 40px 30px 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: all 0.35s ease;
}

.belem-poem:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(212, 175, 55, 0.25);
    border-color: var(--color-secondary);
}

.belem-poem-quote {
    position: absolute;
    top: -8px;
    left: 18px;
    font-size: 4.5rem;
    color: var(--color-secondary);
    opacity: 0.45;
    font-family: Georgia, serif;
    line-height: 1;
}

.belem-poem-text {
    position: relative;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #4A4A4A;
    margin-bottom: 18px;
}

.belem-poem-title {
    position: relative;
    text-align: right;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- ТАБ 3: Открытки --- */
.belem-postcards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.belem-postcard {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    transition: all 0.35s ease;
    background: #eee;
}

.belem-postcard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.belem-postcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 32px rgba(0,0,0,0.2);
}

.belem-postcard:hover img {
    transform: scale(1.08);
}

.belem-postcard-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 107, 95, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.belem-postcard:hover .belem-postcard-hover {
    opacity: 1;
}

/* --- Пустое состояние --- */
.belem-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--color-gray-dark);
    background: rgba(255,255,255,0.6);
    border-radius: 16px;
    border: 2px dashed rgba(0, 107, 95, 0.2);
}

.belem-empty i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 14px;
}

/* --- Кнопка "Все поздравления" --- */
.belem-footer {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.belem-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 38px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 8px 22px rgba(0, 107, 95, 0.35);
    transition: all 0.3s ease;
}

.belem-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 107, 95, 0.45);
}

/* ============================================
🎒 АДАПТИВНОСТЬ СЕКЦИИ "БЕЛЕМ БӘЙРӘМЕ"
============================================ */
@media (max-width: 992px) {
    .belem-title { font-size: 2.1rem; }
    .belem-cards, .belem-poems { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .belem-section { padding: 60px 0 50px; }
    .belem-title { font-size: 1.8rem; }
    .belem-subtitle { font-size: 0.98rem; }
    .countdown-num { font-size: 1.9rem; }
    .countdown-item { padding: 14px 24px; }
    .belem-tabs { gap: 8px; }
    .belem-tab { padding: 10px 18px; font-size: 0.9rem; }
    .belem-cards, .belem-poems { grid-template-columns: 1fr; }
    .belem-postcards { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
    .belem-title { font-size: 1.5rem; }
    .belem-countdown { gap: 12px; }
    .countdown-divider { display: none; }
    .belem-postcards { grid-template-columns: repeat(2, 1fr); }
    .belem-tab span { display: none; }
    .belem-tab { padding: 12px 16px; }
}

/* Уменьшенная анимация для доступности */
@media (prefers-reduced-motion: reduce) {
    .belem-falling-items span,
    .belem-badge { animation: none; }
    .belem-section { transition: none; opacity: 1; transform: none; }
}

/* ============================================
💍 ШАПКА КАТЕГОРИИ (HERO)
============================================ */
.category-hero {
    position: relative;
    background: var(--cat-gradient, linear-gradient(135deg, #006B5F, #00897B));
    padding: 60px 0 100px;
    overflow: hidden;
    color: var(--color-white);
}

.category-hero .breadcrumbs {
    margin-bottom: 30px;
}

.category-hero .breadcrumbs a,
.category-hero .breadcrumbs .current {
    color: rgba(255, 255, 255, 0.85);
}

.category-hero .breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.5);
}

.category-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

/* Иконка категории */
.category-hero-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: catIconFloat 3.5s ease-in-out infinite;
}

@keyframes catIconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-9px) rotate(-4deg); }
}

.category-hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    color: var(--color-white);
}

.category-hero-label {
    font-size: 1.15rem;
    opacity: 0.92;
    margin-bottom: 16px;
    font-style: italic;
}

.category-hero-desc {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 20px;
}

.category-hero-desc p { margin: 0; }

/* Счётчик */
.category-hero-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(6px);
}

/* Декоративные эмодзи */
.category-hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.decor-item {
    position: absolute;
    font-size: 34px;
    opacity: 0.35;
    animation: decorFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2));
}

.decor-0 { top: 15%; left: 8%;  animation-delay: 0s; }
.decor-1 { top: 60%; left: 12%; animation-delay: 1.2s; font-size: 28px; }
.decor-2 { top: 20%; right: 10%; animation-delay: 0.6s; }
.decor-3 { top: 65%; right: 8%;  animation-delay: 1.8s; font-size: 30px; }
.decor-4 { top: 40%; right: 22%; animation-delay: 2.4s; font-size: 24px; }

@keyframes decorFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-16px) rotate(8deg); }
}

/* Волна снизу */
.category-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

/* ============================================
КОНТЕНТ КАТЕГОРИИ
============================================ */
.category-content {
    padding: 40px 20px 60px;
    position: relative;
    z-index: 3;
    margin-top: -40px;
}

.category-content .congrat-card {
    display: flex;
    flex-direction: column;
}

.category-content .congrat-content {
    flex: 1;
}

.category-content .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
АДАПТИВНОСТЬ ШАПКИ КАТЕГОРИИ
============================================ */
@media (max-width: 992px) {
    .category-hero-title { font-size: 2.3rem; }
    .category-hero-icon { width: 78px; height: 78px; font-size: 34px; }
}

@media (max-width: 768px) {
    .category-hero { padding: 45px 0 85px; }
    .category-hero-title { font-size: 1.9rem; }
    .category-hero-label { font-size: 1rem; }
    .category-hero-icon { width: 68px; height: 68px; font-size: 28px; border-radius: 20px; }
    .decor-item { font-size: 24px; opacity: 0.25; }
    .category-content { margin-top: -30px; padding: 30px 15px 50px; }
}

@media (max-width: 480px) {
    .category-hero-title { font-size: 1.6rem; }
    .decor-4 { display: none; }
}

/* Меньше анимаций при соответствующей настройке */
@media (prefers-reduced-motion: reduce) {
    .category-hero-icon,
    .decor-item { animation: none; }
}

/* ============================================
🗂️ ТАБЫ НА СТРАНИЦЕ КАТЕГОРИИ
============================================ */
.cat-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 24px;
    background: var(--color-white);
    border: 2px solid rgba(0, 107, 95, 0.15);
    border-radius: 40px;
    color: var(--color-dark);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.cat-tab:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.cat-tab.active {
    background: var(--cat-gradient, var(--color-primary));
    color: var(--color-white);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cat-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.cat-tab.active .cat-tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Панели табов */
.cat-pane {
    display: none;
    animation: catPaneIn 0.45s ease;
}

.cat-pane.active {
    display: block;
}

@keyframes catPaneIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- ШИГЫРЬЛӘР --- */
.cat-poems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.cat-poem {
    position: relative;
    display: block;
    background: linear-gradient(150deg, #FFFDF8, #FDF6E9);
    border-radius: 16px;
    padding: 40px 30px 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: all 0.35s ease;
}

.cat-poem:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(212, 175, 55, 0.25);
    border-color: var(--color-secondary);
}

.cat-poem-quote {
    position: absolute;
    top: -8px;
    left: 18px;
    font-size: 4.5rem;
    color: var(--color-secondary);
    opacity: 0.45;
    font-family: Georgia, serif;
    line-height: 1;
}

.cat-poem-text {
    position: relative;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #4A4A4A;
    margin-bottom: 18px;
}

.cat-poem-title {
    position: relative;
    text-align: right;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- ОТКРЫТКАЛАР --- */
.cat-postcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 18px;
}

.cat-postcard {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transition: all 0.35s ease;
    background: #eee;
}

.cat-postcard img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.cat-postcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 32px rgba(0, 0, 0, 0.2);
}

.cat-postcard:hover img {
    transform: scale(1.08);
}

.cat-postcard-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 107, 95, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat-postcard:hover .cat-postcard-hover {
    opacity: 1;
}

/* --- ПУСТОЕ СОСТОЯНИЕ --- */
.cat-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-gray-dark);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 2px dashed rgba(0, 107, 95, 0.2);
}

.cat-empty i {
    font-size: 2.5rem;
    color: var(--color-secondary);
    margin-bottom: 14px;
    display: block;
}

/* ============================================
🗂️ АДАПТИВНОСТЬ ТАБОВ КАТЕГОРИИ
============================================ */
@media (max-width: 768px) {
    .cat-tabs { gap: 8px; }
    .cat-tab { padding: 10px 16px; font-size: 0.9rem; flex: 1; justify-content: center; }
    .cat-poems-grid { grid-template-columns: 1fr; }
    .cat-postcards-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (max-width: 480px) {
    .cat-tab { padding: 10px 12px; }
    .cat-tab i { display: none; }
    .cat-postcards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
📜 БЕЛЫЙ БЛОК КОНТЕНТА ПОЗДРАВЛЕНИЯ
============================================ */
.congrat-white-box {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    padding: 50px 55px 45px;
    margin: 5px 0 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09);
    line-height: 1.95;
    font-size: 1.13rem;
    color: var(--color-dark);
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

/* Градиентная полоска сверху */
.congrat-white-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 100%;
    animation: audioGradientMove 5s linear infinite;
}

/* Декоративный татарский орнамент в нижнем углу */
.congrat-white-box::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: cover;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
    transform: rotate(8deg);
}

/* Типографика текста */
.congrat-white-box p {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.congrat-white-box p:last-child {
    margin-bottom: 0;
}

/* 🅰️ Буквица для первого абзаца — эффект старинной книги */
.congrat-white-box > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 3.2em;
    font-weight: 700;
    color: var(--color-primary);
    float: left;
    line-height: 0.85;
    margin: 6px 12px 0 0;
}

/* Цитаты и выделенный текст внутри */
.congrat-white-box blockquote {
    margin: 25px 0;
    padding: 15px 25px;
    border-left: 4px solid var(--color-secondary);
    background: rgba(212, 175, 55, 0.07);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.congrat-white-box a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Лёгкий подъём при наведении */
.congrat-white-box:hover {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
    transition: all 0.35s ease;
}

/* ============================================
📜 АДАПТИВНОСТЬ БЕЛОГО БЛОКА
============================================ */
@media (max-width: 768px) {
    .congrat-white-box {
        padding: 35px 28px 30px;
        border-radius: 16px;
        font-size: 1.05rem;
    }

    .congrat-white-box > p:first-of-type::first-letter {
        font-size: 2.6em;
        margin-right: 9px;
    }

    .congrat-white-box::after {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .congrat-white-box {
        padding: 28px 20px 25px;
        font-size: 1rem;
    }

    .congrat-white-box::after {
        width: 120px;
        height: 120px;
        bottom: -30px;
        right: -30px;
    }
}

/* Уменьшенная анимация для доступности */
@media (prefers-reduced-motion: reduce) {
    .congrat-white-box::before { animation: none; }
    .congrat-white-box:hover { transform: none; }
}

/* ============================================
📖 БЛОГ О ТАТАРСКИХ ТРАДИЦИЯХ
============================================ */
.tatar-blog-section {
    position: relative;
    padding: 80px 0;
    margin-bottom: 60px;
    background: linear-gradient(180deg, rgba(0, 107, 95, 0.05) 0%, rgba(245, 245, 220, 0.7) 100%);
    overflow: hidden;
}

/* Национальный узор фоном (едва заметный) */
.tatar-blog-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("http://tat-pozdravok.ru/wp-content/uploads/2026/08/kotlau.png");
    background-size: 620px;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
}

/* Золотое свечение по углам */
.tatar-blog-section::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
    pointer-events: none;
}

.tatar-blog-section .container {
    position: relative;
    z-index: 2;
}

/* --- Заголовок секции --- */
.blog-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 107, 95, 0.3);
    margin-bottom: 18px;
}

.blog-section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 14px;
    line-height: 1.2;
}

/* Орнамент-разделитель (лента) */
.blog-ornament-divider {
    width: 100%;
    max-width: 460px;
    height: 64px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.blog-ornament-divider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.blog-section-subtitle {
    max-width: 620px;
    margin: 0 auto;
    color: var(--color-gray-dark);
    font-size: 1.05rem;
}

/* --- Сетка: крупный пост + 4 малых --- */
.blog-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 25px;
    align-items: stretch;
}

.blog-grid-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* --- Карточка поста --- */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.18);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
}

/* Золотая декоративная лента сверху */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    z-index: 3;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 107, 95, 0.16);
    border-color: rgba(212, 175, 55, 0.4);
}

/* --- Изображение --- */
.blog-card-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.blog-card:hover .blog-card-image img {
    transform: scale(1.07);
}

.blog-card--featured .blog-card-image {
    min-height: 360px;
    height: 100%;
}

.blog-card--small .blog-card-image {
    height: 150px;
}

/* Заглушка, если нет картинки */
.blog-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    font-size: 3rem;
}

/* Категория */
.blog-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Контент карточки --- */
.blog-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 24px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--color-gray-dark);
}

.blog-card-meta i {
    color: var(--color-secondary);
    margin-right: 5px;
}

.blog-card-title {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.35;
    transition: color 0.3s ease;
}

.blog-card--featured .blog-card-title {
    font-size: 1.45rem;
    font-weight: 700;
}

.blog-card--small .blog-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.blog-card:hover .blog-card-title {
    color: var(--color-accent);
}

.blog-card-excerpt {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.65;
}

.blog-card-more {
    margin-top: auto;
    padding-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.92rem;
}

.blog-card-more i {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-more i {
    transform: translateX(6px);
}

/* --- Крупный пост: горизонтальная «журнальная» карточка --- */
@media (min-width: 769px) {
    .blog-card--featured {
        flex-direction: row;
    }

    .blog-card--featured .blog-card-image {
        width: 52%;
    }

    .blog-card--featured .blog-card-content {
        width: 48%;
        justify-content: center;
        padding: 30px 32px;
    }
}

/* --- Кнопка «Все записи» --- */
.blog-section-footer {
    text-align: center;
    margin-top: 45px;
}

.blog-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 107, 95, 0.35);
    transition: all 0.3s ease;
}

.blog-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 107, 95, 0.45);
}

.blog-all-btn i {
    transition: transform 0.3s ease;
}

.blog-all-btn:hover i {
    transform: translateX(5px);
}

/* ============================================
📖 АДАПТИВНОСТЬ БЛОГА
============================================ */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card--featured .blog-card-image {
        min-height: 280px;
    }

    .blog-section-title {
        font-size: 2.1rem;
    }
}

@media (max-width: 768px) {
    .tatar-blog-section {
        padding: 55px 0;
    }

    .blog-card--featured {
        flex-direction: column;
    }

    .blog-card--featured .blog-card-image {
        width: 100%;
        min-height: 220px;
        height: 220px;
    }

    .blog-section-title {
        font-size: 1.8rem;
    }

    .blog-ornament-divider {
        height: 48px;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .blog-grid-small {
        grid-template-columns: 1fr;
    }

    .blog-card--small .blog-card-image {
        height: 170px;
    }

    .blog-section-title {
        font-size: 1.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card-image img {
        animation: none;
        transition: none;
    }
}

/* ============================================
📝 СТРАНИЦА ПОСТА БЛОГА (single-post.php)
============================================ */
.blog-single {
    padding-top: 0;
}

/* --- HERO-ШАПКА ПОСТА --- */
.post-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: var(--color-dark);
    overflow: hidden;
}

.post-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

/* Затемнение поверх фото */
.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 60, 53, 0.55) 0%, rgba(0, 43, 38, 0.88) 100%);
}

/* Национальный узор поверх шапки */
.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    background-position: center;
    opacity: 0.07;
    z-index: 1;
    pointer-events: none;
}

.post-hero-inner {
    position: relative;
    z-index: 2;
    padding: 90px 20px 120px;
    width: 100%;
}

/* Хлебные крошки */
.post-hero-crumbs {
    margin-bottom: 22px;
    font-size: 0.9rem;
}

.post-hero-crumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-hero-crumbs a:hover {
    color: var(--color-secondary);
}

.post-hero-crumbs .separator {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.45);
}

/* Категория */
.post-hero-category {
    display: inline-block;
    padding: 7px 20px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

/* Заголовок */
.post-hero-title {
    font-family: var(--font-heading);
    font-size: 2.7rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.25;
    max-width: 900px;
    margin-bottom: 22px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

/* Мета */
.post-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
}

.post-meta-item i {
    color: var(--color-secondary);
    margin-right: 6px;
}

/* Волна снизу */
.post-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

/* --- КОНТЕНТНАЯ ОБЛАСТЬ --- */
.blog-single-container {
    padding: 45px 20px 70px;
}

.blog-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 35px;
    align-items: start;
}

/* --- Орнамент-разделитель --- */
.post-ornament-divider {
    width: 100%;
    max-width: 420px;
    height: 60px;
    margin: 0 auto 32px;
    overflow: hidden;
}

.post-ornament-divider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- БЕЛЫЙ БЛОК СТАТЬИ --- */
.post-content-box {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    padding: 50px 55px 45px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09);
    border: 1px solid rgba(212, 175, 55, 0.15);
    overflow: hidden;
    line-height: 1.9;
    font-size: 1.08rem;
    color: var(--color-dark);
}

/* Золотая лента сверху */
.post-content-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
}

/* Орнамент в углу */
.post-content-box::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: cover;
    opacity: 0.06;
    pointer-events: none;
    transform: rotate(8deg);
}

.post-content-box p {
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.post-content-box p:last-child {
    margin-bottom: 0;
}

/* Буквица */
.post-content-box > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 3.2em;
    font-weight: 700;
    color: var(--color-primary);
    float: left;
    line-height: 0.85;
    margin: 6px 12px 0 0;
}

/* Подзаголовки внутри статьи */
.post-content-box h2,
.post-content-box h3,
.post-content-box h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 28px 0 14px;
    line-height: 1.3;
}

/* Изображения в статье */
.post-content-box img {
    border-radius: 14px;
    margin: 22px 0;
    width: 100%;
    height: auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Цитаты */
.post-content-box blockquote {
    margin: 26px 0;
    padding: 18px 28px;
    border-left: 4px solid var(--color-secondary);
    background: rgba(212, 175, 55, 0.07);
    border-radius: 0 14px 14px 0;
    font-style: italic;
    color: #5a5a5a;
}

/* Списки */
.post-content-box ul,
.post-content-box ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.post-content-box li {
    margin-bottom: 8px;
}

.post-content-box a {
    color: var(--color-primary);
}

/* --- ТЕГИ --- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
}

.post-tags-label {
    font-weight: 600;
    color: var(--color-dark);
}

.post-tags-label i {
    color: var(--color-secondary);
    margin-right: 5px;
}

.post-tag {
    padding: 6px 16px;
    background: var(--color-white);
    border: 1px solid rgba(0, 107, 95, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* --- ПОДЕЛИТЬСЯ --- */
.post-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px dashed rgba(0, 107, 95, 0.25);
}

.post-share-label {
    font-weight: 600;
    color: var(--color-dark);
}

.post-share .share-buttons {
    margin-top: 0;
}

/* --- АВТОР --- */
.post-author-box {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--color-white);
    border-radius: 16px;
    padding: 26px 32px;
    margin: 35px 0;
    border-left: 5px solid var(--color-secondary);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.post-author-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--color-secondary);
    display: block;
}

.post-author-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-secondary);
    margin-bottom: 4px;
}

.post-author-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.post-author-bio {
    color: var(--color-gray-dark);
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0;
}

/* --- НАВИГАЦИЯ МЕЖДУ ПОСТАМИ --- */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.post-nav-item a {
    display: block;
    background: var(--color-white);
    border-radius: 14px;
    padding: 18px 22px;
    text-decoration: none;
    border: 1px solid rgba(0, 107, 95, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.post-nav-item a:hover {
    transform: translateY(-3px);
    border-color: var(--color-secondary);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
}

.post-nav-next a {
    text-align: right;
}

.post-nav-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--color-gray-dark);
    margin-bottom: 6px;
}

.post-nav-subtitle i {
    color: var(--color-secondary);
}

.post-nav-title {
    display: block;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.4;
}

/* --- САЙДБАР --- */
.blog-sidebar-widget {
    background: var(--color-white);
    border-radius: 16px;
    padding: 26px;
    margin-bottom: 25px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    border-top: 4px solid var(--color-secondary);
}

.blog-widget-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-dark);
    padding-bottom: 12px;
    margin-bottom: 18px;
    position: relative;
}

.blog-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 3px;
}

/* Последние посты в сайдбаре */
.blog-widget-post {
    display: flex;
    gap: 13px;
    margin-bottom: 16px;
    text-decoration: none;
    align-items: center;
}

.blog-widget-post:last-child {
    margin-bottom: 0;
}

.blog-widget-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-widget-post:hover .blog-widget-thumb img {
    transform: scale(1.1);
}

.blog-widget-date {
    display: block;
    font-size: 0.76rem;
    color: var(--color-gray-dark);
    margin-bottom: 3px;
}

.blog-widget-info h4 {
    font-size: 0.92rem;
    color: var(--color-dark);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.blog-widget-post:hover .blog-widget-info h4 {
    color: var(--color-primary);
}

/* Категории в сайдбаре */
.blog-widget-cats {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-widget-cats li {
    border-bottom: 1px dashed rgba(0, 107, 95, 0.18);
}

.blog-widget-cats li:last-child {
    border-bottom: none;
}

.blog-widget-cats a {
    display: flex;
    justify-content: space-between;
    padding: 10px 4px;
    color: var(--color-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-widget-cats a:hover {
    color: var(--color-primary);
    padding-left: 10px;
}

/* --- ПОХОЖИЕ ЗАПИСИ --- */
.blog-related {
    margin-top: 65px;
}

.blog-related-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 14px;
}

.blog-related .blog-ornament-divider {
    margin-bottom: 35px;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================
📝 АДАПТИВНОСТЬ СТРАНИЦЫ ПОСТА
============================================ */
@media (max-width: 992px) {
    .blog-single-layout {
        grid-template-columns: 1fr;
    }

    .post-hero-title {
        font-size: 2.2rem;
    }

    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-content-box {
        padding: 40px 35px 35px;
    }
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 440px;
    }

    .post-hero-inner {
        padding: 70px 15px 100px;
    }

    .post-hero-title {
        font-size: 1.8rem;
    }

    .post-hero-meta {
        gap: 14px;
        font-size: 0.85rem;
    }

    .post-content-box {
        padding: 32px 25px 28px;
        font-size: 1.02rem;
    }

    .post-content-box > p:first-of-type::first-letter {
        font-size: 2.6em;
    }

    .post-author-box {
        flex-direction: column;
        text-align: center;
        padding: 28px 22px;
    }

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

    .post-nav-next a {
        text-align: left;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-hero-title {
        font-size: 1.5rem;
    }

    .post-content-box {
        padding: 26px 18px 24px;
        border-radius: 14px;
    }

    .post-ornament-divider {
        height: 44px;
        max-width: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-hero-bg {
        transform: none;
    }
}

/* ============================================
🔧 ФИКС: ВЛОЖЕННЫЕ БЕЛЫЕ БЛОКИ (двойная обёртка)
============================================ */
.congrat-white-box .congrat-white-box,
.post-content-box .post-content-box,
.congrat-white-box .post-content-box,
.post-content-box .congrat-white-box,
.entry-content .congrat-white-box {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    overflow: visible;
    animation: none;
}

/* Убираем декоративные полоски и орнамент у внутреннего блока */
.congrat-white-box .congrat-white-box::before,
.congrat-white-box .congrat-white-box::after,
.post-content-box .post-content-box::before,
.post-content-box .post-content-box::after,
.congrat-white-box .post-content-box::before,
.congrat-white-box .post-content-box::after,
.post-content-box .congrat-white-box::before,
.post-content-box .congrat-white-box::after,
.entry-content .congrat-white-box::before,
.entry-content .congrat-white-box::after {
    display: none;
}

/* ============================================
🛡️ ПОЛЕ ПРОВЕРКИ ОТ БОТОВ
============================================ */
.comment-form-antispam {
    margin-bottom: 15px;
    padding: 14px 18px;
    background: rgba(0, 107, 95, 0.06);
    border: 1px dashed rgba(0, 107, 95, 0.3);
    border-radius: var(--border-radius-sm);
}

.comment-form-antispam label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-dark);
}

.comment-form-antispam input[type="text"] {
    width: 110px;
    padding: 10px 15px;
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    text-align: center;
}

.comment-form-antispam input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 107, 95, 0.1);
}

/* ============================================
🌷 ТАТАРСКАЯ ОЦЕНКА ТЮЛЬПАНАМИ
============================================ */
.tatar-rating {
    position: relative;
    background: var(--color-white);
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 28px 32px;
    margin: 40px 0 10px;
    overflow: visible;
}

/* Национальная лента сверху */
.tatar-rating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent), var(--color-secondary), var(--color-primary));
    border-radius: 18px 18px 0 0;
}

/* Полупрозрачный тюльпан в углу */
.tatar-rating::after {
    content: '🌷';
    position: absolute;
    right: 18px;
    bottom: 14px;
    font-size: 30px;
    opacity: 0.12;
    transform: rotate(-12deg);
    pointer-events: none;
}

/* --- Шапка виджета --- */
.tatar-rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tatar-rating-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-dark);
}

.title-tulip {
    display: inline-block;
    transform-origin: bottom center;
    animation: titleTulipSway 3s ease-in-out infinite;
}

@keyframes titleTulipSway {
    0%, 100% { transform: rotate(-6deg); }
    50%      { transform: rotate(8deg); }
}

.tatar-rating-avg {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--color-gray-dark);
}

.avg-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin: 0 3px;
}

.avg-pop {
    animation: avgPop 0.5s ease;
}

@keyframes avgPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* --- Тюльпаны --- */
.tatar-rating-tulips {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 6px 0 4px;
}

.tatar-tulip {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
}

.tulip-icon {
    display: inline-block;
    font-size: 40px;
    filter: grayscale(1) opacity(0.35);
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Наведение / превью — тюльпан «оживает» */
.tatar-tulip:hover .tulip-icon,
.tatar-tulip.preview .tulip-icon {
    filter: grayscale(0.2) opacity(0.9);
    transform: scale(1.18) rotate(-4deg);
}

/* Выбранные — расцвели */
.tatar-tulip.bloomed .tulip-icon {
    filter: none;
    transform: scale(1.2);
    animation: tulipBloom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tulipBloom {
    0%   { transform: scale(0.4) rotate(-30deg); filter: grayscale(1); }
    60%  { transform: scale(1.35) rotate(8deg); }
    100% { transform: scale(1.2) rotate(0deg); filter: none; }
}

/* Уже проголосовали / идёт запрос */
.tatar-rating.has-voted .tatar-tulip {
    cursor: default;
}

.tatar-rating.is-busy .tatar-tulip {
    pointer-events: none;
    opacity: 0.6;
}

/* --- Вердикт-штамп --- */
.tatar-rating-feedback {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
}

.feedback-stamp {
    display: inline-block;
    padding: 8px 24px;
    border: 3px double currentColor;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    transform: rotate(-3deg);
    animation: stampIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stampIn {
    0%   { transform: scale(2) rotate(-14deg); opacity: 0; }
    100% { transform: scale(1) rotate(-3deg); opacity: 1; }
}

.feedback-stamp.grade-5 { color: #006B5F; background: rgba(0, 107, 95, 0.08); }
.feedback-stamp.grade-4 { color: #27ae60; background: rgba(39, 174, 96, 0.08); }
.feedback-stamp.grade-3 { color: #f39c12; background: rgba(243, 156, 18, 0.1); }
.feedback-stamp.grade-2 { color: #e67e22; background: rgba(230, 126, 34, 0.1); }
.feedback-stamp.grade-1 { color: #c0392b; background: rgba(192, 57, 43, 0.1); }

/* Тряска при повторном клике */
.tatar-rating.shake {
    animation: ratingShake 0.45s ease;
}

@keyframes ratingShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Конфетти */
.tulip-confetti {
    will-change: transform, opacity;
}

/* ============================================
🌷 АДАПТИВНОСТЬ ОЦЕНКИ
============================================ */
@media (max-width: 768px) {
    .tatar-rating {
        padding: 22px 18px;
        margin: 30px 0 10px;
    }

    .tatar-rating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tulip-icon {
        font-size: 32px;
    }

    .tatar-rating-tulips {
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .title-tulip,
    .tatar-tulip.bloomed .tulip-icon,
    .feedback-stamp,
    .avg-pop,
    .tatar-rating.shake {
        animation: none;
    }
}

/* ============================================
📚 СБОРНИК СКАЗОК (archive-tale.php)
============================================ */
.tales-archive { padding-top: 0; }

/* --- Шапка сборника --- */
.tales-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #0F4C5C 0%, #006B5F 55%, #00897B 100%);
    color: var(--color-white);
}

.tales-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    background-position: center;
    opacity: 0.07;
    pointer-events: none;
}

.tales-hero-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.tales-hero .container {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 20px 120px;
}

.tales-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    margin-bottom: 18px;
}

.tales-hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 12px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.tales-hero-subtitle {
    max-width: 620px;
    margin: 0 auto 18px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.tales-hero-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tales-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

/* --- Фильтр жанров --- */
.tales-container { padding-top: 45px; }

.tales-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
}

.tales-filter-chip {
    padding: 9px 22px;
    background: var(--color-white);
    border: 2px solid rgba(0, 107, 95, 0.15);
    border-radius: 30px;
    color: var(--color-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tales-filter-chip:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.tales-filter-chip.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(0, 107, 95, 0.3);
}

/* --- Сетка сказок --- */
.tales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* --- Карточка-страница --- */
.tale-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.35s ease;
    animation: fadeIn 0.6s ease-out;
}

.tale-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    z-index: 3;
}

.tale-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 40px rgba(0, 107, 95, 0.16);
    border-color: rgba(212, 175, 55, 0.4);
}

.tale-card-image {
    position: relative;
    height: 190px;
    overflow: hidden;
}

.tale-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tale-card:hover .tale-card-image img { transform: scale(1.07); }

.tale-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
    font-size: 3rem;
}

.tale-card-genre {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    padding: 5px 15px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tale-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
    flex: 1;
}

.tale-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.35;
    transition: color 0.3s ease;
}

.tale-card:hover .tale-card-title { color: var(--color-accent); }

.tale-card-excerpt {
    color: var(--color-gray-dark);
    font-size: 0.93rem;
    line-height: 1.6;
}

.tale-card-footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tale-card-time {
    font-size: 0.8rem;
    color: var(--color-gray-dark);
}

.tale-card-time i { color: var(--color-secondary); margin-right: 4px; }

.tale-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.tale-card-more i { transition: transform 0.3s ease; }
.tale-card:hover .tale-card-more i { transform: translateX(6px); }

/* --- Пагинация и пустое состояние --- */
.tales-pagination { margin-top: 45px; text-align: center; }

.tales-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px dashed rgba(0, 107, 95, 0.2);
    border-radius: 16px;
    color: var(--color-gray-dark);
}

.tales-empty i { font-size: 2.6rem; color: var(--color-secondary); margin-bottom: 14px; display: block; }

/* ============================================
📖 СТРАНИЦА ЧТЕНИЯ СКАЗКИ (single-tale.php)
============================================ */
.tale-single { padding-top: 0; }

.tale-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    background: var(--color-dark);
    overflow: hidden;
}

.tale-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}

.tale-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 76, 92, 0.55) 0%, rgba(0, 43, 38, 0.9) 100%);
}

.tale-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    opacity: 0.07;
    z-index: 1;
    pointer-events: none;
}

.tale-hero-inner {
    position: relative;
    z-index: 2;
    padding: 90px 20px 120px;
    width: 100%;
}

.tale-hero-crumbs { margin-bottom: 20px; font-size: 0.9rem; }
.tale-hero-crumbs a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.tale-hero-crumbs a:hover { color: var(--color-secondary); }
.tale-hero-crumbs .separator { margin: 0 8px; color: rgba(255, 255, 255, 0.45); }

.tale-hero-genre {
    display: inline-block;
    padding: 7px 20px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.tale-hero-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.25;
    max-width: 900px;
    margin-bottom: 20px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.tale-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.9);
}

.tale-meta-item i { color: var(--color-secondary); margin-right: 6px; }

.tale-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

/* --- Контейнер чтения (узкий, как книга) --- */
.tale-single-container {
    max-width: 900px;
    padding: 45px 20px 70px;
}

.tale-ornament-divider {
    width: 100%;
    max-width: 420px;
    height: 60px;
    margin: 0 auto 32px;
    overflow: hidden;
}

.tale-ornament-divider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* --- Белый «лист» сказки (пергамент) --- */
.tale-content-box {
    position: relative;
    background: #FFFDF7;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    padding: 50px 55px 45px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.09);
    line-height: 2;
    font-size: 1.1rem;
    color: #3d3d3d;
    overflow: hidden;
}

.tale-content-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-primary), var(--color-secondary));
}

.tale-content-box::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: cover;
    opacity: 0.06;
    pointer-events: none;
    transform: rotate(8deg);
}

.tale-content-box p { margin-bottom: 18px; position: relative; z-index: 1; }
.tale-content-box p:last-child { margin-bottom: 0; }

/* Буквица */
.tale-content-box > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 3.4em;
    font-weight: 700;
    color: var(--color-accent);
    float: left;
    line-height: 0.85;
    margin: 6px 12px 0 0;
}

.tale-content-box h2, .tale-content-box h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin: 26px 0 12px;
}

.tale-content-box img {
    border-radius: 14px;
    margin: 20px 0;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* --- Мораль сказки --- */
.tale-moral-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin: 35px 0;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.05));
    border: 2px dashed var(--color-secondary);
    border-radius: 16px;
}

.tale-moral-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 5px 14px rgba(212, 175, 55, 0.4);
}

.tale-moral-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b8860b;
    margin-bottom: 6px;
}

.tale-moral-content p {
    margin: 0;
    font-style: italic;
    font-size: 1.05rem;
    color: #6b5410;
    line-height: 1.7;
}

/* --- Шаринг --- */
.tale-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 28px;
    padding-top: 25px;
    border-top: 1px dashed rgba(0, 107, 95, 0.25);
}

.tale-share .share-buttons { margin-top: 0; }

/* --- Навигация --- */
.tale-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.tale-nav-item a {
    display: block;
    background: var(--color-white);
    border-radius: 14px;
    padding: 18px 22px;
    text-decoration: none;
    border: 1px solid rgba(0, 107, 95, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.tale-nav-item a:hover {
    transform: translateY(-3px);
    border-color: var(--color-secondary);
}

.tale-nav-next a { text-align: right; }
.tale-nav-subtitle { display: block; font-size: 0.8rem; color: var(--color-gray-dark); margin-bottom: 6px; }
.tale-nav-subtitle i { color: var(--color-secondary); }
.tale-nav-title { display: block; font-weight: 600; color: var(--color-primary); line-height: 1.4; }

/* --- Похожие сказки --- */
.tale-related { margin-top: 60px; }
.tale-related-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 14px;
}

/* ============================================
📚 АДАПТИВНОСТЬ СКАЗОК
============================================ */
@media (max-width: 992px) {
    .tales-grid { grid-template-columns: repeat(2, 1fr); }
    .tales-hero-title { font-size: 2.2rem; }
    .tale-hero-title { font-size: 2.1rem; }
    .tale-content-box { padding: 40px 35px 35px; }
}

@media (max-width: 768px) {
    .tales-hero .container { padding: 60px 15px 100px; }
    .tales-hero-title { font-size: 1.8rem; }
    .tale-hero { min-height: 420px; }
    .tale-hero-title { font-size: 1.7rem; }
    .tale-content-box { padding: 32px 25px 28px; font-size: 1.03rem; }
    .tale-moral-box { flex-direction: column; align-items: center; text-align: center; }
    .tale-navigation { grid-template-columns: 1fr; }
    .tale-nav-next a { text-align: left; }
}

@media (max-width: 640px) {
    .tales-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .tales-hero-title { font-size: 1.5rem; }
    .tale-content-box { padding: 26px 18px 24px; }
    .tale-content-box > p:first-of-type::first-letter { font-size: 2.7em; }
}

@media (prefers-reduced-motion: reduce) {
    .tale-card, .tale-hero-bg { animation: none; transition: none; transform: none; }
}

/* ============================================
📚 БАННЕР СКАЗОК НА ГЛАВНОЙ
============================================ */
.tales-banner { padding: 20px 0 60px; }

.tales-banner-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 45px 55px;
    background: linear-gradient(135deg, #0F4C5C 0%, #006B5F 60%, #00897B 100%);
    border-radius: 24px;
    text-decoration: none;
    color: var(--color-white);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 107, 95, 0.3);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tales-banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    opacity: 0.08;
    pointer-events: none;
}

.tales-banner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(0, 107, 95, 0.4);
}

.tales-banner-text { position: relative; z-index: 2; }

.tales-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    border-radius: 25px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.tales-banner-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.tales-banner-subtitle {
    color: rgba(255, 255, 255, 0.88);
    max-width: 520px;
    margin-bottom: 20px;
}

.tales-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 30px;
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: 35px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.tales-banner-card:hover .tales-banner-btn {
    background: var(--color-secondary);
    color: var(--color-white);
    gap: 14px;
}

/* Арт справа */
.tales-banner-art {
    position: relative;
    z-index: 2;
    font-size: 90px;
    flex-shrink: 0;
}

.banner-book { display: inline-block; animation: bannerBookFloat 3.5s ease-in-out infinite; }

@keyframes bannerBookFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-12px) rotate(3deg); }
}

.banner-spark { position: absolute; font-size: 26px; animation: bannerSpark 2.5s ease-in-out infinite; }
.spark-1 { top: -10px; left: -30px; }
.spark-2 { bottom: 0; right: -25px; animation-delay: 0.8s; }
.spark-3 { top: 40%; right: -40px; animation-delay: 1.5s; font-size: 20px; }

@keyframes bannerSpark {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50%      { opacity: 1; transform: scale(1.2); }
}

/* Счётчик сказок */
.tales-banner-count {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 2;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
    .tales-banner-card { flex-direction: column; text-align: center; padding: 35px 25px; }
    .tales-banner-subtitle { margin-left: auto; margin-right: auto; }
    .tales-banner-title { font-size: 1.7rem; }
    .tales-banner-art { font-size: 70px; }
}

/* ============================================
📊 ПРОГРЕСС-БАР ЧТЕНИЯ
============================================ */
.reading-progress-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Показываем, когда пользователь начинает читать */
.reading-progress-wrap.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Прогресс-бар (тонкая полоска сверху) */
.reading-progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.reading-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        var(--color-primary) 0%,
        var(--color-secondary) 50%,
        var(--color-accent) 100%);
    background-size: 200% 100%;
    animation: progressGradient 3s linear infinite;
    transition: width 0.15s ease-out;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

@keyframes progressGradient {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Бейдж с процентом (в правом верхнем углу) */
.reading-progress-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.reading-progress-wrap.is-visible .reading-progress-badge {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.reading-progress-badge i {
    color: var(--color-secondary);
    font-size: 0.95rem;
}

.reading-progress-percent {
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}

/* Когда дочитали до конца — зелёная подсветка */
.reading-progress-wrap.is-finished .reading-progress-fill {
    background: linear-gradient(90deg, #27ae60, #2ecc71, #27ae60);
    box-shadow: 0 0 16px rgba(39, 174, 96, 0.7);
}

.reading-progress-wrap.is-finished .reading-progress-badge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--color-white);
    border-color: transparent;
}

.reading-progress-wrap.is-finished .reading-progress-badge i {
    color: var(--color-white);
}

/* ============================================
📊 АДАПТИВНОСТЬ ПРОГРЕСС-БАРА
============================================ */
@media (max-width: 768px) {
    .reading-progress-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .reading-progress-bar {
        height: 3px;
    }
}

@media (max-width: 480px) {
    .reading-progress-badge span.reading-progress-percent::after {
        content: '';
    }
}

@media (prefers-reduced-motion: reduce) {
    .reading-progress-fill {
        animation: none;
    }
    .reading-progress-wrap,
    .reading-progress-badge {
        transition: none;
    }
}

/* ============================================
🔗 ПОХОЖИЕ ЗАПИСИ В СЕРЕДИНЕ ТЕКСТА
============================================ */
.related-mid {
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 107, 95, 0.05), rgba(212, 175, 55, 0.1));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

.related-mid-header {
    margin-bottom: 16px;
}

.related-mid-title {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
}

.related-mid-title i {
    color: var(--color-secondary);
}

.related-mid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.related-mid-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.related-mid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 107, 95, 0.16);
    border-color: rgba(212, 175, 55, 0.45);
}

.related-mid-thumb {
    height: 90px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.related-mid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-mid-card:hover .related-mid-thumb img {
    transform: scale(1.08);
}

.related-mid-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.8rem;
}

.related-mid-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.related-mid-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-mid-card:hover .related-mid-info h4 {
    color: var(--color-primary);
}

.related-mid-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
}

.related-mid-more i {
    transition: transform 0.3s ease;
}

.related-mid-card:hover .related-mid-more i {
    transform: translateX(5px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .related-mid-grid {
        grid-template-columns: 1fr;
    }

    .related-mid-card {
        flex-direction: row;
        align-items: center;
    }

    .related-mid-thumb {
        width: 90px;
        height: 90px;
        flex-shrink: 0;
    }

    .related-mid {
        padding: 18px;
    }
}

/* ============================================
🎭 СЦЕНАРИИ ПРАЗДНИКОВ
============================================ */
.tatar-scenarios-section {
    position: relative;
    padding: 80px 0;
    margin-bottom: 60px;
    background: linear-gradient(180deg, #FFF8F0 0%, #FDEEE0 60%, #FBE4D0 100%);
    overflow: hidden;
}

/* Национальный узор фоном */
.tatar-scenarios-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
}

/* Тёплое свечение по углам */
.tatar-scenarios-section::after {
    content: '';
    position: absolute;
    top: -120px;
    left: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.12), transparent 70%);
    pointer-events: none;
}

.tatar-scenarios-section .container {
    position: relative;
    z-index: 2;
}

/* --- Заголовок --- */
.scenarios-header {
    text-align: center;
    margin-bottom: 50px;
}

.scenarios-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--color-accent), #C0392B);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.3);
    margin-bottom: 18px;
}

.scenarios-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 14px;
    line-height: 1.2;
}

.scenarios-subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: var(--color-gray-dark);
    font-size: 1.05rem;
}

/* --- Сетка сценариев --- */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- Карточка сценария --- */
.scenario-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
}

/* Красно-золотая лента сверху */
.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-secondary), var(--color-accent));
    z-index: 3;
}

.scenario-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(139, 0, 0, 0.16);
    border-color: rgba(212, 175, 55, 0.45);
}

/* --- Изображение --- */
.scenario-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.scenario-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.scenario-card:hover .scenario-card-image img {
    transform: scale(1.07);
}

.scenario-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    font-size: 3rem;
}

/* Бейдж типа (тег) */
.scenario-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--color-accent), #C0392B);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* --- Контент карточки --- */
.scenario-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 24px;
    flex: 1;
}

.scenario-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1.35;
    transition: color 0.3s ease;
}

.scenario-card:hover .scenario-card-title {
    color: var(--color-secondary);
}

.scenario-card-excerpt {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.65;
}

.scenario-card-footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.scenario-card-meta {
    font-size: 0.82rem;
    color: var(--color-gray-dark);
}

.scenario-card-meta i {
    color: var(--color-secondary);
    margin-right: 5px;
}

.scenario-card-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.92rem;
}

.scenario-card-more i {
    transition: transform 0.3s ease;
}

.scenario-card:hover .scenario-card-more i {
    transform: translateX(6px);
}

/* --- Кнопка «Все сценарии» --- */
.scenarios-footer {
    text-align: center;
    margin-top: 45px;
}

.scenarios-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--color-accent), #C0392B);
    color: var(--color-white);
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(139, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.scenarios-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(139, 0, 0, 0.45);
}

.scenarios-all-btn i {
    transition: transform 0.3s ease;
}

.scenarios-all-btn:hover i {
    transform: translateX(5px);
}

/* ============================================
🎭 АДАПТИВНОСТЬ СЦЕНАРИЕВ
============================================ */
@media (max-width: 992px) {
    .scenarios-grid { grid-template-columns: repeat(2, 1fr); }
    .scenarios-title { font-size: 2.1rem; }
}

@media (max-width: 768px) {
    .tatar-scenarios-section { padding: 55px 0; }
    .scenarios-title { font-size: 1.8rem; }
    .blog-ornament-divider { height: 48px; max-width: 320px; }
}

@media (max-width: 480px) {
    .scenarios-grid { grid-template-columns: 1fr; }
    .scenarios-title { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
    .scenario-card, .scenario-card-image img { animation: none; transition: none; }
}

/* ============================================
🈂️ СЕКЦИЯ ПЕРЕВОДЧИКА
============================================ */
.tatar-translator-section {
    position: relative;
    padding: 80px 0;
    margin-bottom: 60px;
    background: linear-gradient(160deg, #14345c 0%, #0F4C5C 55%, #006B5F 100%);
    overflow: hidden;
}

.tatar-translator-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
}

.tatar-translator-section .container {
    position: relative;
    z-index: 2;
}

.translator-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.translator-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    margin-bottom: 18px;
}

.translator-section-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 14px;
}

.translator-section-subtitle {
    max-width: 620px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

.translator-wrap {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
🈂️ ВИДЖЕТ ПЕРЕВОДЧИКА
============================================ */
.tatar-translator {
    background: var(--color-white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.6s ease-out;
}

/* --- Направление --- */
.translator-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.translator-dir {
    padding: 10px 26px;
    background: var(--color-gray);
    border: 2px solid transparent;
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.translator-dir:hover {
    color: var(--color-primary);
}

.translator-dir.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    box-shadow: 0 6px 16px rgba(0, 107, 95, 0.3);
}

.translator-swap {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease;
}

.translator-swap:hover {
    transform: rotate(180deg);
}

/* --- Поля --- */
.translator-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.translator-box {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 2px solid rgba(0, 107, 95, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.translator-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 107, 95, 0.12);
}

.translator-box textarea {
    width: 100%;
    min-height: 190px;
    padding: 15px 18px;
    border: none;
    outline: none;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark);
    background: transparent;
}

.translator-result textarea {
    background: rgba(0, 107, 95, 0.04);
}

.translator-box-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px dashed rgba(0, 107, 95, 0.2);
    background: rgba(0, 107, 95, 0.03);
}

.translator-count {
    font-size: 0.8rem;
    color: var(--color-gray-dark);
    font-variant-numeric: tabular-nums;
}

.translator-clear {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.translator-clear:hover {
    background: rgba(192, 57, 43, 0.12);
    color: #c0392b;
}

.translator-copy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border: 1px solid rgba(0, 107, 95, 0.3);
    border-radius: 20px;
    background: transparent;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.translator-copy:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* --- Кнопка перевода --- */
.translator-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 107, 95, 0.35);
    transition: all 0.3s ease;
}

.translator-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 107, 95, 0.45);
}

.translator-submit.is-busy {
    opacity: 0.6;
    pointer-events: none;
    transform: none;
}

/* --- Статус --- */
.translator-status {
    min-height: 22px;
    margin-top: 12px;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
}

.translator-status.loading { color: var(--color-gray-dark); }
.translator-status.error   { color: #c0392b; }
.translator-status.success { color: #27ae60; }

/* ============================================
🈂️ АДАПТИВНОСТЬ ПЕРЕВОДЧИКА
============================================ */
@media (max-width: 768px) {
    .tatar-translator-section { padding: 55px 0; }
    .translator-section-title { font-size: 1.8rem; }
    .tatar-translator { padding: 20px; }
    .translator-boxes { grid-template-columns: 1fr; }
    .translator-box textarea { min-height: 140px; }
}

@media (prefers-reduced-motion: reduce) {
    .translator-swap, .translator-submit { transition: none; }
}

/* ============================================
🈂️ СТРАНИЦА ПЕРЕВОДЧИКА /perevodchik/
============================================ */

/* --- Анимированный HERO --- */
.tp-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #14345c, #0F4C5C, #006B5F, #00897B);
    background-size: 300% 300%;
    animation: tpGradient 12s ease infinite;
    overflow: hidden;
}

@keyframes tpGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Летающие слова на двух языках */
.tp-hero-words {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.tp-word {
    position: absolute;
    font-family: var(--font-heading);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.14);
    animation: tpWordFloat 9s ease-in-out infinite;
    white-space: nowrap;
}

.w1 { top: 14%; left: 6%;  font-size: 2.1rem; }
.w2 { top: 24%; right: 9%; font-size: 1.7rem; animation-delay: 1s; }
.w3 { top: 58%; left: 10%; font-size: 1.8rem; animation-delay: 2s; }
.w4 { top: 70%; right: 14%; font-size: 1.5rem; animation-delay: 3s; }
.w5 { top: 10%; left: 42%; font-size: 1.5rem; animation-delay: 1.5s; }
.w6 { top: 44%; right: 34%; font-size: 1.4rem; animation-delay: 4s; }
.w7 { top: 80%; left: 38%; font-size: 1.6rem; animation-delay: 2.5s; }
.w8 { top: 36%; left: 24%; font-size: 1.3rem; animation-delay: 5s; }

@keyframes tpWordFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-22px) rotate(3deg); }
}

.tp-hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 90px 20px 150px;
    width: 100%;
}

.tp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    margin-bottom: 20px;
}

.tp-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 16px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.tp-subtitle {
    max-width: 640px;
    margin: 0 auto 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.tp-hero-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tp-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.tp-stat i { color: var(--color-secondary); }

.tp-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 2;
}

/* --- Виджет «въезжает» на hero --- */
.tp-widget-wrap {
    position: relative;
    z-index: 5;
    margin-top: -90px;
    max-width: 900px;
    padding-bottom: 20px;
}

/* --- Заголовки секций --- */
.tp-section-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 14px;
}

.tp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
}

/* --- Популярные фразы --- */
.tp-phrases { padding: 50px 0 60px; }

.tp-phrases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.phrase-card {
    padding: 18px 14px;
    background: var(--color-white);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--color-dark);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.phrase-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 12px 26px rgba(0, 107, 95, 0.16);
}

/* --- Как пользоваться --- */
.tp-how { padding: 20px 0 60px; }

.tp-how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tp-how-card {
    background: var(--color-white);
    border-radius: 16px;
    padding: 30px 26px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    border-top: 4px solid var(--color-secondary);
    transition: transform 0.3s ease;
}

.tp-how-card:hover { transform: translateY(-5px); }

.tp-how-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 6px 16px rgba(0, 107, 95, 0.3);
}

.tp-how-card h3 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    margin-bottom: 10px;
}

.tp-how-card p {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- FAQ --- */
.tp-faq { padding: 0 0 60px; }

.tp-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.tp-faq-item {
    background: var(--color-white);
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tp-faq-item summary {
    padding: 18px 50px 18px 22px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-dark);
    list-style: none;
    position: relative;
    transition: color 0.3s ease;
}

.tp-faq-item summary::-webkit-details-marker { display: none; }

.tp-faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
}

.tp-faq-item[open] summary { color: var(--color-primary); }

.tp-faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.tp-faq-item p {
    padding: 0 22px 18px;
    color: var(--color-gray-dark);
    line-height: 1.7;
    margin: 0;
}

/* --- SEO-текст --- */
.tp-seo { padding: 0 0 70px; }

.tp-seo-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 18px;
    padding: 40px 45px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    border-left: 5px solid var(--color-secondary);
}

.tp-seo-box h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.tp-seo-box p {
    color: var(--color-gray-dark);
    line-height: 1.8;
    margin-bottom: 14px;
}

.tp-seo-box p:last-child { margin-bottom: 0; }

/* ============================================
🈂️ АДАПТИВНОСТЬ СТРАНИЦЫ
============================================ */
@media (max-width: 992px) {
    .tp-phrases-grid { grid-template-columns: repeat(2, 1fr); }
    .tp-how-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
    .tp-title { font-size: 2.3rem; }
}

@media (max-width: 768px) {
    .tp-hero { min-height: 480px; }
    .tp-title { font-size: 1.9rem; }
    .tp-word { font-size: 1.2rem !important; }
    .w5, .w6, .w7, .w8 { display: none; }
    .tp-widget-wrap { margin-top: -50px; }
    .tp-seo-box { padding: 28px 24px; }
}

@media (max-width: 480px) {
    .tp-phrases-grid { grid-template-columns: 1fr; }
    .tp-title { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tp-hero, .tp-word { animation: none; }
}

/* ============================================
📖 СЕКЦИЯ «ХИКӘЯЛӘР» НА ГЛАВНОЙ
============================================ */
.tatar-stories-section {
    position: relative;
    padding: 80px 0;
    margin-bottom: 60px;
    background: linear-gradient(180deg, #F1F8F4 0%, #E6F2EA 100%);
    overflow: hidden;
}

.tatar-stories-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 620px;
    opacity: 0.05;
    pointer-events: none;
}

.tatar-stories-section .container { position: relative; z-index: 2; }

.stories-header { text-align: center; margin-bottom: 50px; }

.stories-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #1B5E20, #388E3C);
    color: var(--color-white);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(27, 94, 32, 0.3);
    margin-bottom: 18px;
}

.stories-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 14px;
}

.stories-subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: var(--color-gray-dark);
    font-size: 1.05rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Карточка рассказа */
.story-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(27, 94, 32, 0.15);
    transition: all 0.35s ease;
    animation: fadeIn 0.6s ease-out;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1B5E20, var(--color-secondary), #1B5E20);
    z-index: 3;
}

.story-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 18px 40px rgba(27, 94, 32, 0.16);
}

.story-card-image { position: relative; height: 180px; overflow: hidden; }

.story-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-card-image img { transform: scale(1.07); }

.story-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1B5E20, var(--color-secondary));
    color: var(--color-white);
    font-size: 3rem;
}

/* Бейджи языков */
.story-card-lang {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 2;
    padding: 5px 15px;
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.story-card-lang.lang-tatar { background: linear-gradient(135deg, #006B5F, #00897B); }
.story-card-lang.lang-bashkir { background: linear-gradient(135deg, #1565C0, #42A5F5); }

.story-card-content {
    display: flex; flex-direction: column; gap: 10px;
    padding: 20px 22px 22px;
    flex: 1;
}

.story-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #1B5E20;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.story-card:hover .story-card-title { color: var(--color-secondary); }

.story-card-excerpt { color: var(--color-gray-dark); font-size: 0.93rem; line-height: 1.6; }

.story-card-footer {
    margin-top: auto; padding-top: 8px;
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
}

.story-card-meta { font-size: 0.8rem; color: var(--color-gray-dark); }
.story-card-meta i { color: var(--color-secondary); margin-right: 4px; }

.story-card-more {
    display: inline-flex; align-items: center; gap: 6px;
    color: #1B5E20; font-weight: 600; font-size: 0.9rem;
}

.stories-footer { text-align: center; margin-top: 45px; }

.stories-all-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #1B5E20, #388E3C);
    color: var(--color-white);
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(27, 94, 32, 0.35);
    transition: all 0.3s ease;
}

.stories-all-btn:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(27, 94, 32, 0.45); }

/* ============================================
📖 КНИГА С ПЕРЕЛИСТЫВАНИЕМ
============================================ */
.book-reader { max-width: 820px; margin: 0 auto; }

.book-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.book-lang {
    padding: 6px 18px;
    background: linear-gradient(135deg, #006B5F, #00897B);
    color: var(--color-white);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.book-hint { color: var(--color-gray-dark); font-size: 0.9rem; font-style: italic; }
.book-hint i { color: var(--color-secondary); margin-right: 6px; }

/* Книга: кожаная обложка + страницы */
.book {
    position: relative;
    perspective: 1800px;
    min-height: 620px;
}

.book::before {
    content: '';
    position: absolute;
    inset: -10px -8px -8px -16px;
    background: linear-gradient(135deg, #4E342E, #6D4C41 60%, #5D4037);
    border-radius: 10px 18px 18px 10px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.book-spine {
    position: absolute;
    left: -16px; top: -10px; bottom: -8px;
    width: 20px;
    background: linear-gradient(to right, #3E2723, #5D4037);
    border-radius: 10px 0 0 10px;
    z-index: 4;
    box-shadow: inset -3px 0 6px rgba(0, 0, 0, 0.4);
}

/* Страница-бумага */
.book-page {
    position: absolute;
    inset: 0;
    display: none;
    background: #FFFDF6;
    border-radius: 4px 14px 14px 4px;
    padding: 42px 50px 55px;
    overflow-y: auto;
    z-index: 1;
    backface-visibility: hidden;
    box-shadow: inset 0 0 40px rgba(139, 105, 60, 0.08);
}

.book-page.active,
.book-page.leaving, .book-page.leaving-rev,
.book-page.entering, .book-page.entering-rev { display: block; }

/* Тень у корешка */
.book-page::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.14), transparent);
    pointer-events: none;
}

.book-page-content { position: relative; }

.book-page-content p,
.book-page-content div {
    margin-bottom: 16px;
    line-height: 1.9;
    font-size: 1.06rem;
    color: #3d3d3d;
    text-align: justify;
}
}

.book-page-content h2, .book-page-content h3 {
    font-family: var(--font-heading);
    color: #1B5E20;
    margin: 18px 0 12px;
}

.book-page-num {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #a1887f;
    font-variant-numeric: tabular-nums;
}

/* --- 3D-перелистывание --- */
.book-page.leaving {
    animation: pageLeave 0.3s ease-in forwards;
    transform-origin: left center;
    z-index: 3;
}
@keyframes pageLeave { to { transform: rotateY(-75deg); opacity: 0; } }

.book-page.entering {
    animation: pageEnter 0.5s ease-out;
    transform-origin: right center;
}
@keyframes pageEnter { from { transform: rotateY(60deg); opacity: 0.2; } to { transform: rotateY(0); opacity: 1; } }

.book-page.leaving-rev {
    animation: pageLeaveRev 0.3s ease-in forwards;
    transform-origin: right center;
    z-index: 3;
}
@keyframes pageLeaveRev { to { transform: rotateY(75deg); opacity: 0; } }

.book-page.entering-rev {
    animation: pageEnterRev 0.5s ease-out;
    transform-origin: left center;
}
@keyframes pageEnterRev { from { transform: rotateY(-60deg); opacity: 0.2; } to { transform: rotateY(0); opacity: 1; } }

/* Управление книгой */
.book-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.book-prev, .book-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #6D4C41, #8D6E63);
    color: var(--color-white);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(78, 52, 46, 0.35);
    transition: all 0.3s ease;
}

.book-prev:hover:not(:disabled), .book-next:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(78, 52, 46, 0.45);
}

.book-prev:disabled, .book-next:disabled { opacity: 0.4; cursor: default; }

.book-counter {
    font-weight: 700;
    color: #5D4037;
    font-variant-numeric: tabular-nums;
}

/* ============================================
📖 АДАПТИВНОСТЬ
============================================ */
@media (max-width: 992px) {
    .stories-grid { grid-template-columns: repeat(2, 1fr); }
    .stories-title { font-size: 2.1rem; }
    .book { min-height: 560px; }
    .book-page { padding: 34px 34px 50px; }
}

@media (max-width: 768px) {
    .tatar-stories-section { padding: 55px 0; }
    .stories-title { font-size: 1.8rem; }
    .book { min-height: 520px; }
    .book-page { padding: 28px 22px 48px; }
    .book-page-content p { font-size: 1rem; }
    .book-controls { gap: 12px; }
    .book-prev, .book-next { padding: 10px 20px; }
}

@media (max-width: 640px) {
    .stories-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .book-page.leaving, .book-page.entering,
    .book-page.leaving-rev, .book-page.entering-rev,
    .story-card { animation: none; transition: none; }
}

/* ============================================
🔥 ВИДЖЕТ ПОПУЛЯРНЫХ ЗАПИСЕЙ
============================================ */
.popular-widget-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--color-white);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.popular-widget-item:hover {
    transform: translateX(5px);
    border-color: var(--color-secondary);
    box-shadow: 0 6px 18px rgba(0, 107, 95, 0.12);
}

.popular-widget-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.popular-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-widget-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.4rem;
}

.popular-widget-info {
    flex: 1;
    min-width: 0;
}

.popular-widget-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.popular-widget-item:hover .popular-widget-title {
    color: var(--color-primary);
}

.popular-widget-views {
    font-size: 0.78rem;
    color: var(--color-gray-dark);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.popular-widget-views i {
    color: var(--color-secondary);
}

/* Заголовок виджета */
.widget h2, .widget h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-dark);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--color-secondary);
    display: inline-block;
}

/* ============================================
📢 БЛОК ПОДПИСКИ НА КАНАЛ MAX (изолированная версия)
============================================ */
.max-subscribe-block {
    margin: 45px auto;
    padding: 32px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 10;
    clear: both;
    max-width: 100%;
    box-sizing: border-box;
}

.max-subscribe-block::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    animation: maxPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes maxPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.max-subscribe-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.max-subscribe-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.max-subscribe-text {
    flex: 1;
    min-width: 250px;
}

.max-subscribe-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #4a5dc9;
    margin-bottom: 10px;
    line-height: 1.4;
}

.max-subscribe-desc {
    font-size: 0.92rem;
    color: #5a6a8a;
    line-height: 1.7;
    margin: 0;
}

.max-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.max-subscribe-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: #ffffff !important;
}

.max-subscribe-btn i {
    color: #ffffff !important;
    transition: transform 0.3s ease;
}

.max-subscribe-btn:hover i {
    transform: translateX(4px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .max-subscribe-block {
        padding: 24px;
        margin: 35px auto;
    }
    
    .max-subscribe-content {
        flex-direction: column;
        text-align: center;
    }
    
    .max-subscribe-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .max-subscribe-title {
        font-size: 1.05rem;
    }
    
    .max-subscribe-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .max-subscribe-block::before {
        animation: none;
    }
}

/* ============================================
📚 РЕКЛАМА КНИГИ «ЙӨРӘК ҖЫЛЫСЫ»
============================================ */
.book-ad-block {
    margin: 50px 0 30px;
    padding: 40px;
    border-radius: 22px;
    background: linear-gradient(135deg, #3d1414 0%, #6b1e1e 45%, #8a5a1e 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 15px 40px rgba(61, 20, 20, 0.35);
    position: relative;
    overflow: hidden;
}

/* Национальный узор фоном */
.book-ad-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 500px;
    background-position: center;
    opacity: 0.06;
    pointer-events: none;
}

/* Пробегающий блик */
.book-ad-block::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 215, 100, 0.12), transparent);
    transform: skewX(-20deg);
    animation: bookAdShine 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bookAdShine {
    0%, 60% { left: -80%; }
    100% { left: 130%; }
}

.book-ad-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* --- 3D-книга --- */
.book-ad-visual {
    position: relative;
    width: 230px;
    flex-shrink: 0;
}

.book-ad-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(255, 200, 90, 0.35), transparent 70%);
    filter: blur(10px);
    animation: bookAdGlow 4s ease-in-out infinite;
}

@keyframes bookAdGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.book-ad-img {
    position: relative;
    width: 100%;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
    animation: bookAdFloat 6s ease-in-out infinite;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.book-ad-block:hover .book-ad-img {
    transform: rotateY(-10deg) rotateX(4deg) scale(1.05);
}

@keyframes bookAdFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

.book-ad-sparkle {
    position: absolute;
    font-size: 1.3rem;
    animation: bookAdTwinkle 2.5s ease-in-out infinite;
    pointer-events: none;
}

.book-ad-sparkle.s1 { top: -8px; right: 10px; }
.book-ad-sparkle.s2 { bottom: 20px; left: -14px; animation-delay: 0.8s; }
.book-ad-sparkle.s3 { top: 40%; right: -16px; animation-delay: 1.6s; font-size: 1rem; }

@keyframes bookAdTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
}

/* --- Контент --- */
.book-ad-content { flex: 1; min-width: 0; }

.book-ad-badge {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.book-ad-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffe9b3;
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.book-ad-desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.98rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.book-ad-features {
    list-style: none;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 0;
}

.book-ad-features li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 600;
}

.book-ad-features i {
    color: var(--color-secondary);
    font-size: 0.8rem;
}

/* --- Кнопки магазинов --- */
.book-ad-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.book-ad-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ridero {
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414 !important;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
}

.btn-wb {
    background: linear-gradient(135deg, #CB11AB, #8f0f7a);
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(203, 17, 171, 0.4);
}

.book-ad-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .book-ad-block { padding: 28px 22px; }
    .book-ad-inner { flex-direction: column; text-align: center; gap: 26px; }
    .book-ad-visual { width: 180px; }
    .book-ad-title { font-size: 1.4rem; }
    .book-ad-features { justify-content: center; }
    .book-ad-buttons { justify-content: center; }
    .book-ad-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .book-ad-img, .book-ad-glow, .book-ad-sparkle, .book-ad-block::after { animation: none; }
}

/* ============================================
📚 ВИДЖЕТ КНИГИ В САЙДБАРЕ
============================================ */
.book-ad-sidebar {
    padding: 20px;
    background: linear-gradient(135deg, #3d1414 0%, #6b1e1e 50%, #8a5a1e 100%);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 20px rgba(61, 20, 20, 0.25);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Узор фоном */
.book-ad-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 300px;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
}

/* Пробегающий блик */
.book-ad-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 215, 100, 0.1), transparent);
    transform: skewX(-20deg);
    animation: bookAdShine 8s ease-in-out infinite;
    pointer-events: none;
}

/* --- 3D-книга (компактная) --- */
.book-ad-sidebar-visual {
    position: relative;
    width: 160px;
    margin: 0 auto 18px;
}

.book-ad-sidebar-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(circle, rgba(255, 200, 90, 0.3), transparent 70%);
    filter: blur(8px);
    animation: bookAdGlow 4s ease-in-out infinite;
}

.book-ad-sidebar-img {
    position: relative;
    width: 100%;
    display: block;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.4));
    animation: bookAdFloat 6s ease-in-out infinite;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

.book-ad-sidebar:hover .book-ad-sidebar-img {
    transform: rotateY(-8deg) rotateX(3deg) scale(1.08);
}

/* --- Контент --- */
.book-ad-sidebar-content {
    position: relative;
    z-index: 2;
}

.book-ad-sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffe9b3;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.book-ad-sidebar-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* --- Кнопки (компактные) --- */
.book-ad-sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.book-ad-sidebar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ridero-small {
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-wb-small {
    background: linear-gradient(135deg, #CB11AB, #8f0f7a);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(203, 17, 171, 0.3);
}

.book-ad-sidebar-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .book-ad-sidebar {
        padding: 18px;
    }
    
    .book-ad-sidebar-visual {
        width: 140px;
    }
    
    .book-ad-sidebar-title {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-ad-sidebar-img, .book-ad-sidebar-glow, .book-ad-sidebar::after {
        animation: none;
    }
}

/* ============================================
🎨 ГЕНЕРАТОР ОТКРЫТОК
============================================ */
.generator-wrapper {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    align-items: start;
}

.generator-controls {
    background: var(--color-white);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.generator-label {
    display: block;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
    font-size: 0.98rem;
}

/* Категории */
.generator-categories { display: flex; gap: 10px; flex-wrap: wrap; }

.generator-cat-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border: 2px solid rgba(0, 107, 95, 0.25);
    background: #f4faf9;
    color: var(--color-primary);
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generator-cat-btn:hover { border-color: var(--color-primary); transform: translateY(-2px); }

.generator-cat-btn.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(0, 107, 95, 0.3);
}

/* Шаблоны */
.generator-templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.generator-tpl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    aspect-ratio: 2 / 3;
    border: 3px solid transparent;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.generator-tpl-btn .tpl-icon { font-size: 1.6rem; text-shadow: none; }

.generator-tpl-btn:hover { transform: translateY(-3px); }

.generator-tpl-btn.active {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35), 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Поля ввода */
.generator-input {
    width: 100%;
    padding: 13px 16px;
    margin-bottom: 10px;
    border: 2px solid rgba(0, 107, 95, 0.2);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-dark);
    background: #fbfdfd;
    transition: border-color 0.3s ease;
}

.generator-input:focus { outline: none; border-color: var(--color-secondary); }

/* Кнопка скачивания */
.generator-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.generator-download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.5);
}

/* Предпросмотр */
.generator-preview { position: sticky; top: 20px; }

.generator-canvas-wrap {
    background: var(--color-white);
    padding: 14px;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

#generatorCanvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .generator-wrapper { grid-template-columns: 1fr; }
    .generator-preview { position: static; }
}

@media (max-width: 640px) {
    .generator-controls { padding: 20px; }
    .generator-templates { grid-template-columns: repeat(3, 1fr); }
}

.generator-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.generator-buttons .generator-download-btn { flex: 1; }

.generator-share-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.02rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
}

.generator-share-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(102, 126, 234, 0.45); }

@media (max-width: 640px) {
    .generator-buttons { flex-direction: column; }
}

.generator-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid rgba(0, 107, 95, 0.2);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-dark);
    background: #fbfdfd;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

.generator-textarea:focus { outline: none; border-color: var(--color-secondary); }

/* ============================================
📱 ФИКС: .post-content-box шире экрана на мобильных
============================================ */
.post-content-box.entry-content {
    box-sizing: border-box !important;   /* padding теперь ВНУТРИ ширины */
    width: auto !important;              /* блок занимает ровно ширину родителя */
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    transform: none !important;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .post-content-box.entry-content {
        padding: 24px 18px !important;   /* поменьше отступов на телефоне */
        width: 100% !important;
    }
}

/* ============================================
📱 ФИКС: blog-single-layout / article не сжимается на мобильных
============================================ */
@media (max-width: 768px) {
    .blog-single-layout,
    .blog-single-layout > *,
    .blog-article,
    .post-content-box {
        min-width: 0 !important;      /* разрешаем сжиматься */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ни один внутренний элемент не может быть шире блока */
    .post-content-box * {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .post-content-box {
        overflow-x: clip;             /* страховка: ничего не торчит наружу */
    }
}

/* ============================================
🧭 ХАБ: первый экран с основным контентом
============================================ */
.tatar-hub-top {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #003d33, #00695C 60%, #00897B);
    text-align: center;
    padding: 70px 20px 110px;
}

.tatar-hub-top-ornament {
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 420px;
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

.tatar-hub-title {
    position: relative;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: #fff;
    margin-bottom: 14px;
}

.tatar-hub-title span {
    background: linear-gradient(90deg, #FFD54F, #E6C558, #FFD54F);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tatar-hub-subtitle {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* Стеклянный поиск */
.tatar-hub-search {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 6px;
    max-width: 560px;
    margin: 26px auto 0;
    backdrop-filter: blur(10px);
}

.tatar-hub-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}

.tatar-hub-search input::placeholder { color: rgba(255, 255, 255, 0.6); }

.tatar-hub-search button {
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tatar-hub-search button:hover { transform: scale(1.05); }

/* Сетка карточек, «плавающая» над границей */
.tatar-hub-grid {
    max-width: 1160px;
    margin: -70px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    position: relative;
    z-index: 2;
}

.hub-card {
    background: #fff;
    border-radius: 20px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 60, 50, 0.10);
    border: 1px solid rgba(0, 105, 92, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 60, 50, 0.16);
    border-color: rgba(212, 175, 55, 0.5);
}

.hub-icon { font-size: 2rem; }

.hub-title {
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--color-dark);
}

.hub-desc { color: #6b7a86; font-size: 0.9rem; line-height: 1.5; }

/* Главная карточка — генератор */
.hub-card--gen {
    grid-column: span 2;
    background: linear-gradient(135deg, #00695C, #00897B);
    border: 1px solid rgba(212, 175, 55, 0.45);
    position: relative;
    overflow: hidden;
}

.hub-card--gen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 300px;
    background-repeat: repeat;
    opacity: 0.1;
    pointer-events: none;
}

.hub-card--gen > * { position: relative; }

.hub-card--gen .hub-title { color: #fff; font-size: 1.3rem; }
.hub-card--gen .hub-desc { color: rgba(255, 255, 255, 0.85); }

.hub-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.75rem;
}

.hub-link { margin-top: auto; color: #FFE9B3; font-weight: 800; }

/* Адаптив */
@media (max-width: 900px) {
    .tatar-hub-grid { grid-template-columns: 1fr 1fr; }
    .hub-card--gen { grid-column: span 2; }
}

@media (max-width: 600px) {
    .tatar-hub-top { padding: 50px 16px 90px; }
    .tatar-hub-grid { grid-template-columns: 1fr; margin-top: -50px; }
    .hub-card--gen { grid-column: span 1; }
}

/* ============================================
📸 СТРАНИЦА ОТКРЫТОК
============================================ */
.postcards-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #003d33, #00695C 60%, #00897B);
    text-align: center;
    padding: 70px 20px 60px;
    color: #fff;
}

.postcards-hero-ornament {
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 420px;
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

.postcards-hero h1 {
    position: relative;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 12px;
}

.postcards-hero p {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
}

.postcards-gen-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(212, 175, 55, 0.35);
    transition: all 0.3s ease;
}

.postcards-gen-btn:hover { transform: translateY(-3px); }

/* Чипы-навигация */
.pc-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 1160px;
    margin: 30px auto 10px;
    padding: 0 20px;
}

.pc-chip {
    padding: 9px 18px;
    background: #fff;
    border: 1px solid rgba(0, 105, 92, 0.15);
    border-radius: 25px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pc-chip:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Блоки праздников */
.postcards-sections {
    max-width: 1160px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.postcards-block {
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(0, 60, 50, 0.08);
    border: 1px solid rgba(0, 105, 92, 0.08);
    scroll-margin-top: 90px;
}

.postcards-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.postcards-block-head h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-emoji { font-size: 1.6rem; }

.pc-count {
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    padding: 5px 14px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Сетка открыток */
.postcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.postcard-item {
    margin: 0;
    background: #fbfdfd;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 105, 92, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.postcard-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0, 60, 50, 0.15);
}

.postcard-thumb {
    position: relative;
    display: block;
    overflow: hidden;
}

.postcard-thumb img {
    width: 100%;
    display: block;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.postcard-item:hover .postcard-thumb img { transform: scale(1.06); }

.postcard-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 61, 51, 0.45);
    color: #fff;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.postcard-item:hover .postcard-view { opacity: 1; }

.postcard-item figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.postcard-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.35;
}

.postcard-dl {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.postcard-dl:hover { transform: scale(1.12); }

@media (max-width: 640px) {
    .postcards-block { padding: 20px; }
    .postcards-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* ============================================
🪟 ВСПЛЫВАЮЩЕЕ ОКНО ОТКРЫТОК
============================================ */
.postcard-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pc-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    display: none;
}

.pc-modal.open { display: block; }

.pc-modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 20, 16, 0.78);
}

.pc-modal-window {
    position: relative;
    margin: 4vh auto;
    width: min(520px, 92vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.pc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #f1f3f4;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease;
}

.pc-modal-close:hover { background: #e0e3e5; }

.pc-modal-img {
    width: 100%;
    display: block;
    border-radius: 14px;
}

.pc-modal-title {
    margin: 14px 0;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--color-dark);
}

.pc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 26px;
    border: none;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.pc-btn:hover { transform: translateY(-2px); }

.pc-btn-dl  { background: linear-gradient(135deg, var(--color-secondary), #e6c558); color: #3d1414; }
.pc-btn-max { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.pc-btn-vk  { background: linear-gradient(135deg, #0077FF, #005bbf); color: #fff; }

/* ============================================
💰 ОТКРЫТКИ НА ЗАКАЗ
============================================ */
.zakaz-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #003d33, #00695C 60%, #00897B);
    text-align: center;
    padding: 70px 20px 60px;
    color: #fff;
}

.zakaz-hero-ornament {
    position: absolute;
    inset: 0;
    background-image: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png");
    background-size: 420px;
    background-repeat: repeat;
    opacity: 0.07;
    pointer-events: none;
}

.zakaz-hero h1 {
    position: relative;
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    margin-bottom: 12px;
}

.zakaz-hero p {
    position: relative;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto 26px;
}

.zakaz-hero-actions {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.zakaz-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 30px;
    border: none;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.zakaz-btn:hover { transform: translateY(-3px); }

.zakaz-btn.gold {
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    box-shadow: 0 10px 26px rgba(212, 175, 55, 0.35);
}

.zakaz-btn.max {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.zakaz-btn.big { padding: 15px 34px; font-size: 1.05rem; }

/* Примеры работ */
.zakaz-works {
    max-width: 1160px;
    margin: 0 auto;
    padding: 50px 20px 10px;
}

.zakaz-works h2, .zakaz-form-wrap h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-dark);
    text-align: center;
    margin-bottom: 26px;
}

/* Форма */
.zakaz-form-wrap {
    max-width: 760px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

.zakaz-form {
    background: #fff;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 12px 36px rgba(0, 60, 50, 0.10);
    border: 1px solid rgba(0, 105, 92, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zakaz-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.zakaz-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark);
}

.zakaz-form input, .zakaz-form select, .zakaz-form textarea {
    padding: 12px 14px;
    border: 2px solid rgba(0, 105, 92, 0.2);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.98rem;
    background: #fbfdfd;
}

.zakaz-form input:focus, .zakaz-form select:focus, .zakaz-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.zakaz-file input {
    padding: 10px;
    background: #f4faf9;
}

.zakaz-ok {
    background: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #1b5e20;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-weight: 700;
}

.zakaz-err {
    background: #fdecea;
    border: 1px solid #e57373;
    color: #b71c1c;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-weight: 700;
}

.zakaz-note {
    text-align: center;
    margin-top: 18px;
    color: #6b7a86;
}

.zakaz-note a { color: var(--color-primary); font-weight: 700; }

@media (max-width: 640px) {
    .zakaz-row { grid-template-columns: 1fr; }
    .zakaz-form { padding: 22px; }
}

/* ============================================
💰 ПРОМО-БАННЕР «ОТКРЫТКИ НА ЗАКАЗ»
============================================ */
.zakaz-promo {
    max-width: 1160px;
    margin: 50px auto 30px;
    padding: 0 20px;
}

.zakaz-promo-inner {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 2px solid rgba(212, 175, 55, 0.45);
    border-radius: 24px;
    padding: 44px;
    box-shadow: 0 14px 40px rgba(0, 60, 50, 0.12);
}

/* Орнамент-водяной знак */
.zakaz-promo-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("https://tat-pozdravok.ru/wp-content/uploads/2026/04/Тат-котлау_main-3.png") repeat center;
    background-size: 340px;
    opacity: 0.06;
    pointer-events: none;
}

.zakaz-promo-text { position: relative; }

.zakaz-promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    color: #3d1414;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.zakaz-promo h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--color-dark);
    margin-bottom: 10px;
}

.zakaz-promo p {
    color: #5d4a1f;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Шаги 1-2-3 */
.zakaz-promo-steps {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    flex-wrap: wrap;
}

.zakaz-promo-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark);
}

.zakaz-promo-steps span {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Кнопки */
.zakaz-promo-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.zakaz-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 30px;
    background: linear-gradient(135deg, #00695C, #00897B);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 105, 92, 0.3);
    transition: transform 0.3s ease;
}

.zakaz-promo-btn.ghost {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    box-shadow: none;
}

.zakaz-promo-btn:hover { transform: translateY(-3px); }

/* Веер из примеров работ */
.zakaz-promo-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
}

.zakaz-promo-visual img {
    width: 150px;
    border-radius: 14px;
    border: 4px solid #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.zakaz-promo-visual img + img { margin-left: -30px; }

.zakaz-promo-visual img:nth-child(1) { transform: rotate(-8deg) translateY(10px); }
.zakaz-promo-visual img:nth-child(2) { transform: rotate(0deg) translateY(-8px); z-index: 2; }
.zakaz-promo-visual img:nth-child(3) { transform: rotate(8deg) translateY(10px); }

.zakaz-promo-emoji { font-size: 6rem; }

/* Адаптив */
@media (max-width: 900px) {
    .zakaz-promo-inner {
        grid-template-columns: 1fr;
        padding: 30px 24px;
        text-align: center;
    }
    .zakaz-promo-steps, .zakaz-promo-actions { justify-content: center; }
    .zakaz-promo-visual { order: -1; min-height: 180px; }
    .zakaz-promo-visual img { width: 120px; }
}

/* ============================================
🎈 ПРАЗДНИЧНАЯ АТМОСФЕРА В ШАПКЕ (финальная версия)
============================================ */
/* Декор — отдельный слой поверх верха страницы.
   Шапку (#masthead) не трогаем совсем. */
.party-decor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* --- Воздушные шары --- */
.balloon {
    position: absolute;
    width: 34px;
    height: 42px;
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    opacity: 0.5;
    animation: balloon-sway 5s ease-in-out infinite alternate;
}

/* Блик на шаре */
.balloon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 10px;
    height: 14px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* Нить шара */
.balloon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 1px;
    height: 32px;
    background: rgba(0, 0, 0, 0.22);
}

/* Позиции на ПК */
.b1 { left: 3%;  top: 10px; background: radial-gradient(circle at 35% 30%, #ff8a80, #e53935); }
.b2 { left: 8%;  top: 30px; background: radial-gradient(circle at 35% 30%, #ffe082, #fbc02d); width: 26px; height: 32px; animation-delay: 1.2s; }
.b3 { right: 4%; top: 12px; background: radial-gradient(circle at 35% 30%, #80d8ff, #039be5); animation-delay: 0.6s; }
.b4 { right: 9%; top: 32px; background: radial-gradient(circle at 35% 30%, #b9f6ca, #43a047); width: 26px; height: 32px; animation-delay: 1.8s; }

@keyframes balloon-sway {
    from { transform: translateY(0) rotate(-4deg); }
    to   { transform: translateY(-10px) rotate(4deg); }
}

/* --- Конфетти --- */
.confetti {
    position: absolute;
    top: -8px;
    left: 0;
    width: 6px;
    height: 10px;
    background: transparent;
    opacity: 0;
    box-shadow:
        40px 10px 0 #e53935,   130px 28px 0 #fbc02d,  220px 12px 0 #039be5,
        310px 26px 0 #43a047,  400px 8px 0 #e53935,   490px 30px 0 #8e24aa,
        580px 14px 0 #fbc02d,  670px 28px 0 #039be5,  760px 10px 0 #43a047,
        850px 24px 0 #e53935,  940px 12px 0 #8e24aa,  1030px 28px 0 #fbc02d,
        1120px 16px 0 #039be5, 1210px 30px 0 #43a047, 1300px 12px 0 #e53935,
        1390px 26px 0 #fbc02d, 1480px 14px 0 #8e24aa, 1570px 28px 0 #039be5;
    animation: confetti-fall 7s linear infinite;
}

@keyframes confetti-fall {
    0%   { transform: translateY(-10px) rotate(0deg);   opacity: 0; }
    12%  { opacity: 0.5; }
    85%  { opacity: 0.35; }
    100% { transform: translateY(130px) rotate(340deg); opacity: 0; }
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ: шарики в шапке, в свободной зоне --- */
@media (max-width: 640px) {
    .balloon {
        opacity: 0.55;
    }

    /* Уменьшенные шарики между заголовком и бургер-меню */
    .b1 { left: 56%; top: 6px;  width: 22px; height: 27px; }
    .b2 { left: 65%; top: 32px; width: 18px; height: 22px; }
    .b3 { left: 74%; top: 10px; width: 20px; height: 25px; }
    .b4 { display: none; }

    /* Короткие нити, чтобы не мешали поиску */
    .balloon::after { height: 18px; }

    /* Конфетти пореже на узких экранах */
    .confetti {
        box-shadow:
            30px 10px 0 #e53935,  110px 26px 0 #fbc02d,
            190px 12px 0 #039be5, 270px 24px 0 #43a047,
            350px 14px 0 #8e24aa, 430px 28px 0 #e53935,
            510px 10px 0 #fbc02d, 590px 24px 0 #039be5;
    }
}

/* Уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
    .balloon, .confetti { animation: none; }
    .confetti { display: none; }
}

/* ============================================
✍️ ШРИФТ ТОЛЬКО НАДПИСИ В ШАПКЕ
============================================ */
#masthead .site-title,
#masthead .site-title a,
.site-header .site-title,
.site-header .site-title a,
#masthead .site-logo-text,
#masthead .site-logo-text a,
.site-header .site-logo-text,
.site-header .site-logo-text a {
    font-family: 'Caveat', cursive !important;
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.1;
}

/* ============================================
📦 СТРАНИЦА «СТАТУС ЗАКАЗА»
============================================ */
.status-hero {
    background: linear-gradient(135deg, #003d33, #00695C 60%, #00897B);
    text-align: center;
    padding: 60px 20px 50px;
    color: #fff;
}

.status-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 10px;
}

.status-hero p { color: rgba(255, 255, 255, 0.85); }

.status-wrap {
    max-width: 640px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

.status-form {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 60, 50, 0.10);
    margin-bottom: 22px;
}

.status-form input {
    flex: 1;
    border: 2px solid rgba(0, 105, 92, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    text-transform: uppercase;
}

.status-form input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.status-card {
    background: #fff;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 12px 36px rgba(0, 60, 50, 0.10);
}

.status-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.status-num {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-dark);
}

.status-badge {
    color: #fff;
    padding: 6px 16px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 0.85rem;
    white-space: nowrap;
}

.status-client {
    color: #6b7a86;
    margin-bottom: 22px;
}

/* Лента этапов */
.status-steps {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    margin: 0 0 22px;
}

.status-steps li {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #9aa7b0;
    position: relative;
}

.status-steps .dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #e6ebee;
    color: #9aa7b0;
    font-weight: 800;
}

.status-steps li.done { color: var(--color-primary); }
.status-steps li.done .dot { background: var(--color-primary); color: #fff; }

.status-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: #e6ebee;
}

.status-steps li.done:not(:last-child)::after { background: var(--color-primary); }

.status-note {
    text-align: center;
    color: #6b7a86;
    font-size: 0.9rem;
}

.status-note a { color: var(--color-primary); font-weight: 700; }

@media (max-width: 560px) {
    .status-steps li { font-size: 0.68rem; }
    .status-form { flex-direction: column; }
}

/* ============================================
🖼 СЕТКА ОТКРЫТОК ВНУТРИ ЗАПИСИ (самодостаточная)
============================================ */
.inpost-otkrytki {
    margin: 32px 0;
    max-width: 100%;
}

.inpost-otkrytki-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--color-dark);
    margin-bottom: 16px;
}

/* Контейнер сетки — принудительно 3 колонки на всю ширину текста */
.inpost-otkrytki .inpost-grid,
.inpost-otkrytki .postcards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    transform: none !important;
}

/* Карточка — сбрасываем всё, что может её сжать/сдвинуть */
.inpost-otkrytki .postcard-item {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
}

/* Кнопка-миниатюра */
.inpost-otkrytki .postcard-thumb {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    cursor: pointer;
}

/* Картинка — всегда во всю ширину карточки, пропорция 3:4 */
.inpost-otkrytki .postcard-thumb img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

/* Подпись под открыткой */
.inpost-otkrytki .postcard-title {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 900px) {
    .inpost-otkrytki .inpost-grid,
    .inpost-otkrytki .postcards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .inpost-otkrytki .inpost-grid,
    .inpost-otkrytki .postcards-grid {
        gap: 10px !important;
    }
    .inpost-otkrytki .postcard-title { font-size: 0.75rem; }
}

/* ============================================
🌐 КНОПКИ ВО ВСПЛЫВАЮЩЕМ ОКНЕ ОТКРЫТКИ
============================================ */
/* Основная кнопка Скачать — изумрудная (уже есть, усиливаем) */
.pc-btn-dl {
    background: linear-gradient(135deg, #00695C, #00897B) !important;
    color: #fff !important;
    border: 0 !important;
}

/* ============================================
💜 КНОПКА MAX — ФИРМЕННЫЙ ГРАДИЕНТ
============================================ */
.pc-btn-max {
    background: linear-gradient(135deg, #7C4DFF, #5E35B1) !important;
    color: #fff !important;
    border: 0 !important;
}

.pc-btn-max:hover {
    box-shadow: 0 6px 18px rgba(124, 77, 255, 0.45);
}

/* ВК — фирменный синий #0077FF */
.pc-btn-vk {
    background: linear-gradient(135deg, #0077FF, #2688eb) !important;
    color: #fff !important;
    border: 0 !important;
}

.zakaz-btn.max,
.pc-btn-max {
    background: linear-gradient(135deg, #7C4DFF, #5E35B1) !important;
    color: #fff !important;
}

/* Общий hover-эффект для всех кнопок */
.pc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0.95;
}

/* ============================================
👆 СТРЕЛКИ И СЧЁТЧИК В ОКНЕ ОТКРЫТКИ
============================================ */
.pc-nav {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #00695C;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 100001 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    transition: background 0.2s ease, transform 0.2s ease;
}

.pc-nav:hover { background: #ffffff; transform: translateY(-50%) scale(1.08); }

.pc-nav-prev { left: 12px !important; right: auto !important; }
.pc-nav-next { right: 12px !important; left: auto !important; }

/* Счётчик «3 / 12» сверху по центру */
.pc-counter {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 5px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    z-index: 100001;
    pointer-events: none;
}

@media (max-width: 640px) {
    .pc-nav { width: 40px; height: 40px; font-size: 26px; }
    .pc-nav-prev { left: 8px !important; }
    .pc-nav-next { right: 8px !important; }
}

/* ============================================
📖 ИМЕННЫЕ ПОЗДРАВЛЕНИЯ: КАТАЛОГ
============================================ */
.imennye-hero,
.imname-hero {
    background: linear-gradient(135deg, #003d33, #00695C 60%, #00897B);
    text-align: center;
    padding: 60px 20px 50px;
    color: #fff;
}

.imennye-hero h1,
.imname-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 10px;
}

.imennye-hero p,
.imname-hero p { color: rgba(255, 255, 255, 0.85); }

.imennye-wrap {
    max-width: 900px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

/* Алфавит */
.imennye-alpha {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
    margin-bottom: 22px;
}

.im-alpha-btn {
    position: relative;
    padding: 12px 0 10px;
    border: 2px solid rgba(0, 105, 92, 0.18);
    border-radius: 12px;
    background: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.im-alpha-btn:hover:not(:disabled) {
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

.im-alpha-btn.active {
    background: linear-gradient(135deg, var(--color-secondary), #e6c558);
    border-color: transparent;
    color: #3d1414;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}

.im-alpha-btn:disabled { opacity: 0.3; cursor: default; }

.im-count {
    position: absolute;
    top: -7px;
    right: -5px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Поиск */
.imennye-search { margin-bottom: 24px; }

.imennye-search input {
    width: 100%;
    padding: 13px 18px;
    border: 2px solid rgba(0, 105, 92, 0.2);
    border-radius: 30px;
    font-size: 1rem;
    background: #fff;
}

.imennye-search input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

/* Имена */
.im-letter-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 14px;
}

.im-names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.im-name-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid rgba(0, 105, 92, 0.12);
    border-radius: 14px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.im-name-card:hover {
    border-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 60, 50, 0.12);
}

.im-hint {
    text-align: center;
    color: #6b7a86;
    padding: 30px 0;
    line-height: 1.7;
}

/* ============================================
📖 СТРАНИЦА ИМЕНИ (поздравление)
============================================ */
.imname-hero { padding: 50px 20px 46px; }

.imname-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.imname-body {
    max-width: 760px;
    margin: 36px auto;
    padding: 30px 34px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0, 60, 50, 0.10);
    font-size: 1.05rem;
    line-height: 1.8;
    color: #23343f;
}

.imname-body p { margin-bottom: 1em; }

.imname-actions {
    text-align: center;
    margin: 0 20px 40px;
}

.imname-actions a { margin: 0 6px 10px; }

.imname-same {
    max-width: 760px;
    margin: 0 auto 70px;
    padding: 0 20px;
}

.imname-same h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 14px;
    color: var(--color-dark);
}

@media (max-width: 640px) {
    .imennye-alpha { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
    .im-alpha-btn { font-size: 1.05rem; padding: 10px 0 8px; }
    .im-names-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
}