/*
Theme Name: Landing Script Theme
Theme URI: https://example.com
Author: You
Author URI: https://example.com
Description: Тема для лендинга скрипта с поддержкой страниц
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: landing-theme
*/

/* === ГЛОБАЛЬНЫЕ СТИЛИ (для всех страниц) === */
:root {
    --primary-color: #2563eb;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --max-width: 1100px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Контейнер для центрирования контента */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.3s;
}
a:hover {
    opacity: 0.8;
}

/* Меню */
.main-navigation {
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 0;
}
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}
.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
}

/* Контент обычных страниц */
.page-content {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* === СТИЛИ ЛЕНДИНГА (специфичные) === */
.lp-section {
    padding: 60px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.lp-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    text-align: center;
    padding: 80px 20px;
}
.lp-hero h1 { font-size: 2.5rem; margin-bottom: 20px; color: var(--text-dark); }
.lp-hero .subtext { font-size: 1.2rem; max-width: 700px; margin: 0 auto 40px; color: var(--text-light); }

.lp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.lp-contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-light);
    padding: 40px;
    border-radius: 20px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    text-align: center;
    cursor: pointer;
    border: none;
    color: white;
    box-sizing: border-box; /* Важно: учитывает padding в ширине */
}

.btn-primary { 
    background-color: var(--primary-color); 
}
.btn-primary:hover { 
    background-color: #1d4ed8; 
    color: white; 
}

.btn-messenger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%; /* Растягиваем на всю ширину контейнера */
    max-width: 300px; /* Ограничиваем на десктопе */
    color: white;
}

.btn-tg { background-color: #0088cc; }
.btn-wa { background-color: #25D366; }

/* Адаптив для кнопок на мобильных */
@media (max-width: 768px) {
    .btn-messenger {
        max-width: 100%; /* На мобильном убираем ограничение в 300px */
        width: 100%;
    }
    
    .btn {
        padding: 12px 20px; /* Чуть меньше отступы на мобильных */
    }
}

/* Адаптив */
@media (max-width: 768px) {
    .lp-contact-wrapper { grid-template-columns: 1fr; }
    .lp-hero h1 { font-size: 2rem; }
    .main-navigation ul { justify-content: center; }
}

/* Стили для форм CF7 */
.wpcf7-form-control-wrap { display: block; margin-bottom: 15px; }
.wpcf7-text, .wpcf7-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}
.wpcf7-submit {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}
.wpcf7-submit:hover {
    opacity: 0.9;
}

details summary {
    list-style: none;
}
details summary::-webkit-details-marker {
    display: none;
}
details summary::after {
    content: '+';
    float: right;
    font-weight: bold;
}
details[open] summary::after {
    content: '-';
}

/* === БЛОК КОММЕНТАРИЕВ === */

/* Контейнер комментариев */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-title::before {
    content: "💬";
    font-size: 1.2rem;
}

/* Список комментариев */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.comment-item {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Вложенные комментарии (ответы) */
.children {
    list-style: none;
    padding-left: 50px;
    margin-top: 20px;
    border-left: 3px solid var(--primary-color);
    margin-left: 20px;
}

/* Шапка комментария */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author-info {
    flex: 1;
    min-width: 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    font-size: 1rem;
}

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

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

.comment-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Кнопка ответа */
.comment-reply-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.comment-reply-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    opacity: 1;
}

/* Текст комментария */
.comment-content {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
    margin: 15px 0 0 0;
}

.comment-content p {
    margin: 0 0 10px 0;
}

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

.comment-content a {
    color: var(--primary-color);
    word-break: break-word;
}

/* Статус комментария (на модерации) */
.comment-awaiting-moderation {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 6px;
    display: inline-block;
}

/* === ФОРМА КОММЕНТАРИЕВ === */

.comment-respond {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
}

.comment-reply-title {
    font-size: 1.3rem;
    margin: 0 0 20px 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-reply-title::before {
    content: "✍️";
}

.comment-reply-title small {
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 10px;
}

.comment-reply-title small a {
    color: var(--primary-color);
}

.comment-reply-title small a:hover {
    opacity: 1;
    text-decoration: underline;
}

.comment-form {
    display: grid;
    gap: 15px;
}

/* Поля формы */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: grid;
    gap: 8px;
}

.comment-form label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.comment-form label .required {
    color: #ef4444;
    margin-left: 2px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: var(--white);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Сетка полей: имя + email в одну строку */
@media (min-width: 768px) {
    .comment-form-author,
    .comment-form-email {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* Кнопка отправки комментария */
.comment-form .form-submit {
    margin: 10px 0 0 0;
}

.comment-form .submit {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comment-form .submit:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

.comment-form .submit:active {
    transform: translateY(0);
}

/* Сообщение после отправки */
.comment-awaiting-moderation,
.comment-respond .logged-in-as {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.comment-respond .logged-in-as a {
    color: var(--primary-color);
}

/* Пустой список комментариев */
.no-comments {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-style: italic;
    background: var(--bg-light);
    border-radius: 12px;
}

/* Адаптив для комментариев */
@media (max-width: 768px) {
    .comment-item {
        padding: 15px;
    }
    
    .comment-meta {
        gap: 12px;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .children {
        padding-left: 30px;
        margin-left: 15px;
        border-left-width: 2px;
    }
    
    .comment-respond {
        padding: 20px;
    }
    
    .comment-form-author,
    .comment-form-email {
        grid-template-columns: 1fr;
    }
    
    .comment-form .submit {
        width: 100%;
        justify-content: center;
    }
}

/* Тёмная тема (опционально, если добавите переключатель) */
@media (prefers-color-scheme: dark) {
    .comment-item,
    .comment-respond {
        background: #1f2937;
        border-color: #374151;
    }
    
    .comment-form input,
    .comment-form textarea {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .comment-form input::placeholder,
    .comment-form textarea::placeholder {
        color: #9ca3af;
    }
}