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

:root {
    --primary: #000000;
    --secondary: #ffeb3b;
    --text: #111111;
    --border: #000000;
    --accent: #3b82f6;
    --section-pad: clamp(4rem, 8vw, 8rem);
    --border-w: 3px;
}

* { 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: #fff; }
img { max-width: 100%; height: auto; display: block; border: var(--border-w) solid var(--border); }
a { color: var(--primary); text-decoration: none; transition: 0.2s; }

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

/* Neobrutalism Base V-B */
.neo-box { border: var(--border-w) solid var(--border); box-shadow: 6px 6px 0px var(--border); background: #fff; transition: transform 0.2s, box-shadow 0.2s; }
.neo-box:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0px var(--border); }

/* Decor D-E (Accent color stripes) */
.stripe { width: 100%; height: 15px; background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 10px, transparent 10px, transparent 20px); border-bottom: var(--border-w) solid var(--border); border-top: var(--border-w) solid var(--border); }

/* Header N-A (Classic horizontal) */
.site-header { background: #fff; border-bottom: var(--border-w) solid var(--border); position: relative; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(1rem, 5vw, 4rem); min-height: 80px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; color: var(--primary); min-height: 1em; min-width: 100px; white-space: nowrap; flex-shrink: 0; text-transform: uppercase; 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: 3rem; margin: 0; padding: 0; }
.main-nav a { font-weight: 800; font-size: 1.1rem; white-space: normal; overflow-wrap: break-word; color: var(--primary); text-transform: uppercase; }
.main-nav a:hover { color: var(--accent); }

.nav-toggle { display: none; flex-shrink: 0; z-index: 2100; background: none; border: none; width: 30px; height: 20px; position: relative; cursor: pointer; }
.hamburger, .hamburger::before, .hamburger::after { content: ''; display: block; width: 100%; height: 3px; background: var(--primary); position: absolute; transition: 0.3s; }
.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { top: -10px; }
.hamburger::after { bottom: -10px; }

@media (max-width: 1024px) {
    .main-nav ul { gap: 1.5rem; }
}
@media (max-width: 768px) {
    .header-inner { gap: 1rem; }
    .nav-toggle { display: block; }
    .main-nav { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--secondary); z-index: 2000; transform: translateY(-100%); transition: transform 0.4s ease; visibility: hidden; padding-top: 80px; border-bottom: var(--border-w) solid var(--border); }
    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 { display: block; font-size: 1.3rem; }
}

/* Hero H-E (Compact Hero) */
.hero-section { padding: 6rem 0; background: var(--secondary); text-align: center; border-bottom: var(--border-w) solid var(--border); }
.hero-content h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 1.5rem; word-break: break-word; line-height: 1.1; font-weight: 900; color: var(--primary); text-transform: uppercase; }
.hero-content p { font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--text); max-width: 800px; margin: 0 auto; font-weight: 600; }

/* Features F-B (Cards in grid) */
.features-section { padding: var(--section-pad) 0; background: #fff; border-bottom: var(--border-w) solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2rem; }
.feature-card { padding: 2rem; background: var(--secondary); text-align: center; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 1rem; font-weight: 900; text-transform: uppercase; }
.feature-card p { font-weight: 600; }

/* Unique Block U-E (Number infographic) */
.stats-section { padding: var(--section-pad) 0; background: var(--accent); color: #fff; border-bottom: var(--border-w) solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; text-align: center; }
.stat-item h4 { font-size: clamp(3rem, 8vw, 6rem); color: var(--secondary); line-height: 1; font-weight: 900; text-shadow: 4px 4px 0px var(--border); margin-bottom: 1rem; }
.stat-item p { font-size: 1.2rem; font-weight: 900; text-transform: uppercase; color: var(--primary); }
@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr; } }

/* Posts Grid C-A (Vertical classic) */
.posts-section { padding: var(--section-pad) 0; background: #fff; }
.section-title { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 4rem; text-align: center; font-weight: 900; text-transform: uppercase; }
.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; }
.post-card .thumb { height: clamp(180px, 25vw, 300px); overflow: hidden; border-bottom: var(--border-w) solid var(--border); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; border: none; }
.post-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-content h3 { font-size: 1.4rem; margin-bottom: 1.5rem; flex-grow: 1; word-break: break-word; font-weight: 900; line-height: 1.2; text-transform: uppercase; }
.btn-read { display: inline-block; padding: 0.8rem 1.5rem; background: var(--accent); color: #fff; text-align: center; font-weight: 900; margin-top: auto; text-transform: uppercase; border: var(--border-w) solid var(--border); box-shadow: 4px 4px 0px var(--border); transition: 0.2s; }
.btn-read:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--border); background: var(--primary); }

@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: 900; font-size: 1.2rem; text-transform: uppercase; border: var(--border-w) solid var(--border); box-shadow: 6px 6px 0px var(--border); transition: 0.2s; }
.btn-primary:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0px var(--border); background: var(--accent); color: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 5rem 0; flex-wrap: wrap; }
.pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 50px; height: 50px; padding: 0 10px; text-decoration: none; font-weight: 900; border: var(--border-w) solid var(--border); box-shadow: 4px 4px 0px var(--border); background: #fff; transition: 0.2s; color: var(--primary); }
.pagination .page-numbers.current { background: var(--accent); color: #fff; transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--border); }
.pagination .page-numbers.dots { border: none; background: transparent; box-shadow: none; cursor: default; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--secondary); transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--border); }

/* Single Post */
.single-container { max-width: 900px; padding: var(--section-pad) 15px; }
.single-thumb { margin-bottom: 3rem; }
.single-header { margin-bottom: 3rem; border-bottom: var(--border-w) solid var(--border); padding-bottom: 2rem; }
.single-header h1 { font-size: clamp(2rem, 6vw, 4.5rem); margin-bottom: 1rem; word-break: break-word; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.post-meta { color: var(--accent); font-size: 1rem; font-weight: 900; text-transform: uppercase; }
.post-content { line-height: 1.8; font-size: 1.15rem; font-weight: 500; }
.post-content h2, .post-content h3 { margin-top: 4rem; margin-bottom: 1.5rem; word-break: break-word; color: var(--primary); font-weight: 900; text-transform: uppercase; }
.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; border: var(--border-w) solid var(--border); }
.post-content th, .post-content td { border: var(--border-w) solid var(--border); padding: 1rem; text-align: left; }
.post-content th { background: var(--secondary); font-weight: 900; text-transform: uppercase; }

/* Footer FT-C (Three-column) */
.site-footer { background: var(--primary); color: #fff; padding: var(--section-pad) 0; margin-top: auto; border-top: var(--border-w) 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, 4vw, 2.5rem); font-weight: 900; color: var(--secondary); margin-bottom: 1rem; overflow-wrap: anywhere; text-transform: uppercase; }
.footer-desc { font-size: 1.1rem; color: #fff; max-width: 100%; overflow-wrap: break-word; font-weight: 500; }
.footer-col h4 { font-size: 1.2rem; margin-bottom: 1.5rem; color: var(--accent); font-weight: 900; text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.8rem; }
.footer-col a { color: #fff; font-weight: 500; }
.footer-col a:hover { color: var(--accent); }
.footer-contacts p { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; font-weight: 500; max-width: 100%; overflow-wrap: break-word; }

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