/*
Theme Name: NewPlan Budget
Author: Senior Frontend Designer
Description: Концепция "Financial Architecture": Структура, планирование и достижение целей.
Version: 1.5.0
Text Domain: newplan
*/

:root {
    /* Colors - Structural & Focused */
    --bg: #0b0e11;
    --surface: #14181d;
    --surface-light: #1e2329;
    --primary: #c1ff72; /* Planning Lime */
    --primary-dim: rgba(193, 255, 114, 0.1);
    --accent: #3b82f6; /* Trust Blue */
    --text: #ffffff;
    --text-muted: #94a3b8;
    --border: #2d3748;
    
    /* Spacing */
    --gap: 2rem;
    --header-height: 100px;
    --container-width: 1400px;
    
    /* Fonts */
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: var(--font-body); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* Grid System */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--gap); }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: -0.04em; }
.text-mono { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* Header - Floating Island Design */
.site-header {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.header-inner {
    background: rgba(20, 24, 29, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 100px; /* Floating pill shape */
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    background: var(--primary);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 50% 50%);
}

.main-nav ul { display: flex; gap: 2.5rem; }
.main-nav a { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--primary); }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--primary);
    left: 0;
    transition: 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero - Blueprint Style */
.hero {
    padding: calc(var(--header-height) + 8rem) 0 6rem;
    position: relative;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-label {
    display: inline-flex;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--bg);
    font-weight: 800;
    margin-bottom: 2rem;
}

.hero h1 { font-size: clamp(3rem, 10vw, 7.5rem); margin-bottom: 2rem; }
.hero-desc { font-size: 1.5rem; color: var(--text-muted); line-height: 1.3; max-width: 600px; }

.hero-banner-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-banner-wrap:hover .hero-banner-img {
    transform: translateY(-10px);
}

/* Stats/Goals Block */
.section-goals {
    padding: 6rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.goal-card {
    padding: 2rem;
    border: 1px solid var(--border);
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary);
}

.goal-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-muted); }
.goal-value { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; display: block; margin-bottom: 0.5rem; }
.goal-progress { height: 2px; background: var(--border); width: 100%; position: relative; }
.goal-progress-bar { height: 100%; background: var(--primary); position: absolute; left: 0; top: 0; }

/* Planning Tools Section */
.planning-tools {
    padding: 8rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.section-header h2 { font-size: 3.5rem; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.tool-card {
    background: var(--bg);
    padding: 4rem 3rem;
    transition: background 0.4s;
}

.tool-card:hover { background: var(--surface); }
.tool-icon { font-size: 2.5rem; margin-bottom: 2rem; display: block; }
.tool-title { font-size: 1.5rem; margin-bottom: 1.5rem; }
.tool-link { color: var(--primary); font-family: var(--font-mono); font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }

/* Posts Grid - Balanced Blueprint */
.post-section {
    padding: 8rem 0;
    background: var(--surface);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.card-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.4s, transform 0.6s; }
.post-card:hover .card-img { filter: grayscale(0); transform: scale(1.05); }

.card-meta { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; color: var(--primary); }
.card-title { font-size: 1.8rem; margin-bottom: 1.5rem; text-transform: none; letter-spacing: -0.02em; line-height: 1.2; }
.card-excerpt { color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; flex-grow: 1; }

.btn-plan {
    align-self: flex-start;
    padding: 1.2rem 2.5rem;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.btn-plan:hover { background: var(--primary); color: var(--bg); }

/* Pagination */
.pagination-container { padding: 6rem 0; }
.pagination-list { display: flex; justify-content: center; gap: 0.5rem; }
.pagination-item a, .pagination-item span {
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
}
.pagination-item.is-active span { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* Footer */
.site-footer {
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-col h4 { margin-bottom: 2rem; color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.1em; }
.footer-contact-item { margin-bottom: 1.5rem; }
.footer-contact-item label { display: block; color: var(--primary); font-family: var(--font-mono); font-size: 0.7rem; margin-bottom: 0.5rem; }
.footer-contact-item span { font-size: 1.2rem; }

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Mobile */
@media (max-width: 1024px) {
    .header-inner { padding: 1rem 2rem; border-radius: 40px; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 20px;
        margin-top: 10px;
        padding: 2rem;
        flex-direction: column;
    }
    .main-nav.is-active { display: flex; }
    .main-nav ul { flex-direction: column; gap: 1rem; }
    .menu-toggle { display: block; }
    .goals-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .hero-content { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .goals-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
