.help-icon, .hover-tooltip, .click-tooltip {
    will-change: transform;
}

.tooltips-container {
    grid-column: 1 / 5;
    display: grid;
    gap: 16px; 
    width: 90%;
    margin: auto;
    height: auto;
    padding-top: 32px;
    z-index: 10;


    justify-content: flex-start;
    align-items: start;
    position: sticky;
    top: 70px;
    padding-bottom: 60px;
    z-index: 1; 
    width: 100%;
    transform-origin: center top; 
    /* will-change: transform, opacity;
    backface-visibility: hidden; */
    transition: opacity 0.1s linear;
    /*-webkit-transform: translate3d(0, 0, 0);
     transform: translate3d(0, 0, 0);
    isolation: isolate; */
}

/* Sekce, která kontejner překryje */
.our-project, 
.individual-approach {
    position: relative;
    z-index: 900; /* Vyšší vrstva */
    background-color: #ffffff;
    -webkit-transform: translateZ(0);
    transform: translateZ(0); /* Nutné! Bez pozadí by byl blok pod ním vidět */
}

/* Aby efekt vynikl, musí mít main dostatečný padding/margin nebo pozadí */
.main_index {
    position: relative;
    background: transparent; /* Main samotný musí nechat header vidět */
}







.shorts {
    width: 95%;
    text-align: left;
    padding-left: 5%;
    font-size: 1.15rem;
}

.block {
    background-color: rgba(239, 239, 239, 0.2);
    border: 1px solid rgb(232, 235, 235);
    border-radius: 12px;
    position: relative;
    cursor: default;
    transition: background-color 0.3s ease, transform 0.2s ease;
    overflow: hidden;
    padding: 12px 0;


    margin-bottom: 10px;  /* Mezera mezi bloky */
    display: block;       /* Jistota, že se chová jako blok */
    min-height: inherit;
}


.block:hover .block-description {
    display: block; /* Nebo lépe použít opacity/max-height pro animaci */

}

.block h2 {
    display: flex;
    font-size: 1.1rem;
    padding-left: 5%;
    margin: 0 !important;
    cursor: pointer;
    user-select: none;
}

    .block.active .block-description {
    display: block !important;
    padding-left: 5%;
    padding-right: 5%;
    padding-bottom: 16px;
    animation: fadeIn 0.3s ease-out; /* Přidáme jemný efekt pro UX */
    }

    /* Jednoduchá animace pro hezčí pocit z rozbalení */
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }

.block:last-child {
    border-right: none;
}

.contact-card {
    display: none;
}

/* 3. Overlay - naprostý vládce přes celou obrazovku */
.contact-overlay {
    position: fixed; /* Fixed ho vytrhne z běžného toku dokumentu */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    z-index: 999999 !important; /* Bezpečně nad vším */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Skrytý stav */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Aktivní stav overlaye */
.contact-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-close {
    position: absolute;
    top: 50px;
    right: 50px;
    width: 40px;
    height: 40px;
    background: rgb(241, 243, 244);
    color: rgb(79, 79, 79);
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
}

.overlay-close:hover {
    background: rgb(70, 155, 111);
}

.overlay-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.overlay-content img {
    width: 70%;
    height: auto;
    margin: auto;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 40px;
    padding: 8px;
    border: 1px solid  rgb(232, 235, 235);
    background-color: #fff;
}

.overlay-content a {
    text-align: center;
    width: max-content;
    margin: auto;
    text-decoration: none;
    color: var(--secondary-clr);
    font-size: 2rem;
}

.tooltip-trigger {
  position: relative;
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  background-color: #333;
  color: #fff;
  text-align: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 10;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: none;
  border-top-color: #333;
}

.tooltip-trigger:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.bento-shortcuts {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: max-content;
    margin: 0 auto;
}

.bento-shortcuts > a, #copyEmailBtn {
    padding: 8px 16px; 
    margin-top: 40px;
    background-color: rgb(241, 243, 244);
    border: 1px solid rgb(241, 243, 244);
    color: rgb(32, 32, 32);
    font-size: 14px;
    border-radius: 50px;
    cursor: pointer;
}

.bento-shortcuts > a:hover, #copyEmailBtn:hover {
    border: 1px solid rgb(232, 235, 235);
    background-color: white;
}


.help-icon {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 16px;
    height: 16px;
    background: rgb(255, 255, 255);
    color: rgb(79, 79, 79);
    border-radius: 50%;
    border: 1px solid rgb(219, 222, 221);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease, background 0.3s ease;
    font-weight: 400;
    font-size: 12px;
}

.visited-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    height: 25px;
    background: rgb(255, 255, 255);
    color:  rgb(79, 79, 79);
    border-radius: 20px;
    border: 1px solid rgb(241, 244, 243);
    display: flex;
    align-items: center;
    padding: 2px 8px 0 35px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9;
}

.block.is-visited .visited-tag {
    opacity: 1;
    transform: translateX(0);
}

.block.is-visited .help-icon {
    background: rgb(255, 255, 255);
}

/* Zobrazí štítek, když je karta prohlédnutá NEBO právě otevřená */
.is-visited .visited-tag, 
.is-active-now .visited-tag {
    opacity: 1;
    transform: translateX(0); /* Záleží, jakou máš nastavenou animaci zobrazení */
    visibility: visible;
}

/* Volitelný detail: Štítek může mít jinou barvu, když je "Otevřeno" */
.is-active-now .visited-tag {
    background-color: rgb(220, 220, 220);
    color: var(--secondary-clr);
}

.help-icon.visited .icon-text {
    max-width: 120px;
    opacity: 1;
    margin-left: 8px;
}

.block-description {
    display: none;
}

.help-icon:hover {
    transform: scale(0.9);
    color:  rgb(47, 47, 47);
}

.help-icon:hover + .visited-tag {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.help-icon.active {
    background: rgb(70, 155, 111);
    transform: scale(0.9);
    color:  rgb(255, 255, 255);
}

#hoverTooltip {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999; 
    background: rgb(248, 248, 248);
    color: var(--secondary-clr);
    padding: 16px 24px;
    border-radius: 8px;
    border: 1px solid rgb(202, 204, 204);
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

#hoverTooltip.active {
    opacity: 1;
    visibility: visible;
}

#hoverTooltip.fade-out {
    opacity: 0.5;
    filter: blur(2px);
}

#hoverTooltip.is-wide {
    max-width: 500px;
    white-space: normal; /* Povolíme zalamování textu */
    line-height: 1.5;
    text-align: left;
}

.click-tooltip {
    position: absolute;
    background: white;
    color: #333;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    min-width: 220px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    z-index: 990;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid #eee;
    pointer-events: all;
}

.click-tooltip-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.click-tooltip-title { 
    font-weight: 700; 
    color: #111; 
    font-size: 15px; 
    display: block;
}

.click-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.click-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.click-tooltip-title {
    font-weight: 700;
    color: #111;
    font-size: 15px;
}

.click-tooltip-close {
    background: #f0f0f0;
    border: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.controls-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    z-index: 1000;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px; 
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.15), /* Vnější stín */
        inset 0 0 12px rgba(255, 255, 255, 0.4), /* Vnitřní záře pro efekt tloušťky skla */
        inset 0 4px 4px rgba(255, 255, 255, 0.2);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}

#hintBox {
    background: rgba(243, 243, 243, 0.9);
    color: rgb(74, 68, 68);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    transition: opacity 0.5s ease;
}

/* Kontejner pro animované číslo */
.num-animate-container {
    display: inline-block;
    height: 1.2em;
    vertical-align: bottom;
    overflow: hidden;
    position: relative;
    width: 0.7em; /* Fixní šířka pro stabilitu */
    text-align: center;
}

.num-animate-value {
    display: block;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.num-container {
    display: inline-block;
    height: 20px;
    overflow: hidden;
    vertical-align: bottom;
    width: 20px;
    text-align: center;
}

.num-rolling {
    display: block;
    margin-top: -4px;
    animation: rollDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes rollDown {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}


/* Přidat novou třídu pro tooltip v controls-wrapper */
.controls-tooltip {
    position: fixed;
    bottom: 80px; /* Nad controls-wrapper */
    right: 0px;
    background: rgb(220, 220, 220);
    color: var(--secondary-clr);
    padding: 16px 32px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    width: 480px;
    height: 124px;
    opacity: 0;
    visibility: hidden;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(93, 93, 93, 0.2);
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: 4px solid rgb(23, 23, 23);
    pointer-events: all;
}

.controls-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.controls-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(212, 212, 212);
    gap: 15px;
}

.controls-tooltip-title { 
    font-weight: bold; 
    color: #111; 
    font-size: 15px;
    width: 80%;
}

.controls-tooltip-close {
    background:white;
    border: none;
    width: 28px !important; 
    height: 28px !important;
    border-radius: 50%;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.controls-tooltip-close:hover {
    background:rgb(70, 155, 111);

}

.stack-nav {
    display: none; /* Skryté ve výchozím stavu */
    gap: 10px;
    margin-bottom: 10px; /* Mezera mezi šipkami a kartou */
    justify-content: flex-end; /* Zarovnání doprava (nebo center) */
    position: absolute;
    top: 0;
    right: 220px;
    padding: 12px;
    background-color: white;
    border-radius: 18px;
    z-index: 210;
        background: rgba(255, 255, 255, 0.35); 
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px; 
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.15), /* Vnější stín */
        inset 0 0 12px rgba(255, 255, 255, 0.4), /* Vnitřní záře pro efekt tloušťky skla */
        inset 0 4px 4px rgba(255, 255, 255, 0.2);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
}

.stack-nav-btn, #layoutBtn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    /* font-weight: bold; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-nav-btn {
    transform: rotate(90deg);
    font-size: 10px;
}

.stack-nav-btn:hover {
    background-color: rgba(70, 155, 111, 1);
}


#layoutBtn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.3s ease, background 0.3s ease;
    transition: background-color 0.2s;
    line-height: 1; 
}

#layoutBtn:hover {
    background: rgb(70, 155, 111);
    transition: transform 0.3s ease, background 0.3s ease;
    transform: rotate(90deg);
}

.overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    z-index: 990;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px; 
}

.modal-title {
    font-size: 20px;
    font-weight: 700; 
}

.highlight {
    color: inherit;
    font-weight: bold;
}

/* Animace pro tekutou změnu textu */
.liquid-animate {
    animation: liquid-transition 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes liquid-transition {
    0% {
        filter: blur(0px);
        transform: scale(1);
        opacity: 1;
    }
    40% {
        filter: blur(12px);
        transform: scale(0.92);
        opacity: 0;
    }
    60% {
        filter: blur(12px);
        transform: scale(0.92);
        opacity: 0;
    }
    100% {
        filter: blur(0px);
        transform: scale(1);
        opacity: 1;
    }
}

.thumb-bounce {
    display: inline-block;
    margin-left: 8px;
    font-size: 1.1em; /* Mírně zvětšená ikona */
    animation: bounceEffect 1s 1 cubic-bezier(0.28, 0.84, 0.42, 1);
}

/* Skákavá animace (Bounce) */
@keyframes bounceEffect {
    0%, 100% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-25%) scale(1.1); /* Vyskočí a mírně se zvětší */
    }
}








/* 1. Výchozí stav: přidána podpora pro plynulý návrat posunu */
header .header_hero-perex,
header .tooltips-container,
header .h1-perex,
header h1 {
/* Animujeme opacity i transform zároveň */
transition: opacity 0.35s ease-in-out, transform 0.35s ease-in-out;
opacity: 1;
transform: translateY(0);
}

/* 2. Zprůhlednění a posun při hoveru na tlačítko */

/* Krok 1: .header_hero-perex se posune NAHORU (záporná hodnota) */
header:has(.btn_reservation:hover) .header_hero-perex {
opacity: 0.1;
transform: translateY(-205px); /* Uprav hodnotu 15px podle potřeby */
}

/* Krok 2: .tooltips-container zůstává na místě */
header:has(.btn_reservation:hover) .tooltips-container {
opacity: 0.7;
transform: translateY(0); /* Zde není posun nutný, zůstává na místě */
}

/* Krok 3: .h1-perex se posune DOLŮ (kladná hodnota) */
header:has(.btn_reservation:hover) .h1-perex {
opacity: 0.5;
transform: translateY(105px); /* Uprav hodnotu 15px podle potřeby */
}

header:has(.btn_reservation:hover) h1 {
transform: translateY(5px); /* Uprav hodnotu 15px podle potřeby */
}




@media (max-width: 1099px) {
    .tooltips-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas: "a" "b" "c" "d" "e";
        height: auto;
        grid-row: 1 / 7;
        grid-column: 1 / 13;
    }
}



@media (min-width: 1100px) {

    .tooltips-container {
        grid-column: 1 / 5;
        grid-row: 1 / 7;
        display: grid;
        gap: 16px; 
        width: 96%;
        margin: auto;
        height: calc(100% - 48px);
        padding-top: 32px;
        grid-template-areas: 
            "a a b c"
            "d e contact contact";
        grid-template-rows: 45% 54%;
        transition: grid-template-columns 0.4s ease, grid-template-rows 0.4s ease;
        position: relative;
        z-index: 10;
        top: 0;
    }

    .block {
        height: 100%;
        padding: 0;
    }

    .block h2, .shorts {
        display: none;
    }

    .contact-card {
        border: 1px solid rgb(232, 235, 235);
        grid-area: contact;
        background: #fff;
        border-radius: 16px;
        padding: 12px;
        display: flex;
        align-items: start;
        flex-direction: column;
        gap: 16px;
        cursor: pointer;
        transition: all 1.4s ease;
        height: 95%;
    }

    .contact-card:hover {
        background-color: rgb(232, 235, 235);
        transition: all 0.8s ease;
    }

    .contact-card img {
        width: 140px;
        height: 240px;
        border-radius: 8px;
        object-fit: cover;
    }

    #bento-arrow img {
        width: 24px;
        height: 24px;
    }

    .contact-card a {
        color:var(--secondary-clr);
        font-size: 1.5rem;
        text-decoration: none;
        font-weight: 400;
    }


}

