﻿/* ===================================================
   RM - Rezonans Magnetyczny Oczami Elektroradiologa
   Paleta: Głęboki indygo / Lawendowy akcent
   =================================================== */

:root {
    --primary: #283593;
    --primary-light: #3949ab;
    --primary-dark: #0d1b6b;
    --secondary: #7c4dff;
    --secondary-light: #9c6eff;
    --accent: #b388ff;
    --accent-light: #d4b8ff;
    --error: #b71c1c;
    --bg: #f0f0fc;
    --surface: #ffffff;
    --text: #1a1a3e;
    --text-light: #4a4a8a;
    --shadow: 0 2px 12px rgba(40,53,147,0.12);
    --shadow-lg: 0 8px 32px rgba(40,53,147,0.2);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}
[data-theme="dark"] {
    --bg: #06061a;
    --surface: #10102e;
    --text: #c8c8f0;
    --text-light: #5a5a9a;
    --shadow: 0 2px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { font-family: 'Roboto', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; }

.rm-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10,10,40,0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    padding: 0 20px; transition: var(--transition);
}
.rm-nav.scrolled { background: rgba(10,10,40,0.99); }
.nav-inner { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.nav-logo i { font-size: 1.4rem; color: #b388ff; }
.nav-links { display: flex; list-style: none; gap: 2px; align-items: center; flex-wrap: nowrap; }
.nav-links a { color: rgba(255,255,255,0.85); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 0.82rem; font-weight: 500; transition: var(--transition); white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.12); color: white; }
.nav-links a.active { border-bottom: 2px solid #b388ff; }
.nav-back { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; transition: var(--transition); white-space: nowrap; }
.nav-back:hover { background: rgba(255,255,255,0.1); color: white; }
.hamburger { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 8px; }

.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #0d1b6b 0%, #283593 40%, #7c4dff 100%);
    position: relative; overflow: hidden; text-align: center; padding: 100px 20px 60px;
}
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='60' cy='60' rx='55' ry='30' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='2' fill='none'/%3E%3Cellipse cx='60' cy='60' rx='40' ry='20' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='2' fill='none'/%3E%3C/svg%3E") repeat; }
.hero-content { position: relative; z-index: 1; max-width: 850px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; color: white; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { color: #b388ff; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: rgba(255,255,255,0.85); margin-bottom: 36px; max-width: 620px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero { padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1rem; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-hero.primary { background: white; color: var(--primary-dark); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.btn-hero.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,0,0,0.3); }
.btn-hero.secondary { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); }
.btn-hero.secondary:hover { border-color: white; background: rgba(255,255,255,0.1); }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 50px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 900; color: #b388ff; }
.hero-stat .label { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

.page-header { padding: 120px 20px 60px; text-align: center; position: relative; overflow: hidden; }
.page-header.indigo { background: linear-gradient(135deg, #0d1b6b 0%, #283593 50%, #3949ab 100%); color: white; }
.page-header.violet { background: linear-gradient(135deg, #283593 0%, #7c4dff 50%, #9c6eff 100%); color: white; }
.page-header.dark { background: linear-gradient(135deg, #060618 0%, #0d1b6b 50%, #283593 100%); color: white; }
.page-header.purple { background: linear-gradient(135deg, #4a148c 0%, #7b1fa2 50%, #9c4dcc 100%); color: white; }
.page-header::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='35' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1.5' fill='none'/%3E%3Ccircle cx='40' cy='40' r='20' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") repeat; }
.page-header .header-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; margin-bottom: 16px; }
.page-header h1 i { margin-right: 12px; opacity: 0.8; }
.page-header .lead { font-size: clamp(1rem, 2vw, 1.2rem); opacity: 0.85; max-width: 600px; margin: 0 auto; }

.breadcrumb { background: var(--surface); padding: 12px 20px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.breadcrumb .container { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.breadcrumb a { color: var(--secondary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-light); }
.breadcrumb i { font-size: 0.7rem; color: var(--text-light); }

.section-block { padding: 80px 20px; }
.section-block.alt { background: var(--surface); }
.section-block.gradient { background: linear-gradient(135deg, #ede7f6 0%, #f0f0fc 50%, #e8eaf6 100%); }
[data-theme="dark"] .section-block.gradient { background: linear-gradient(135deg, #06061a 0%, #10102e 50%, #0a0820 100%); }
.section-block.dark-section { background: linear-gradient(135deg, #0d1b6b 0%, #283593 50%, #7c4dff 100%); color: white; }
.container { max-width: 1200px; margin: 0 auto; }
.container-narrow { max-width: 900px; margin: 0 auto; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 12px; }
.section-title.center { text-align: center; }
.section-title i { margin-right: 10px; color: var(--secondary); }
.section-subtitle { color: var(--text-light); font-size: 1.05rem; margin-bottom: 40px; max-width: 600px; }
.section-subtitle.center { text-align: center; margin-left: auto; margin-right: auto; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; transition: var(--transition); border: 1px solid rgba(40,53,147,0.08); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px; color: white; }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }
.card ul { color: var(--text-light); font-size: 0.95rem; padding-left: 20px; margin-top: 8px; }
.card ul li { margin-bottom: 4px; }

.landing-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); border: 1px solid rgba(40,53,147,0.08); text-decoration: none; color: inherit; display: block; }
.landing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.landing-card .card-banner { height: 140px; display: flex; align-items: center; justify-content: center; color: white; font-size: 2.5rem; }
.landing-card .card-body { padding: 24px; }
.landing-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.landing-card p { color: var(--text-light); font-size: 0.92rem; }
.landing-card .card-footer { padding: 12px 24px; border-top: 1px solid rgba(40,53,147,0.07); display: flex; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--secondary); font-weight: 600; }
.landing-card.card-indigo .card-banner { background: linear-gradient(135deg, #060618, #0d1b6b); }
.landing-card.card-royal .card-banner { background: linear-gradient(135deg, #0d1b6b, #283593); }
.landing-card.card-periwinkle .card-banner { background: linear-gradient(135deg, #283593, #3949ab); }
.landing-card.card-lavender .card-banner { background: linear-gradient(135deg, #3949ab, #5c6bc0); }
.landing-card.card-violet .card-banner { background: linear-gradient(135deg, #4a148c, #7c4dff); }
.landing-card.card-red .card-banner { background: linear-gradient(135deg, #b71c1c, #d32f2f); }
.landing-card.card-teal .card-banner { background: linear-gradient(135deg, #006064, #00838f); }
.landing-card.card-green .card-banner { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
.landing-card.card-fusion .card-banner { background: linear-gradient(135deg, #283593, #0d1b6b); }
.landing-card.card-patient .card-banner { background: linear-gradient(135deg, #283593, #7c4dff); }

.quick-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-top: 36px;
}

.fact-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid rgba(40,53,147,0.08);
}

.fact-card .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 12px;
}

.fact-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.fact-card p {
    color: var(--text-light);
    font-size: 0.94rem;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 26px 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(124,77,255,0.12);
    color: var(--primary-dark);
    font-size: 0.84rem;
    font-weight: 600;
}

.info-list {
    list-style: none;
    margin-top: 18px;
}

.info-list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.info-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.note-box {
    margin-top: 30px;
    background: rgba(124,77,255,0.08);
    border: 1px solid rgba(124,77,255,0.16);
    border-radius: var(--radius-lg);
    padding: 26px 28px;
}

.note-box.teal {
    background: rgba(0,131,143,0.08);
    border-color: rgba(0,131,143,0.16);
}

.note-box.red {
    background: rgba(211,47,47,0.08);
    border-color: rgba(211,47,47,0.16);
}

.note-box h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.02rem;
    margin-bottom: 10px;
}

.note-box p {
    color: var(--text-light);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid rgba(40,53,147,0.08);
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.faq-item h3 i {
    color: var(--secondary);
    margin-right: 8px;
}

.faq-item p {
    color: var(--text-light);
    font-size: 0.93rem;
}

.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--primary-dark), var(--secondary-light)); transform: translateX(-50%); }
.timeline-item { display: flex; align-items: flex-start; margin-bottom: 40px; position: relative; }
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-dot { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: white; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; box-shadow: 0 0 0 4px var(--bg); }
.timeline-content { width: 42%; background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.timeline-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--secondary); margin-bottom: 8px; }
.timeline-content p { font-size: 0.92rem; color: var(--text-light); }

.info-box { background: var(--surface); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); }
.info-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.info-box p { color: var(--text-light); margin-bottom: 16px; }
.info-box ul { color: var(--text-light); padding-left: 20px; margin-bottom: 16px; }
.info-box ul li { margin-bottom: 4px; }
.info-box .block { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.info-box .block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.detail-row { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-bottom: 60px; }
.detail-text h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.detail-text p { color: var(--text-light); margin-bottom: 12px; }
.detail-text ul { color: var(--text-light); padding-left: 20px; margin-bottom: 12px; }
.detail-text ul li { margin-bottom: 4px; }
.detail-box { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); border-left: 4px solid var(--secondary); }
.detail-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.detail-box p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 10px; }
.detail-box ul { color: var(--text-light); font-size: 0.95rem; padding-left: 18px; margin-bottom: 8px; }
.detail-box ul li { margin-bottom: 4px; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: var(--primary); color: white; padding: 14px 16px; font-weight: 600; font-size: 0.9rem; text-align: left; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 0.9rem; color: var(--text); }
.data-table tr:hover td { background: rgba(40,53,147,0.04); }
.data-table .highlight { font-weight: 700; color: var(--secondary); }

.stats-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin: 40px 0; }
.stat-item { text-align: center; padding: 24px 32px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 160px; }
.stat-item .stat-num { font-size: 2rem; font-weight: 900; color: var(--secondary); }
.stat-item .stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

/* RM-specific: MRI signal box */
.mri-box { background: #080818; border-radius: var(--radius); padding: 20px; border: 1px solid rgba(179,136,255,0.25); font-family: 'Courier New', monospace; }
.mri-label { font-size: 0.75rem; color: #b388ff; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.mri-desc { font-size: 0.85rem; color: rgba(255,255,255,0.7); line-height: 1.6; }
.mri-seq { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; margin: 2px; }
.mri-seq.t1 { background: #1a0d33; color: #ce93d8; border: 1px solid #4a2a6a; }
.mri-seq.t2 { background: #0d1a33; color: #90caf9; border: 1px solid #1a3a6a; }
.mri-seq.flair { background: #0d1a0d; color: #a5d6a7; border: 1px solid #1a4a1a; }
.mri-seq.dwi { background: #1a1a0d; color: #fff176; border: 1px solid #4a4a1a; }
.mri-seq.gd { background: #330d1a; color: #ef9a9a; border: 1px solid #661a33; }
.mri-bright { color: #e1bee7; font-weight: 600; }
.mri-dark { color: #546e7a; }

.page-nav { display: flex; justify-content: space-between; gap: 20px; padding: 40px 0; margin-top: 40px; border-top: 1px solid rgba(0,0,0,0.08); }
.page-nav a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 16px 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition); max-width: 45%; }
.page-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--secondary); }
.page-nav .label { font-size: 0.8rem; color: var(--text-light); }
.page-nav .title { font-weight: 700; font-size: 0.95rem; }
.page-nav .next { margin-left: auto; text-align: right; }

.rm-footer { background: #080818; color: rgba(255,255,255,0.7); text-align: center; padding: 40px 20px; }
.rm-footer a { color: #b388ff; text-decoration: none; }
.rm-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

@media (max-width: 900px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(10,10,40,0.99); padding: 16px; gap: 4px; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 16px; }
    .hamburger { display: block; }
    .nav-back { display: none; }
    .timeline::before { left: 20px; }
    .timeline-item, .timeline-item:nth-child(odd) { flex-direction: column; padding-left: 60px; }
    .timeline-dot { left: 20px; transform: translateX(-50%); }
    .timeline-content { width: 100%; }
    .card-grid.cols-2 { grid-template-columns: 1fr; }
    .detail-row { grid-template-columns: 1fr; }
    .page-nav { flex-direction: column; }
    .page-nav a { max-width: 100%; }
}
@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }
    .card-grid.cols-3 { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; align-items: center; }
    .page-header { padding: 100px 16px 40px; }
    .section-block { padding: 50px 16px; }
    .quick-facts { grid-template-columns: 1fr; }
}
