.jmr-container {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 40px;
}

h1 {
    text-align: center;
    margin-top: 50px; /* Týmto pridáme medzeru od vrchu */
}

/* .icon-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0 auto 50px auto;
    max-width: 90%;
    margin-top: 80px;
} */

.icon-container {
    display: flex;
    flex-wrap: wrap; /* Toto zabezpečí, že sa ikony premiestnia na nový riadok */
    justify-content: center; /* Vycentruje obsah v kontajneri */
    gap: 15px; /* Medzera medzi ikonami */
    margin: 0 auto 50px auto; /* Vycentruje kontajner a pridá medzeru dole */
    max-width: 90%;
    margin-top: 80px;
}

/* Štýly pre každú ikonu */
/* .icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    flex: 1 1 100px;
    max-width: 180px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
} */

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Zarovnáva obsah na začiatok */
    cursor: pointer;
    box-sizing: border-box; /* Zabezpečí, že padding neovplyvní celkovú veľkosť */

    /* Tu je kľúčová zmena pre rozloženie 4-4-3 */
    /* Výpočet šírky pre 4 ikony na riadok s gapom 15px */
    flex-basis: calc((100% - 3 * 15px) / 4); /* Šírka pre 4 položky */
    max-width: calc((100% - 3 * 15px) / 4); /* Maximálna šírka pre 4 položky */

    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px; /* Medzera medzi riadkami */
}

.icon-container .icon-item:nth-last-child(-n+3) {
    /* Ak sú 3 ikony na riadku, potrebujeme upraviť flex-basis */
    flex-basis: calc((100% - 2 * 15px) / 3); /* Šírka pre 3 položky */
    max-width: calc((100% - 2 * 15px) / 3); /* Maximálna šírka pre 3 položky */
}

/* .icon-container .icon-item:last-child { */
    /* Toto je pre prípad, že by na poslednom riadku boli len 1, 2 alebo 3 ikony */
    /* A chceme ich vycentrovať */
    /* margin-left: auto; */ /* Tieto auto okraje môžu byť zložité s flex-wrap */
    /* margin-right: auto; */
/* } */

.icon-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.icon-item span {
    font-size: 0.9em;
    color: #555;
    line-height: 1.2;
}

.icon-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-item.active {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.5);
    transform: translateY(-5px);
}

.central-documents {
    font-size: 0.9em;
    font-style: italic;
    color: #c0c0c0;
}


/* Document List and Viewer */
#document-list-container {
    /* margin-top: 50px; */
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 800px;
    /* max-width: 90%; */
    display: none;
    flex-direction: column;
    gap: 8px;
    /* max-height: 200px; */
    overflow-y: auto;
    margin-left: auto;
    margin-right: auto;
}

#document-list-container h5 { /* Zmena z h3 na h5 pre konzistentnosť */
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    text-align: center;
}

#document-list-container h5,
#document-viewer h4,
#document-viewer p,
.document-item,
.icon-item span { /* Zjednocujeme font aj pre popis ikon */
    font-family: 'Arial', sans-serif; /* Rovnaký font ako body */
    font-size: 1em; /* Uprav na 1em, aby bolo relatívne k body */
    font-weight: normal; /* Zabezpečí, že písmo nebude tučné, ak to nie je zámer */
    line-height: 1.5; /* Zabezpečí jednotnú výšku riadkov */
}

.document-item {
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    color: #333;
    font-size: 1em;
    text-align: left;
}

.document-item:hover {
    background-color: #e9ecef;
}

.document-item.active {
    background-color: #0d6efd;
    color: white;
}

#document-viewer {
    margin-left: auto;
    margin-right: auto;
    width: 800px;
    /* max-width: 90%; */
    height: 400px;
    min-height: 80px;
    margin-top: 50px; /* Posunuté dole */
    border-left: 4px solid #0d6efd;
    padding-left: 16px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 1px solid #dee2e6;
    overflow-y: auto;
}

#document-list-container,
#document-viewer {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 20px;
    width: 800px;
}

#document-list-container:hover,
#document-viewer:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#document-viewer::before {
    content: '';
    display: block;
    height: 4px;
    background-color: #0d6efd;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    margin: -20px -20px 16px -20px; /* prekryje padding */
}

#document-viewer h4 i {
    margin-right: 8px;
    color: #0d6efd;
}

.file-type-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap; /* Aby sa text neoddelil na dva riadky */
}

/* Špecifické štýly pre PDF */
.file-type-pdf {
    background-color: #d9534f; /* Červená farba */
}

/* Špecifické štýly pre DOCX */
.file-type-docx {
    background-color: #337ab7; /* Modrá farba */
}

.file-type-xlsx {
    background-color: rgb(18, 145, 18);
}

.document-icon {
    /* Pridaj medzeru na pravej strane */
    margin-right: 1rem; 
}