@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* ======================================================
   spectonova_tutorial_shared.css
   Wspólne style dla wszystkich podstron dokumentacji
   ====================================================== */

:root {
    --bg:           #f5f8fc;
    --bg-soft:      #fbfdff;
    --panel:        #ffffff;
    --panel2:       #eef3fa;
    --panel3:       #ffffff;
    --accent:       #007acc;
    --accent-hover: #0062a3;
    --accent2:      #2b9fdb;
    --accent2-dim:  rgba(0, 122, 204, 0.10);
    --text:         #1a2333;
    --text-dim:     #5f6f86;
    --border:       rgba(26, 35, 51, 0.08);
    --border2:      rgba(0, 122, 204, 0.18);
    --green:        #1fb982;
    --orange:       #ff9d47;
    --shadow:       0 18px 44px rgba(26, 60, 110, 0.10);
    --shadow-soft:  0 8px 22px rgba(26, 60, 110, 0.07);
    --app-bg:       #ffffff;
    --app-panel:    #ffffff;
    --sidebar-w:    270px;
}

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

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: #f7f9fc;
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    z-index: -1;
    pointer-events: none;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    right: -120px;
    top: 160px;
    background: radial-gradient(circle, rgba(43, 159, 219, 0.10), transparent 70%);
    animation: floatBlob 14s ease-in-out infinite;
}
body::after {
    left: -140px;
    right: auto;
    bottom: 80px;
    top: auto;
    animation-delay: -7s;
}

@keyframes floatBlob {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, 14px, 0) scale(1.05); }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    from { transform: translateX(-120%) skewX(-18deg); }
    to { transform: translateX(220%) skewX(-18deg); }
}

@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 122, 204, 0.14); }
    50% { box-shadow: 0 0 0 14px rgba(0, 122, 204, 0); }
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ========== GLOBAL HEADER ========== */
.g-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0;
    height: 56px;
    padding: 0 28px;
    box-shadow: none;
}

.g-header .logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.g-header .logo-area:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.g-header .logo-area svg { width: 30px; height: 30px; }

.g-header .logo-area .logo-mark {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.g-header .divider {
    width: 1px;
    height: 22px;
    background: var(--border2);
    margin: 0 18px;
    flex-shrink: 0;
}

.g-header .site-title {
    font-size: 0.86rem;
    color: var(--text-dim);
    font-weight: 500;
}

.g-header nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.g-header nav a {
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: color 0.15s, background 0.15s, transform 0.15s;
}

.g-header nav a:hover {
    color: var(--accent);
    background: rgba(0, 122, 204, 0.08);
    transform: translateY(-1px);
}

.g-header nav a.active {
    color: var(--accent);
    background: rgba(0, 122, 204, 0.10);
    box-shadow: inset 0 0 0 1px rgba(0, 122, 204, 0.12);
}

/* ========== SUBPAGE LAYOUT ========== */
.doc-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* ---- Sidebar ---- */
.doc-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.82);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 58px;
    height: calc(100vh - 58px);
    overflow-y: auto;
    padding: 24px 0 40px;
}

.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.sidebar-back {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 16px 20px;
    padding: 7px 12px;
    border-radius: 6px;
    background: var(--panel);
    text-decoration: none;
    font-size: 0.82rem;
    color: var(--text-dim);
    transition: color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.sidebar-back:hover {
    color: var(--accent);
    background: rgba(0, 122, 204, 0.08);
    transform: translateX(2px);
    box-shadow: var(--shadow-soft);
}

.sidebar-section-label {
    padding: 14px 20px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    text-decoration: none;
    font-size: 0.83rem;
    color: var(--text-dim);
    border-left: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.15s;
    line-height: 1.3;
}
.sidebar-nav a:hover { color: var(--accent); background: rgba(0, 122, 204, 0.06); transform: translateX(2px); }
.sidebar-nav--toc a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(0, 122, 204, 0.10); }
.sidebar-nav--more a.active { color: inherit; border-left-color: transparent; background: transparent; }
.sidebar-nav a .sn-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--border2); flex-shrink: 0; margin-left: 2px;
}
.sidebar-nav--toc a.active .sn-dot { background: var(--accent2); }

/* ---- Main content ---- */
.doc-main {
    flex: 1;
    min-width: 0;
    padding: 36px 56px 80px;
    max-width: 860px;
    animation: fadeUp 0.7s ease both;
}

@media (max-width: 900px) {
    .doc-main { padding: 24px 24px 96px; }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 22px;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent2); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text); }

/* ---- Article header ---- */
.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.badge-start { background: rgba(0, 122, 204, 0.12); color: var(--accent); }
.badge-adv    { background: rgba(240,164,80,0.15);  color: var(--orange); }
.badge-ref    { background: rgba(0,122,204,0.15);   color: var(--accent2); }

.article-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 8px;
}

.article-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.article-meta span { display: flex; align-items: center; gap: 4px; }

/* ---- Step card ---- */
.step-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.7s ease both;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.step-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(0, 122, 204, 0.85), rgba(59, 163, 217, 0.18));
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(0, 122, 204, 0.24);
}

.step-card:nth-of-type(1) { animation-delay: 0.08s; }
.step-card:nth-of-type(2) { animation-delay: 0.15s; }
.step-card:nth-of-type(3) { animation-delay: 0.22s; }
.step-card:nth-of-type(4) { animation-delay: 0.29s; }
.step-card:nth-of-type(5) { animation-delay: 0.36s; }

.step-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.step-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(0, 122, 204, 0.24);
    animation: softPulse 3.4s ease-in-out infinite;
}

.step-card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
}

.step-card p { color: var(--text); margin-bottom: 10px; }
.step-card p:last-child { margin-bottom: 0; }

.step-card ul {
    list-style: none;
    margin: 10px 0;
}
.step-card ul li {
    padding: 4px 0;
    color: var(--text);
    padding-left: 16px;
    position: relative;
}
.step-card ul li::before {
    content: '▸';
    color: var(--accent2);
    position: absolute;
    left: 0;
    font-size: 0.75em;
    top: 7px;
}

/* ---- Photo placeholder ---- */
.photo-ph {
    border: 1px solid rgba(0, 122, 204, 0.16);
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 243, 255, 0.85)),
        var(--panel2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    margin: 18px 0;
    gap: 10px;
    color: var(--text-dim);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), var(--shadow-soft);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.photo-ph::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.65) 48%, transparent 100%);
    animation: shimmer 6s linear infinite;
}

.photo-ph::after {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px dashed rgba(59, 163, 217, 0.24);
    border-radius: 18px;
    pointer-events: none;
}

.photo-ph:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow);
    border-color: rgba(0, 122, 204, 0.28);
}

.photo-ph svg {
    opacity: 0.55;
    animation: floatIcon 3.6s ease-in-out infinite;
}

.photo-ph img {
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(24, 27, 38, 0.16);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.photo-ph:hover img {
    transform: scale(1.03);
    filter: saturate(1.06);
}

/* Real image inside photo-ph – remove decorative overlays */
.photo-ph:has(img) {
    padding: 0;
    min-height: 0;
    background: none;
    border: none;
    box-shadow: 0 18px 36px rgba(24, 27, 38, 0.14);
}
.photo-ph:has(img)::before,
.photo-ph:has(img)::after {
    display: none;
}

/* Hub hero decorative image */

.photo-ph .ph-label { font-size: 0.9rem; font-weight: 600; }
.photo-ph .ph-sub { font-size: 0.75rem; opacity: 0.6; }
.photo-ph-caption {
    font-size: 0.76rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: -10px;
    margin-bottom: 18px;
    font-style: italic;
}

/* ---- Callout ---- */
.callout {
    border-radius: 18px;
    padding: 14px 18px;
    margin: 20px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: var(--shadow-soft);
}
.callout-info  { background: rgba(0, 122, 204, 0.08);    border-left: 4px solid var(--accent); }
.callout-tip   { background: rgba(31, 185, 130, 0.10);    border-left: 4px solid var(--green); }
.callout-warn  { background: rgba(255, 157, 71, 0.12);    border-left: 4px solid var(--orange); }
.callout strong { color: var(--accent2); }
.callout-tip strong { color: var(--green); }
.callout-warn strong { color: var(--orange); }

/* ---- Separator ---- */
.sep-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 122, 204, 0.20) 18%, rgba(0, 122, 204, 0.10) 82%, transparent 100%);
    margin: 32px 0;
}

/* ---- Prev/Next nav ---- */
.prevnext {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.prevnext a {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    max-width: 48%;
    box-shadow: var(--shadow-soft);
}
.prevnext a:hover {
    border-color: rgba(0, 122, 204, 0.24);
    background: rgba(255, 255, 255, 0.96);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.prevnext a.next { text-align: right; margin-left: auto; }
.prevnext .pn-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; }
.prevnext .pn-title { font-size: 0.92rem; color: var(--accent2); font-weight: 600; }

/* ---- Global footer ---- */
.g-footer {
    border-top: 1px solid var(--border);
    padding: 20px 28px 28px;
    font-size: 0.84rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.7);
}

/* ========== HUB PAGE SPECIFIC ========== */
.hub-hero {
    background:
        radial-gradient(circle at 15% 18%, rgba(59, 163, 217, 0.26), transparent 26%),
        radial-gradient(circle at 82% 20%, rgba(0, 122, 204, 0.14), transparent 26%),
        linear-gradient(145deg, #fafdff 0%, #edf5ff 52%, #e7f1ff 100%);
    border-bottom: 1px solid var(--border);
    padding: 60px 40px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hub-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.hub-brand img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    
}

.hub-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    animation: fadeUp 0.75s ease both;
}

.hub-hero h1 span { color: var(--accent2); }

.hub-hero p {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
    animation: fadeUp 0.75s ease 0.08s both;
}

.hub-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 52px 40px 80px;
}

.hub-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.hub-section-title.big {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.hub-subtitle { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 28px; }

/* ---- All tutorials grid ---- */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.tut-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 22px;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-soft);
    animation: fadeUp 0.75s ease both;
}
.tut-card:hover {
    border-color: rgba(0, 122, 204, 0.24);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.tut-card:nth-child(1) { animation-delay: 0.12s; }
.tut-card:nth-child(2) { animation-delay: 0.16s; }
.tut-card:nth-child(3) { animation-delay: 0.20s; }
.tut-card:nth-child(4) { animation-delay: 0.24s; }
.tut-card:nth-child(5) { animation-delay: 0.28s; }
.tut-card:nth-child(6) { animation-delay: 0.32s; }
.tut-card:nth-child(7) { animation-delay: 0.36s; }
.tut-card:nth-child(8) { animation-delay: 0.40s; }

.tut-card .tc-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.12), rgba(59, 163, 217, 0.22));
    border: 1px solid var(--border2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.tut-card .tc-icon svg { animation: floatIcon 4.8s ease-in-out infinite; }
.tut-card .tc-body { flex: 1; min-width: 0; }
.tut-card h4 { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tut-card p  { font-size: 0.78rem; color: var(--text-dim); line-height: 1.45; }
.tut-card .tc-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 8px; display: flex; gap: 12px; }
.tut-card .tc-meta span { display: flex; align-items: center; gap: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* Mobile TOC drawer */
.doc-toc-toggle {
    display: none;
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 120;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.doc-toc-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.doc-toc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 130;
}
.doc-toc-drawer {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78vh, 640px);
    overflow: auto;
    z-index: 140;
    background: var(--panel);
    border-radius: 18px 18px 0 0;
    padding: 18px 18px 28px;
    box-shadow: var(--shadow);
}
.doc-toc-drawer h2 {
    font-size: 0.95rem;
    margin: 0 0 10px;
}
.doc-toc-drawer h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin: 16px 0 8px;
}
.doc-toc-drawer a {
    display: block;
    padding: 12px 4px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.doc-toc-drawer a:last-child { border-bottom: 0; }
body.toc-open { overflow: hidden; }
body.toc-open .doc-toc-backdrop { display: block; }
body.toc-open .doc-toc-drawer { display: block; }

@media (max-width: 900px) {
    .doc-sidebar { display: none !important; }
    .doc-toc-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .doc-main { padding: 24px 24px 96px; }
}

.doc-toc-drawer a.active { color: var(--accent); }
.doc-toc-drawer h3 + a.active,
.doc-toc-drawer a.active { font-weight: 700; }

.faq-acc-q:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}
