/*
Theme Name: 4kcons Theme
Description: Финансовый портал (Право и МФО).
Version: 1.0
*/

:root {
    --primary: #1e1e1e;
    --secondary: #f4f4f5;
    --text: #333333;
    --border: #e4e4e7;
    --accent: #0284c7;
    --section-pad: clamp(3rem, 6vw, 6rem);
    --bg-1: #e0f2fe;
    --bg-2: #fef3c7;
    --bg-3: #f3e8ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: var(--text); line-height: 1.6; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; background: var(--secondary); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: 0.3s; }

.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 15px; }

/* SVG Pattern Backgrounds D-D */
.pattern-bg { position: relative; z-index: 1; }
.pattern-bg::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E"); z-index: -1; pointer-events: none; }

/* Header N-E (Minimal top-bar) */
.site-header { background: var(--primary); color: #fff; position: relative; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 50px; gap: clamp(1rem, 5vw, 4rem); }
.logo { font-size: 1.2rem; font-weight: bold; color: #fff; white-space: nowrap; flex-shrink: 0; letter-spacing: 1px; }
.logo span { color: var(--accent); }

.main-nav { flex: 1; min-width: 0; overflow: hidden; display: flex; justify-content: flex-end; }
.main-nav ul { display: flex; list-style: none; gap: 2rem; margin: 0; padding: 0; }
.main-nav a { font-weight: 400; font-size: 0.9rem; color: #ccc; text-transform: uppercase; letter-spacing: 1px; }
.main-nav a:hover { color: #fff; }

.nav-toggle { display: none; flex-shrink: 0; z-index: 2100; background: none; border: none; width: 24px; height: 16px; position: relative; cursor: pointer; }
.hamburger, .hamburger::before, .hamburger::after { content: ''; display: block; width: 100%; height: 2px; background: #fff; position: absolute; transition: 0.3s; }
.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--primary); z-index: 2000; transform: translateY(-100%); transition: transform 0.4s ease; visibility: hidden; padding-top: 60px; }
    body.menu-open .main-nav { transform: translateY(0); visibility: visible; }
    .main-nav ul { flex-direction: column; padding: 20px; gap: 1.5rem; align-items: center; }
    .main-nav a { font-size: 1.2rem; color: #fff; }
}

/* Hero H-E (Compact Hero) */
.hero-section { padding: 4rem 0; background: var(--bg-1); text-align: center; }
.hero-content h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; word-break: break-word; line-height: 1.2; font-weight: 800; color: var(--primary); }
.hero-content p { font-size: 1.2rem; color: var(--text); max-width: 700px; margin: 0 auto; }

/* Features F-D (Single text block manifesto) */
.manifesto-section { padding: var(--section-pad) 0; background: var(--bg-2); text-align: center; }
.manifesto-content { max-width: 800px; margin: 0 auto; font-size: clamp(1.2rem, 3vw, 1.8rem); line-height: 1.6; font-weight: 300; color: var(--primary); }
.manifesto-content strong { font-weight: 700; color: var(--accent); }

/* Unique Block U-C (Horizontal scroll strip) */
.scroll-strip-section { padding: 3rem 0; background: var(--primary); color: #fff; overflow: hidden; white-space: nowrap; }
.scroll-strip-inner { display: inline-block; animation: scroll 30s linear infinite; }
.scroll-item { display: inline-block; padding: 0 3rem; font-size: 1.5rem; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.8); }
.scroll-item span { color: var(--accent); margin-right: 1rem; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Posts Grid C-D (Minimal, no image) */
.posts-section { padding: var(--section-pad) 0; background: var(--bg-3); }
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 3rem; text-align: center; font-weight: 800; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.post-card { background: #fff; padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; transition: 0.3s; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.post-card .thumb { display: none; } /* Hide images */
.post-card-content { padding: 0; display: flex; flex-direction: column; flex-grow: 1; }
.post-meta-card { font-size: 0.85rem; color: #888; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.post-card-content h3 { font-size: 1.3rem; margin-bottom: 1.5rem; flex-grow: 1; word-break: break-word; line-height: 1.4; color: var(--primary); }
.btn-read { display: inline-block; font-weight: bold; color: var(--accent); text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .posts-grid { grid-template-columns: minmax(0, 1fr); } }

.all-posts-action { text-align: center; margin-top: 4rem; }
.btn-primary { display: inline-block; padding: 1rem 2.5rem; background: var(--primary); color: #fff; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.btn-primary:hover { background: var(--accent); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 4rem 0; flex-wrap: wrap; }
.pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; text-decoration: none; font-weight: bold; background: #fff; color: var(--primary); transition: 0.3s; }
.pagination .page-numbers.current { background: var(--primary); color: #fff; }
.pagination .page-numbers.dots { background: transparent; cursor: default; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--accent); color: #fff; }

/* Single Post */
.single-container { max-width: 800px; padding: var(--section-pad) 15px; background: #fff; margin: 3rem auto; }
.single-thumb { display: none; } /* Hide images in single too for minimal style */
.single-header { margin-bottom: 3rem; text-align: center; }
.single-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; word-break: break-word; line-height: 1.2; color: var(--primary); }
.post-meta { color: #888; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.post-content { line-height: 1.8; font-size: 1.15rem; }
.post-content h2, .post-content h3 { margin-top: 3rem; margin-bottom: 1.5rem; word-break: break-word; color: var(--primary); }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 1rem; text-align: left; }
.post-content th { background: var(--secondary); }

/* Footer FT-D (CTA footer) */
.site-footer { background: var(--primary); color: #fff; padding: 0; margin-top: auto; }
.footer-cta { background: var(--accent); padding: 4rem 15px; text-align: center; }
.footer-cta h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; color: #fff; }
.footer-cta p { font-size: 1.1rem; margin-bottom: 2rem; opacity: 0.9; max-width: 600px; margin-left: auto; margin-right: auto; }
.footer-cta .btn-primary { background: #fff; color: var(--accent); }
.footer-cta .btn-primary:hover { background: var(--primary); color: #fff; }

.footer-bottom { padding: 3rem 15px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2rem; }
.footer-logo { font-size: 1.5rem; font-weight: bold; overflow-wrap: anywhere; color: #fff; letter-spacing: 1px; }
.footer-nav ul { list-style: none; display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: #ccc; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-nav a:hover { color: #fff; }
.footer-contacts p { color: #888; font-size: 0.9rem; margin-bottom: 0.5rem; }
