/* ═══════════════════════════════════════════════════════
   HOME.CSS — стили главной страницы РебусПлейс
   ═══════════════════════════════════════════════════════ */

/* ── HERO ─────────────────────────────────────────────── */
.hero {
    padding: 80px 40px 60px;
    max-width: 1200px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px; align-items: center;
}
.hero-label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212,124,15,0.1);
    border: 1px solid rgba(212,124,15,0.2);
    color: var(--accent); padding: 6px 14px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 24px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 3rem; font-weight: 900;
    line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 20px;
}
.hero h1 .highlight { color: var(--accent); }
.hero-desc { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-mascot { display: flex; align-items: center; justify-content: center; }
.hero-mascot__img {
    width: 100%; max-width: 260px; display: block;
    filter: drop-shadow(0 12px 32px rgba(0,0,0,0.12));
    animation: float 4s ease-in-out infinite;
}
.hero-mascot__fallback { font-size: 7rem; line-height: 1; animation: float 4s ease-in-out infinite; }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ── STATS BAR ────────────────────────────────────────── */
.stats-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 40px; box-shadow: 0 2px 8px var(--shadow);
}
.stats-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; gap: 60px; justify-content: center; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* ── AUTHOR ───────────────────────────────────────────── */
.author-section { max-width: 1200px; margin: 0 auto; padding: 50px 40px; }
.author-inner {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; padding: 40px;
    display: grid; grid-template-columns: 200px 1fr;
    gap: 40px; align-items: start;
    box-shadow: 0 2px 8px var(--shadow);
}
.author-photo-col { text-align: center; }
.author-photo-wrap { position: relative; display: inline-block; margin-bottom: 14px; }
.author-photo {
    width: 160px; height: 160px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--border);
    display: block; margin: 0 auto;
}
.author-photo-fallback {
    width: 160px; height: 160px; border-radius: 50%;
    background: rgba(212,124,15,0.08); border: 3px solid rgba(212,124,15,0.2);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto; font-size: 3rem;
}
.author-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.author-aka { font-size: 0.78rem; color: var(--muted); }
.author-kicker {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.author-kicker::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.author-letter {
    font-size: 0.97rem; line-height: 1.8; color: var(--text);
    border-left: 3px solid rgba(212,124,15,0.3);
    padding-left: 20px; margin-bottom: 20px;
}
.author-letter p { margin: 0 0 14px; }
.author-letter p:last-child { margin: 0; }
.author-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent); font-size: 0.88rem; font-weight: 600;
    text-decoration: none; border-bottom: 1.5px solid rgba(212,124,15,0.3);
    padding-bottom: 2px; transition: border-color 0.2s, gap 0.2s;
}
.author-link:hover { border-color: var(--accent); gap: 10px; }

/* ── LESSONS BANNER ───────────────────────────────────── */
.lessons-section { padding: 0 40px 50px; max-width: 1200px; margin: 0 auto; }
.lessons-inner {
    background: linear-gradient(135deg, rgba(212,124,15,0.08) 0%, rgba(212,124,15,0.03) 100%);
    border: 1.5px solid rgba(212,124,15,0.25);
    border-radius: 20px;
    padding: 36px 40px 0;
    display: grid; grid-template-columns: 1fr auto;
    gap: 32px; align-items: end;
    position: relative; overflow: hidden;
    min-height: 260px;
}
.lessons-inner::before {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 180px; height: 180px; background: rgba(212,124,15,0.06); border-radius: 50%;
}
.lessons-content { padding-bottom: 36px; }
.lessons-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(212,124,15,0.12); color: var(--accent);
    padding: 4px 12px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.lessons-title {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 900;
    letter-spacing: -0.02em; color: var(--text); margin-bottom: 10px; line-height: 1.2;
}
.lessons-title span { color: var(--accent); }
.lessons-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; margin-bottom: 20px; max-width: 500px; }
.lessons-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.lessons-list li a {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text); font-size: 0.88rem; text-decoration: none; transition: color 0.15s, gap 0.15s;
}
.lessons-list li a::before { content: '→'; color: var(--accent); font-weight: 700; }
.lessons-list li a:hover { color: var(--accent); gap: 12px; }
.lessons-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff;
    padding: 12px 24px; border-radius: 12px;
    font-size: 0.9rem; font-weight: 700; text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 16px rgba(212,124,15,0.35);
}
.lessons-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.lessons-raccoon {
    align-self: flex-end;
    flex-shrink: 0;
    position: relative; z-index: 1;
    max-height: 240px;
    display: flex; align-items: flex-end;
}
.lessons-raccoon img {
    height: 240px; width: auto;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}
.lessons-deco {
    position: absolute; right: 200px; top: 16px;
    display: flex; flex-direction: column; gap: 4px;
    opacity: 0.07; pointer-events: none;
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 900;
    color: var(--accent); line-height: 1; text-align: right;
}

/* ── RATINGS ──────────────────────────────────────────── */
.section { max-width: 1200px; margin: 0 auto; padding: 50px 40px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.section-link { font-size: 0.85rem; color: var(--accent); text-decoration: none; font-weight: 600; }
.section-link:hover { text-decoration: underline; }
.rating-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.rating-block {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px var(--shadow);
}
.rating-header { padding: 14px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.85rem; background: var(--bg2); }
.rating-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background 0.15s;
}
.rating-item:hover { background: var(--bg2); }
.rating-item:last-child { border-bottom: none; }
.rating-item--me { background: rgba(212,124,15,0.05); }
.rating-pos { font-family: var(--font-display); font-size: 0.75rem; font-weight: 700; color: var(--muted); width: 24px; text-align: center; }
.rating-pos.gold { color: var(--accent); }
.rating-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--bg2);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; border: 1px solid var(--border); flex-shrink: 0;
}
.rating-name { flex: 1; font-size: 0.85rem; font-weight: 500; }
.rating-points { font-size: 0.8rem; font-weight: 700; color: var(--accent); }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
    .pz-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; padding: 40px 20px; gap: 24px; text-align: center; }
    .hero h1 { font-size: 2rem; }
    .hero-actions { justify-content: center; }
    .hero-mascot { order: -1; }
    .hero-mascot__img { max-width: 160px; }
    .stats-bar { padding: 20px; }
    .stats-inner { gap: 20px; }
    .section { padding: 32px 20px; }
    .rating-grid { grid-template-columns: 1fr; }
    .author-inner { grid-template-columns: 1fr; }
    .author-photo-col { display: flex; align-items: center; gap: 16px; text-align: left; }
    .author-section { padding: 32px 20px; }
    .lessons-section { padding: 0 20px 32px; }
    .lessons-inner { grid-template-columns: 1fr; min-height: unset; padding-bottom: 36px; }
    .lessons-raccoon { display: none; }
    .lessons-deco { display: none; }
    .pz-grid { grid-template-columns: 1fr !important; }
}
/* ── НОВОСТИ (карточки) ───────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.news-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
    text-decoration: none; color: var(--text);
    display: flex; flex-direction: column;
    transition: border-color .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 2px 8px var(--shadow);
}
.news-card:hover { border-color: var(--accent2); transform: translateY(-3px); box-shadow: 0 6px 20px var(--shadow); }
.news-card__img { height: 180px; overflow: hidden; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-card__img img { transform: scale(1.04); }
.news-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__date { font-size: 0.75rem; color: var(--muted); }
.news-card__title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.news-card__excerpt { font-size: 0.82rem; color: var(--text2); line-height: 1.5; }

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
}
/* День без нового ребуса: извинение */
.home-grace{max-width:1200px;margin:16px auto 0;padding:12px 16px;border:1.5px solid var(--accent);border-radius:14px;background:var(--surface);color:var(--fg);font-size:.92rem;line-height:1.45;box-sizing:border-box}
@media (max-width:1232px){.home-grace{margin-left:16px;margin-right:16px}}
