/* Stomatologia obrazowa - dział edukacyjny */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700;9..144,900&family=Lexend:wght@400;500;600;700;800;900&display=swap');

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

:root {
    --primary: #0f5960;
    --primary-dark: #06262c;
    --secondary: #12b8ac;
    --accent: #f4725f;
    --gold: #ffd166;
    --bg: #f4fbfa;
    --bg2: #e7f5f3;
    --card-bg: #fff;
    --text: #13283a;
    --text2: #40586a;
    --border: rgba(15, 89, 96, 0.18);
    --shadow: 0 18px 42px rgba(15, 89, 96, 0.12);
    --radius: 8px;
    --nav-bg: rgba(6, 38, 44, 0.97);
    --nav-active: #12b8ac;
}

[data-theme="dark"] {
    --bg: #071416;
    --bg2: #0d2024;
    --card-bg: #102429;
    --text: #efffff;
    --text2: #b9d8d7;
    --border: rgba(142, 238, 230, 0.18);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(18, 184, 172, 0.12), transparent 26rem),
        radial-gradient(circle at 90% 18%, rgba(244, 114, 95, 0.13), transparent 28rem),
        linear-gradient(180deg, #fffaf3 0%, var(--bg) 42%, #f4fbff 100%);
    font-family: 'Lexend', 'Roboto', sans-serif;
    line-height: 1.64;
    overflow-x: clip;
}

h1, h2, .section-title, .header-content h1 {
    font-family: 'Fraunces', 'Lexend', serif;
    letter-spacing: -0.02em;
}

h1, h2, h3, p, li, a, span {
    overflow-wrap: break-word;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

.stoma-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(18, 184, 172, 0.18);
}
.stoma-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.36); }
.nav-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 0;
    padding: 0 20px; height: 58px;
}
.nav-logo {
    font-size: 1.12rem; font-weight: 900; color: #9af2ed;
    margin-right: 20px; white-space: nowrap; text-decoration: none;
}
.nav-logo i { margin-right: 7px; color: var(--gold); }
.nav-links {
    display: flex; list-style: none; gap: 2px;
    flex-wrap: nowrap; overflow-x: auto; flex: 1;
}
.nav-links li a {
    display: block; padding: 6px 10px;
    color: #c8f4f0; font-size: 0.8rem; font-weight: 700;
    border-radius: 6px; white-space: nowrap; text-decoration: none;
}
.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(18, 184, 172, 0.16);
    color: #9af2ed;
}
.nav-links li a.active { border-bottom: 2px solid var(--secondary); }
.nav-back {
    margin-left: 14px; padding: 6px 13px;
    border-radius: 8px; background: rgba(18, 184, 172, 0.12);
    color: #9af2ed; font-size: 0.82rem; font-weight: 800;
    white-space: nowrap; text-decoration: none;
}
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    color: #9af2ed; font-size: 1.3rem; padding: 6px; margin-left: 10px;
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: fixed; top: 58px; left: 0; right: 0;
        background: var(--nav-bg); padding: 12px 0 20px;
        max-height: calc(100vh - 58px); overflow-y: auto;
    }
    .nav-links li a { padding: 10px 24px; font-size: 0.95rem; }
    .hamburger { display: block; }
    .nav-back { display: none; }
}

.hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 58px;
    color: #fff;
    background:
        radial-gradient(circle at 14% 20%, rgba(18, 184, 172, 0.20), transparent 24rem),
        radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.18), transparent 24rem),
        linear-gradient(135deg, #06151a 0%, #0e3941 52%, #553126 100%);
}
.stoma-hero-grid {
    width: min(1240px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: center;
}
.hero-content { max-width: 760px; text-align: left; }
.stoma-chip {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 14px; padding: 8px 10px;
    border: 1px solid rgba(154, 242, 237, 0.34);
    border-radius: 8px; color: #dcfffb;
    background: rgba(255,255,255,0.08);
    font-size: 0.8rem; font-weight: 900; text-transform: uppercase;
}
.hero-content h1 {
    color: #fffdf0;
    font-size: clamp(2.1rem, 4.7vw, 4.15rem);
    line-height: 1.04;
    margin-bottom: 18px;
    text-wrap: balance;
}
.hero-content h1 span { color: #9af2ed; }
.hero-content p {
    color: #e8fffc; font-size: 1.08rem;
    max-width: 68ch; line-height: 1.76; margin-bottom: 26px;
}
.hero-btns, .hero-stats {
    display: flex; flex-wrap: wrap; gap: 12px;
}
.hero-btns { margin-bottom: 28px; }
.btn-hero {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: 8px; font-weight: 900;
    text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-hero:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.btn-hero.primary { color: #06151a; background: #9af2ed; }
.btn-hero.secondary { color: #fff; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.24); }
.hero-stat {
    min-width: 128px; padding: 12px 14px; border-radius: 8px;
    border: 1px solid rgba(154,242,237,0.24); background: rgba(255,255,255,0.08);
}
.hero-stat .num { color: var(--gold); font-size: 1.35rem; font-weight: 900; }
.hero-stat .label { color: #d9fffb; font-size: 0.78rem; }
.stoma-hero-art {
    margin: 0; overflow: hidden; border-radius: 8px;
    border: 1px solid rgba(154,242,237,0.26);
    background: rgba(2, 12, 15, 0.66);
    box-shadow: 0 24px 70px rgba(0,0,0,0.36);
}
.stoma-hero-art img {
    display: block; width: 100%; aspect-ratio: 16 / 9;
    object-fit: cover; filter: contrast(1.08) brightness(0.9);
}
.stoma-hero-art figcaption {
    padding: 12px 14px; color: #e8fffc;
    border-top: 1px solid rgba(154,242,237,0.18);
    background: rgba(6, 21, 26, 0.92); font-size: 0.88rem;
}

.page-header {
    padding: 100px 20px 46px;
    color: #fff;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(6, 21, 26, 0.84), rgba(6, 21, 26, 0.74)),
        url("../img-stomatologia-panoramic.jpg") center 52% / cover no-repeat;
}
.page-header.teal { background: linear-gradient(135deg, #06262c, #0f5960); }
.page-header.coral { background: linear-gradient(135deg, #06262c, #7b332b 62%, #f4725f); }
.page-header.deep { background: linear-gradient(135deg, #06151a, #0d3941 58%, #10283a); }
.header-content { max-width: 820px; margin: 0 auto; }
.header-content h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.header-content h1 i { color: #9af2ed; margin-right: 10px; }
.header-content .lead { color: #e8fffc; font-size: 1.06rem; line-height: 1.75; }

.breadcrumb {
    background: var(--bg2); border-bottom: 1px solid var(--border);
    padding: 10px 0; color: var(--text2); font-size: 0.88rem;
}
.breadcrumb .container { display: flex; gap: 8px; align-items: center; }
.breadcrumb i { font-size: 0.7rem; color: var(--text2); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.section-block { padding: 62px 0; }
.section-block.alt { background: var(--bg2); }
.section-block.gradient {
    color: #e8fffc;
    background:
        radial-gradient(circle at 12% 10%, rgba(18,184,172,0.16), transparent 26rem),
        radial-gradient(circle at 86% 18%, rgba(255,209,102,0.14), transparent 24rem),
        linear-gradient(135deg, #06151a 0%, #0f5960 58%, #5e3129 100%);
}
.section-title {
    color: var(--primary);
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    font-weight: 900;
    margin-bottom: 16px;
}
.section-title i { color: var(--secondary); margin-right: 10px; }
.section-title.center { text-align: center; margin-bottom: 34px; }
.section-subtitle {
    max-width: 82ch; margin: -18px auto 38px;
    text-align: center; color: var(--text2);
    font-size: 1rem; line-height: 1.78;
}
.section-block.gradient .section-title,
.section-block.gradient .section-subtitle,
.section-block.gradient h3,
.section-block.gradient p,
.section-block.gradient li { color: #e8fffc; }

.stoma-anchor-band {
    padding: 22px 0;
    background:
        radial-gradient(circle at 16% 0%, rgba(255,209,102,0.14), transparent 20rem),
        linear-gradient(135deg, #06151a, #0e3941 58%, #4f2b25);
}
.stoma-page-map {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    padding: 16px; border: 1px solid rgba(154,242,237,0.20);
    border-radius: 8px; background: rgba(255,255,255,0.07);
}
.stoma-page-map a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 8px;
    color: #f3fffd; background: rgba(255,255,255,0.08);
    border: 1px solid rgba(154,242,237,0.18);
    font-size: 0.86rem; font-weight: 800;
}
.stoma-page-map a:hover {
    color: #06151a; background: linear-gradient(135deg, #9af2ed, var(--gold));
    text-decoration: none;
}

.card-grid, .quick-facts, .stoma-method-grid, .stoma-process, .source-grid, .faq-grid {
    display: grid; gap: 22px;
}
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.quick-facts { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.stoma-method-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stoma-process { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.source-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.faq-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card, .fact-card, .faq-item, .source-grid a, .process-step, .stoma-method-grid article, .detail-box, .note-box {
    position: relative; overflow: hidden;
    min-width: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card, .fact-card, .faq-item, .source-grid a, .process-step, .stoma-method-grid article, .detail-box, .note-box {
    padding: 24px;
}
.card::before, .fact-card::before, .faq-item::before, .source-grid a::before, .process-step::before, .stoma-method-grid article::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
    background: linear-gradient(90deg, var(--gold), #9af2ed, var(--accent));
}
.card h3, .fact-card h3, .faq-item h3, .process-step h3, .stoma-method-grid h3, .detail-box h3, .note-box h3 {
    color: var(--text); margin-bottom: 10px; font-size: 1.06rem;
}
.card p, .card li, .fact-card p, .faq-item p, .process-step p, .stoma-method-grid p, .detail-box p, .detail-box li, .note-box p, .note-box li, .source-grid span {
    color: var(--text2); line-height: 1.72; font-size: 0.95rem;
}
.card ul, .detail-box ul, .note-box ul { padding-left: 18px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 12px; padding: 5px 8px;
    border-radius: 8px; background: rgba(18,184,172,0.10);
    color: var(--primary); font-size: 0.75rem; font-weight: 900;
    text-transform: uppercase;
}
.stoma-method-grid article i {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-bottom: 16px;
    border-radius: 8px; color: #06151a;
    background: linear-gradient(135deg, #9af2ed, var(--gold));
}
.process-step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; margin-bottom: 14px;
    border-radius: 8px; color: #06151a; font-weight: 900;
    background: linear-gradient(135deg, #9af2ed, var(--gold));
}
.source-grid a { display: block; text-decoration: none; }
.source-grid strong { display: block; color: var(--primary); margin-bottom: 8px; }

.landing-card {
    display: flex; flex-direction: column; overflow: hidden;
    padding: 0; color: inherit; text-decoration: none;
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.landing-card:hover { transform: translateY(-4px); text-decoration: none; box-shadow: 0 20px 48px rgba(15,89,96,0.16); }
.card-banner {
    height: 110px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2.5rem;
}
.card-body { padding: 20px; flex: 1; }
.card-body h3 { color: var(--text); margin-bottom: 8px; }
.card-body p { color: var(--text2); font-size: 0.9rem; line-height: 1.62; }
.card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; border-top: 1px solid var(--border);
    background: var(--bg2); color: var(--primary); font-size: 0.86rem; font-weight: 900;
}
.card-history .card-banner { background: linear-gradient(135deg, #17324a, #0f5960); }
.card-principle .card-banner { background: linear-gradient(135deg, #06262c, #12b8ac); }
.card-2d .card-banner { background: linear-gradient(135deg, #0f5960, #2dd4bf); }
.card-pano .card-banner { background: linear-gradient(135deg, #10283a, #12b8ac); }
.card-cbct .card-banner { background: linear-gradient(135deg, #0b3148, #f4725f); }
.card-ceph .card-banner { background: linear-gradient(135deg, #28435a, #ffd166); color: #06151a; }
.card-shield .card-banner { background: linear-gradient(135deg, #0e6245, #12b8ac); }
.card-clinic .card-banner { background: linear-gradient(135deg, #7b332b, #f4725f); }
.card-role .card-banner { background: linear-gradient(135deg, #243b53, #0f5960); }
.card-patient .card-banner { background: linear-gradient(135deg, #0f5960, #84cc16); }

.detail-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start;
}
.detail-text p, .detail-text li { color: var(--text2); line-height: 1.72; margin-bottom: 10px; }
.detail-text ul { padding-left: 18px; }
.note-box {
    margin-top: 28px;
    border-left: 7px solid var(--secondary);
    background:
        radial-gradient(circle at right top, rgba(18,184,172,0.18), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,251,250,0.98));
}
.note-box.red { border-left-color: var(--accent); }

.stoma-patient-page .page-header.teal {
    background:
        radial-gradient(circle at 16% 12%, rgba(154, 242, 237, 0.16), transparent 22rem),
        radial-gradient(circle at 88% 20%, rgba(255, 209, 102, 0.18), transparent 24rem),
        linear-gradient(135deg, #06262c 0%, #0f5960 54%, #5d3028 100%);
}

.patient-exam-grid article,
.patient-curiosity-grid article {
    min-height: 100%;
}

.patient-exam-grid ul {
    margin-top: 12px;
    padding-left: 18px;
}

.stoma-patient-page .section-block.gradient .stoma-method-grid article {
    border-color: rgba(154, 242, 237, 0.22);
    background:
        radial-gradient(circle at right top, rgba(255, 209, 102, 0.12), transparent 9rem),
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.20);
}

.stoma-patient-page .section-block.gradient .stoma-method-grid article::before {
    background: linear-gradient(90deg, var(--gold), #9af2ed, var(--accent));
}

.stoma-patient-page .section-block.gradient .stoma-method-grid article p,
.stoma-patient-page .section-block.gradient .stoma-method-grid article li {
    color: #e8fffc;
}

.training-process .process-step {
    background:
        radial-gradient(circle at right top, rgba(18, 184, 172, 0.12), transparent 8rem),
        var(--card-bg);
}

.quality-grid article ul,
.glossary-grid article ul,
.training-cases-grid article ul {
    margin-top: 12px;
    padding-left: 18px;
}

.glossary-grid article h3 {
    color: var(--primary);
}

.training-quiz-grid .faq-item {
    border-left: 5px solid rgba(18, 184, 172, 0.55);
}

.training-quiz-grid .faq-item h3 {
    color: var(--primary-dark);
}

[data-theme="dark"] .training-quiz-grid .faq-item h3 {
    color: #efffff;
}

.page-nav {
    display: flex; gap: 16px; justify-content: space-between; margin-top: 20px;
}
.page-nav a {
    display: flex; align-items: center; gap: 14px; flex: 1;
    padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card-bg); box-shadow: var(--shadow); text-decoration: none;
}
.page-nav a.next { justify-content: flex-end; text-align: right; }
.page-nav i { color: var(--secondary); font-size: 1.25rem; }
.page-nav .label { display: block; color: var(--text2); font-size: 0.78rem; }
.page-nav .title { display: block; color: var(--text); font-weight: 900; }

.stoma-footer {
    padding: 36px 20px; text-align: center;
    color: #c8f4f0; background: #06151a;
    border-top: 1px solid rgba(154,242,237,0.14);
}
.stoma-footer strong { color: #9af2ed; }
.footer-links {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
    margin: 16px 0 20px;
}
.footer-links a { color: #9af2ed; font-weight: 800; }

@media (max-width: 980px) {
    .stoma-hero-grid { grid-template-columns: 1fr; }
    .stoma-hero-art { order: -1; width: min(760px, 100%); margin: 0 auto; }
    .hero-content { margin: 0 auto; }
    .detail-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .hero { padding: 92px 16px 48px; }
    .hero-content h1 { max-width: 12ch; font-size: 2.15rem; }
    .hero-content p { font-size: 0.98rem; }
    .page-header { padding: 88px 16px 38px; }
    .header-content {
        width: min(340px, 100%);
        max-width: min(340px, 100%);
    }
    .header-content .lead {
        font-size: 0.98rem;
        overflow-wrap: anywhere;
    }
    .container {
        padding-left: 16px;
        padding-right: 16px;
        overflow-x: clip;
    }
    .btn-hero { width: 100%; }
    .hero-stat { flex: 1 1 100%; }
    .stoma-page-map a { flex-basis: 100%; justify-content: center; }
    .section-block { padding: 52px 0; }
    .section-title.center {
        max-width: min(100%, 20rem);
        margin-left: auto;
        margin-right: auto;
        font-size: 1.34rem;
        line-height: 1.22;
        text-wrap: balance;
        overflow-wrap: anywhere;
    }
    .section-title i {
        display: block;
        margin: 0 auto 10px;
    }
    .section-subtitle {
        max-width: min(100%, 31ch);
    }
    .card, .fact-card, .faq-item, .source-grid a, .process-step, .stoma-method-grid article, .detail-box, .note-box { padding: 20px; }
    .card, .fact-card, .faq-item, .source-grid a, .process-step, .stoma-method-grid article, .detail-box, .note-box {
        width: min(100%, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
    }
    .card p, .card li,
    .fact-card p,
    .faq-item p,
    .process-step p,
    .stoma-method-grid p,
    .detail-box p,
    .detail-box li,
    .note-box p,
    .note-box li {
        max-width: 31ch;
    }
    .page-nav { flex-direction: column; }
}
