.highlight {
    fill: rgba(220, 38, 38, 0.3) !important;
}

tr.highlight {
    background: rgba(220, 38, 38, 0.3) !important;
}

#mapa {
    flex: 1;
    position: relative;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mapa-arealu {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mapa-arealu svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.2);
}

#mapa-arealu [class^="budova_"] {
    cursor: pointer;
    fill: rgb(0 0 0 / 22%);
}

#zoznam-objektov {
    position: relative;
    flex: 1;
    padding: 24px;
    background: #fff;
}

/* Detail objektu */
#detail-objektu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 32px;
    box-sizing: border-box;
    overflow-y: auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    position: relative;
    flex-direction: column;
    align-content: flex-start;
}

.detail-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: #111827;
    letter-spacing: -0.025em;
}

#close-detail {
    position: absolute;
    top: -8px;
    right: -8px;
    background: none;
    color: #000000;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 80px;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#close-detail:hover {
    color: #111827;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}



.info-item {
    padding: 16px;
    background: #f9fafb;
    border-left: 2px solid #e5e7eb;
    transition: border-color 0.2s;
}

.info-item:hover {
    border-left-color: #000000;
}

/* Priestory sekcie */
.priestory-sekcia {
    margin-top: 48px;
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
}

.priestory-sekcia h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #111827;
    letter-spacing: -0.025em;
}

.priestory-sekcia.dostupne h3 {
    color: #047857;
    /* Tmavšia zelená */
}

.priestory-sekcia.obsadene h3 {
    color: #991b1b;
    /* Tmavšia červená */
}

.priestory-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.priestor-item {
    display: flex;
    flex-wrap: wrap;
    /* Umožní zalomenie riadkov, ak je málo miesta */
    padding: 24px;
    gap: 30px;
    /* Nastavuje medzeru medzi galériou a gridom */
    background: #fff;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
    transition: border-color 0.2s;
    align-items: stretch;
    /* Roztiahne info-grid na rovnakú výšku ako galéria */
}

.priestor-item h4 {
    width: 100%;
    /* Nadpis na plnú šírku */
    margin: 0 0 16px 0;
    color: #111827;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.025em;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.priestor-galeria {
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    /* Štvorcový pomer strán */
    overflow: hidden;
}

.priestor-item .priestor-galeria {
    width: 30%;
}

.priestor-item .info-grid {
    flex: 1;
    /* Roztiahne zvyšok priestoru rovnomerne */
    display: grid;
    /* Použitie grid layoutu pre interné zarovnanie */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* Dynamické rozloženie vnútri gridu */
    gap: 16px;
    /* Medzery medzi prvkami v grid-e */
}

.priestor-item:hover {
    border-color: #9ca3af;
}



/* Stavy priestorov */
.stav-dostupny {
    border-left: 2px solid #047857;
}

.stav-obsadeny {
    border-left: 2px solid #991b1b;
}

.stav-v-rekonstrukcii {
    border-left: 2px solid #92400e;
}

/* Loading stav */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #6b7280;
}

/* Responsive design */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    #detail-objektu {
        padding: 24px 16px;
    }

    .priestor-item {
        flex-direction: column;
        /* Na menších obrazovkách sa prvky usporiadajú pod seba */
        gap: 12px;
        /* Menšia medzera na menších obrazovkách */
    }

    .priestor-item .priestor-galeria,
    .priestor-item .info-grid {
        width: 100%;
        /* Na menších obrazovkách každý prvok zaberie plnú šírku */
    }

    .detail-header h2 {
        font-size: 20px;
    }

    .priestory-sekcia {
        margin-top: 32px;
        padding-top: 16px;
    }
}










/* Galéria - spoločné štýly */
.objekt-galeria,
.priestor-galeria {
    overflow: hidden;
}

/* Jeden obrázok */
.galeria-single {
    position: relative;
    overflow: hidden;
}

.galeria-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.galeria-single:hover img {
    transform: scale(1.05);
}


.swiper-container {
    width: 100%;
    height: auto;
    /* Automatická výška podľa obsahu */
}

.swiper-wrapper {
    display: flex;
    height: auto;
    /* Automatická výška podľa obsahu */
}



.swiper-slide {
    display: flex;
    /* Zmeňte na flex pre jednoduchšie zarovnanie */
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    /* Zachová štvorcový pomer strán */
    overflow: hidden;
    /* Skryje prebytočné časti obrázka */
}


.swiper-slide a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Obrázok sa prispôsobí priestoru */
    object-position: center;
    /* Zarovnanie do stredu */
}




/* Navigačné prvky slideru */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 2px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.8;
}

.swiper-pagination-bullet-active {
    background: #dc2626;
}

/* Hover efekty pre lightbox */
.galeria-single a,
.swiper-slide a {
    position: relative;
    display: block;
    cursor: pointer;
}

.galeria-single a:before,
.swiper-slide a:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-single a:hover:before,
.swiper-slide a:hover:before {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {

    .galeria-single,
    .galeria-slider {
        height: 200px;
    }
}







/* Základný vzhľad tabuľky */

.dt-search {
    display: none;
}

table.dataTable.stripe>tbody>tr:nth-child(odd)>*,
table.dataTable.display>tbody>tr:nth-child(odd)>* {
    box-shadow: none !important
}

table tbody>tr:nth-child(odd)>td,
table tbody>tr:nth-child(odd)>th {
    background: none !important;
}

.dataTables_wrapper {
    padding: 24px 0;
}

/* Hlavička tabuľky */
#datatable-objekty thead th {
    color: #1A0101;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    border-left: none;
    border-right: none;
}

/* Bunky tabuľky */
#datatable-objekty tbody td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #1A0101;
    border-right: none;
    border-left: none;
}

/* Hover efekt na riadky */
#datatable-objekty tbody tr:hover {
    background-color: #f9fafb;
}

/* Zoraďovanie */
table.dataTable.display tbody tr.odd>.sorting_1,
table.dataTable.order-column.stripe tbody tr.odd>.sorting_1,
table.dataTable.display tbody tr.even>.sorting_1,
table.dataTable.order-column.stripe tbody tr.even>.sorting_1 {
    background-color: transparent !important;
    /* Transparentné pozadie */
    color: inherit !important;
    /* Zachováva pôvodnú farbu textu */
    box-shadow: none !important;
}

table.dataTable td.sorting_1 {
    box-shadow: none !important;
}


/* Vyhľadávacie pole */
.dataTables_filter {
    margin-bottom: 24px;
}

.dataTables_filter input {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    width: 250px;
    outline: none;
}

.dataTables_filter input:focus {
    border-color: #dc2626;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1A0101;
}

/* Stránkovanie */
.dataTables_paginate {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.paginate_button {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #1A0101;
    background: #fff;
    min-width: 32px;
    text-align: center;
}

.paginate_button:hover:not(.disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.paginate_button.current {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.paginate_button.disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

/* Prázdny stav */
.dataTables_empty {
    padding: 48px 24px !important;
    text-align: center;
    color: #1A0101;
}

/* Responsive úpravy */
@media (max-width: 1024px) {
    #mapa-objektov {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 768px) {

    #mapa-objektov {
        display: flex;
        flex-direction: column;
    }

    #detail-objektu {
        overflow-y: visible;
    }

    #mapa-arealu {
        scale: 1.5;
        -webkit-transform-origin-y: 150px;
        height: 640px !important;
    }

    .map-popup {
        width: fit-content;
    }

    .dataTables_filter input {
        width: 100%;
    }

    .dataTables_filter label {
        flex-direction: column;
        align-items: flex-start;
    }

    .paginate_button {
        padding: 6px 10px;
        min-width: 28px;
    }
}

#filter-container {
    margin-bottom: 16px;
    text-align: left;
}

#filter-container select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    color: #1A0101;
}

/* Popup štýly */
.map-popup {
    position: absolute;
    background: white;
    padding: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 300px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
}

.map-popup.visible {
    opacity: 1;
    transform: translateY(0);
}

.map-popup.loading {
    min-height: 100px;
}

.map-popup.loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
}

.map-popup-image {
    margin: -12px -12px 12px -12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    height: auto;
    width: calc(100% + 24px);
}

.map-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-popup-header h4 {
    margin: 0;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.map-popup-objekt {
    font-size: 14px;
}

.map-popup-content {
    font-size: 14px;
    color: #374151;
}

.map-popup-info {
    display: grid;
    gap: 4px;
}

.map-popup-info-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.map-popup-info-label {
    font-weight: 500;
    color: #6b7280;
}

.map-popup-info-value {
    color: #111827;
}

#mapa-objektov {
    display: flex;
}
