body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
}

.display-1, .display-2, .display-4, .display-6 {
    font-weight: 900;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 350px;
}

.card {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.text-orange-600 {
    color: #ea580c;
}

.text-teal-500 {
    color: #14b8a6;
}

.popup-header {
    font-size: 1.1rem;
    font-weight: bold;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s;
}

.loading-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- Styly pro legendu mapy --- */
.legend {
    padding: 6px 8px;
    font: 14px/16px Arial, Helvetica, sans-serif;
    background: white;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    line-height: 18px;
    color: #555;
}

.legend-scale-container {
    display: flex;
    align-items: flex-start;
    margin-top: 5px;
}

.legend-color-bar {
    display: flex;
    flex-direction: column;
    width: 20px;
    height: 140px;
    border: 1px solid #aaa;
}

.legend-color-bar span {
    flex-grow: 1;
}

.legend-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
    padding-left: 5px;
    font-size: 12px;
}

.legend-dark-theme {
    background: rgba(40, 40, 40, 0.85);
    color: #f0f0f0;
}

.legend-dark-theme .legend-color-bar {
    border: 1px solid #888;
}

/* --- Styly pro srovnání nejlepší/nejhorší lokality --- */
.comparison-card {
    border-width: 3px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

/* --- Styly pro detailní rozpad v akordeonu --- */
.extreme-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}
.extreme-detail-item:last-child {
    border-bottom: none;
}
.extreme-detail-item .label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #555;
}
.extreme-detail-item .value {
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- Styly pro novou stupnici Heat Indexu --- */
/* --- Styly pro novou stupnici Heat Indexu --- */
.hi-scale-wrapper {
    position: relative;
    padding-bottom: 20px; /* Místo pro popisky pod stupnicí */
}

.hi-scale-bars {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
}

.hi-scale-bar {
    flex: 1;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: flex-grow 0.2s ease-in-out;
    cursor: help; /* Ukáže, že prvek má tooltip */
}

.hi-scale-bar:hover {
    flex-grow: 1.5; /* Mírné zvětšení segmentu při najetí myší */
}

.hi-scale-labels {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
}

.hi-scale-labels span {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* --- Styly pro kartu Vlny veder --- */
.heat-wave-card {
    background: linear-gradient(145deg, #fff5f5, #ffe3e3);
    border-color: #fecaca;
}
/* --- Styly pro novou sticky navigaci --- */
.dashboard-nav {
    position: -webkit-sticky; /* Pro Safari */
    position: sticky;
    top: 0;
    z-index: 1020; /* Vyšší než standardní obsah, ale nižší než modální okna */
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

/*
 * Přidá horní odsazení k sekcím, aby je nepřekrývala přilepená navigace,
 * když na ně přeskočíme pomocí odkazu. Hodnota by měla odpovídat výšce navigace.
*/
section[id] {
    scroll-margin-top: 100px;
}


/* --- Styly pro nové tlačítko "Domů" na mapě --- */
.leaflet-control-home {
    background-color: white;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}

.leaflet-control-home:hover {
    background-color: #f4f4f4;
}

.leaflet-control-home .material-icons {
    font-size: 22px;
    color: #333;
}


/* --- Styly pro nové dlaždice lokalit --- */
.area-tile {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.area-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
    border-color: #ea580c;
}


/* --- Styly pro nové dlaždice lokalit --- */
.area-tile {
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.area-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

.area-tile.active-tile {
    border-color: #ea580c; /* Oranžová barva pro aktivní dlaždici */
    border-width: 2px;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
    transform: translateY(-5px);
}

.border-start-lg {
    border-left: none;
}

@media (min-width: 992px) {
    .border-start-lg {
        border-left: 1px solid #dee2e6 !important;
        padding-left: 1.5rem !important;
    }
}

/* --- Styly pro porovnávací pruhy (Tropické noci) --- */
.comparison-bar-container {
    display: grid;
    grid-template-columns: 1fr 2fr 30px;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comparison-bar-container .label {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comparison-bar-container .bar-wrapper {
    background-color: #e9ecef;
    border-radius: 0.25rem;
    height: 1.25rem;
}

.comparison-bar-container .bar {
    height: 100%;
    border-radius: 0.25rem;
    transition: width 0.5s ease-in-out;
}

.comparison-bar-container .value {
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
}

/* --- Styly pro novou sekci "Použité technologie" --- */
.sensor-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #fff;
}

.sensor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.07) !important;
}

.sensor-card-image-col {
    background-color: #f8fafc; /* Světle šedé pozadí */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.sensor-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.5rem;
}

.sensor-card-image-placeholder .material-icons {
    font-size: 5rem;
    color: #e2e8f0; /* Světlejší šedá pro ikonu zástupce */
}

.sensor-measurements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem 1rem;
}

.sensor-measurements-list li {
    display: flex;
    align-items: center;
    color: #4b5563; /* Gray-700 */
}

.sensor-measurements-list .material-icons {
    font-size: 1.125rem; /* 18px */
    margin-right: 0.5rem;
    color: #6b7280; /* Gray-500 */
}

.comparison-bar-container .value {
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
}
