/*
Theme Name: Моя Современная Тема
Theme URI: https://example.com/my-modern-theme/
Author: Ваше Имя
Author URI: https://example.com/
Description: Финальная версия темы с подложкой в стиле Telegram.
Version: 5.0 (Final)
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, custom-logo, responsive-layout, modern, minimalist
Text Domain: my-modern-theme
*/

/* ==========================================================================
   1. ПЕРЕМЕННЫЕ И БАЗОВЫЕ СТИЛИ
   ========================================================================== */
:root {
    --content-bg: #ffffff;
    --text-color: #212529;
    --text-color-light: #555;
    /* Добавлен для второстепенного текста */
    --border-color: #e9ecef;
    --header-height: 70px;

    /* ОСНОВНЫЕ ЦВЕТА ДИЗАЙНА */
    --primary-color: #0088cc;
    --gradient-start: #fbfbfb;
    --gradient-end: #e2eefe;
}

html {
    font-size: 100%;
    /* База для REM, 1rem = 16px */
}

body {
    /* Единое объявление шрифта. Убраны все !important. */
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.0625rem;
    /* 17px */
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-color-light);
    margin: 0;
    padding-top: var(--header-height);
    min-height: 100vh;
    background-color: var(--gradient-end);
    /* Резервный цвет */

    /* 
     * МНОГОСЛОЙНАЯ ПОДЛОЖКА
     * Слой 1: Паттерн с самолетиками.
     * Слой 2: Ваш градиент.
    */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z' fill='%230088cc' fill-opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(to top right, var(--gradient-start), var(--gradient-end));

    background-repeat: repeat, no-repeat;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0077b3;
    text-decoration: none;
}

/* ==========================================================================
   2. СТРУКТУРА И МАКЕТ
   ========================================================================== */
.container {
    max-width: 960px;
    margin: 30px auto;
    padding: 20px 40px;
    background-color: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.site-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.site-title a {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--primary-color);
}

.site-footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9em;
}

/* ==========================================================================
   3. НАВИГАЦИЯ
   ========================================================================== */
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.main-navigation li {
    margin: 0 15px;
}

.main-navigation a {
    display: block;
    color: var(--text-color);
    font-weight: 500;
}

.main-navigation li {
    position: relative;
}

.main-navigation .sub-menu {
    visibility: hidden;
    opacity: 0;
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
    background-color: var(--content-bg);
    min-width: 200px;
    padding: 10px 0;
    margin-top: 5px;
    list-style: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

.main-navigation li:hover>.sub-menu {
    visibility: visible;
    opacity: 1;
}

.main-navigation .sub-menu li {
    margin: 0;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    color: var(--text-color);
    transition: background-color 0.2s, color 0.2s;
}

.main-navigation .sub-menu a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.main-navigation .menu-item-has-children>a {
    position: relative;
    padding-right: 15px;
}

.main-navigation .menu-item-has-children>a::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6em;
    color: #999;
    transition: transform 0.2s;
}

.main-navigation li:hover>a::after {
    transform: translateY(-50%) rotate(180deg);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
}

.menu-toggle .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 1px;
}

.menu-toggle .icon-bar+.icon-bar {
    margin-top: 4px;
}

/* ==========================================================================
   4. КОНТЕНТНЫЕ БЛОКИ
   ========================================================================== */
main article {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2em;
    margin-bottom: 2em;
}

main article:last-child {
    border-bottom: none;
}

.entry-title {
    margin-bottom: 0.5em;
    font-size: 1.75rem;
}

.entry-title a {
    color: var(--text-color);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-content p {
    margin: 0 0 1em;
}

/* --- Hero-блок --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section {
    padding: 100px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    background: linear-gradient(45deg, var(--primary-color), #333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.2s;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.4s;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-button {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-button.primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
}

.hero-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    color: #fff;
}

.hero-button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-button.secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* --- FAQ-блок --- */
.faq-section {
    padding-top: 60px;
    margin-top: 40px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--text-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    position: relative;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 15px;
    color: #555;
    line-height: 1.7;
}

.faq-item.active .faq-question {
    color: var(--primary-color);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 15px 20px;
}

/* ==========================================================================
   5. АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        font-size: 1rem;
    }

    .site-header {
        height: 60px;
    }

    .container {
        margin: 15px;
        padding: 15px 20px;
        width: auto;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
    }

    .main-navigation.toggled {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--content-bg);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-navigation.toggled ul {
        flex-direction: column;
    }

    .main-navigation.toggled li {
        margin: 0;
    }

    .main-navigation.toggled a {
        padding: 15px 20px;
        border-bottom: 1px solid #f1f1f1;
    }

    .main-navigation.toggled .sub-menu {
        display: block;
        position: static;
        visibility: visible;
        opacity: 1;
        border: none;
        box-shadow: none;
        background-color: transparent;
        padding-left: 20px;
        margin-top: 0;
    }

    .main-navigation.toggled .sub-menu a {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .main-navigation.toggled .menu-item-has-children>a::after {
        display: none;
    }

    /* Адаптивность для Hero */
    .hero-section {
        padding: 80px 20px;
        min-height: 50vh;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-actions {
        gap: 0.8rem;
    }

    .hero-button {
        padding: 12px 28px;
    }
}

.landing-main .container {
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

/* Общие стили для всех секций лендинга */
.features-section,
.cta-section {
    padding: 80px 20px;
}

/* --- Секция "Продукты/Возможности" --- */
.features-section {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    /* Большой отступ между блоками продуктов */
}

.feature-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Сетка: 1 часть для иконки, 2 для текста */
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* Разворачиваем второй блок: текст слева, картинка справа */
.feature-item--reverse {
    grid-template-columns: 2fr 1fr;
}

.feature-item--reverse .feature-image {
    grid-column: 2;
    grid-row: 1;
}

.feature-item--reverse .feature-content {
    grid-column: 1;
    grid-row: 1;
}

.feature-image {
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.feature-image svg {
    color: var(--primary-color);
}

.feature-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-button {
    font-weight: 600;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s;
}

.feature-button:hover {
    padding-left: 5px;
}

/* --- Секция "Финальный призыв к действию" (CTA) - ОБНОВЛЕННАЯ ВЕРСИЯ --- */
.cta-section {
    margin-top: 60px;
    margin-bottom: 20px;
    padding: 20px;
    text-align: center;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z' fill='%230088cc' fill-opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(to top right, var(--gradient-start), var(--gradient-end));
    background-repeat: repeat, no-repeat;
    background-attachment: fixed;
    border-radius: 8px;
}

/* Новый контейнер для контента внутри CTA */
.cta-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.cta-title {
    margin-top: 0px;
    font-size: 2.5rem;
    /* Немного увеличим для акцента */
    margin-bottom: 1rem;

    /* Копируем стиль градиентного текста с .hero-title */
    background: linear-gradient(45deg, var(--primary-color), #333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.cta-section p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-color-light);
    /* Используем более мягкий цвет */
}

/* --- Адаптивность для новых блоков --- */
@media (max-width: 768px) {
    .features-section {
        gap: 4rem;
    }

    .feature-item,
    .feature-item--reverse {
        grid-template-columns: 1fr;
        /* На мобильных все в один столбец */
        gap: 2rem;
        text-align: center;
    }

    .feature-item--reverse .feature-image,
    .feature-item--reverse .feature-content {
        grid-column: 1;
    }

    .feature-image {
        height: 200px;
    }

    .feature-button:hover {
        padding-left: 0;
    }
}

.hero-title .typed-cursor {
    font-weight: 800;
    color: var(--primary-color);
    /* Делаем его цвета акцента */
    opacity: 1;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.wp-block-image {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z' fill='%230088cc' fill-opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(to top right, var(--gradient-start), var(--gradient-end));
    background-repeat: repeat, no-repeat;
    background-attachment: fixed;
    border-radius: 8px;
    padding: 30px 1px 1px 1px;
    max-width: 60%;
    text-align: center;
    margin: 20px auto;
}