html, body {
    margin: 0;
    height: 100%;
    background-color: #f8f8f8;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.info-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 66%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-top: 3vh;
    box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.info-container .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
}
/* Zásadní změny pro image-container */
.info-container .image-container {
    width: 90%; /* Nastavíme pevnou šířku (stejnou jako max-width obrázku) */
    max-width: 600px; /* Omezíme maximální šířku (volitelné) */
    height: 65%;
    display: flex;
    flex-direction: column; /* Prvky pod sebou */
    justify-content: flex-start; /* Obsah nahoře */
    align-items: center;
    position: relative; /* Pro absolutní pozicování tlačítek */
}

.info-container .image-container img {
    max-width: 100%; /* Obrázek se vejde do šířky kontejneru */
    max-height: 80%;  /* Omezíme výšku, aby se vešel i text */
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 5px;
}

.info-container .image-container img:hover {
    cursor: pointer;
}

/* Kontejner pro tlačítka a info o shodách */
.match-controls-container {
    width: 100%;
    display: flex;
    justify-content: space-between; /* Tlačítka na okrajích */
    align-items: center;
    padding: 0 10px; /* Odsazení od okrajů */
    box-sizing: border-box; /* Důležité pro padding */
}

.navigation-button {
    background: none;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 20px;
    color: #444;
    cursor: pointer;
    padding: 5px 10px;
    transition: background-color 0.2s, color 0.2s;
    z-index: 1001; /* Aby byla tlačítka nad ostatním obsahem */
    /* ODSTRANÍME position, top, transform */
}

.navigation-button:hover {
    background-color: #444;
    color: white;
}

/* Styl pro text o shodách */
.match-info-container {
    width: auto;        /* Přizpůsobí se obsahu */
    display: flex;       /* Pro centrovaní textu */
    justify-content: center;
}

#matchInfo {
    font-size: 1.5vh;
    text-align: center;
    color: #666;
}

/* Ostatní styly (text-container, atd.) */
.info-container .text-container {
    text-align: center;
    width: 100%;
    padding: 0 20px;
    color: #444;
    box-sizing: border-box;
    margin-top: -8vh;
}

.info-container .text-container h3 {
    font-size: 3.5vh;
    margin-bottom: 0.25vh;
}

.info-container .text-container p {
    font-size: 2.5vh;
    margin: 0.5vh 0;
}

.info-container .text-container .description2 {
    font-size: 2vh;
}

.close-info {
    position: absolute;
    top: 0vh;
    right: 1vh;
    cursor: pointer;
    font-size: 4vh;
    color: #444;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.close-info:hover {
    color: #ff0000bd;
    transform: scale(1.2);
}



.polygon-label {
    text-align: center;
    font-family: 'Poppins';
    font-size: 3vh;
    offset: 100px;
}



/* Styly pro ovládací panel vrstev a tlacitko galerie */
/* --------------------------------------------------------- */

.layer-controls {
    position: fixed;
    top: 1.5vh;
    right: 1.1vh;
    z-index: 999;
    font-family: 'Poppins';
}


.layer-controls-toggle, #galleryButton {
    width: 8vh; /* Stejná šířka jako ostatní ovládací prvky */
    min-width: 90px;
    height: 3.2vh;
    min-height: 30px;
    background-color: #f8f8f8;
    border: none; /* Odstranění všech ohraničení */
    border-radius: 1vh;
    font-size: calc(0.1vh + 18px);
    font-family: 'Poppins';
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s;

}

#galleryButton {
    position: fixed;
    top: 4vh;
    right: 1.1vh;
    z-index: 998;
    display: none; /* Skrytí při inicializaci */
    margin-top: calc(0.1vh + 15px); /* Minimální margin 10px */
}

.layer-controls-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}
.layer-controls-list.show{
    display: block;
}

.layer-controls-list button {
    display: block;
    width: 8vh;
    height: 2.5vh;
    padding-right: 0.5vh;
    border: none;
    background-color: #f8f8f8;
    cursor: pointer;
    font-size: 1.3vh;
    text-align: right;
    font-family: 'Poppins';
}


.layer-controls-list button.active {
    background-color: #777777;
    color: white;
}
.layer-controls-list button:hover {
    background-color: #cecece;
}



/* Styly pro vyhledávací pole */
/* ------------------------------------------------------------------ */
.search-control {
    position: absolute;
    bottom: 0.5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 1vh;
    font-family: 'Poppins';
    padding: 0.5vh;
}

.search-control input[type="text"] {
    padding: 0.5vh;
    height: 3.5vh;
    border: 0.2vh solid #ccc;
    border-radius: 1vh;
    margin-right: 0.5vh;
    font-size: 1.5vh;
    box-sizing: border-box;
    font-family: 'Poppins';
    font-style: italic;
}

.search-control button {
    padding: 0.7vh 1vh;
    border: none;
    border-radius: 1vh;
    background-color: #f8f8f8;
    cursor: pointer;
    font-size: 1.5vh;
    font-family: 'Poppins';
    font-weight: bold;
}

.search-control button:hover{
    background-color: #9c9c9c;
}


/* Chybová hláška */
/* ------------------------------------------------------------------ */

.search-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 15px 35px 15px 20px; /* Zvětšíme pravý padding */
    border-radius: 1vh;
    font-size: 2vh;
    font-family: 'Poppins';
    font-weight: bold;
    display: none;
    box-sizing: border-box; /* DŮLEŽITÉ: Zahrne padding do šířky */
    max-width: 90%; /* Omezíme maximální šířku */
    text-align: center; /* Zarovnání textu na střed */
    margin-right: 20vh;
}

.search-error.show-error {
    display: block;
}

.search-error-close {
    position: absolute;
    top: 0;       /* Umístění nahoře */
    right: 0;     /* Umístění vpravo */
    font-size: 3vh;
    line-height: 1;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.search-error-close:hover {
    opacity: 0.7;
}

/* Prohlizeni detailu objektu, tedy zvetseni fotografie */
/* ------------------------------------------------------------------ */
.lightbox-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001;
    display: none;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: none;
    width: auto;

}

.lightbox-image {
    max-width: 95vw;
    max-height: 95vh;
    height: auto;
    width: auto;
    display: block;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: -1vh;
    right: 0.25vh;
    font-size: 5vh;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    z-index: 1002;
}
.lightbox-close:hover {
    color: #ff0000bd;
    transform: scale(1.2);
}



/* Logo box + nadpis */
/* ------------------------------------------------------------------ */

.info-table {
    position: fixed;
    top: 1.5vh;
    left: 1.5vh;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 1vh;
    font-family: 'Poppins';
    height: 7vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.info-table-logos {
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

.info-table-separator {
    font-size: 2vh;
    color: #444;
    font-weight: bold;
    margin-left: 1.5vh;
}

.info-table-logo-link {
    display: flex;
    align-items: center;
    height: 100%;
    color: inherit;
}

  /* Individuální animace a pozicování */
.gps-item {
    display: flex;
    align-items: center;
}

.porici-item {
    display: flex;
    align-items: center;
}

.info-table-logo {
    height: 5vh;
    transition: transform 0.2s ease;
    cursor: pointer;
    vertical-align: middle;
    margin-right:-1.5vh;
    margin-left: 1vh;
}

.info-table-logo:hover {
    transform: scale(1.1);
}


.info-table-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    white-space: nowrap;
}

.info-table-heading-line1 {
    font-size: 2.25vh;
    line-height: 1.2;
    margin-left: 3vh;
    font-weight: 500;
}

.info-table-heading-line2 {
    font-size: 1.5vh;
    line-height: 1.2;
    margin-right: 1vh;
    margin-left: 3vh;
}

.info-table-heading-line-gps {
    font-size: 1.5vh;
    line-height: 1.2;
    margin-left: 1.5vh;
}

.info-table-heading-line-obec {
    font-size: 1.5vh;
    line-height: 1.2;
    margin-left: 3vh;
}

.info-table-content {
    font-size: 1.5vh;
    padding-left: px;
    display: none;
    flex-direction: column;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Konec info-table */





.navigation-button {
    background: none;
    border: none;
    border-radius: 5px;
    font-size: 5vh;
    font-family: 'Poppins';
    color: #444;
    cursor: pointer;
    padding: 0px 1vh;
    transition: background-color 0.2s, color 0.2s;
    position: absolute;  /* Absolutní pozice */
    top: 50%;          /* Vertikální centrovaní */
    transform: translateY(-100%);  /* Přesné vertikální centrovaní */
    z-index: 1100;    /* Nad obrázkem */
}

.navigation-button:hover {
    background-color: #44444400;
    color: white;
}

/* Umístění tlačítek */
.navigation-button#prevMatch {
    left: calc(50% - 65%); /* Dynamický výpočet */
}

.navigation-button#nextMatch {
    right: calc(50% - 65%); /* Dynamický výpočet */
}





.layer-controls-toggle:hover, #galleryButton:hover {
    background-color: #e0e0e0; /* Světle šedé pozadí */
}

/* Odstranění specifických stylů pro fotogalerii */
.gallery-control {
    padding: 0;
    border: none;
    background: none;
}
/* Kontejner galerie */
#galleryLightbox .gallery-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 99vw;
    max-height: 99vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Obrázek v galerii */
#galleryLightbox .gallery-image {
    max-width: 99vw;
    max-height: 99vh;
    object-fit: contain;
    border-radius: 2vh;
}

/* Šipky navigace */
.nav-prev, .nav-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4.5vh;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2003;
    font-family: 'Poppins';
}

.nav-prev {
    left: 1vh;
}

.nav-next {
    right: 1vh;
}

.nav-prev:hover, .nav-next:hover {
    color: #000000;
}

/* Zavírací tlačítko */
#galleryLightbox .lightbox-close {
    top: -1vh;
    right: 0.5vh;
    font-size: 5vh;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2003;
}

#galleryLightbox .lightbox-close:hover {
    color: #ff0000bd;
    transform: scale(1.2);
}


/* Odstranění nepotřebného obsahu */
.leaflet-control-attribution {
    display: none !important;
}



/* Upravený styly pro uvítací banner */
.welcome-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9); /* Polopruhledné bílé pozadí */
    text-align: center;
    padding: 40px 20px;
    width: 80%; /* 80% šířky stránky */
    max-width: 800px;
    border-radius: 1vh; /* Zakulacené rohy */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1003; /* Nad ostatními prvky */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Oprava stylu překryvu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Tmavší překryv */
    z-index: 1002; /* Pod bannerem, ale nad mapou */
    backdrop-filter: blur(0.3vh); /* Rozmazání pozadí */
}

/* Styly pro loga v banneru */
.banner-logos {
    display: flex;
    align-items: center;
}

.banner-logos a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.banner-logos .gps-logo {
    width: 9vh;
    height: auto;
    transition: transform 0.2s;
}

.banner-logos .gps-logo:hover {
    transform: scale(1.1); /* Větší zvětšení při hover */
}

.banner-logos .porici-logo {
    width: 8vh;
    height: auto;
    transition: transform 0.2s;
}

.banner-logos .porici-logo:hover {
    transform: scale(1.05); /* Menší zvětšení při hover */
}


.separator {
    font-size: 4vh;
    color: #444;
    font-weight: 500;
    margin-right: 2vh;
    margin-left: 0.25vh;
    opacity: 1;
    font-family: 'Poppins';
}

.welcome-banner h1 {
    color: #333333;
    font-size: 4vh;
    font-family: 'Poppins';
}

.welcome-banner p {
    color: #666666;
    font-size: 2vh;
    margin-top: -20px;
    font-family: 'Poppins';
}

/* Upravené tlačítko */
.cta-button {
    background-color: #ff3333;
    color: white;
    border: none;
    padding: 0.7vh 1.5vh;
    font-size: 2vh;
    font-family: 'Poppins';
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, scale 0.2s;
    margin-top: 0.7vh;
}

.cta-button:hover {
    transform: translateY(-0.5vh);
    scale: 110%;
}