/*
Theme Name: StroyInvest Guide Portal
Author: Senior Frontend Designer
Description: Концепция "Precision Investment": Профессиональный подход к бюджету, качеству и результату в строительстве.
Version: 1.0.0
Text Domain: stroyinvest
*/

:root {
    /* Colors - Growth & Precision */
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-dark: #064e3b; /* Deep Forest Green - Investment Feel */
    --primary: #10b981; /* Success Green */
    --primary-dim: rgba(16, 185, 129, 0.1);
    --accent: #0284c7; /* Sky Blue - Technical */
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Spacing */
    --gap: 2rem;
    --header-height: 90px;
    --container-width: 1400px;
    
    /* Fonts */
    --font-display: 'Inter', 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;
}
a { color: inherit; text-decoration: none; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
ul { list-style: none; }

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

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

/* Header - Modern Floating Island */
.site-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 4rem; /* Safe spacing */
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--surface-dark);
    text-transform: uppercase;
    flex-shrink: 0; /* No overlap */
}
.logo span { color: var(--primary); }

.main-nav ul { display: flex; gap: 3rem; }
.main-nav a { 
    font-weight: 700; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    text-transform: uppercase;
    position: relative;
}
.main-nav a:hover, .main-nav .current-menu-item a { color: var(--text); }
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0; width: 0; height: 2px;
    background: var(--primary);
    transition: 0.3s;
}
.main-nav a:hover::after, .main-nav .current-menu-item a::after { width: 100%; }

.menu-toggle { display: none; background: var(--surface-dark); color: #fff; border: none; padding: 12px; cursor: pointer; border-radius: 4px; }
.hamburger { width: 24px; height: 2px; background: #fff; position: relative; display: block; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 100%; height: 2px; background: #fff; left: 0; transition: 0.3s; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero - Option D: Split 50/50 Layout */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: stretch;
    padding-top: var(--header-height);
    background: #fff;
}

.hero-text-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10% 5%;
}

.hero-image-side {
    flex: 1;
    background: var(--surface-dark);
    position: relative;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('banner.png') center/cover no-repeat;
    opacity: 0.4;
    filter: grayscale(1) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, var(--surface-dark) 0%, transparent 100%);
}

.hero h1 { font-size: clamp(3rem, 7vw, 5.5rem); margin-bottom: 2rem; color: var(--surface-dark); }
.hero-desc { font-size: 1.3rem; color: var(--text-muted); max-width: 600px; margin-bottom: 4rem; border-left: 4px solid var(--primary); padding-left: 2rem; }

/* Budget Tools Section */
.budget-tools {
    padding: 8rem 0;
    background: var(--surface);
}

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

.tool-card {
    background: #fff;
    padding: 3rem;
    border: 1px solid var(--border);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tool-card:hover { border-color: var(--primary); transform: translateY(-10px); }
.tool-icon { font-size: 3rem; margin-bottom: 2rem; }
.tool-card h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.tool-card p { font-size: 0.95rem; color: var(--text-muted); flex-grow: 1; }

/* Process Ticker */
.process-ticker {
    background: var(--surface-dark);
    color: #fff;
    padding: 3rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-wrap { display: flex; gap: 6rem; align-items: center; }
.ticker-item { font-family: var(--font-mono); font-size: 0.9rem; text-transform: uppercase; color: var(--primary); font-weight: 700; display: flex; align-items: center; gap: 1rem; }
.ticker-item span { color: #fff; font-family: var(--font-body); }

/* Post Grid - Standard Layout */
.section-header {
    padding: 8rem 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--surface-dark);
    margin-bottom: 4rem;
}

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

.post-card {
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    min-width: 0;
}
.post-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

.card-img-wrap {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface-dark);
}

.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; opacity: 0.9; }
.post-card:hover .card-img { transform: scale(1.05); opacity: 1; }

.card-body { padding: 2.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--primary); font-weight: 700; margin-bottom: 1rem; display: block; }
.card-title { font-size: 1.5rem; margin-bottom: 1.5rem; line-height: 1.2; }
.card-excerpt { font-size: 1rem; color: var(--text-muted); margin-bottom: 2.5rem; flex-grow: 1; }

.btn-invest {
    background: var(--surface-dark);
    color: #fff;
    padding: 1.2rem 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    width: fit-content;
    text-align: center;
}
.btn-invest:hover { background: var(--primary); }

/* Footer */
.site-footer {
    padding: 10rem 0 4rem;
    background: var(--surface-dark);
    color: #fff;
}

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

.footer-col h4 { font-family: var(--font-mono); font-size: 0.8rem; color: var(--primary); margin-bottom: 3rem; text-transform: uppercase; }

.footer-contact-item { margin-bottom: 3rem; }
.footer-contact-item label { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 0.75rem; }
.footer-contact-item span { font-size: 1.3rem; font-weight: 700; }

.footer-bottom {
    padding-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.4);
}

/* Pagination */
.pagination-container { padding-bottom: 8rem; }
.pagination-list { display: flex; justify-content: center; gap: 0.5rem; }
.pagination-item a, .pagination-item span {
    width: 55px; height: 55px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border);
    font-weight: 800;
}
.pagination-item.is-active span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Mobile */
@media (max-width: 1024px) {
    .hero { flex-direction: column; }
    .hero-text-side { padding: 10rem var(--gap) 5rem; }
    .hero-image-side { height: 400px; }
    .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: fixed; top: var(--header-height); left: 0; width: 100%;
        background: #fff; padding: 2rem; border-bottom: 1px solid var(--border);
    }
    .main-nav ul { flex-direction: column; gap: 2rem; }
    .main-nav a { color: var(--text); }
    .menu-toggle { display: block; }
}

@media (max-width: 640px) {
    .tool-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
    .hero-desc { font-size: 1.1rem; }
}
