/*
Theme Name: YouBeauty
Theme URI: https://youbeauty.ru
Author: YouBeauty Team
Description: Тема для женского портала YouBeauty.Ru
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: youbeauty
*/

/* === Цвета Kohana-сайта === */
:root {
    --yb-red: #59062D;
    --yb-red-light: #72123B;
    --yb-purple: #7B2856;
    --yb-blue: #000A49;
    --yb-cyan: #54c0d9;
    --yb-footer: #fceda8;
    --yb-text: #333;
    --yb-text-muted: #595959;
}

/* === Сброс и базовые стили === */
body, html {
    min-height: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    min-width: 320px;
    margin: 0;
    padding: 0;
}

ul, ol { padding: 0; margin: 0; }
.clear { clear: both; }

/* === Фон как на Kohana === */
#html-bg {
    background: url('../images/bg-top.jpg') no-repeat center top;
    width: 100%;
}

#body-bg {
    background: url('../images/bg-bottom.jpg') no-repeat -130px bottom;
    width: 100%;
}

/* === Карточки статей на главной === */
.front-news-card {
    display: block;
    text-decoration: none;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    height: 100%;
}

.front-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    text-decoration: none;
    color: #333;
}

.front-news-img {
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    height: 140px;
}

.front-news-title {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.front-news-card:hover .front-news-title {
    color: var(--yb-red);
}

@media (max-width: 576px) {
    .front-news-img {
        height: 120px;
    }
    .front-news-title {
        font-size: 12px;
    }
}

/* === Табы-навигация на главной === */
.front-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
    background: #f8f9fa;
    border: none;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.25s;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.front-tab:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(89,6,45,0.18);
    text-decoration: none;
}

.front-tab-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 14px;
    border-radius: 20px;
    transition: transform 0.25s;
}

.front-tab:hover .front-tab-icon {
    transform: scale(1.08);
}

.front-tab-icon.articles { background: linear-gradient(135deg, #e8f0fe, #d2e3fc); }
.front-tab-icon.recipes { background: linear-gradient(135deg, #fce8e6, #f8d7da); }
.front-tab-icon.horoscopes { background: linear-gradient(135deg, #e8f5e9, #d5f5e3); }
.front-tab-icon.sonnik { background: linear-gradient(135deg, #f3e5f5, #e8daef); }

.front-tab-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #222;
}

.front-tab:hover .front-tab-title {
    color: var(--yb-red);
}

.front-tab-count {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

@media (max-width: 576px) {
    .front-tab {
        padding: 20px 10px;
    }
    .front-tab-icon {
        width: 70px;
        height: 70px;
        font-size: 36px;
    }
    .front-tab-title {
        font-size: 13px;
    }
    .front-tab-count {
        font-size: 11px;
    }
}

/* === Табы категорий рецептов === */
.recipe-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-cat-tab {
    display: inline-block;
    padding: 8px 20px;
    background: #e9ecef;
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.recipe-cat-tab:hover {
    background: #dee2e6;
    text-decoration: none;
    color: var(--yb-red);
}

.recipe-cat-tab.active {
    background: var(--yb-red);
    color: #fff;
}

/* === Карточки рецептов === */
.front-recipe-card {
    display: block;
    text-decoration: none;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #dceef8;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    height: 100%;
}

.front-recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    text-decoration: none;
    color: #333;
}

.front-recipe-img {
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    height: 130px;
}

.front-recipe-title {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
}

.front-recipe-card:hover .front-recipe-title {
    color: var(--yb-red);
}

@media (max-width: 576px) {
    .front-recipe-img {
        height: 110px;
    }
    .front-recipe-title {
        font-size: 12px;
    }
}

/* === Шапка === */
#header {
    padding: 30px 5px 0 5px;
}

#header img.logo {
    max-width: 100%;
    height: auto;
}

/* === Поиск в шапке === */
#header-search {
    position: relative;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--yb-red);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

.search-toggle:hover {
    color: var(--yb-red-light);
}

.search-expand {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    display: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    white-space: nowrap;
}

#header-search.active .search-expand {
    display: flex;
}

.search-expand input[type="search"] {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    width: 200px;
    outline: none;
}

.search-expand input[type="search"]:focus {
    border-color: var(--yb-red);
}

.search-expand button {
    background: var(--yb-red);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 4px;
    cursor: pointer;
    font-size: 14px;
}

.search-expand button:hover {
    background: var(--yb-red-light);
}

/* === Навигация Kohana — в шапке справа от логотипа === */
#mainmenu {
    min-height: auto;
}

/* Бургер-кнопка — только на мобилке */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
}

.icon-bar {
    display: block;
    width: 22px;
    height: 3px;
    background: #7B2856;
    margin: 4px 0;
    border-radius: 2px;
}

@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }

    #mainNav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #dceef8;
        z-index: 200;
        padding: 70px 20px 20px;
        overflow-y: auto;
    }

    #mainNav.show {
        display: block;
    }

    .menu-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 50%;
        font-size: 20px;
        line-height: 34px;
        text-align: center;
        cursor: pointer;
        color: #333;
        z-index: 210;
    }

    .menu-close:hover {
        background: var(--yb-red);
        color: #fff;
        border-color: var(--yb-red);
    }

    #mainmenu {
        position: relative;
    }

    #mainmenu ul {
        flex-direction: column;
    }

    #mainmenu li {
        display: block;
    }

    #mainmenu li a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        font-size: 16px;
        font-weight: 600;
        color: #333;
    }

    #mainmenu li a:hover {
        color: var(--yb-red);
    }
}

#mainmenu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

#mainmenu li {
    display: inline-block;
    margin: 0;
}

#mainmenu li a {
    display: block;
    color: var(--yb-blue);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    padding: 8px 11px;
    text-decoration: none;
    line-height: 20px;
}

#mainmenu li a:hover {
    background: none;
    text-decoration: underline;
    color: var(--yb-red);
}

/* === Кнопки Kohana === */
.btn-f {
    padding: 4px 16px;
    color: #fff !important;
    background: #630e37 url('../images/btn-bg.png') repeat-x 0 top;
    outline: none;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-f:hover {
    background: #6d0a32 url('../images/btn-bg-active.png') repeat-x 0 top;
    color: #fff !important;
}

/* === Ссылки === */
a { color: var(--yb-red); }
a:hover { color: var(--yb-red-light); }

/* === Контентная область === */
#wrap {
    max-width: 990px;
    margin: 0 auto;
    padding: 0 15px;
}

#page {
    padding: 15px;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 1px 5px rgba(56, 56, 56, 0.3);
    margin-bottom: 20px;
    min-height: 900px;
}

/* === Заголовки секций Kohana === */
.block .head {
    border-bottom: 1px dotted var(--yb-cyan);
    padding-bottom: 25px;
    font-family: Arial Narrow, sans-serif;
    font-style: italic;
    font-size: 20px;
    margin: 0;
    font-weight: normal;
    height: 20px;
    overflow: hidden;
    line-height: 22px;
}

h1 {
    font-size: 18px;
    margin: 0;
    line-height: 30px;
    padding-top: 5px;
}

h2 {
    font-size: 16px;
    margin: 0;
    line-height: 30px;
}

/* === Статьи Kohana === */
.newsimg {
    float: left;
    margin: 5px 15px 15px 0;
}

.articles td {
    vertical-align: top;
    padding: 10px 0;
    border-bottom: 1px solid #d8e1e5;
}

.articles .last td {
    border: none;
}

.articles a {
    color: var(--yb-red);
}

.articles .all {
    text-align: right;
}

.articles img {
    border: 2px solid #d1d1d1;
    border-radius: 3px;
}

/* === Гороскопы === */
.zodiac-card {
    transition: background-color 0.2s;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
}

.zodiac-card:hover {
    background-color: #e3f2fd !important;
}

.zodiac-icon {
    line-height: 1;
}

/* === Рецепты Kohana === */
.list-new-recipe {
    padding: 0;
    margin: 20px 0 0 0;
    list-style: none;
    text-align: center;
}

.list-new-recipe li {
    display: inline-block;
}

.new-recipe {
    margin: 10px 10px 0 0;
}

.new-recipe img {
    border: 2px solid #d1d1d1;
    border-radius: 3px;
    border-bottom: none;
}

.new-recipe .t {
    background: #b5daf3 url('../images/z.png') repeat-x 0 bottom;
    padding: 6px 6px 12px 6px;
    width: 164px;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-recipe .t a {
    color: #000;
}

/* === Карточки сервисов === */
.service-card {
    display: block;
    text-decoration: none;
    color: #333;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    height: 100%;
    text-align: center;
    padding: 20px 10px;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 10px;
    border-radius: 16px;
}

.service-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.service-card:hover .service-title {
    color: var(--yb-red);
}

/* === Рецепты (детали) === */
.recipe-ingredients .table td {
    border-top: none;
    padding: 0.3rem 0.5rem;
}

.recipe-steps .step {
    border-left: 3px solid var(--yb-cyan);
    padding-left: 15px;
    margin-bottom: 15px;
}

/* === Футер Kohana === */
#footer-kohana {
    background: var(--yb-footer) url('../images/bg-footer.jpg') repeat-x 0 top;
    padding: 15px 20px;
    clear: both;
}

#footer-kohana .footer-copyright {
    font-size: 12px;
}

#footer-kohana .footer-menu {
    margin-left: 0;
    padding: 0;
    list-style: none;
}

#footer-kohana .footer-menu li {
    display: inline;
    list-style: none;
    margin-right: 10px;
}

#footer-kohana .footer-menu li a {
    font-size: 12px;
    color: #000;
    text-decoration: underline;
}

/* === Виджеты Kohana === */
.widget-title {
    font-size: 20px;
    font-family: Arial Narrow, sans-serif;
    font-style: italic;
    font-weight: normal;
    border-bottom: 1px dotted var(--yb-cyan);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--yb-text);
}

/* === Sidebar Kohana === */
.random-news .item {
    margin-bottom: 12px;
    padding: 3px 3px 7px 3px;
    background: url('../images/z.png') repeat-x scroll 0 bottom #B5DAF3;
}

.random-news .item img {
    margin-right: 5px;
}

.random-news .item a {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #000;
}

/* === Меню пользователя Kohana === */
#userlogin {
    float: right;
}

#userlogin .enter span {
    background: url('../images/bg-enter.png') no-repeat;
    display: block;
    width: 71px;
    color: var(--yb-red);
    text-align: center;
    padding: 4px 0 5px 0;
    float: left;
    text-decoration: none;
    font-size: 12px;
}

#userlogin .enter span:hover {
    box-shadow: inset 0 10px 10px rgba(0, 0, 0, 0.075);
    color: #992415;
}

#userlogin .reg span {
    background: url('../images/bg-reg.png') no-repeat;
    display: block;
    width: 167px;
    color: #fff;
    text-align: center;
    padding: 4px 0 5px 0;
    margin-left: 5px;
    float: left;
    text-decoration: none;
    font-size: 12px;
}

#userlogin .reg span:hover {
    box-shadow: inset 0 10px 10px rgba(0, 0, 0, 0.075);
    color: #E3F1FC;
}

#userlogin .enter, #userlogin .reg {
    text-decoration: none;
}

/* === Поиск Kohana === */
#search {
    padding: 40px 0 0 0;
}

#search input[type="text"] {
    width: 184px;
    padding: 1px 2px;
    font-size: 12px;
    margin: 0;
    border-left: none;
}

#search .input-group-addon {
    background: #fff;
    padding: 5px 9px 3px 9px;
}

#search .input-group .form-control {
    border-left: none;
    background-color: #fff;
    height: 28px;
    padding-left: 5px;
    box-shadow: none;
}

/* === Пагинация === */
.pagination {
    text-align: center;
}

/* === Комментарии === */
.comment-list .comment {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.comment-list .children {
    margin-left: 2rem;
    border-left: 2px solid #eee;
    padding-left: 1rem;
}

/* === Главная новость === */
.mainnews-inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mainnews-img {
    flex: 0 0 180px;
}

.mainnews-img img {
    border: 2px solid #d1d1d1;
    border-radius: 3px;
    width: 100%;
    height: auto;
}

.mainnews-text .t {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 8px;
}

.mainnews-text .t a {
    color: #59062D;
    text-decoration: none;
}

.mainnews-text .t a:hover {
    text-decoration: underline;
}

.mainnews-text .desc {
    color: #595959;
    font-size: 13px;
    line-height: 1.5;
}

/* === Адаптивность Kohana === */
@media (max-width: 768px) {
    .zodiac-icon {
        font-size: 1.5rem !important;
    }
    .comment-list .children {
        margin-left: 1rem;
    }
    .mainnews-inner {
        flex-direction: column;
    }
    .mainnews-img {
        flex: none;
        width: 100%;
    }
    .mainnews-img img {
        height: auto;
    }
    /* Скрытие аннотаций (описаний) на главной в мобилке */
    .mainnews-text .desc,
    .article-desc {
        display: none;
    }
    /* Таблица новостей на мобилке — в столбик */
    .articles td.i {
        width: 100% !important;
        padding-bottom: 5px;
    }
    .articles td.i img {
        width: 100%;
        height: auto;
    }
    .articles td {
        display: block;
        width: 100% !important;
    }
}

/* === Стиль заголовков статей как на Kohana === */
.section-title {
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-style: italic;
    font-weight: normal;
    font-size: 20px;
    border-bottom: 1px dotted #54c0d9;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #333;
    line-height: 22px;
    overflow: hidden;
}

/* Заголовки статей в блоке "Новости" */
.block .head {
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-style: italic;
    font-weight: normal;
    font-size: 20px;
    border-bottom: 1px dotted #54c0d9;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #333;
    line-height: 22px;
    overflow: hidden;
}

/* Ссылки статей Kohana-стиль */
.articles a,
.article-content a {
    color: #59062D;
    text-decoration: none;
}

.articles a:hover,
.article-content a:hover {
    color: #72123B;
    text-decoration: underline;
}

/* === Гороскопы === */
.horoscope-text {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

/* Полоса дат Kohana-стиль */
.horoscope-date {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #d8e1e5;
}

.horoscope-date li {
    display: inline-block;
}

.horoscope-date li a {
    display: block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    color: #59062D;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

.horoscope-date li a:hover {
    text-decoration: underline;
}

.horoscope-date li a.active {
    border-bottom: 2px solid #59062D;
    color: #59062D;
}

/* Сетка знаков Kohana-стиль */
.list-zodiacs {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.list-zodiacs li {
    display: inline-block;
    width: 25%;
    text-align: center;
}

.list-zodiacs li a {
    display: block;
    padding: 10px 5px;
    text-decoration: none;
    color: #59062D;
    font-weight: bold;
    font-size: 13px;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.list-zodiacs li a:hover {
    background: #f0f4f7;
    border-color: #d8e1e5;
}

.list-zodiacs li a.active {
    background: #59062D;
    color: #fff;
}

.list-zodiacs .zodiac-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
    line-height: 1;
}

/* Мобилка: знаки по 3 в ряд */
@media (max-width: 576px) {
    .list-zodiacs li {
        width: 33.33%;
    }
    .list-zodiacs li a {
        font-size: 11px;
        padding: 8px 2px;
    }
    .horoscope-date li a {
        padding: 4px 6px;
        font-size: 11px;
    }
}

.zodiac-card {
    transition: all 0.2s;
    cursor: pointer;
}

.zodiac-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.zodiac-icon {
    line-height: 1;
    font-size: 28px;
}

/* === Сонник === */
.block h1.head {
    border-bottom: none;
    padding-bottom: 0;
    height: auto;
    overflow: visible;
}

.sonnik-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.sonnik-letter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
    padding: 6px 8px;
    text-decoration: none;
    color: #59062D;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #d8e1e5;
    border-radius: 4px;
    transition: all 0.15s;
}

.sonnik-letter:hover {
    background: #59062D;
    color: #fff;
    border-color: #59062D;
    text-decoration: none;
}

.sonnik-letter.active {
    background: #59062D;
    color: #fff;
    border-color: #59062D;
}

.sonnik-letter.disabled {
    color: #ccc;
    border-color: #eee;
    cursor: default;
    pointer-events: none;
}

.sonnik-count {
    font-size: 9px;
    color: #999;
    font-weight: normal;
}

.sonnik-letter:hover .sonnik-count,
.sonnik-letter.active .sonnik-count {
    color: rgba(255,255,255,0.7);
}

.sonnik-item h4 a {
    color: #59062D;
    text-decoration: none;
}

.sonnik-item h4 a:hover {
    text-decoration: underline;
}

.sonnik-text {
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

.sonnik-related {
    display: block;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #59062D;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    transition: background 0.15s;
}

.sonnik-related:hover {
    background: #59062D;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 576px) {
    .sonnik-letter {
        min-width: 30px;
        padding: 4px 6px;
        font-size: 12px;
    }
}
