* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

/* Celá stránka přesně na výšku okna */
.page {
    height: 100vh;
    height: 100dvh;

    display: grid;
    grid-template-rows: 10vh minmax(0, 1fr) auto;

    overflow: hidden;
}

/* Horní blok */
.top {
    background: white;
    border-bottom: 1px solid #ddd;

    display: flex;
    align-items: center;

    padding: 0 3vw;
}

.logo {
    max-height: 70%;
    max-width: 320px;
}

/* Prostřední rolovatelná část */
.content {
    min-height: 0;
    overflow-y: auto;

    padding: 3vh 4vw;

    scroll-behavior: smooth;
}

/* Jeden hlavní rámeček kolem celého prostředního obsahu */
.presentation {
    max-width: 1200px;
    margin: 0 auto;

    background: white;

    padding: 32px 40px;

    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* Navigace kapitol nahoře */
.chapter-nav {
    margin: 0 0 24px 0;
    padding: 0 0 24px 0;

    border-bottom: 1px solid #ddd;

    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chapter-nav a {
    color: #1f4e79;
    text-decoration: none;
    font-weight: bold;

    padding: 8px 12px;

    border-radius: 6px;
    background: #eef4fa;
}

.chapter-nav a:hover {
    background: #dceaf5;
}

/* Jednotlivé kapitoly uvnitř hlavního rámečku */
.chapter {
    padding: 32px 0;
    border-bottom: 1px solid #ddd;

    scroll-margin-top: 24px;
}

.chapter:last-child {
    border-bottom: none;
}

/* Řádek s názvem kapitoly a šipkou nahoru */
.chapter-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
    margin-bottom: 16px;
}

.chapter-title-row h1 {
    margin: 0;

    font-size: 2.2rem;
    color: #1f4e79;
}

/* Pro případ, že některá kapitola má ještě h1 bez wrapperu */
.chapter > h1 {
    margin-top: 0;

    font-size: 2.2rem;
    color: #1f4e79;
}

.chapter h2 {
    margin-top: 2rem;

    font-size: 1.5rem;
    color: #333;
}

.chapter p,
.chapter li {
    font-size: 1.1rem;
    line-height: 1.6;
}

.chapter ul,
.chapter ol {
    padding-left: 1.5rem;
}

/* Obecné odkazy v kapitolách */
.chapter a {
    color: #1f4e79;
    font-weight: bold;
}

.chapter a:hover {
    text-decoration: underline;
}

/* Šipka nahoru vedle názvu kapitoly
   Selektor je úmyslně silnější než .chapter a,
   aby se barva šipky nepřebila obecným stylem odkazů. */
.chapter .chapter-up,
.chapter .chapter-up:visited {
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: #1f4e79;
    color: white;

    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    font-weight: bold;
    line-height: 1;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.chapter .chapter-up:hover,
.chapter .chapter-up:focus {
    background: #163a5a;
    color: white;
    text-decoration: none;
}

/* Spodní kontaktní blok */
.bottom {
    background: #222;
    color: white;

    font-size: 0.95rem;

    padding: 10px 3vw;
    text-align: center;
}

.bottom a {
    color: white;
    text-decoration: underline;
}

.bottom a:hover {
    text-decoration: none;
}

/* Obrázky v obsahu */
.presentation img,
.chapter img {
    max-width: 100%;
    height: auto;
}

/* Google mapa */
.map-card {
    width: 100%;
    height: 260px;

    margin-top: 18px;

    border-radius: 14px;
    overflow: hidden;

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    border: 1px solid #ddd;
}

.map-card iframe {
    width: 100%;
    height: 100%;

    border: 0;
    display: block;
}

.map-link {
    margin-top: 12px;
}

.map-link a {
    color: #1f4e79;
    font-weight: bold;
    text-decoration: none;
}

.map-link a:hover {
    text-decoration: underline;
}

/* Obrázky W4h */
.image-row {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    align-items: flex-start;
}

.image-row figure {
    flex: 1;
    margin: 0;
    text-align: center;
}

.image-row img {
    max-width: 100%;
    height: auto;

    border-radius: 12px;
    border: 1px solid #ddd;

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.10);
}

.image-row figcaption {
    margin-top: 10px;
    font-size: 0.95rem;
    color: #555;
}

/* Seznam služeb */
.service-list {
    margin-top: 18px;
    padding-left: 1.4rem;
}

.service-list > li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.service-sublist {
    margin-top: 8px;
    padding-left: 1.8rem;
}

.service-sublist li {
    margin-bottom: 6px;
    font-size: 1.05rem;
}

/* Jednoduchá responzivní úprava pro menší displeje */
@media (max-width: 700px) {
    .presentation {
        padding: 24px 22px;
    }

    .chapter-title-row h1,
    .chapter > h1 {
        font-size: 1.7rem;
    }

    .chapter p,
    .chapter li,
    .service-list > li {
        font-size: 1rem;
    }

    .chapter-nav {
        flex-direction: column;
        gap: 8px;
    }

    .chapter-nav a {
        display: block;
    }

    .logo {
        max-width: 240px;
    }

    .image-row {
        flex-direction: column;
    }
}
