@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #F4F9F5; /* Очень светлый мятно-серый фон для эффекта приложения */
    --bg-card: #FFFFFF;
    --bg-header: #10B981; /* Сочный изумрудно-зеленый для шапки (как в аппках) */
    --accent: #10B981; 
    --accent-hover: #059669;
    --text-main: #064E3B; /* Темно-зеленый (почти черный) для заголовков */
    --text-gray: #4B5563;
    --border-color: #E2E8F0;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 2px 8px rgba(16, 185, 129, 0.05); /* Легкая зеленоватая тень */
    --shadow-md: 0 8px 24px rgba(16, 185, 129, 0.1);
    --shadow-hover: 0 16px 32px rgba(16, 185, 129, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { 
    font-family: var(--font-main); 
    background-color: var(--bg-main); 
    color: var(--text-gray); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
a:hover { opacity: 0.8; }
h1, h2, h3, h4 { color: var(--text-main); font-weight: 700; letter-spacing: -0.02em; }

/* Уменьшены отступы по краям для мобильных экранов */
.container { max-width: 1400px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* --- HEADER --- */
/* Шапка в стиле мобильного приложения: цветная, с белым текстом */
.site-header { background: var(--bg-header); border-bottom: none; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100;}
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px; max-width: 1400px; margin: 0 auto; }
.header-left { display: flex; align-items: center; gap: 10px; color: #FFFFFF; font-weight: 600; cursor: pointer; }
.header-left svg { width: 26px; height: 26px; fill: currentColor; }
.logo { font-size: 1.5rem; font-weight: 800; color: #FFFFFF; letter-spacing: -0.5px; }
.header-right { display: flex; align-items: center; gap: 10px; color: #FFFFFF; font-weight: 600; }
.header-right svg { width: 22px; height: 22px; fill: currentColor; }

.header-nav { background: var(--accent-hover); border-top: none; }
.nav-links { display: flex; justify-content: flex-start; gap: 20px; padding: 12px 15px; max-width: 1400px; margin: 0 auto; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;}
.nav-links::-webkit-scrollbar { display: none; } /* Скрываем скроллбар для мобильного свайпа */
.nav-links a { color: rgba(255, 255, 255, 0.9); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: #FFFFFF; }

/* --- TAG CLOUD --- */
.tag-cloud-wrapper { margin: 25px auto 15px; max-width: 1400px; padding: 0; }
.tag-cloud-title { color: var(--text-main); margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; padding: 0 15px;}
.tag-cloud-title::before { content: ''; display: inline-block; width: 4px; height: 18px; background: var(--accent); border-radius: 4px; }
/* Горизонтальный свайп для тегов (native app feel) */
.tag-cloud { display: flex; flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding: 5px 15px 15px 15px; scrollbar-width: none; -webkit-overflow-scrolling: touch;}
.tag-cloud::-webkit-scrollbar { display: none; }
.tag-item { 
    background: var(--bg-card); border: none; color: var(--text-main); 
    padding: 10px 20px; border-radius: 99px; font-size: 0.95rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.tag-item:hover { background: var(--bg-card); color: var(--accent); transform: scale(0.98); }
.tag-count { background: var(--bg-main); padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: var(--accent); }
.tag-item:hover .tag-count { background: #E6F4EA; }

/* --- HERO GRID SECTION --- */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 15px auto 40px; max-width: 1400px; padding: 0 15px; }
.hero-right { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.post-thumb-card { 
    position: relative; border-radius: 20px; overflow: hidden; 
    display: flex; flex-direction: column; justify-content: flex-end; 
    padding: 20px; transition: all 0.3s ease; box-shadow: var(--shadow-sm);
    border: none;
}
.post-thumb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Свежие зеленые градиенты */
.bg-gradient-1 { background: linear-gradient(135deg, #A7F3D0 0%, #34D399 100%); }
.bg-gradient-2 { background: linear-gradient(135deg, #D1FAE5 0%, #6EE7B7 100%); }
.bg-gradient-3 { background: linear-gradient(135deg, #ECFDF5 0%, #A7F3D0 100%); }

.hero-left .post-thumb-card { height: 100%; min-height: 350px; }
.hero-right .post-thumb-card { height: 200px; padding: 15px; }

.cat-badge { 
    background: #FFFFFF; color: var(--text-main); 
    padding: 6px 12px; font-size: 0.75rem; font-weight: 800; 
    text-transform: uppercase; border-radius: 99px; display: inline-block; 
    margin-bottom: 12px; width: fit-content; letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.hero-right .cat-badge { margin-bottom: 8px; font-size: 0.7rem; }

.post-thumb-title { color: var(--text-main); font-size: 1.1rem; line-height: 1.3; font-weight: 800; text-shadow: 0 1px 2px rgba(255,255,255,0.5); }
.hero-left .post-thumb-title { font-size: 1.6rem; }

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-left .post-thumb-card { min-height: 250px; }
}
@media (max-width: 600px) {
    .hero-right { grid-template-columns: 1fr; }
}

/* --- BOTTOM POST GRID --- */
.section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: none; padding-bottom: 0; margin-bottom: 20px; padding: 0 15px;}
.section-header h3 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.section-header h3::before { content: ''; display: inline-block; width: 6px; height: 20px; background: var(--accent); border-radius: 4px; }

.bottom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-bottom: 40px; padding: 0 15px;}
.bottom-grid .post-thumb-card { height: 220px; }

/* --- POST ARTICLE --- */
.post-container { max-width: 850px; margin: 20px auto 40px; background: var(--bg-card); padding: 30px 20px; border-radius: 24px; border: none; box-shadow: var(--shadow-md); }
@media(max-width: 768px) { .post-container { margin: 10px auto 30px; border-radius: 20px; padding: 25px 15px; } }
.post-header { margin-bottom: 30px; }
.post-h1 { font-size: 1.8rem; line-height: 1.3; margin-bottom: 20px; color: var(--text-main); }
.post-meta-info { display: flex; align-items: center; gap: 12px; color: var(--text-gray); font-size: 0.9rem; border-top: 1px solid var(--border-color); padding-top: 15px; }
.post-meta-info img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-meta-text strong { color: var(--text-main); display: block; font-size: 0.95rem; }

/* POST CONTENT */
.post-content { font-size: 1.05rem; line-height: 1.7; color: var(--text-gray); }
.post-content p { margin-bottom: 20px; }
.post-content h2 { font-size: 1.5rem; margin: 40px 0 15px; color: var(--text-main); border-bottom: none; padding-bottom: 0; }
.post-content h3 { font-size: 1.3rem; margin: 25px 0 10px; color: var(--text-main); }
.post-content ul, .post-content ol { margin: 0 0 20px 20px; padding-left: 10px; }
.post-content li { margin-bottom: 10px; }
/* Цитаты с зеленой заливкой */
.post-content blockquote { font-style: normal; font-size: 1.1rem; border-left: 4px solid var(--accent); padding: 15px 20px; margin: 25px 0; background: #ECFDF5; color: var(--text-main); border-radius: 0 12px 12px 0; }
.post-content table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 25px 0; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden;}
.post-content th, .post-content td { padding: 12px; border-bottom: 1px solid var(--border-color); text-align: left; }
.post-content th { background: #F4F9F5; font-weight: 700; color: var(--text-main); }
.post-content td:last-child, .post-content th:last-child { border-right: none; }
.post-content tr:last-child td { border-bottom: none; }
.post-content a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(16, 185, 129, 0.2); }
.post-content a:hover { border-bottom-color: var(--accent); opacity: 1; }

/* FAQ BLOCK */
.faq-block { background: #F4F9F5; padding: 25px; margin: 25px 0; border-radius: 16px; border: none; }
.faq-question { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; color: var(--text-main); }
.faq-answer { font-size: 1rem; color: var(--text-gray); }

/* --- PAGINATION --- */
.pagination { display: flex; justify-content: center; gap: 10px; margin: 10px 0 50px; }
/* Увеличенная зона тапа для мобильных (min 44px) */
.page-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: none; border-radius: 50%; font-size: 1rem; color: var(--text-main); background: var(--bg-card); transition: 0.2s; font-weight: 600; box-shadow: var(--shadow-sm);}
.page-link:hover, .page-link.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-md); transform: scale(1.05); }

/* --- FOOTER --- */
.site-footer { background: var(--bg-card); border-top: none; padding: 40px 15px 20px; margin-top: auto; border-radius: 24px 24px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.03); }
.footer-container { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 1400px; margin: 0 auto; }
@media(min-width: 768px) { .footer-container { grid-template-columns: 1.5fr 1fr 1fr; } }
.footer-logo { font-size: 1.6rem; font-weight: 800; color: var(--accent); margin-bottom: 10px; display: inline-block; }
.footer-text { color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; margin-bottom: 15px; }
.footer-title { color: var(--text-main); font-size: 1.1rem; margin-bottom: 15px; font-weight: 800; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 15px; } /* Увеличен отступ для мобильных пальцев */
.footer-links a { color: var(--text-gray); transition: color 0.2s; font-size: 0.95rem; font-weight: 500; display: inline-block; padding: 2px 0;}
.footer-links a:hover { color: var(--accent); }
.contact-info { list-style: none; color: var(--text-gray); font-size: 0.95rem; }
.contact-info li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 10px; font-weight: 500;}
.footer-bottom { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-color); font-size: 0.85rem; color: #9CA3AF; font-weight: 500;}