/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Скрываем картинку в посте */
.page-header-image-single {
      display: none;
}

/* Скрываем картинку в посте */
.page-header-image {
      display: none;
}

/* ==========================================================================
   ЭЛЕГАНТНЫЙ АЛФАВИТНЫЙ СОННИК (COMPACT VERSION)
   ========================================================================== */

/* Сетка блоков */
.sonnik-elegant-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
    align-items: start;
}

/* Карточка */
.sonnik-card {
    background: #ffffff;
    border: 1px solid #f0e8f5;
    border-radius: 15px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(125, 91, 166, 0.05);
}

.sonnik-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(125, 91, 166, 0.12);
    border-color: #d1bfe3;
}

/* Шапка */
.sonnik-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px double #e9dff2;
}

.header-main-info {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.letter-link-wrapper { text-decoration: none !important; display: flex; align-items: center; }

.mystic-star { color: #b39b5d; font-size: 16px; margin-right: 8px; transition: transform 0.6s ease; }
.letter-link-wrapper:hover .mystic-star { transform: rotate(180deg); }

.letter-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 32px;
    font-weight: 700;
    color: #3a2d4a;
    line-height: 1;
    text-transform: uppercase;
}

/* Кликабельный счетчик (XX всего) */
.total-count-pill {
    font-size: 13px;
    color: #9e8fb2;
    text-decoration: none !important;
    font-style: italic;
    transition: color 0.3s ease;
}

.total-count-pill:hover { color: #7d5ba6 !important; text-decoration: underline !important; }

/* Список постов */
.posts-list { list-style: none !important; margin: 0 0 10px 0 !important; padding: 0 !important; }
.posts-list li { margin-bottom: 6px !important; padding: 0 !important; }
.posts-list li a { color: #4a4a4a !important; text-decoration: none !important; font-size: 16px; transition: all 0.2s ease; }
.posts-list li a:hover { color: #7d5ba6 !important; padding-left: 4px; }

/* Кнопка внизу */
.footer-link { margin-top: 5px; padding-top: 8px; border-top: 1px solid #fcfaff; }
.view-all-btn { font-size: 11px; font-weight: 700; color: #b39b5d !important; text-decoration: none !important; text-transform: uppercase; letter-spacing: 1px; }
.view-all-btn:hover { color: #7d5ba6 !important; }

/* Адаптивность */
@media (max-width: 1024px) { .sonnik-elegant-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { 
    .sonnik-elegant-container { grid-template-columns: 1fr; }
    .letter-title { font-size: 28px; }
}

/* ==========================================================================
   ЭЛЕГАНТНЫЕ ХЛЕБНЫЕ КРОШКИ (YOAST + MYSTIC STYLE)
   ========================================================================== */

.mystic-breadcrumbs {
    margin-top: 20px;
    margin-bottom: 10px;
}

#breadcrumbs {
    font-family: "Playfair Display", Georgia, serif; /* Книжный шрифт */
    font-size: 14px;
    color: #9e8fb2; /* Приглушенный цвет для второстепенного текста */
    line-height: 1.5;
    padding: 10px 0;
    border-bottom: 1px double #e9dff2; /* Тонкая двойная линия как в карточках */
}

/* Ссылки в крошках (Главная, Категория) */
#breadcrumbs a {
    color: #7d5ba6 !important; /* Наш фирменный фиолетовый */
    text-decoration: none !important;
    transition: all 0.3s ease;
    font-weight: 500;
}

#breadcrumbs a:hover {
    color: #b39b5d !important; /* Золотой при наведении */
}

/* Разделитель между крошками */
/* Если в настройках Yoast стоит символ » или >, мы его стилизуем */
#breadcrumbs span {
    padding: 0 5px;
}

/* Стилизация последнего элемента (текущая страница) */
#breadcrumbs span:last-child {
    color: #3a2d4a; /* Глубокий баклажановый */
    font-style: italic; /* Курсив для текущего положения */
    font-weight: 400;
}

/* Декоративный элемент: если вы хотите заменить стандартный разделитель на золотую точку или звезду через CSS */
/* В настройках Yoast желательно поставить символ » или • */
#breadcrumbs span .breadcrumb_last {
    font-style: italic;
}

/* Адаптивность для мобильных */
@media (max-width: 767px) {
    #breadcrumbs {
        font-size: 13px;
        line-height: 1.4;
        padding: 5px 0;
    }
}



/* ==========================================================================
   АЛФАВИТНАЯ НАВИГАЦИЯ (MYSTIC ALPHABET)
   ========================================================================== */

.sonnik-alphabet-nav-block {
    text-align: center;
    margin: 40px auto;
    max-width: 1000px;
    padding: 0 15px;
}

/* Блок заголовка */
.sonnik-nav-header {
    margin-bottom: 30px;
}

.mystic-title {
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: 32px !important;
    color: #3a2d4a !important;
    margin-bottom: 5px !important;
    letter-spacing: 1px;
}

.mystic-subtitle {
    font-size: 14px;
    color: #9e8fb2;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.mystic-divider {
    color: #b39b5d;
    font-size: 12px;
    letter-spacing: 5px;
}

/* Сетка букв */
.alphabet-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.letter-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #f0e8f5;
    border-radius: 8px;
    text-decoration: none !important;
    font-family: "Playfair Display", serif;
    font-size: 18px;
    font-weight: 700;
    color: #7d5ba6 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(125, 91, 166, 0.05);
}

.letter-item:hover {
    border-color: #b39b5d;
    color: #b39b5d !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(179, 155, 93, 0.2);
}

/* СТИЛЬ ДЛЯ АКТИВНОЙ БУКВЫ */
.letter-item.is-active {
    background: #fff;
    border: 2px solid #b39b5d; /* Золотая рамка */
    color: #b39b5d !important;
    box-shadow: 0 0 15px rgba(179, 155, 93, 0.3); /* Эффект свечения */
    transform: scale(1.1);
    position: relative;
    z-index: 2;
}

/* Чтобы активная буква не прыгала при наведении */
.letter-item.is-active:hover {
    box-shadow: 0 0 20px rgba(179, 155, 93, 0.5);
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .letter-item {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .mystic-title {
        font-size: 26px !important;
    }
}

/* ==========================================================================
   ЭЛЕГАНТНЫЙ ПОИСК (MYSTIC SEARCH)
   ========================================================================== */

.sonnik-search-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
}

.sonnik-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #f0e8f5;
    border-radius: 50px; /* Скругленные края для элегантности */
    padding: 8px 10px 8px 25px;
    box-shadow: 0 4px 15px rgba(125, 91, 166, 0.05);
    transition: all 0.4s ease;
}

/* Эффект свечения при наведении и вводе */
.sonnik-search-input-group:focus-within,
.sonnik-search-input-group:hover {
    border-color: #d1bfe3;
    box-shadow: 0 8px 25px rgba(125, 91, 166, 0.12);
    transform: translateY(-2px);
}

/* Золотая звезда перед текстом */
.mystic-search-star {
    color: #b39b5d;
    font-size: 20px;
    margin-right: 15px;
    line-height: 1;
}

/* Поле ввода */
.sonnik-search-field {
    flex-grow: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: Georgia, serif;
    font-size: 18px;
    font-style: italic;
    color: #3a2d4a;
    padding: 10px 0 !important;
    box-shadow: none !important;
}

/* Цвет плейсхолдера (текста-подсказки) */
.sonnik-search-field::placeholder {
    color: #9e8fb2;
    opacity: 0.7;
}

/* Кнопка поиска */
.sonnik-search-submit {
    background: #7d5ba6 !important; /* Фирменный фиолетовый */
    color: #ffffff !important;
    border: none !important;
    border-radius: 40px;
    padding: 12px 25px !important;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sonnik-search-submit:hover {
    background: #3a2d4a !important; /* Глубокий баклажановый при наведении */
    box-shadow: 0 4px 12px rgba(62, 45, 74, 0.3);
}

.sonnik-search-submit .search-arrow {
    font-style: normal;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sonnik-search-submit:hover .search-arrow {
    transform: translateX(4px);
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .sonnik-search-input-group {
        padding: 6px 6px 6px 15px;
    }
    
    .sonnik-search-field {
        font-size: 15px;
    }
    
    .sonnik-search-submit {
        padding: 10px 18px !important;
        font-size: 11px;
    }
    
    .sonnik-search-submit span {
        display: none; /* Скрываем текст "Поиск" на мобильных, оставляем только стрелку */
    }
    
    .mystic-search-star {
        margin-right: 8px;
    }
}

/* ==========================================================================
   ПОЛНОШИРИННАЯ ГРУППИРОВКА (4 КОЛОНКИ)
   ========================================================================== */

/* Общий контейнер */
.sonnik-full-wrapper {
    width: 100%;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 40px; /* Расстояние между карточками Аа, Аб... */
}

/* Карточка одной группы (Аа) */
.sonnik-full-group {
    background: #ffffff;
    border: 1px solid #f0e8f5;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(125, 91, 166, 0.03);
    transition: border-color 0.3s ease;
}

.sonnik-full-group:hover {
    border-color: #d1bfe3;
}

/* Шапка группы */
.sonnik-full-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем заголовок для красоты */
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px double #e9dff2;
    padding-bottom: 15px;
}

.full-group-title {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #3a2d4a !important;
    margin: 0 !important;
    letter-spacing: 2px;
}

.full-star {
    color: #b39b5d; /* Золотой цвет */
    font-size: 18px;
}

/* Сетка ссылок (Внутренняя) */
.sonnik-full-grid {
    display: grid;
    /* 4 колонки по умолчанию для ПК */
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 25px;
}

/* Элемент списка (название сна) */
.full-item a {
    font-size: 16px;
    color: #4a4a4a !important;
    text-decoration: none !important;
    line-height: 1.3;
    display: block;
    padding: 2px 0;
    transition: all 0.2s ease;
}

.full-item a:hover {
    color: #7d5ba6 !important; /* Фиолетовый при наведении */
    transform: translateX(5px); /* Легкий сдвиг вправо */
}

/* ==========================================================================
   АДАПТИВНОСТЬ (СЕТКА ПОД РАЗНЫЕ ЭКРАНЫ)
   ========================================================================== */

/* Ноутбуки (средние экраны) - 3 колонки */
@media (max-width: 1200px) {
    .sonnik-full-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Планшеты (горизонтальные и вертикальные) - 2 колонки */
@media (max-width: 900px) {
    .sonnik-full-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 15px;
    }
}

/* Мобильные телефоны - 1 колонка */
@media (max-width: 550px) {
    .sonnik-full-grid {
        grid-template-columns: 1fr;
    }
    
    .sonnik-full-group {
        padding: 20px;
    }
    
    .full-group-title {
        font-size: 24px !important;
    }
    
    .sonnik-full-header {
        gap: 10px;
    }
}

/* ==========================================================================
   ПОЛНЫЙ БЛОК СТИЛИЗАЦИИ ТЕКСТА СТАТЬИ (MYSTIC CONTENT STYLE)
   ========================================================================== */

/* 1. Основной контент и шрифты */
.entry-content {
    line-height: 1.85 !important;
    font-size: 20px !important;
    color: #444 !important;
    word-wrap: break-word;
}

/* Исправление визуального размера жирного шрифта (Playfair компенсация) */
.entry-content strong, 
.entry-content b {
    color: #3a2d4a !important;
    font-family: "Playfair Display", Georgia, serif !important;
    font-weight: 700 !important;
    font-size: 1.15em !important; /* Увеличено до 1.15 для четкой видимости */
    letter-spacing: 0.1px;
}

/* 2. Первый (вводный) абзац */
.entry-content > p:first-of-type {
    font-size: 22px !important;
    line-height: 1.7 !important;
    font-style: italic !important;
    color: #3a2d4a !important;
    background: #fcfaff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    border-left: 6px solid #b39b5d !important;
    margin-bottom: 40px !important;
    box-shadow: 0 4px 20px rgba(125, 91, 166, 0.05) !important;
}

/* 3. Заголовки (H2 с символом ✦) */
.entry-content h2, 
.entry-content h3 {
    font-family: "Playfair Display", Georgia, serif !important;
    color: #3a2d4a !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 25px !important;
}

.entry-content h2 {
    font-size: 36px !important;
    margin-top: 60px !important;
    border-bottom: 1px double #e9dff2 !important;
    padding-bottom: 15px !important;
}

.entry-content h2::before {
    content: "✦";
    color: #b39b5d;
    font-size: 20px;
    margin-right: 12px;
}

.entry-content h3 {
    font-size: 28px !important;
    margin-top: 45px !important;
}

/* 4. СПИСКИ (РАДИКАЛЬНОЕ ИСПРАВЛЕНИЕ ОТСТУПОВ) */
.entry-content ul, 
.entry-content ol {
    margin-left: 0 !important;
    padding-left: 1.3em !important; /* Умеренный отступ на ПК */
    margin-bottom: 30px !important;
    list-style-position: outside !important;
}

.entry-content li {
    margin-bottom: 12px !important;
    padding-left: 8px !important;
}

/* Вложенные списки (Список внутри списка) */
.entry-content li > ul, 
.entry-content li > ol {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    margin-left: 0 !important;
    padding-left: 1.1em !important; /* Уменьшенный отступ для вложенности */
}

/* Блок навигации (Содержание) */
.entry-content h3 + ol {
    background: #ffffff !important;
    border: 1px solid #f0e8f5 !important;
    border-radius: 15px !important;
    padding: 30px 30px 30px 45px !important;
    margin: 40px 0 !important;
    list-style-position: outside !important;
}

.entry-content h3 + ol li a {
    color: #7d5ba6 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 19px !important;
}

/* 5. Цитаты и Блоки сонников */
.entry-content blockquote {
    background: #ffffff !important;
    border: 1px solid #f0e8f5 !important;
    border-left: 6px solid #b39b5d !important;
    border-radius: 20px !important;
    padding: 35px 40px !important;
    margin: 50px 0 !important;
    box-shadow: 0 10px 30px rgba(125, 91, 166, 0.08) !important;
}

.entry-content blockquote p {
    font-style: italic !important;
    font-family: Georgia, serif !important;
    font-size: 21px !important;
    line-height: 1.8 !important;
}

/* 6. Таблицы */
.entry-content table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 15px !important;
    margin: 40px 0 !important;
    border: 1px solid #f0e8f5 !important;
    overflow: hidden !important;
}

.entry-content table th {
    background: #7d5ba6 !important;
    color: #fff !important;
    padding: 20px !important;
    font-family: "Playfair Display", serif !important;
}

.entry-content table td {
    padding: 20px !important;
    border-bottom: 1px solid #f0e8f5 !important;
}

/* 7. FAQ */
.entry-content #faq + ol > li {
    background: #ffffff !important;
    border: 1px solid #f0e8f5 !important;
    border-radius: 15px !important;
    padding: 25px 30px !important;
    margin-bottom: 20px !important;
    list-style: none !important;
}

.entry-content #faq + ol > li strong {
    font-size: 22px !important;
    display: block !important;
    margin-bottom: 10px !important;
    border: none !important;
}

/* 8. МОБИЛЬНАЯ АДАПТАЦИЯ (ДЛЯ ТЕЛЕФОНОВ) */
@media (max-width: 767px) {
    .entry-content {
        font-size: 18px !important; /* Чуть меньше на мобильном */
    }

    /* РЕШАЕМ ПРОБЛЕМУ ОТСТУПОВ СПИСКОВ НА МОБИЛЬНОМ */
    .entry-content ul, 
    .entry-content ol {
        padding-left: 1em !important; /* Почти вплотную к краю */
    }

    /* Вложенный список на мобильном - экстремально малый отступ */
    .entry-content li > ul, 
    .entry-content li > ol {
        padding-left: 0.8em !important;
        margin-left: 0.1em !important;
    }

    .entry-content h2 { font-size: 28px !important; }
    .entry-content h3 { font-size: 24px !important; }

    .entry-content > p:first-of-type {
        font-size: 19px !important;
        padding: 20px !important;
    }

    /* Уменьшаем отступы в Содержании на мобильном */
    .entry-content h3 + ol {
        padding: 25px 15px 25px 35px !important;
    }

    .entry-content table td, 
    .entry-content table th {
        padding: 12px !important;
        font-size: 16px !important;
    }
}