/* MAIN CONTENT */
main {
   max-width: 1400px;
   margin: 0 auto;
   padding: 2rem;
}

.section-title {
   font-size: 2rem;
   font-weight: 700;
   color: var(--text-primary);
   margin-bottom: 2rem;
   text-align: center;
   position: relative;
}

.section-title::after {
   content: '';
   position: absolute;
   bottom: -0.5rem;
   left: 50%;
   transform: translateX(-50%);
   width: 60px;
   height: 3px;
   background: var(--gradient-secondary);
   border-radius: 2px;
}



/* INFO SECTIONS */
.info-section-two-columns {
   display: grid;
   grid-template-columns: 1fr 0.5fr;
   gap: 2rem;
   margin-bottom: 3rem;
}

.info-section-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
 }
 
 .info-block {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
 }
 
 /* Убираем padding у блоков в трёхколоночной секции */
 .info-section-three-columns .info-block {
    padding: 0;
    overflow: hidden; /* Чтобы контент не выходил за скругленные углы */
 }
 
 .info-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
 }
 
 .info-block h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
 }
 
 /* Корректируем заголовки в трёхколоночной секции */
 .info-section-three-columns .info-block h3 {
    padding: 20px 24px 15px 24px;
    margin-bottom: 0;
    background: rgba(126, 87, 194, 0.03);
    border-bottom: 1px solid rgba(126, 87, 194, 0.1);
 }
 
 .info-block h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-secondary);
    border-radius: 1px;
 }
 
 /* Убираем линию под заголовком в трёхколоночной секции */
 .info-section-three-columns .info-block h3::after {
    display: none;
 }
 
 .info-block p {
    color: var(--text-secondary);
    line-height: 1.7;
 }
 
 /* Добавляем отступы для текста в трёхколоночной секции */
 .info-section-three-columns .info-block p {
    padding: 0 24px 20px 24px;
 }
 
 /* Корректировка для контента калькулятора сна */
 .info-section-three-columns .sleep-calculator-content {
    padding: 1rem 0;
 }
 
 .info-section-three-columns .sleep-calc-text {
    padding: 0 24px 20px 24px;
 }
 
 .info-section-three-columns .sleep-calc-btn {
    margin: 0 24px 20px 24px;
    width: calc(100% - 48px);
 }
 
 .info-section-three-columns .sleep-features {
    padding: 0 24px 10px 24px;
 }
 
 /* Корректировка для блока "О проекте" */
 .info-section-three-columns .info-about-content {
    padding: 0;
 }
 
 .info-section-three-columns .info-about-text {
    padding: 0 24px;
 }
 
 .info-section-three-columns .info-about-features {
    padding: 0 24px 10px 24px;
 }
 
 @media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
 
    .mobile-menu-toggle {
        display: block;
    }
 
    .header-container {
        padding: 1rem;
    }
 
    .search-input {
        width: 200px;
    }
 
    .search-input:focus {
        width: 220px;
    }
 
    main {
        padding: 1rem;
    }
 
    .alphabet-container {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        gap: 0.5rem;
    }
 
    .letter-btn {
        height: 50px;
        font-size: 1rem;
    }
 
    .info-section-two-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Трёхколоночная секция становится одноколоночной */
    .info-section-three-columns {
        grid-template-columns: 1fr;
    }
    
    /* Уменьшаем отступы на планшетах */
    .info-section-three-columns .info-block h3 {
        padding: 18px 20px 12px 20px;
    }
    
    .info-section-three-columns .info-block p,
    .info-section-three-columns .sleep-calc-text,
    .info-section-three-columns .info-about-text {
        padding: 0 20px 18px 20px;
    }
    
    .info-section-three-columns .sleep-calc-btn {
        margin: 0 20px 18px 20px;
        width: calc(100% - 40px);
    }
    
    .info-section-three-columns .sleep-features,
    .info-section-three-columns .info-about-features {
        padding: 0 20px 10px 20px;
    }
 
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
 
    .footer-section {
        padding: 1.5rem;
        min-height: auto;
    }
 
    .footer-section h4 {
        font-size: 1.2rem;
    }
 
    .footer-section p {
        font-size: 0.9rem;
    }
 
    .section-title {
        font-size: 1.5rem;
    }
 }
 
 @media (max-width: 480px) {
    .header-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
 
    .search-container {
        order: 3;
        flex-basis: 100%;
    }
 
    .search-input {
        width: 100%;
    }
 
    .alphabet-section, .calendar-section {
        padding: 2rem 1rem;
    }
 
    .info-block {
        padding: 1.5rem;
    }
    
    /* Оставляем padding 0 для трёхколоночной секции */
    .info-section-three-columns .info-block {
        padding: 0;
    }
    
    /* Уменьшаем отступы на мобильных */
    .info-section-three-columns .info-block h3 {
        padding: 16px 16px 10px 16px;
        font-size: 1.15rem;
    }
    
    .info-section-three-columns .info-block p,
    .info-section-three-columns .sleep-calc-text,
    .info-section-three-columns .info-about-text {
        padding: 0 16px 16px 16px;
    }
    
    .info-section-three-columns .sleep-calc-btn {
        margin: 0 16px 16px 16px;
        width: calc(100% - 32px);
    }
    
    .info-section-three-columns .sleep-features,
    .info-section-three-columns .info-about-features {
        padding: 0 16px 8px 16px;
    }
 
    .mobile-menu {
        width: 280px;
    }
 }
 
/* HIDDEN ELEMENTS */
#eventsData {
   display: none;
}

.popular-topics {
  /*  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); */
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 50px 20px;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 35px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.topics-table {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Колонка тега */
.topic-column {
    background: white;
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.topic-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Заголовок тега */
.topic-header {
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 3px solid;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-header::after {
    display: none;
}



.topic-header a {
    text-decoration: none;
    transition: opacity 0.2s ease;

}

.topic-header a:hover {
    opacity: 0.7;
}

/* 🎨 Цвета заголовков */
.topic-header.color-1 {
    border-color: #e74c3c;
}
.topic-header.color-1 a {
    color: #e74c3c;
}

.topic-header.color-2 {
    border-color: #3498db;
}
.topic-header.color-2 a {
    color: #3498db;
}

.topic-header.color-3 {
    border-color: #2ecc71;
}
.topic-header.color-3 a {
    color: #2ecc71;
}

.topic-header.color-4 {
    border-color: #9b59b6;
}
.topic-header.color-4 a {
    color: #9b59b6;
}

.topic-header.color-5 {
    border-color: #f39c12;
}
.topic-header.color-5 a {
    color: #f39c12;
}

/* 
.info-block-1 h3::after {
    display: none;
}
*/



/* Список статей */
.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-list li {
    margin-bottom: 14px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

/* Красивые маркеры списка */
.topic-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #764ba2;
    font-weight: bold;
    font-size: 17px;
    line-height: 1;
}

.topic-list li a {
    color: #34495e;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.6;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.topic-list li:hover a {
    color: var(--primary-color);
    padding-left: 5px;
}

.topic-list li a:hover {
    text-decoration: underline;
}

/* Заглушка */
.empty, .no-data {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 20px;
}

/* ============================================ */
/* 📱 АДАПТИВНОСТЬ                            */
/* ============================================ */

/* Средние экраны */
@media (max-width: 1200px) {
    .topics-table {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Планшеты */
@media (max-width: 768px) {
    .topics-table {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .section-title {
        font-size: 26px;
    }

    .topic-header {
        font-size: 16px;
    }

    .popular-topics {
        padding: 40px 15px;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .topics-table {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 22px;
    }
}


/* *******Модуль новых толкований снов */
.new-articles {
    max-width: 400px;
    margin: 0;
    padding: 20px;
    background: #fff;
}

.new-articles h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-card {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
}

.article-card:first-child {
    padding-top: 0;
}

.article-card:hover .article-title a {
    color: #326891;
    transition: all 0.3s ease;
}

/* Верхняя часть: заголовок + фото в одну линию */
.article-header-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.article-title-wrapper {
    flex: 1;
}

.article-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 1.1rem;
}

.article-card img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Описание на всю ширину */
.article-description {
    font-size: 16px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 8px 0;
}

/* Время чтения */
.article-meta {
    font-size: 11px;
    color: #d0d2d7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.no-articles {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

@media (max-width: 480px) {
    .new-articles {
        max-width: 100%;
    }

    .article-card img {
        width: 60px;
        height: 60px;
    }

    .article-title {
        font-size: 14px;
    }

    .article-description {
        font-size: 13px;
    }
}
/* СТИЛИ ДЛЯ БЛОКА КАЛЬКУЛЯТОРА СНА */
.sleep-calculator-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;


}

.sleep-calc-visual {
    width: 90%;
 /*   height: 250px;  */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    padding-top: 10px;
}

.sleep-calc-visual img {
    width: 100%;
    /* height: 100%; */
    object-fit: cover;
    display: block;
}

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

.sleep-calc-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.sleep-calc-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Делаем кнопку калькулятора сна в стиле lunar-widget-link */
.sleep-calc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #7e57c2;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    width: auto; /* Отменяем width: 100% */
    box-shadow: none; /* Убираем тень градиента */
}

.sleep-calc-btn:hover {
    background: #5e35b1;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(126, 87, 194, 0.3);
}

.sleep-calc-btn::after {
    content: '→';
    font-size: 1em; /* Уменьшаем размер стрелки */
    transition: transform 0.3s ease;
}

.sleep-calc-btn:hover::after {
    transform: translateX(2px); /* Меньше сдвиг стрелки */
}

/* Центрируем кнопку */
.sleep-calculator-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center; /* Центрируем все элементы */
}

/* Отменяем правила для трёхколоночной секции */
.info-section-three-columns .sleep-calc-btn {
    margin: 0;
    width: auto;
}

.sleep-features {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 0;
}

.sleep-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sleep-feature-item::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sleep-calc-visual {
        height: 150px;
    }

    .sleep-calc-title {
        font-size: 1rem;
    }

    .sleep-calc-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .info-section-three-columns {
        grid-template-columns: 1fr;
    }

    .sleep-calc-visual {
        height: 180px;
    }
}

/* -------- CSS ТОЛЬКО ДЛЯ ЭТОГО БЛОКА 5   -----  */

.info-about-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Визуальный блок с иконками */
.info-about-visual {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.info-about-visual::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -20px;
    right: -20px;
}

/* Иконки */
.info-about-icons {
    display: flex;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.about-icon {
    font-size: 36px;
    animation: icon-float 3s ease-in-out infinite;
}

.about-icon:nth-child(2) {
    animation-delay: 0.3s;
}

.about-icon:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes icon-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Основной текст */
.info-about-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    text-align: left;
}

/* Список особенностей */
.info-about-features {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.about-feature:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.about-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.about-feature-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .info-about-visual {
        padding: 1.2rem;
        min-height: 80px;
    }

    .about-icon {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .info-about-text {
        font-size: 0.85rem;
    }

    .about-feature-text {
        font-size: 0.8rem;
    }
}

/* Виджет лунного календаря на главной */
.lunar-widget {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lunar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(126, 87, 194, 0.2);
}

.lunar-widget-header {
    padding: 0.2rem;
    background: rgba(126, 87, 194, 0.08);
    border-bottom: 1px solid rgba(126, 87, 194, 0.15);
}

.lunar-widget-header h3 {
    margin: 0 0 6px 0;
    color: #5e35b1;
    font-weight: 600;
    text-align: center;
}

.lunar-widget-subtitle {
    margin: 0;
    font-size: 0.9em;
    color: #7e57c2;
    opacity: 0.8;
}

.lunar-widget-content {
    padding: 24px;
}

.lunar-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.lunar-data-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(126, 87, 194, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(126, 87, 194, 0.2);
    transition: all 0.3s ease;
}

.lunar-data-item.featured {
    background: rgba(126, 87, 194, 0.15);
    border: 2px solid rgba(126, 87, 194, 0.3);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
}

.lunar-data-item:hover {
    background: rgba(126, 87, 194, 0.18);
    transform: translateY(-1px);
}

.lunar-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.lunar-data-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.lunar-label {
    font-size: 0.75em;
    color: #7e57c2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.lunar-value {
    font-size: 1.3em;
    color: #5e35b1;
    font-weight: 700;
}

.lunar-dreams-value.high {
    color: #2e7d32;
}

.lunar-dreams-value.medium {
    color: #f57c00;
}

.lunar-dreams-value.low {
    color: #c62828;
}

.lunar-text {
    color: #5e35b1;
    font-size: 0.92em;
    font-weight: 500;
}

.lunar-widget-footer {
    padding: 16px 24px 20px;
 /*   background: rgba(126, 87, 194, 0.05); */
    text-align: center;
/*  border-top: 1px solid rgba(126, 87, 194, 0.1);  */
}

.lunar-widget-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #7e57c2;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.lunar-widget-link:hover {
    background: #5e35b1;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(126, 87, 194, 0.3);
}

.lunar-widget-empty {
    padding: 30px;
    text-align: center;
    background: rgba(126, 87, 194, 0.05);
    color: #7e57c2;
}

.lunar-widget-empty p {
    margin: 0;
    font-size: 1em;
}

/* Адаптивность */
@media (max-width: 768px) {
    .lunar-data-grid {
        grid-template-columns: 1fr;
    }
    
    .lunar-widget-header {
        padding: 16px 20px 12px;
    }
    
    .lunar-widget-header h3 {
        font-size: 1.2em;
    }
    
    .lunar-widget-content {
        padding: 20px;
    }
    
    .lunar-data-item {
        padding: 10px 14px;
    }
    
    .lunar-data-item.featured {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .lunar-widget {
        border-radius: 12px;
    }
    
    .lunar-widget-header h3 {
        font-size: 1.1em;
    }
    
    .lunar-icon {
        font-size: 1.3em;
    }
    
    .lunar-value {
        font-size: 1.15em;
    }
}

.info-block-4 {
    display: flex;
}

.info-block-4 .lunar-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.info-block-4 .lunar-widget-header {
    flex-shrink: 0;
}

.info-block-4 .lunar-widget-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.info-block-4 .lunar-widget-footer {
    flex-shrink: 0;
}