/* =====================================================
   Job Maker — новости компании на главной странице
   ===================================================== */
.jn-root { --jn-accent: #007aff; --jn-text: #1c1c1e; --jn-muted: #6e6e73; --jn-line: rgba(60,60,67,.12); --jn-glass: rgba(255,255,255,.78);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--jn-text); -webkit-font-smoothing: antialiased; }
.jn-root *, .jn-root *::before, .jn-root *::after { box-sizing: border-box; }
.jn-root button:focus:not(:focus-visible) { outline: none; }
.jn-root button:focus-visible { outline: 2px solid var(--jn-accent); outline-offset: 2px; }

/* ---------- кнопка ---------- */
.jn-fab { position: fixed; left: 24px; bottom: 24px; z-index: 2500; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 8px;
    border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: var(--jn-glass); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 14px 40px -10px rgba(20,20,40,.28), inset 0 1px 0 rgba(255,255,255,.8); cursor: pointer; font: 600 14.5px/1 inherit; color: var(--jn-text);
    transform: translateY(120px); opacity: 0; transition: transform .6s cubic-bezier(.22,1,.36,1), opacity .4s, box-shadow .3s; }
.jn-root.ready .jn-fab { transform: none; opacity: 1; }
.jn-fab:hover { box-shadow: 0 18px 50px -10px rgba(20,20,40,.34), inset 0 1px 0 rgba(255,255,255,.8); }
.jn-fab:active { transform: scale(.96); }
.jn-fab .jn-ic { position: relative; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px;
    background: linear-gradient(145deg, #3d9bff, #0062d6); box-shadow: 0 6px 16px -4px rgba(0,122,255,.6); }
.jn-fab .jn-badge { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff3b30; color: #fff;
    font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.jn-fab .jn-badge[hidden] { display: none; }
.jn-fab.has-new .jn-ic::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(0,122,255,.5); animation: jnRing 2.4s ease-out infinite; }
@keyframes jnRing { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- всплывающая карточка ---------- */
.jn-toast { position: fixed; left: 24px; bottom: 96px; z-index: 2501; width: 380px; max-width: calc(100vw - 32px); padding: 2px; border-radius: 26px; cursor: pointer;
    background: conic-gradient(from var(--jn-ang, 0deg), #007aff, #5ac8fa, #af52de, #ff2d55, #ff9500, #007aff);
    box-shadow: 0 30px 70px -18px rgba(0,60,160,.55), 0 0 0 1px rgba(255,255,255,.4), 0 0 40px -6px rgba(0,122,255,.45);
    transform-origin: 0 100%; transform: translate(-30px, 40px) scale(.82) rotate(-3deg); opacity: 0; pointer-events: none;
    transition: transform .7s cubic-bezier(.2,1.4,.35,1), opacity .35s; animation: jnSpin 4s linear infinite; }
@property --jn-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes jnSpin { to { --jn-ang: 360deg; } }
.jn-toast.show { transform: none; opacity: 1; pointer-events: auto; animation: jnSpin 4s linear infinite, jnNudge 7s ease-in-out 3s infinite; }
@keyframes jnNudge { 0%, 88%, 100% { transform: none; } 91% { transform: translateY(-6px) rotate(-1.2deg); } 94% { transform: translateY(0) rotate(1deg); } 97% { transform: translateY(-3px) rotate(-.5deg); } }
.jn-toast:hover { transform: translateY(-4px); }
.jn-toast .jn-tin { position: relative; overflow: hidden; border-radius: 24px; background: #fff; display: flex; flex-direction: column; }
.jn-toast .jn-th { position: relative; height: 150px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 42px;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6 55%, #bf5af2); }
.jn-toast .jn-th.noimg { height: 96px; }
.jn-toast .jn-th img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 6s ease-out; }
.jn-toast.show .jn-th img { transform: scale(1); }
.jn-toast .jn-th::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 45%); pointer-events: none; }
.jn-toast .jn-th::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; z-index: 1; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); animation: jnShine 3.5s ease-in-out 1s infinite; }
@keyframes jnShine { 0% { left: -60%; } 40%, 100% { left: 130%; } }
.jn-toast .jn-tb { padding: 14px 16px 16px; min-width: 0; }
.jn-toast .jn-lbl { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px;
    background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; box-shadow: 0 6px 18px -4px rgba(255,59,48,.7); }
.jn-toast .jn-lbl i { font-size: 11px; animation: jnShake 1.6s ease-in-out infinite; transform-origin: 60% 50%; }
@keyframes jnShake { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-6deg); } }
.jn-toast .jn-tt { font-family: 'Playfair Display', Georgia, serif; font-size: 19px; font-weight: 700; line-height: 1.22; color: var(--jn-text);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jn-toast .jn-tx { font-size: 13.5px; line-height: 1.45; color: var(--jn-muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jn-toast .jn-tx:empty { display: none; }
.jn-toast .jn-tf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.jn-toast .jn-tm { font-size: 12.5px; color: var(--jn-muted); }
.jn-toast .jn-go { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: linear-gradient(135deg, #0a84ff, #0062d6); color: #fff;
    font-size: 13.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(0,122,255,.7); transition: transform .2s; }
.jn-toast .jn-go i { font-size: 12px; transition: transform .25s; }
.jn-toast:hover .jn-go i { transform: translateX(3px); }
.jn-toast .jn-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.jn-toast .jn-x:hover { background: rgba(0,0,0,.65); }
.jn-fab.jn-bump { animation: jnBump .8s cubic-bezier(.3,1.6,.4,1); }
@keyframes jnBump { 0% { transform: scale(1); } 30% { transform: scale(1.18); } 60% { transform: scale(.94); } 100% { transform: scale(1); } }

/* ---------- панель новостей ---------- */
.jn-overlay { position: fixed; inset: 0; z-index: 2600; background: rgba(15,15,25,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none; transition: opacity .35s; }
.jn-root.open .jn-overlay { opacity: 1; pointer-events: auto; }
.jn-panel { position: fixed; z-index: 2601; left: 16px; top: 16px; bottom: 16px; width: 440px; max-width: calc(100vw - 32px); display: flex; flex-direction: column;
    border-radius: 30px; background: rgba(248,248,251,.92); backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.8); box-shadow: 0 40px 100px -20px rgba(10,10,30,.45); overflow: hidden;
    transform: translateX(calc(-100% - 40px)); transition: transform .55s cubic-bezier(.22,1,.36,1); }
.jn-root.open .jn-panel { transform: none; }
.jn-grab { display: none; }
.jn-head { display: flex; align-items: center; gap: 12px; padding: 22px 22px 14px; flex-shrink: 0; }
.jn-head .jn-back { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(118,118,128,.12); color: var(--jn-text); cursor: pointer; font-size: 14px; display: none; flex-shrink: 0; }
.jn-root.article .jn-head .jn-back { display: flex; align-items: center; justify-content: center; }
.jn-head .jn-ht { flex: 1; min-width: 0; }
.jn-head h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.jn-head p { font-size: 13px; color: var(--jn-muted); margin: 3px 0 0; }
.jn-head .jn-close { width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(118,118,128,.12); color: var(--jn-text); cursor: pointer; font-size: 15px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; }
.jn-head .jn-close:hover, .jn-head .jn-back:hover { background: rgba(118,118,128,.22); }
.jn-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px 22px; -webkit-overflow-scrolling: touch; }
.jn-list { display: flex; flex-direction: column; gap: 12px; }
.jn-card { position: relative; display: block; width: 100%; text-align: left; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: #fff; padding: 0; cursor: pointer;
    overflow: hidden; box-shadow: 0 2px 10px rgba(20,20,40,.05); font: inherit; color: inherit; transition: transform .25s, box-shadow .25s;
    animation: jnIn .5s cubic-bezier(.22,1,.36,1) both; }
.jn-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(20,20,40,.18); }
.jn-card .jn-cimg { aspect-ratio: 16 / 9; background: linear-gradient(145deg, #e8eefc, #d6e4ff); overflow: hidden; }
.jn-card .jn-cimg img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.jn-card:hover .jn-cimg img { transform: scale(1.04); }
.jn-card .jn-cb { padding: 14px 16px 16px; }
.jn-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--jn-muted); }
.jn-new { padding: 2px 8px; border-radius: 8px; background: #ff3b30; color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.jn-pin { color: var(--jn-accent); }
.jn-card h4 { font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 700; line-height: 1.25; margin: 6px 0 0; letter-spacing: -.01em; }
.jn-card p { font-size: 13.5px; color: #48484a; line-height: 1.5; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.jn-card.noimg { padding-top: 2px; }
.jn-card.noimg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #3d9bff, #0062d6); }
.jn-empty { text-align: center; padding: 60px 20px; color: var(--jn-muted); }
.jn-empty i { font-size: 36px; opacity: .4; display: block; margin-bottom: 12px; }
@keyframes jnIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- статья ---------- */
.jn-art { animation: jnIn .45s cubic-bezier(.22,1,.36,1) both; }
.jn-art .jn-aimg { margin: 0 0 16px; border-radius: 22px; overflow: hidden; background: #e8eefc; }
.jn-art .jn-aimg img { width: 100%; display: block; max-height: 60vh; object-fit: cover; }
.jn-art h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; font-weight: 800; line-height: 1.18; letter-spacing: -.02em; margin: 8px 0 14px; }
.jn-art .jn-text { font-size: 15.5px; line-height: 1.7; color: #2c2c2e; }
.jn-art .jn-text p { margin: 0 0 12px; }
.jn-art .jn-text a { color: var(--jn-accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.jn-art .jn-share { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; height: 42px; padding: 0 18px; border-radius: 999px; border: none; cursor: pointer;
    background: var(--jn-text); color: #fff; font: 600 14px inherit; }
.jn-art .jn-share.done { background: #34c759; }
[dir="rtl"] .jn-art .jn-text, [dir="rtl"] .jn-card .jn-cb { text-align: right; }

/* ---------- телефон ---------- */
@media (max-width: 640px) {
    .jn-fab { left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 52px; padding: 0 6px; width: 52px; justify-content: center; }
    .jn-fab .jn-lab { display: none; }
    .jn-fab .jn-ic { width: 40px; height: 40px; }
    .jn-toast { left: 12px; right: 12px; width: auto; max-width: none; bottom: calc(78px + env(safe-area-inset-bottom)); transform: translateY(60px) scale(.9); transform-origin: 50% 100%; }
    .jn-toast .jn-th { height: 130px; }
    .jn-toast .jn-tt { font-size: 18px; }
    .jn-panel { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; height: 92vh; height: 92dvh; border-radius: 28px 28px 0 0; border-bottom: none;
        transform: translateY(105%); transition: transform .5s cubic-bezier(.22,1,.36,1); }
    .jn-root.dragging .jn-panel { transition: none; }
    .jn-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(60,60,67,.25); margin: 10px auto 0; flex-shrink: 0; }
    .jn-head { padding: 12px 16px 12px; }
    .jn-head h3 { font-size: 22px; }
    .jn-body { padding: 2px 14px calc(22px + env(safe-area-inset-bottom)); }
    .jn-art h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .jn-fab, .jn-toast, .jn-panel, .jn-card, .jn-art { transition: none !important; animation: none !important; }
}
