/*
Theme Name: Frizaem Theme
Description: Финансовый портал (МФО, займы, кредитная история).
Version: 1.0
*/

:root {
    --primary: #0f172a;
    --secondary: #f8fafc;
    --text: #334155;
    --border: #e2e8f0;
    --accent: #0ea5e9;
    --section-pad: clamp(4rem, 8vw, 8rem);
    --bg-1: #f0f9ff;
    --bg-2: #f1f5f9;
    --bg-3: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Space Grotesk', 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; border-radius: 8px; }
a { color: var(--primary); text-decoration: none; transition: 0.3s; }

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

/* 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: 60px; gap: clamp(1rem, 5vw, 4rem); }
.logo { font-size: 1.4rem; font-weight: 700; color: #fff; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.5px; }
.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: 2.5rem; margin: 0; padding: 0; }
.main-nav a { font-weight: 500; font-size: 0.95rem; color: #cbd5e1; }
.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: 80px; }
    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: 5rem 0; background: var(--bg-1); text-align: center; }
.hero-content h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 1.5rem; word-break: break-word; line-height: 1.1; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.hero-content p { font-size: 1.25rem; color: var(--text); max-width: 800px; margin: 0 auto; font-weight: 500; }

/* Features F-B (Cards in grid) */
.features-section { padding: var(--section-pad) 0; background: var(--bg-2); }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.feature-card { background: #fff; padding: 2.5rem; border-radius: 12px; transition: 0.3s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 1rem; color: var(--primary); font-weight: 700; }
.feature-card p { color: var(--text); font-size: 1.05rem; }
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }

/* Unique Block U-A (Quote) */
.quote-section { padding: var(--section-pad) 0; background: var(--bg-3); text-align: center; }
.quote-inner { max-width: 900px; margin: 0 auto; }
.quote-text { font-size: clamp(1.5rem, 4vw, 2.5rem); font-style: italic; font-weight: 400; line-height: 1.4; margin-bottom: 2rem; color: var(--primary); }
.quote-author { font-size: 1.1rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }

/* Posts Grid C-A (Vertical classic) */
.posts-section { padding: var(--section-pad) 0; background: var(--bg-2); }
.section-title { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 4rem; text-align: center; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.post-card { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 12px; overflow: hidden; transition: 0.3s; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); }
.post-card .thumb { height: clamp(200px, 25vw, 250px); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card-content { padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-content h3 { font-size: 1.3rem; margin-bottom: 1.5rem; flex-grow: 1; word-break: break-word; color: var(--primary); font-weight: 700; line-height: 1.4; }
.btn-read { display: inline-block; font-weight: 600; color: var(--accent); font-size: 1rem; }
.btn-read::after { content: ' →'; transition: 0.2s; }
.btn-read:hover::after { margin-left: 5px; }

@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: 1.2rem 3rem; background: var(--primary); color: #fff; font-weight: 700; font-size: 1.1rem; border-radius: 8px; 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: 45px; height: 45px; padding: 0 8px; text-decoration: none; font-weight: 600; background: #fff; color: var(--primary); border-radius: 8px; 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; margin: 0 auto; }
.single-thumb { margin-bottom: 3rem; }
.single-header { margin-bottom: 3rem; text-align: center; }
.single-header h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.5rem; word-break: break-word; color: var(--primary); font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
.post-meta { color: #64748b; font-size: 0.95rem; }
.post-content { line-height: 1.8; font-size: 1.15rem; color: var(--text); }
.post-content h2, .post-content h3 { margin-top: 3.5rem; margin-bottom: 1.5rem; word-break: break-word; color: var(--primary); font-weight: 700; }
.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; background: #fff; border-radius: 8px; overflow: hidden; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 1rem; text-align: left; }
.post-content th { background: var(--bg-2); font-weight: 600; color: var(--primary); }

/* Footer FT-C (Three-column) */
.site-footer { background: var(--bg-3); color: var(--text); padding: 5rem 0; margin-top: auto; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.footer-logo { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; overflow-wrap: anywhere; margin-bottom: 1.5rem; color: var(--primary); }
.footer-desc { max-width: 100%; overflow-wrap: break-word; font-size: 1rem; color: #64748b; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--primary); font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: #64748b; font-weight: 500; }
.footer-col a:hover { color: var(--accent); }
.footer-contacts p { margin-bottom: 0.8rem; max-width: 100%; overflow-wrap: break-word; font-size: 1rem; color: #64748b; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
