/*
 Theme Name:   GeneratePress Child
 Template:     generatepress
 Version:      1.1.0
*/

:root {
    --primary: #1a4d42;
    --accent: #e67e22;
    --bg-light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.98);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
}

body { background-color: var(--bg-light); color: #334155; }

/* --- HERO BANNER --- */
.home-hero {
    position: relative;
    padding: clamp(80px, 10vh, 160px) 20px;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://cdn.hswstatic.com/gif/gettyimages-500942462-hero.jpg') no-repeat center center;
    background-size: cover;
    text-align: center;
    color: #fff;
    z-index: 1;
}
.home-hero h1 { color: #fff !important; font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 900; line-height: 1.1; margin-bottom: 20px; }

/* --- ADVICE BOXES (Вернул правильный вид) --- */
.home-advice-wrapper { display: block; width: 100%; clear: both; margin-bottom: 50px; }
.home-advice-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-top: -60px; 
    position: relative; 
    z-index: 10;
}
.advice-box { 
    background: #fff; padding: 35px; border-radius: 20px; box-shadow: var(--shadow); 
    display: flex; flex-direction: column; min-height: 280px; transition: 0.3s ease;
}
.advice-box:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.advice-icon { font-size: 36px; margin-bottom: 15px; }
.advice-text { flex-grow: 1; }
.advice-box h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 8px; font-weight: 800; }
.advice-link { color: var(--accent); font-weight: 700; text-decoration: none; margin-top: 10px; font-size: 0.9rem; }

/* --- ПРОФЕССИОНАЛЬНАЯ СЕТКА ПОСТОВ --- */
.section-title { font-size: 2.2rem; font-weight: 800; margin: 60px 0 30px; text-align: center; color: var(--primary); }

@media (min-width: 769px) {
    .blog .site-main, .archive .site-main {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
        align-items: stretch !important;
    }
}

.inside-article {
    background: #fff !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    transition: 0.3s ease !important;
    border: none !important;
}

/* Контроль картинки (Занимает 16:9 всегда) */
.post-image {
    margin: 0 !important;
    background: #e5eaf0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}
.post-image img { height: 100% !important; width: 100% !important; object-fit: cover !important; display: block !important; }

/* Заглушка, если картинки нет */
.post-image:not(:has(img))::after {
    content: "📸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 32px; opacity: 0.2;
}

/* Контент карточки с фиксированными высотами для выравнивания */
.entry-header { padding: 25px 20px 0 !important; }
.entry-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem) !important;
    line-height: 1.3 !important; 
    margin-bottom: 15px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.9em; 
}
.entry-meta { font-size: 0.75rem !important; opacity: 0.5; margin-bottom: 12px !important; }

.entry-summary { 
    padding: 0 20px 25px !important; flex-grow: 1 !important; 
    display: flex; flex-direction: column;
}
.entry-summary p { 
    font-size: 0.9rem; line-height: 1.5; color: #64748b; margin-bottom: 20px;
    min-height: 4.5em; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Кнопка всегда прижата к низу */
.read-more {
    margin-top: auto !important;
    background: var(--primary) !important; color: #fff !important;
    padding: 10px 22px !important; border-radius: 8px !important;
    font-weight: 700 !important; font-size: 0.85rem !important; display: inline-block !important;
}

/* --- СТИЛИЗАЦИЯ ЗАГОЛОВКА ВНУТРИ СТАТЬИ (SINGLE POST) --- */

/* Контейнер заголовка */
.single .entry-header {
    margin-bottom: 40px;
   /* max-width: 900px; */
}

/* Сам H1 заголовок */
.single .entry-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem) !important; 
    font-weight: 900 !important;
    line-height: 1.1 !important;
    color: var(--primary) !important;
    letter-spacing: -0.03em !important; 
    margin-bottom: 20px !important;
}

/* Мета-данные под заголовком (Дата, Автор) */
.single .entry-meta {
    font-size: 1rem !important;
    color: #64748b !important;
    display: flex;
    gap: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Оформление подзаголовков H2 и H3 внутри текста для ритма */
.single .entry-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 50px;
    margin-bottom: 25px;
    line-height: 1.2;
}

.single .entry-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 40px;
    color: #334155;
}

/* Увеличиваем шрифт основного текста статьи для читаемости */
.single .entry-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 1.6em;
}

/* --- MAGAZINE FOOTER STYLES --- */

.magazine-footer {
    background: #111827; /* Очень темный синий/черный */
    color: #e5e7eb;
    padding: 80px 0 0;
    margin-top: 80px;
    font-size: 0.95rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* Делаем логотип белым, если он темный */
}

.footer-col p {
    line-height: 1.7;
    color: #9ca3af;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Соцсети */
.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-socials a {
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 800;
    font-size: 0.8rem;
}

.footer-socials a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* Нижняя полоса */
.footer-bottom {
    background: #0b0f1a;
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal-links a {
    color: #6b7280;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.85rem;
}

.footer-legal-links a:hover {
    color: #fff;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-socials {
        justify-content: center;
    }
    .footer-bottom-flex {
        flex-direction: column;
        gap: 15px;
    }
    .footer-legal-links a {
        margin: 0 10px;
    }
}

/* --- СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ ШИРОКОЙ ПЛАШКИ --- */

@media (min-width: 1024px) {
    .advice-box-wide {
        grid-column: 1 / -1; /* Растягиваем на всю ширину сетки (все 3 колонки) */
        flex-direction: row !important; /* Выстраиваем контент в линию */
        align-items: center !important;
        gap: 40px;
        min-height: auto !important;
        padding: 40px 50px !important;
        background: linear-gradient(90deg, #ffffff 0%, #f0fdf4 100%) !important; /* Легкий градиент для выделения */
        border: 1px solid #bbf7d0 !important;
    }

    .advice-box-wide .advice-icon {
        margin-bottom: 0 !important;
        font-size: 50px;
    }

    .advice-box-wide .advice-text h3 {
        font-size: 1.6rem !important;
    }

    .advice-box-wide .advice-link {
        margin-top: 0 !important;
        white-space: nowrap; /* Чтобы кнопка не переносилась */
        background: var(--primary);
        color: #fff !important;
        padding: 12px 25px;
        border-radius: 12px;
    }
}

/* Мобильный вид (до 1023px) */
@media (max-width: 1023px) {
    .advice-box-wide {
        order: 4; /* Убеждаемся, что она идет последней */
    }
}

/* Стиль для кнопки-партнера */
.partner-btn {
    transition: transform 0.3s ease;
}
.partner-btn:hover {
    transform: scale(1.05);
}

