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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: linear-gradient(to right, #afeeee, #f8ffff);
    min-height: 100vh;
    margin: 0;
    margin: 3%;
    color: #232375;
}
a {
  text-decoration: none;
  color: #104e8b;
}
a:hover {
  background-color: #fdf5e6;
}
.container {
    max-width: 971px;
    margin: 0 auto;
    padding: 10px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c5aa0;
    font-size: 2.5em;
}

#toplinks {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 1px;
}

.toplink {
    flex: 1;
    text-align: center;
    padding: 12px 3px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #ccc;
    transition: all 0.3s ease;
}

.toplink:nth-child(1) { background-color: #87c6e6; }
.toplink:nth-child(2) { background-color: #89c8e6; }
.toplink:nth-child(3) { background-color: #93cae6; }
.toplink:nth-child(4) { background-color: #97cce6; }
.toplink:nth-child(5) { background-color: #9acee6; }
.toplink:hover {
    opacity: 0.7;
    color: black;
    background-color: #657af0;
}
.toplink.actual {
    background-color: #43b0cf;
}
#intro {
    border: 2px dotted #666;
    padding: 10px;
    margin-bottom: 10px;
    text-align: justify;
    line-height: 1.8;
}

.mainline {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 10px;
    position: relative;
}

#vrs {
    width: 145px;
    flex-shrink: 0;
    padding: 2px;
    border: 1px dotted #666;
    position: relative;
}

#klm {
    flex: 1;
    text-align: center;
    position: relative;
}

#klm img {
    max-width: 100%;
    height: auto;
    border: 1px dotted #666;
}

#odk {
    width: 435px;
    flex-shrink: 0;
    padding: 5px;
    border: 1px dotted #666;
    
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.odkin {
    flex: 0 0 calc(33.333% - 10px); /* Odečítání gap */
}
#odk.soloodk {
  border-width: 2px;
  margin-right: -5px;
}
#odk.onecol {
  width: 145px;
}

.subblock {
    font-size: 14px;
    margin-bottom: 5px;
    padding-bottom: 0;
}

.subblock:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.subblock h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: #2c5aa0;
}
.subblock h4 a {
    text-decoration: none;
}

.subblock img {
    width: 124px;
    height: 93px;
    margin: 0;
    border: 0px solid #ccc;
}

.bottom-section {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

#vers {
    width: 250px;
    flex-shrink: 0;
    border: 2px dotted #666;
    padding: 10px;
}

#popistoku {
    width: 696px;
    flex-shrink: 0;
    border: 2px dotted #666;
    padding: 10px;
}

#intro h3, #vrs h3, #vers h3, #popistoku h3 {
    margin-bottom: 5px;
    color: #2c5aa0;
    font-size: 18px;
}

#vers p {
    margin-bottom: 20px;
    line-height: 1.5;
}

#popistoku p {
    margin-bottom: 15px;
    line-height: 1.6;
}



        .nadfoto {
            margin: 0 auto;
            padding-right: 5px;
        }

        .subfoto {
            width: 100%;
            border: 2px dotted #666;
            margin-left: 0;
            margin-top: 0;
            margin-right: 10px;
            margin-bottom: 10px;
            padding: 15px;
            display: flex;
            gap: 15px;
            min-height: 120px;
        }

        .subfoto-text {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .subfoto-link {
            color: #2c5aa0;
            text-decoration: none;
            font-weight: bold;
            font-size: 15px;
        }


        .subfoto-content {
            text-align: justify;
            line-height: 1.5;
            font-size: 14px;
        }

        .subfoto-image {
            flex-shrink: 0;
            width: 124px;
            height: 93px;
            align-self: flex-start;
        }

        .subfoto-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border: 1px solid #ccc;
        }

        
/* Responzivní design */
@media (max-width: 1000px) {
    .container {
        max-width: 95%;
        margin: 5px auto;
        padding: 1px;
    }
}

@media (max-width: 768px) {
    #toplinks {
        flex-wrap: wrap;
    }

    .toplink {
        flex-basis: calc(50% - 5px);
        margin-bottom: 10px;
    }

    .mainline, celek {
        flex-direction: column;
    }

    #vrs, #odk {
        width: 100%;
    }

    .bottom-section {
        flex-direction: column;
    }

    #vers, #popistoku {
        width: 100%;
    }

    h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .toplink {
        flex-basis: 100%;
    }
}

/* Opravené styly pro mapu */
.map-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 342px;
}

#map-image {
    width: 100%;
    height: auto;
    display: block;
}

#highlight-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
    z-index: 10;
    background: transparent;
}
.undr {
  text-align: center;
  font-size: small;
  font-style: italic;
}
        .celek {
            max-width: 970px;
            margin: 0 auto;
            border: 2px dotted #666;
            padding: 20px;
            display: flex;
            gap: 10px;
        }

        .polovic {
            width: 50%;
            position: relative;
        }

        .polovic strong {
            display: block;
            font-size: 16px;
            margin-bottom: 10px;
            color: #2c5aa0;
        }

        .polovic ul {
            list-style: none;
            padding-left: 0;
        }

        /* Specifické nastavení pro první seznam */
        .polovic:first-child ul {
            padding-left: 20px;
        }

        .polovic:first-child li {
            position: relative;
            padding-left: 15px;
            margin-bottom: 2px;
            line-height: 1.5;
        }

        /* Odrážky pro první seznam vpravo od tečkovaného ohraničení */
        .polovic:first-child li::before {
            content: "•";
            position: absolute;
            left: -5px;
            color: #666;
            font-size: 20px;
            line-height: 1.2;
        }

        /* Nastavení pro druhý seznam */
        .polovic:last-child li {
            position: relative;
            padding-left: 20px;
            margin-bottom: 2px;
            line-height: 1.5;
        }

        /* Odrážky pro druhý seznam normálně vlevo */
        .polovic:last-child li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: #666;
            font-size: 20px;
            line-height: 1.2;
        }

        /* Responzivní design */
        @media (max-width: 768px) {
            .celek {
                flex-direction: column;
                padding: 15px;
            }

            .polovic {
                width: 100%;
            }

            .polovic:first-child {
                margin-bottom: 20px;
                padding-bottom: 20px;
                border-bottom: 1px dotted #666;
            }
        }

        @media (max-width: 480px) {
            .celek {
                padding: 10px;
            }

            .polovic strong {
                font-size: 16px;
            }

            .polovic li {
                font-size: 14px;
            }
        }

        /* Responzivní design */
        @media (max-width: 768px) {
            .subfoto {
                margin-right: 0;
            }

            .subfoto-image {
                order: -1;
                margin-bottom: 10px;
            }

            .subfoto-content {
                font-size: 13px;
            }
        }

        @media (max-width: 480px) {
            .subfoto {
                padding: 10px;
            }
            .subfoto-content {
                font-size: 12px;
            }

            .subfoto-link {
                font-size: 15px;
            }
        }

        
        /* Styly pro div.obalf */
        .obalf {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            max-width: 100%;
            margin: 0 auto;
            align-items: flex-start;
        }

        /* Styly pro fieldset.fpol */
        fieldset.fpol {
            flex: 0 0 calc(50% - 10px);
            max-width: calc(50% - 10px);
            border: 1px solid #666;
            padding: 20px;
            margin: 0;
            position: relative;
        }

        fieldset.fpol legend {
            padding: 0 5px;
            margin: 0;
            position: relative;
            top: 0;
            line-height: 1;
        }

        fieldset.fpol legend strong {
            font-size: 16px;
            color: #2c5aa0;
            display: inline-block;
            vertical-align: middle;
        }

        fieldset.fpol ul {
            list-style: none;
            padding-left: 10px;
            margin: 0;
        }

        fieldset.fpol li {
            position: relative;
            padding-left: 20px;
            margin-bottom: 4px;
            line-height: 1.5;
        }

        fieldset.fpol li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: #666;
            font-size: 20px;
            line-height: 1.2;
        }

        fieldset.fpol li:last-child {
            margin-bottom: 0;
        }

        /* Pokud je lichý počet fieldsetů, poslední zabere jen 50% */
        fieldset.fpol:last-child:nth-child(odd) {
            margin-right: auto;
        }

        /* Responzivní design */
        @media (max-width: 768px) {
            .obalf {
                gap: 15px;
            }

            fieldset.fpol {
                flex: 0 0 100%;
                max-width: 100%;
            }

            fieldset.fpol legend strong {
                font-size: 16px;
            }
        }

        @media (max-width: 480px) {
            .obalf {
                gap: 10px;
                padding: 5px;
            }

            fieldset.fpol {
                padding: 15px;
            }

            fieldset.fpol ul {
                padding-left: 15px;
            }

            fieldset.fpol li {
                font-size: 14px;
                padding-left: 15px;
            }

            fieldset.fpol li::before {
                font-size: 16px;
            }
        }

        
        .link-table {
            width: 100%;
        }

        .link-row {
            display: flex;
            width: 100%;
            min-height: 50px;
        }

        .link-row.group-header {
            margin-top: 1px;
        }

        .link-row:first-child {
            margin-top: 0;
        }

        .link-cell {
            padding: 3px 5px;
        }

        .link-cell:first-child {
            flex: 0 0 30%;
            padding-right: 20px;
        }

        .link-cell:last-child {
            flex: 0 0 70%;
            padding-left: 20px;
        }

        .group-title {
            font-weight: bold;
            color: #2c5aa0;
            font-size: 16px;
            padding: 15px;
        }

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

        .link-list li {
            position: relative;
            padding-left: 25px;
            margin-bottom: 5px;
        }

        .link-list li:last-child {
            margin-bottom: 0;
        }

        .link-list li::before {
            content: "";
            position: absolute;
            left: 0;
            top: 5px;
            width: 16px;
            height: 16px;
            background-image: url('https://reka-svitava.sije.cz/images/icons/odraz1.gif');
            background-repeat: no-repeat;
            background-position: center center;
            background-size: contain;
        }

        .link-list a {
            color: #2c5aa0;
            text-decoration: none;
            font-weight: 500;
        }

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

        .link-description {
            text-align: justify;
            line-height: 1.5;
            color: #555;
        }

        /* Vizuální oddělení řádků */
        .link-row + .link-row:not(.group-header) {
            margin-top: 1px;
        }

        /* Responzivní design */
        @media (max-width: 768px) {
            .link-row {
                flex-direction: column;
            }

            .link-cell:first-child,
            .link-cell:last-child {
                flex: 0 0 100%;
                width: 100%;
                padding: 1px;
            }

            .link-cell:first-child {
                padding-bottom: 1px;
            }

            .link-cell:last-child {
                padding-top: 5px;
            }

            .link-row.group-header .link-cell:last-child {
                display: none;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 10px;
            }

            .link-cell {
                padding: 8px;
            }

            .group-title {
                font-size: 14px;
            }

            .link-description {
                font-size: 12px;
            }
        }

        
a.odkazy {
  font-weight: bold;
}
.oddelovac {
  width: 95%;
  margin: auto;
  padding: 2px;
  border: none;
  border-top: 1px solid #ccc;
}
li.nobullet {
  list-style-type: none;
  margin-left: 0;
  padding-left: 0;
}
