/*
Theme Name: Schneider Enterprise Theme
Description: Корпоративное кредитование: гайды для бизнеса.
Version: 1.0
*/

:root {
    --primary: #1E3A5F;
    --secondary: #8B9DC3;
    --accent: #B8860B;
    --bg: #F0F4F8;
    --text: #2C3E50;
    --border: #D5DCE6;
    --section-pad: clamp(4rem, 8vw, 7rem);
    --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito Sans', sans-serif; color: var(--text); line-height: 1.7; overflow-x: hidden; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; border-radius: 6px; }
a { color: var(--accent); text-decoration: none; transition: 0.3s; }
h1, h2, h3, h4 { font-family: 'Libre Baskerville', serif; }

.sch-container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 2rem; }

/* V-D Alternating sections */
.sch-section-light { background: var(--bg); color: var(--text); }
.sch-section-navy { background: var(--primary); color: #fff; }
.sch-section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 3rem; text-align: center; font-weight: 700; color: var(--primary); }
.sch-section-title-light { color: #fff; }

/* N-B Dark navy sidebar */
.sch-site-wrapper { display: flex; min-height: 100vh; }
.sch-site-header { width: var(--sidebar-w); position: fixed; top: 0; left: 0; height: 100vh; background: var(--primary); padding: 2.5rem 1.75rem; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; z-index: 1000; }
.sch-site-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; width: calc(100% - var(--sidebar-w)); }

.sch-logo { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; color: #fff; margin-bottom: 2.5rem; display: block; white-space: normal; overflow-wrap: anywhere; max-width: 100%; line-height: 1.3; font-family: 'Libre Baskerville', serif; }
.sch-logo span { color: var(--accent); }

.sch-main-nav { flex: 1; min-width: 0; }
.sch-main-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; margin: 0; padding: 0; }
.sch-main-nav a { font-weight: 500; font-size: 1rem; color: var(--secondary); display: block; white-space: normal; overflow-wrap: break-word; }
.sch-main-nav a:hover { color: #fff; transform: translateX(4px); }

.sch-nav-toggle { display: none; }

@media (max-width: 1024px) {
    .sch-site-wrapper { display: block; }
    .sch-site-header { width: 100%; position: sticky; height: auto; padding: 1rem 1.5rem; flex-direction: row; align-items: center; justify-content: space-between; overflow: visible; }
    .sch-site-main { margin-left: 0 !important; width: 100% !important; }
    .sch-logo { margin-bottom: 0; font-size: 1.25rem; }

    .sch-nav-toggle { display: block; flex-shrink: 0; z-index: 2100; background: none; border: none; width: 30px; height: 20px; position: relative; cursor: pointer; }
    .sch-hamburger, .sch-hamburger::before, .sch-hamburger::after { content: ''; display: block; width: 100%; height: 2px; background: #fff; position: absolute; transition: 0.3s; }
    .sch-hamburger { top: 50%; transform: translateY(-50%); }
    .sch-hamburger::before { top: -8px; }
    .sch-hamburger::after { bottom: -8px; }

    .sch-main-nav { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--primary); z-index: 2000; transform: translateY(-100%); transition: transform 0.4s ease; visibility: hidden; padding-top: 80px; }
    body.menu-open .sch-main-nav { transform: translateY(0); visibility: visible; }
    .sch-main-nav ul { padding: 2rem; align-items: center; }
    .sch-main-nav a { font-size: 1.2rem; text-align: center; }
}

/* H-D Asymmetric hero + D-A diagonal bottom */
.sch-hero-section { padding: var(--section-pad) 0; position: relative; overflow: hidden; }
.sch-hero-section::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 60px; background: var(--primary); clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%); z-index: 3; }
.sch-hero-inner { display: grid; grid-template-columns: 42% 58%; gap: 0; align-items: center; min-height: 420px; position: relative; z-index: 2; padding: 0 2rem; max-width: 1200px; margin: 0 auto; }
.sch-hero-content { padding: 2rem 2rem 2rem 0; }
.sch-hero-content h1 { font-size: clamp(1.75rem, 4vw, 3rem); margin-bottom: 1.5rem; word-break: break-word; line-height: 1.2; font-weight: 700; color: var(--primary); }
.sch-hero-content p { font-size: 1.1rem; color: var(--text); max-width: 480px; }
.sch-hero-image { position: relative; height: 100%; min-height: 380px; }
.sch-hero-image img { width: 100%; height: 100%; object-fit: cover; clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); border-radius: 0; }

@media (max-width: 768px) {
    .sch-hero-inner { grid-template-columns: 1fr; gap: 2rem; min-height: auto; }
    .sch-hero-content { padding: 0; }
    .sch-hero-image { min-height: 260px; }
    .sch-hero-image img { clip-path: none; }
    .sch-hero-section::after { height: 40px; }
}

/* F-B Feature cards */
.sch-features-section { padding: var(--section-pad) 0; }
.sch-features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.sch-feature-card { background: rgba(255, 255, 255, 0.08); padding: 2rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.12); transition: 0.3s; }
.sch-feature-card:hover { background: rgba(255, 255, 255, 0.14); }
.sch-feature-card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--accent); font-weight: 700; }
.sch-feature-card p { font-size: 1rem; color: rgba(255, 255, 255, 0.88); line-height: 1.65; }

@media (max-width: 1024px) { .sch-features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .sch-features-grid { grid-template-columns: minmax(0, 1fr); } }

/* U-A Quote */
.sch-quote-section { padding: var(--section-pad) 0; text-align: center; }
.sch-quote-text { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 400; line-height: 1.55; margin-bottom: 1.5rem; max-width: 780px; margin-left: auto; margin-right: auto; color: var(--primary); font-family: 'Libre Baskerville', serif; font-style: italic; border: none; }
.sch-quote-author { font-size: 1rem; font-weight: 600; color: var(--accent); font-style: normal; }

/* C-A Vertical post cards */
.sch-posts-section { padding: var(--section-pad) 0; }
.sch-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.sch-post-card { display: flex; flex-direction: column; height: 100%; background: rgba(255, 255, 255, 0.06); border-radius: 8px; overflow: hidden; transition: 0.3s; }
.sch-post-card:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-4px); }
.sch-thumb { height: clamp(180px, 25vw, 250px); overflow: hidden; }
.sch-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.sch-post-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.sch-post-category { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.5rem; display: block; }
.sch-post-card-content h3 { font-size: 1.15rem; margin-bottom: 1.25rem; flex-grow: 1; word-break: break-word; line-height: 1.4; color: #fff; font-weight: 600; }
.sch-btn-read { display: inline-block; font-weight: 600; color: var(--accent); font-size: 0.95rem; }
.sch-btn-read:hover { color: #fff; }

@media (max-width: 1024px) { .sch-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .sch-posts-grid { grid-template-columns: minmax(0, 1fr); } }

.sch-all-posts-action { text-align: center; margin-top: 3.5rem; }
.sch-btn-primary { display: inline-block; padding: 1rem 2.5rem; background: var(--accent); color: #fff; font-weight: 600; border-radius: 4px; transition: 0.3s; }
.sch-btn-primary:hover { background: #9A7209; color: #fff; }

/* Pagination */
.sch-pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 4rem 0; flex-wrap: wrap; }
.sch-pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; text-decoration: none; font-weight: 600; background: rgba(255, 255, 255, 0.1); color: #fff; border-radius: 4px; transition: 0.3s; }
.sch-pagination .page-numbers.current { background: var(--accent); color: #fff; }
.sch-pagination .page-numbers.dots { background: transparent; cursor: default; }
.sch-pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--secondary); color: var(--primary); }

/* Single / Page */
.sch-single-container { max-width: 800px; padding: var(--section-pad) 2rem; margin: 0 auto; }
.sch-single-thumb { margin-bottom: 2.5rem; }
.sch-single-header { margin-bottom: 2.5rem; }
.sch-single-header h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-bottom: 1rem; word-break: break-word; color: var(--primary); font-weight: 700; line-height: 1.2; }
.sch-post-meta { color: var(--secondary); font-size: 0.95rem; }
.sch-post-content { line-height: 1.8; font-size: 1.1rem; }
.sch-post-content h2, .sch-post-content h3, .sch-post-content h4 { margin-top: 3.5rem; margin-bottom: 1.25rem; word-break: break-word; color: var(--primary); font-weight: 700; }
.sch-post-content p { margin-bottom: 1.5rem; }
.sch-post-content ul, .sch-post-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.sch-post-content li { margin-bottom: 0.5rem; }
.sch-post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; background: #fff; border-radius: 6px; overflow: hidden; }
.sch-post-content th, .sch-post-content td { border: 1px solid var(--border); padding: 1rem; text-align: left; }
.sch-post-content th { background: var(--bg); font-weight: 600; color: var(--primary); }

/* Index */
.sch-index-card { display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: 8px; overflow: hidden; transition: 0.3s; }
.sch-index-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12); }
.sch-index-card .sch-thumb { height: clamp(180px, 25vw, 250px); }
.sch-index-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.sch-index-card-content h3 { font-size: 1.15rem; margin-bottom: 1.25rem; flex-grow: 1; color: var(--primary); }
.sch-index-card .sch-btn-read { color: var(--accent); }
.sch-index-card .sch-btn-read:hover { color: var(--primary); }

/* 404 */
.sch-error-page { text-align: center; min-height: 50vh; display: flex; flex-direction: column; justify-content: center; padding: var(--section-pad) 2rem; }
.sch-error-code { font-size: clamp(3rem, 10vw, 6rem); color: var(--accent); margin-bottom: 1rem; font-weight: 700; font-family: 'Libre Baskerville', serif; }
.sch-error-title { font-size: clamp(1.25rem, 3vw, 1.75rem); margin-bottom: 1.5rem; color: var(--primary); }
.sch-error-text { margin-bottom: 2rem; max-width: 480px; margin-left: auto; margin-right: auto; }

/* FT-C Footer */
.sch-site-footer { background: #fff; color: var(--text); padding: var(--section-pad) 0; margin-top: auto; border-top: 1px solid var(--border); }
.sch-footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); }
.sch-footer-logo { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; overflow-wrap: anywhere; margin-bottom: 1.25rem; color: var(--primary); font-family: 'Libre Baskerville', serif; }
.sch-footer-desc { max-width: 100%; overflow-wrap: break-word; font-size: 0.95rem; color: var(--secondary); }
.sch-footer-col h4 { font-size: 1.05rem; margin-bottom: 1.25rem; color: var(--primary); font-weight: 600; }
.sch-footer-col ul { list-style: none; padding: 0; margin: 0; }
.sch-footer-col li { margin-bottom: 0.75rem; }
.sch-footer-col a { color: var(--secondary); font-weight: 500; }
.sch-footer-col a:hover { color: var(--accent); }
.sch-footer-contacts p { margin-bottom: 0.75rem; max-width: 100%; overflow-wrap: break-word; font-size: 0.95rem; color: var(--secondary); }

@media (max-width: 768px) {
    .sch-footer-grid { grid-template-columns: 1fr; text-align: center; }
}
