/* ===========================================================================
   GMATPro — Blog article stylesheet (shared by all /blog/<hub>/<slug>/ pages)
   Design tokens & components mirror the main site (/index.html).
   Linked via root-relative path: <link rel="stylesheet" href="/blog/assets/blog.css">
   =========================================================================== */

:root {
    --navy: #0A192F;
    --white: #FFFFFF;
    --gray-light: #F4F6F8;
    --gray-dark: #333333;
    --gray-text: #666666;
    --orange: #D97706;
    --orange-hover: #B46305;
    --green: #10B981;
    --red: #EF4444;
    --border: #E5E7EB;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s ease;
    --maxw-prose: 760px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--gray-dark);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; padding: 0 20px; margin: 0 auto; }
.text-center { text-align: center; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 24px; font-size: 1rem; font-weight: 600; border-radius: 8px;
    cursor: pointer; transition: var(--transition); border: none; text-align: center;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }

/* ---------- Header / nav (matches /index.html) ---------- */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    z-index: 1000; border-bottom: 1px solid var(--border); transition: var(--transition);
}
.header.scrolled { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-weight: 800; font-size: 1.5rem; color: var(--navy); }
.logo span { color: var(--orange); }
.menu-toggle { display: block; background: none; border: none; font-size: 1.5rem; color: var(--navy); cursor: pointer; }
.nav-menu {
    display: none; position: absolute; top: 70px; left: 0; width: 100%;
    background: var(--white); padding: 20px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    flex-direction: column; gap: 15px;
}
.nav-menu.active { display: flex; }
.nav-link { font-weight: 500; color: var(--navy); }
.nav-link:hover { color: var(--orange); }
.header-btn { display: none; }

/* ---------- Article hero (navy band) ---------- */
.article-hero { background: var(--navy); color: var(--white); padding: 110px 0 45px; }
.article-hero .container { max-width: var(--maxw-prose); }
.breadcrumb { font-size: 0.8rem; color: #A0AEC0; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { color: #64748B; }
.article-hero h1 { font-size: 1.9rem; line-height: 1.2; font-weight: 800; margin-bottom: 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 0.85rem; color: #A0AEC0; }
.article-meta .cat-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 4px 10px; border-radius: 20px; background: var(--orange); color: #fff; }
.article-meta .pillar-pill { background: #fff; color: var(--navy); }

/* ---------- Lead / atomic answer (snippet-first) ---------- */
.lead {
    font-size: 1.12rem; line-height: 1.65; color: var(--navy); font-weight: 500;
    background: #FFF7ED; border-left: 4px solid var(--orange);
    padding: 20px 22px; border-radius: 0 10px 10px 0; margin: 0 0 6px;
}

/* ---------- Article body / prose ---------- */
.article-body { padding: 38px 0 20px; }
.article-body .container { max-width: var(--maxw-prose); }
.article-body p { margin-bottom: 1.15rem; color: var(--gray-dark); }
.article-body h2 {
    font-size: 1.55rem; line-height: 1.3; font-weight: 700; color: var(--navy);
    margin: 2.4rem 0 1rem; scroll-margin-top: 90px; position: relative;
}
.article-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin: 1.6rem 0 .7rem; }
.article-body ul, .article-body ol { margin: 0 0 1.2rem; padding-left: 0; }
.article-body ul li, .article-body ol li { position: relative; padding-left: 28px; margin-bottom: .6rem; }
.article-body ul li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }
.article-body ol { counter-reset: li; }
.article-body ol li::before { counter-increment: li; content: counter(li); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; font-size: .75rem; font-weight: 700; color: #fff; background: var(--navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.article-body a:not(.btn) { color: var(--orange); font-weight: 600; border-bottom: 1px solid rgba(217,119,6,.3); }
.article-body a:not(.btn):hover { border-bottom-color: var(--orange); }
.article-body strong { color: var(--navy); font-weight: 700; }
.article-body blockquote { border-left: 4px solid var(--navy); background: var(--gray-light); padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 0 0 1.2rem; color: var(--gray-text); font-style: italic; }

/* ---------- Table of contents / jump-links ---------- */
.toc { background: var(--gray-light); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; margin: 0 0 30px; }
.toc strong { display: block; color: var(--navy); margin-bottom: 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.toc ul { display: grid; gap: 8px; }
.toc ul li { padding-left: 0; margin: 0; }
.toc ul li::before { content: none; }
.toc a { color: var(--gray-dark); font-weight: 500; border: none; }
.toc a:hover { color: var(--orange); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.6rem; border-radius: 12px; border: 1px solid var(--border); }
.article-body table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
.article-body th, .article-body td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.article-body thead th { background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; }
.article-body tbody tr:nth-child(even) { background: var(--gray-light); }
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body td strong { color: var(--orange); }

/* ---------- Callouts / key-fact / mythbusting ---------- */
.callout { padding: 18px 20px; border-radius: 10px; margin: 0 0 1.6rem; display: flex; gap: 14px; align-items: flex-start; }
.callout .ico { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.callout p:last-child { margin-bottom: 0; }
.callout-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.callout-warn { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; }
.callout-ok { background: #ECFDF5; border: 1px solid #86EFAC; color: #065F46; }
.key-fact { text-align: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 26px 20px; margin: 0 0 1.6rem; }
.key-fact .big { font-size: 2.4rem; font-weight: 800; color: var(--orange); line-height: 1; margin-bottom: 6px; }
.key-fact .cap { color: #A0AEC0; font-size: .95rem; }

/* myth → fact cards (used by риски / restriction articles) */
.myth-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 1.6rem; }
.myth-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.myth-card .myth { background: #FEF2F2; color: #991B1B; padding: 14px 16px; font-weight: 600; }
.myth-card .fact { background: #fff; padding: 14px 16px; }
.myth-card .fact::before { content: '✓ '; color: var(--green); font-weight: 700; }

/* ---------- Inline CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 16px; padding: 32px 26px; margin: 2.2rem 0; text-align: center; }
.cta-band h3 { color: #fff; font-size: 1.3rem; margin-bottom: 10px; }
.cta-band p { color: #A0AEC0; margin-bottom: 20px; }

/* ---------- Stat cards ---------- */
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 1.6rem; }
.stat-box { background: var(--gray-light); border-radius: 12px; padding: 20px 16px; text-align: center; }
.stat-box .num { font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.stat-box .lbl { font-size: .82rem; color: var(--gray-text); }

/* ---------- Author / E-E-A-T card ---------- */
.author-card { display: flex; gap: 18px; align-items: flex-start; background: var(--gray-light); border-radius: 14px; padding: 22px; margin: 2.2rem 0 0; }
.author-photo { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,#E5E7EB,#CBD5E0); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #94A3B8; flex-shrink: 0; overflow: hidden; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-info .name { font-weight: 700; color: var(--navy); }
.author-score { display: inline-block; background: #FEF3C7; color: #92400E; padding: 3px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; margin: 4px 0; }
.author-info p { font-size: .9rem; color: var(--gray-text); margin: 4px 0 0; }
.updated { font-size: .82rem; color: var(--gray-text); margin-top: 8px; }

/* ---------- Sources ---------- */
.sources { margin: 2rem 0 0; padding: 18px 20px; background: var(--gray-light); border-radius: 12px; }
.sources strong { color: var(--navy); display: block; margin-bottom: 8px; }
.sources ul { font-size: .85rem; color: var(--gray-text); }
.sources li { padding-left: 18px; position: relative; margin-bottom: 6px; }
.sources li::before { content: '↗'; position: absolute; left: 0; color: var(--orange); }

/* ---------- FAQ (matches /index.html) ---------- */
.faq { padding: 50px 0; background: var(--white); border-top: 1px solid var(--border); }
.faq .container { max-width: var(--maxw-prose); }
.faq h2 { font-size: 1.6rem; font-weight: 700; color: var(--navy); margin-bottom: 1.2rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%; text-align: left; background: none; border: none; padding: 20px 0;
    font-size: 1.05rem; font-weight: 600; color: var(--navy); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--orange); transition: var(--transition); flex-shrink: 0; }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: var(--transition); color: var(--gray-text); }
.faq-item.active .faq-answer { max-height: 600px; padding-bottom: 20px; }

/* ---------- Related ---------- */
.related { padding: 50px 0; background: var(--gray-light); }
.related .container { max-width: var(--maxw-prose); }
.related h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.related-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; transition: var(--transition); }
.related-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); transform: translateY(-3px); }
.related-card h3 { font-size: 1.02rem; color: var(--navy); margin-bottom: 6px; }
.related-card p { font-size: .85rem; color: var(--gray-text); }

/* ---------- Final CTA band ---------- */
.lead-band { background: var(--navy); color: var(--white); padding: 55px 0; text-align: center; }
.lead-band .container { max-width: var(--maxw-prose); }
.lead-band h2 { font-size: 1.6rem; margin-bottom: 12px; }
.lead-band p { color: #A0AEC0; margin: 0 auto 24px; max-width: 540px; }

/* ---------- Footer (matches blog hub) ---------- */
.footer { background: #071222; color: var(--white); padding: 60px 0 30px; }
.footer .logo { color: #fff; }
.footer p { color: #A0AEC0; margin-top: 10px; font-size: 0.9rem; }
.footer a { color: #A0AEC0; }
.footer a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 25px; font-size: 0.85rem; color: #A0AEC0; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .article-hero { padding: 150px 0 60px; }
    .article-hero h1 { font-size: 2.6rem; }
    .menu-toggle { display: none; }
    .nav-menu { display: flex; position: static; width: auto; background: none; flex-direction: row; box-shadow: none; padding: 0; gap: 25px; }
    .header-btn { display: inline-flex; padding: 10px 20px; font-size: 0.9rem; }
    .article-body h2 { font-size: 1.85rem; }
    .stat-row { grid-template-columns: repeat(4, 1fr); }
    .myth-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Hub feed redesign ===== */
/* Цветной акцент карточки по хабу + выделение pillar */
.post-card { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--navy); border-radius: 12px; padding: 24px; transition: var(--transition); display: flex; flex-direction: column; }
.post-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); transform: translateY(-3px); }
.post-card[data-cat="bally"]       { border-top-color: #D97706; }
.post-card[data-cat="format"]      { border-top-color: #1E40AF; }
.post-card[data-cat="sravnenie"]   { border-top-color: #4338CA; }
.post-card[data-cat="podgotovka"]  { border-top-color: #059669; }
.post-card[data-cat="sdacha"]      { border-top-color: #DB2777; }
.post-card[data-cat="postuplenie"] { border-top-color: #7C3AED; }
.post-card[data-cat="riski"]       { border-top-color: #DC2626; }
.post-card .post-read::after { content: ''; }

/* Блок «Начните отсюда» — pillar-статьи крупными карточками */
.featured { padding: 38px 0 4px; }
.featured-head { margin-bottom: 22px; }
.featured-head h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 4px; }
.featured-head p { color: var(--gray-text); font-size: .95rem; }
.featured-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.featured-card {
    position: relative; background: var(--navy); color: #fff; border-radius: 14px; padding: 24px;
    overflow: hidden; display: flex; flex-direction: column; transition: var(--transition);
    background-image: linear-gradient(135deg, rgba(217,119,6,.20), rgba(10,25,47,0) 62%);
}
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -16px rgba(10,25,47,.65); }
.featured-card .fc-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #FBBF24; margin-bottom: 10px; }
.featured-card h3 { color: #fff; font-size: 1.16rem; line-height: 1.3; margin-bottom: 8px; }
.featured-card p { color: #A0AEC0; font-size: .9rem; flex-grow: 1; margin-bottom: 14px; }
.featured-card .fc-read { color: #fff; font-weight: 600; font-size: .88rem; }
.featured-card .fc-read::after { content: ' →'; color: var(--orange); }
@media (min-width: 768px) { .featured-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Hub: hero, рубрикатор, лента (перенос из старой inline-версии) ===== */
.blog-hero { background: var(--navy); color: var(--white); padding: 120px 0 50px; text-align: center; }
.blog-hero h1 { font-size: 1.9rem; }
.blog-hero p { color: #A0AEC0; max-width: 640px; margin: 6px auto 0; font-size: 1.05rem; }
.blog-hero .breadcrumb { justify-content: center; }
.blog-hero .rating-block { justify-content: center; margin-top: 14px; }
.rubricator { background: var(--gray-light); padding: 16px 0; border-bottom: 1px solid var(--border); position: sticky; top: 70px; z-index: 900; }
.chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: 8px 16px; white-space: nowrap; border: 1px solid var(--border); background: var(--white); border-radius: 30px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--gray-text); transition: var(--transition); }
.chip.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.feed { padding: 40px 0 50px; }
.feed-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.post-cat { display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 10px; border-radius: 20px; margin-bottom: 14px; }
.cat-bally { background: #FEF3C7; color: #92400E; }
.cat-format { background: #DBEAFE; color: #1E40AF; }
.cat-sravnenie { background: #E0E7FF; color: #3730A3; }
.cat-podgotovka { background: #D1FAE5; color: #065F46; }
.cat-sdacha { background: #FCE7F3; color: #9D174D; }
.cat-postuplenie { background: #F3E8FF; color: #6B21A8; }
.cat-riski { background: #FEE2E2; color: #991B1B; }
.post-card h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 10px; font-weight: 700; }
.post-card p { font-size: 0.9rem; color: var(--gray-text); margin-bottom: 16px; flex-grow: 1; }
.post-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--gray-text); border-top: 1px solid #F0F0F0; padding-top: 14px; }
.post-read { color: var(--orange); font-weight: 600; }
.pillar-badge { display: inline-block; font-size: 0.6rem; background: var(--navy); color: #fff; padding: 2px 7px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }

/* ===== Футер как на главной (сеточный, не центрованный) ===== */
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; margin-bottom: 36px; text-align: left; }
.footer-title { color: var(--orange); margin-bottom: 16px; font-size: 1.2rem; }
.footer-links { display: block; }
.footer-links li { margin-bottom: 10px; color: #A0AEC0; }
.footer-legal { font-size: 0.8rem; line-height: 1.7; color: #A0AEC0; }
.footer-bottom { text-align: center; }

@media (min-width: 768px) {
  .blog-hero { padding: 150px 0 60px; }
  .blog-hero h1 { font-size: 2.6rem; }
  .feed-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1.3fr; }
}
