/*
Theme Name: Eleven IT Theme
Description: Информационный портал о финтехе и займах.
Version: 1.0
*/

:root {
    --primary: #0D1B2A;
    --secondary: #3A86FF;
    --accent: #00B4D8;
    --bg: #E8EEF4;
    --text: #1a2a3a;
    --border: #c5d4e3;
    --section-pad: clamp(4rem, 8vw, 8rem);
    --shadow: 0 10px 25px -5px rgba(13, 27, 42, 0.08), 0 8px 10px -6px rgba(13, 27, 42, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
body { font-family: 'IBM Plex Sans', sans-serif; color: var(--text); line-height: 1.7; background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
h1, h2, h3, h4 { color: var(--primary); font-weight: 700; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }
a { color: var(--secondary); text-decoration: none; transition: 0.3s; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* D-B Horizontal divider lines */
.decor-line { width: 100%; height: 1px; background: var(--border); }

/* Header N-C */
.site-header { background: #fff; position: relative; z-index: 1000; padding: 1.25rem 0; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(1rem, 5vw, 4rem); }
.logo {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 1em;
    min-width: 100px;
    font-family: 'IBM Plex Mono', monospace;
}
.logo span { color: var(--secondary); }
.header-spacer { width: 40px; flex-shrink: 0; }

.main-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    width: clamp(300px, 40vw, 400px);
    height: 100vh;
    background: var(--primary);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    visibility: hidden;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
}
body.menu-open .main-nav { transform: translateX(0); visibility: visible; }
.main-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: 1.15rem; color: rgba(232, 238, 244, 0.85); }
.main-nav a:hover { color: var(--accent); }

.nav-toggle {
    display: block;
    flex-shrink: 0;
    z-index: 2100;
    background: var(--bg);
    border: 1px solid var(--border);
    width: 44px;
    height: 44px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 22px;
    left: 11px;
    height: 2px;
    background: var(--primary);
    position: absolute;
    transition: 0.3s;
}
.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }
body.menu-open .hamburger { background: transparent; }
body.menu-open .hamburger::before { top: 0; transform: rotate(45deg); }
body.menu-open .hamburger::after { bottom: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
    .main-nav { width: 100%; }
    .header-spacer { display: none; }
}

.site-main { flex: 1; }

/* Hero H-D asymmetric, no image */
.hero-section { padding: var(--section-pad) 0; background: #fff; position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 2; min-width: 0; }
.hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    margin-bottom: 1.5rem;
    word-break: break-word;
    line-height: 1.15;
}
.hero-content p { font-size: clamp(1rem, 2vw, 1.15rem); max-width: 520px; }
.hero-visual { position: relative; min-height: 280px; }
.hero-gradient-block {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 50%, var(--primary) 100%);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
    border-radius: 0;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { min-height: 200px; }
    .hero-gradient-block { clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%); min-height: 200px; }
}

/* F-F Stats */
.stats-section { padding: var(--section-pad) 0; background: var(--bg); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; text-align: center; }
.stat-item { background: #fff; padding: 2rem 1rem; border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat-item h4 { font-size: clamp(2rem, 6vw, 3rem); color: var(--secondary); line-height: 1; font-weight: 700; margin-bottom: 0.75rem; font-family: 'IBM Plex Mono', monospace; }
.stat-item p { font-size: 0.95rem; font-weight: 500; color: var(--text); }
@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr; } }

/* U-C Horizontal scroll tags */
.tags-scroll-section { padding: 2rem 0; background: var(--primary); overflow: hidden; }
.tags-scroll-wrap { overflow: hidden; }
.tags-scroll-inner { display: flex; gap: 1.5rem; animation: eit-scroll 25s linear infinite; width: max-content; }
.tag-item {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(58, 134, 255, 0.15);
    color: #E8EEF4;
    border-radius: 100px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    border: 1px solid rgba(0, 180, 216, 0.3);
}
@keyframes eit-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Posts C-F Timeline V-A soft shadows */
.posts-section { padding: var(--section-pad) 0; background: #fff; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 3rem; text-align: center; }
.posts-grid { position: relative; max-width: 800px; margin: 0 auto; }
.posts-grid::before { content: ''; position: absolute; top: 0; bottom: 0; left: 30px; width: 2px; background: var(--border); z-index: 1; }
.post-card { position: relative; margin-bottom: 2.5rem; padding-left: 80px; z-index: 2; min-width: 0; }
.post-card::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 21px;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--border);
}
.post-card-inner { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; transition: 0.3s; }
.post-card-inner:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(13, 27, 42, 0.12); }
.post-card .thumb { aspect-ratio: 16 / 9; max-height: 360px; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center center; border-radius: 0; }
.post-card-content { padding: 1.5rem 2rem; }
.post-date { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; color: var(--accent); margin-bottom: 0.5rem; display: block; }
.post-category { font-size: 0.75rem; font-weight: 600; color: var(--secondary); margin-bottom: 0.5rem; display: block; text-transform: uppercase; letter-spacing: 0.04em; }
.post-card-content h3 { font-size: 1.25rem; margin-bottom: 1rem; word-break: break-word; line-height: 1.35; }
.btn-read { font-weight: 600; color: var(--secondary); font-size: 0.95rem; }
.btn-read::after { content: ' →'; }

@media (max-width: 768px) {
    .posts-grid::before { left: 20px; }
    .post-card { padding-left: 60px; }
    .post-card::before { left: 11px; }
}

.all-posts-action { text-align: center; margin-top: 3rem; }
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    transition: 0.3s;
    box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--primary); 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: 45px;
    height: 45px;
    padding: 0 8px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid var(--border);
    transition: 0.3s;
    color: var(--primary);
    background: #fff;
    box-shadow: var(--shadow);
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers.dots { border: none; background: transparent; box-shadow: none; cursor: default; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--bg); }

/* Single & archive */
.single-container, .archive-container { max-width: 900px; padding: var(--section-pad) 20px; margin: 0 auto; width: 100%; }
.archive-header { margin-bottom: 3rem; text-align: center; }
.archive-header h1 { font-size: clamp(1.8rem, 5vw, 3rem); word-break: break-word; }
.archive-desc { margin-top: 1rem; }
.single-thumb { margin-bottom: 2.5rem; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.single-header { margin-bottom: 2.5rem; text-align: center; }
.single-header h1 { font-size: clamp(1.8rem, 5vw, 3rem); margin-bottom: 1rem; word-break: break-word; line-height: 1.2; }
.post-meta { color: #64748b; font-size: 0.95rem; font-family: 'IBM Plex Mono', monospace; }
.post-content { line-height: 1.8; font-size: 1.15rem; }
.post-content h2, .post-content h3 { margin-top: 3.5rem; margin-bottom: 1.5rem; word-break: break-word; color: var(--secondary); }
.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; box-shadow: var(--shadow); }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 1rem; text-align: left; }
.post-content th { background: var(--bg); font-weight: 600; color: var(--primary); }

/* 404 */
.not-found-container { text-align: center; padding: var(--section-pad) 20px; min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 600px; margin: 0 auto; }
.not-found-code { font-size: clamp(3rem, 10vw, 6rem); color: var(--primary); margin-bottom: 1rem; font-family: 'IBM Plex Mono', monospace; }
.not-found-title { margin-bottom: 1rem; font-size: clamp(1.5rem, 4vw, 2rem); }
.not-found-text { margin-bottom: 2rem; }

/* Footer FT-A */
.site-footer { background: var(--primary); color: rgba(232, 238, 244, 0.8); padding: 1.5rem 0; margin-top: auto; }
.footer-minimal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; text-align: center; font-size: 0.9rem; }
.footer-logo { font-size: clamp(1.2rem, 7vw, 2rem); font-weight: 600; color: #E8EEF4; overflow-wrap: anywhere; }
.footer-nav ul { list-style: none; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; }
.footer-nav a { color: rgba(232, 238, 244, 0.75); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-sep { opacity: 0.4; }
.footer-copy, .footer-contact { overflow-wrap: break-word; max-width: 100%; }
