/*
Theme Name: StroyZnak Portal (V2)
Author: Senior Frontend Designer
Description: Концепция "Floating Island & Geometric Minimalism": Плавающая шапка, полное отсутствие фото в Hero и акцент на чистой геометрии.
Version: 1.1.0
Text Domain: stroyznak
*/

:root {
    /* Colors - Pure & Minimalist */
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-dark: #0f172a;
    --primary: #0f172a;
    --accent: #ca8a04;
    --text: #334155;
    --text-muted: #94a3b8;
    --border: #f1f5f9;
    
    /* Spacing */
    --gap: 2rem;
    --header-height: 80px;
    --container-width: 1200px;
    
    /* Fonts */
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* 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; }

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

/* Header - Floating Island Redesign */
.site-header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(95%, var(--container-width));
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2.5rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    flex-shrink: 0;
}
.logo span { color: var(--accent); }

.main-nav ul { display: flex; gap: 0.5rem; }
.main-nav li { display: flex; align-items: center; }
.main-nav a { 
    padding: 0.7rem 1.5rem;
    font-weight: 700; 
    font-size: 0.8rem; 
    text-transform: uppercase;
    color: var(--text-muted);
    border-radius: 50px;
}
.main-nav a:hover, .main-nav .current-menu-item a { 
    background: var(--primary);
    color: #fff;
}

.menu-toggle { display: none; background: var(--primary); color: #fff; border: none; padding: 0.8rem; border-radius: 50%; cursor: pointer; }
.hamburger { width: 20px; height: 2px; background: currentColor; position: relative; display: block; }

/* Hero - Geometric Minimalism (No Images) */
.hero {
    padding: 15rem 0 10rem;
    background: var(--bg);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Background Geometric Graphic */
.hero-graphic {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.03;
    pointer-events: none;
}
.hero-graphic svg { width: 100%; height: 100%; }

.hero-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.hero-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--surface);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-radius: 50px;
    margin-bottom: 3rem;
}
.hero h1 { font-size: clamp(3rem, 8vw, 6rem); margin-bottom: 3rem; letter-spacing: -0.05em; }
.hero-desc { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 4rem; max-width: 600px; margin-inline: auto; line-height: 1.4; }

.btn-znak {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--primary);
    color: #fff;
    padding: 1.5rem 3.5rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-radius: 100px;
    transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.btn-znak:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

/* Metrics Section */
.metrics { padding: 8rem 0; border-top: 1px solid var(--border); }
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.metric-item {
    background: #fff;
    padding: 4rem;
    text-align: center;
}
.metric-num { font-size: 3rem; font-weight: 900; color: var(--border); margin-bottom: 1rem; display: block; }
.metric-item h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.metric-item p { font-size: 0.9rem; color: var(--text-muted); }

/* Post Grid */
.section-title {
    margin: 8rem 0 5rem;
    text-align: center;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gap);
    margin-bottom: 10rem;
    width: 100%;
}

.post-card { 
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 3rem);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    transition: 0.4s;
    min-width: 0; /* Prevent grid blowout */
    overflow: hidden; /* Safety for internal elements */
}

.post-card img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
}
.post-card:hover { background: #fff; box-shadow: 0 30px 60px rgba(0,0,0,0.05); transform: translateY(-10px); }

.card-cat { color: var(--accent); font-weight: 800; font-size: 0.7rem; margin-bottom: 2rem; display: block; text-transform: uppercase; }
.card-title { font-size: 1.6rem; margin-bottom: 1.5rem; line-height: 1.2; }
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 3rem; flex-grow: 1; }

.btn-read { font-weight: 900; font-size: 0.8rem; text-transform: uppercase; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.btn-read::after { content: '→'; transition: 0.3s; }
.post-card:hover .btn-read::after { transform: translateX(5px); }

/* Expert Hub Section */
.expert-hub {
    background: var(--surface-dark);
    padding: 10rem 0;
    color: #fff;
    margin-top: 5rem;
}

.hub-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 8rem;
    align-items: center;
}

.hub-list {
    margin-bottom: 4rem;
}

.hub-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hub-list li::before {
    content: '✓';
    color: var(--accent);
}

.hub-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 30px;
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 1rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    font-weight: 800;
}

/* Footer */
.site-footer {
    padding: 10rem 0 5rem;
    background: #fff;
    border-top: 1px solid var(--border);
}

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

.footer-col h4 { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 3rem; }
.footer-links li { margin-bottom: 1.2rem; }
.footer-links a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent); }

.footer-contact-item { margin-bottom: 2.5rem; }
.footer-contact-item label { display: block; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.5rem; }
.footer-contact-item span { font-size: 1.1rem; font-weight: 800; color: var(--primary); }

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

/* Single Post & Page Styles Redesign */
.single-post-header { 
    padding: 12rem 0 6rem; 
    text-align: center; 
    background: var(--surface);
    margin-bottom: 6rem;
}
.breadcrumbs { 
    display: flex; 
    gap: 0.8rem; 
    justify-content: center; 
    margin-bottom: 3rem; 
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}
.breadcrumbs .sep { color: var(--accent); }

.post-meta-top { 
    display: flex;
    gap: 1.5rem;
    justify-content: center; 
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.single-post-layout { 
    max-width: 900px; 
    margin: 0 auto 10rem; 
}

.post-content-body { 
    font-size: 1.2rem; 
    line-height: 1.8;
    color: var(--text);
}

.post-content-body h2 { font-size: 2.5rem; margin: 5rem 0 2rem; }
.post-content-body h3 { font-size: 1.8rem; margin: 3rem 0 1.5rem; color: var(--accent); }
.post-content-body p { margin-bottom: 2rem; }

.post-content-body ul, .post-content-body ol {
    margin: 3rem 0;
    padding-left: 0;
}
.post-content-body li { 
    list-style: none;
    margin-bottom: 1.2rem; 
    padding: 1.5rem 2rem;
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 0 20px 20px 0;
}

.post-featured-image {
    margin-bottom: 5rem;
    border-radius: 40px;
    overflow: hidden;
}
.post-featured-image img { width: 100%; height: auto; display: block; }

/* Pagination */
.pagination-container {
    margin: 6rem 0;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-item a, 
.pagination-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
    transition: 0.3s;
}

.pagination-item.is-active span {
    background: var(--primary);
    color: #fff;
}

.pagination-item a:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

/* Mobile */
@media (max-width: 1024px) {
    .site-header { width: 95%; border-radius: 20px; top: 1rem; }
    .header-inner { padding: 0 1.5rem; }
    .main-nav { display: none; }
    
    .main-nav.is-active {
        display: block;
        position: fixed;
        top: calc(var(--header-height) + 2rem);
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        background: #fff;
        border-radius: 30px;
        padding: 3rem;
        box-shadow: 0 40px 80px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .main-nav.is-active ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .main-nav.is-active a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { padding: 12rem 0 6rem; }
    .metrics-grid { grid-template-columns: 1fr; }
    .hub-grid { grid-template-columns: 1fr; gap: 4rem; text-align: center; }
    .hub-list li { justify-content: center; }
}

@media (max-width: 768px) {
    .post-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero h1 { font-size: 3rem; }
}
