/**
 * page.css - Stylizacja dla monografii naukowej DBT Online
 */

#hero,
#spis-tresci,
#sec-00,
#sec-01,
#sec-02,
#sec-03,
#sec-04,
#sec-05,
#sec-06,
#sec-07,
#sec-08,
#sec-dowody,
#podsumowanie,
#wizualizacja,
#wizualizacja-naukowa,
#metafora,
#metafora-koncepcyjna,
#faq {
    scroll-margin-top: 90px;
}

.dbt-online-container {
    max-width: 1000px;
    margin: 0 auto;
}

.monograph-hero-modern {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
    gap: 2.5rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.monograph-hero-badge-row {
    grid-column: 1 / -1;
}

.monograph-hero-title,
.monograph-hero-subtitle,
.monograph-hero-lead,
.clinical-badge-row,
.monograph-hero-actions {
    grid-column: 1;
}

.monograph-hero-title {
    grid-row: 2;
}

.hero-modern-image-side {
    grid-column: 2;
    grid-row: 2 / span 5;
    align-self: center;
}

.monograph-hero-figure,
.article-monograph-figure {
    width: min(100%, 760px);
    margin: 2rem auto;
}

.monograph-figure-img {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 0 auto;
}

.hero-modern-image-side {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 2rem auto;
}

.hero-modern-image-side .hero-modern-image-wrapper {
    width: 100%;
    margin: 0;
}

.hero-modern-image-side .hero-modern-image-wrapper img {
    width: 100%;
    max-width: none;
}

.hero-modern-badge {
    position: absolute;
    bottom: -15px;
    left: -15px;
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    z-index: 10;
    border: 0;
    min-width: 0;
}

/* Hero korzysta z kanonicznego layoutu /dbt-rodzaje/. */
.hero-modern-image-side {
    max-width: none;
    margin: 0;
}

.hero-modern-image-side .hero-modern-image-wrapper {
    width: 100%;
    margin: 0;
}

.hero-modern-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.4rem;
    border: 1px solid rgba(148, 118, 0, 0.15);
    border-radius: 16px;
    min-width: 160px;
}

@media (max-width: 800px) {
    .monograph-hero-modern {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 1rem 3rem;
    }

    .monograph-hero-badge-row,
    .monograph-hero-title,
    .monograph-hero-subtitle,
    .monograph-hero-lead,
    .clinical-badge-row,
    .monograph-hero-actions,
    .hero-modern-image-side {
        grid-column: 1;
        grid-row: auto;
    }
}

.clinical-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 20px;
}

.clinical-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--surface-secondary, #f1f5f9);
    color: var(--text-secondary, #475569);
    border: 1px solid var(--border-subtle, #e2e8f0);
}

.clinical-tag.tag-full {
    background: rgba(30, 64, 175, 0.08);
    color: #1e40af;
    border-color: rgba(30, 64, 175, 0.2);
}

.clinical-tag.tag-skills {
    background: rgba(13, 148, 136, 0.08);
    color: #0f766e;
    border-color: rgba(13, 148, 136, 0.2);
}

.clinical-tag.tag-safety {
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.2);
}

.scoping-evidence-table-wrapper {
    overflow-x: auto;
    margin: 20px 0 28px;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.scoping-evidence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
}

.scoping-evidence-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.scoping-evidence-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: top;
}

.scoping-evidence-table tr:hover td {
    background: #fcfdfe;
}

.evidence-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.pill-pilot {
    background: #fef3c7;
    color: #92400e;
}

.pill-rct {
    background: #dbeafe;
    color: #1e40af;
}

.pill-protocol {
    background: #f1f5f9;
    color: #475569;
}

.pill-review {
    background: #ccfbf1;
    color: #115e59;
}

.clinical-alert-box {
    margin: 20px 0;
    padding: 18px 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.clinical-alert-box.alert-safety {
    border-left-color: #ef4444;
    background: #fff5f5;
}

.clinical-alert-box.alert-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.clinical-alert-title {
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 4-column contextual knowledge grid */
.context-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.context-matrix-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.context-matrix-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.context-matrix-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.context-matrix-list li {
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.context-matrix-list li a {
    color: #0284c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.context-matrix-list li a:hover {
    text-decoration: underline;
    color: #0369a1;
}

/* --- MONOGRAPH CHAPTER LINKS & SUBPAGE CARDS --- */
.chapter-subpage-link {
    margin: 12px 0 20px 0;
}

.link-subpage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0369a1;
    text-decoration: none;
    padding: 8px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.link-subpage-btn:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.monograph-chapters-index {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 28px;
    margin: 32px 0;
}

.chapters-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.chapter-nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.chapter-nav-card:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
    transform: translateY(-2px);
}

.chapter-card-num {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #0284c7;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.chapter-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 8px;
}

.chapter-card-desc {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 12px;
    flex-grow: 1;
}

.chapter-card-cta {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
