﻿:root {
    --white: #fff;
    --black: #000;
    --orange: #fdb615;
    --light-orange: #ffd067;
    --light-grey: #f5f5f5;
    /* hotspot defaults */
    --hotspot-bg: rgba(255,255,255,0.92);
    --hotspot-padding: 6px 10px;
    --hotspot-radius: 8px;
    --hotspot-gap: 8px;
    --hotspot-scale-default: 1; /* výchozí, lze přepsat inline */
}

/* kontejner obrázku */
.image-wrap {
    position: relative;
    width: 100%;
    overflow: visible;
    border-radius: 8px;
}

    /* pouze hlavní obrázek (neovlivní ikony) */
    .image-wrap > img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

/* hotspot - používá proměnnou --hotspot-scale */
.hotspot {
    position: absolute;
    /* --hotspot-scale může být nastaven inline: style="--hotspot-scale:1.3;" */
    --hotspot-scale: var(--hotspot-scale-default);
    transform: translate(-50%, -50%) scale(var(--hotspot-scale));
    transform-origin: center center;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: var(--hotspot-gap);
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease;
    border-radius: 6px;
}

.hotspot-nohover {
    position: absolute;
    /* --hotspot-scale může být nastaven inline: style="--hotspot-scale:1.3;" */
    --hotspot-scale: var(--hotspot-scale-default);
    transform: translate(-50%, -50%) scale(var(--hotspot-scale));
    transform-origin: center center;
    padding: var(--hotspot-padding);
    border: 2px solid var(--light-grey);
    border-radius: var(--hotspot-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: var(--hotspot-gap);
    white-space: nowrap;
}

/* vnitřní odkaz */
.hotspot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: var(--hotspot-padding);
    background: var(--hotspot-bg);
    border-radius: var(--hotspot-radius);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.16);
    transition: box-shadow 160ms ease;
}

/* ikona - responzivní pomocí clamp */
.image-wrap .hotspot .hotspot-icon {
    width: clamp(30px, 5.2vw, 46px);
    height: auto;
    display: block;
}

/* text */
.hotspot-text {
    color: var(--light-orange);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
    line-height: 1;
    white-space: nowrap;
}

/* odkaz uvnitř hotspotu */
.hotspot a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);    
}

/* hover/focus: škálujeme rodičovský .hotspot relativně k jeho výchozí proměnné */
/* hover/focus pouze pro hotspoty, které NEMAJÍ třídu hotspot-nohover */
.hotspot:not(.hotspot-nohover):hover,
.hotspot:not(.hotspot-nohover):focus-within {
    transform: translate(-50%, -50%) scale(calc(var(--hotspot-scale) * 1.12));
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}


/* RESPONSIVE: zmenšení scale pro menší obrazovky */
@media (max-width: 1200px) {
    .hotspot {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.90);
    }

    .hotspot-nohover {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.90);
    }
}

@media (max-width: 900px) {
    .hotspot {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.80);
    }

    .hotspot-nohover {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.80);
    }
}

@media (max-width: 600px) {
    .hotspot {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.70);
    }

    .hotspot-nohover {
        --hotspot-scale: calc(var(--hotspot-scale-default) * 0.70);
    }

    .image-wrap .hotspot .hotspot-icon {
        width: clamp(16px, 4.5vw, 28px);
    }

    .hotspot-link {
        padding: 4px 8px;
        gap: 0.4rem;
    }

    .hotspot a {
        font-size: 0.85rem;
    }
}

/* přístupnost */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* seznam pod obrázkem */
.list-links {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 8px;
}

    .list-links a {
        display: block;
        padding: 8px 10px;
        background: #f7f9fb;
        border-radius: 6px;
        color: var(--orange);
        text-decoration: none;
        font-weight: 600;
        text-align: center;
    }
