/*
 * Jemné pohybové efekty a drobná responzivní vylepšení
 * veřejného webu.
 *
 * Obsah není v CSS nikdy předem skrytý. Animace jsou pouze
 * progresivní vylepšení spuštěné JavaScriptem ve chvíli, kdy se
 * prvek dostane do viewportu.
 */

.text-link svg {
  transition: transform .22s ease;
}

.explain-card,
.choice-card,
.offer-card,
.room-card,
.amenity-card,
.room-occupancy-card,
.feature-item,
.faq-item {
  transition:
    transform .26s cubic-bezier(.2, .7, .2, 1),
    box-shadow .26s ease,
    border-color .26s ease;
}

.explain-card .card-icon,
.feature-icon,
.amenity-card svg {
  transition: transform .26s cubic-bezier(.2, .7, .2, 1);
}

.offer-card > img,
.room-card-media img,
.gallery-link img,
.floorplan-link img {
  transition: transform .38s cubic-bezier(.2, .7, .2, 1);
}

.gallery-link,
.floorplan-link {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
}

.gallery-link::after,
.floorplan-link::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(11, 34, 59, .28));
  opacity: 0;
  transition: opacity .28s ease;
}

.gallery-open-label {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  color: #fff;
  background: rgba(11, 34, 59, .88);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(11, 34, 59, .2);
  font-size: .74rem;
  font-weight: 850;
  backdrop-filter: blur(8px);
}

/*
 * Plynulé FAQ bez měření výšky v JavaScriptu. Přímý potomek
 * tvoří animovaný grid řádek od 0fr do 1fr.
 */
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows .35s cubic-bezier(.2, .7, .2, 1),
    opacity .2s ease,
    padding-bottom .35s cubic-bezier(.2, .7, .2, 1),
    visibility 0s linear .35s;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
  padding-top: 24px;
  padding-bottom: 24px;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.faq-item.open .faq-question {
  background: #f8fbfd;
}


.faq-question {
  transition: background-color .24s ease;
}

.faq-item.open .faq-question {
  background: #f8fbfd;
}

/*
   Sladění GLightboxu s webem.

   Vlastní CSS knihovny se načítá až za tímhle souborem, takže
   pouhé zopakování selektoru by prohrálo. Odsud výš zvednutá
   specificita platí bez ohledu na pořadí.
*/
.glightbox-container .goverlay {
  background: rgba(8, 24, 41, .96);
}

/*
   Fotka v modalu se nenatahuje přes 1280 px. Zdrojová varianta
   detail.webp má 1600 px, takže se pořád zmenšuje a zůstává ostrá.
*/
.glightbox-container .gslide-image img { max-width: 90vw;}
@media (min-width: 1400px) {
  .glightbox-container .gslide-image img { max-width: 1280px;}
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover svg {
    transform: translateX(4px);
  }
  .explain-card:hover,
  .choice-card:hover,
  .offer-card:hover,
  .room-card:hover,
  .amenity-card:hover,
  .room-occupancy-card:hover,
  .faq-item:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 120, 181, .24);
    box-shadow: 0 18px 42px rgba(18, 51, 86, .12);
  }

  .feature-item:hover {
    transform: translateY(-2px);
    background: #fbfdff;
  }

  .explain-card:hover .card-icon,
  .feature-item:hover .feature-icon,
  .amenity-card:hover svg {
    transform: scale(1.06);
  }

  .offer-card:hover > img,
  .room-card:hover .room-card-media img,
  .gallery-link:hover img,
  .floorplan-link:hover img {
    transform: scale(1.025);
  }

  .gallery-link:hover::after,
  .floorplan-link:hover::after {
    opacity: 1;
  }
}

/* Nabídka: čtyři filtry a reset se na desktopu vejdou do řádku. */
.filters {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

@media (max-width: 860px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-field:first-child {
    grid-column: auto;
  }

  .filter-reset {
    width: 100%;
  }
}

/*
 * Na mobilu se tabulka přeskupí do karet. HTML zůstává tabulkou,
 * takže desktop i asistivní technologie dostávají stejná data.
 */
@media (max-width: 760px) {
  .inventory-table-wrap {
    overflow: visible;
    margin-inline: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .inventory-table {
    display: block;
    min-width: 0;
    font-size: .88rem;
  }

  .inventory-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .inventory-table tbody {
    display: grid;
    gap: 16px;
  }

  .inventory-table tbody tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .inventory-table tbody tr:hover {
    background: #fff;
  }

  .inventory-table td,
  .inventory-table td:first-child,
  .inventory-table td:last-child {
    position: static;
    z-index: auto;
    display: grid;
    grid-template-columns: minmax(105px, .7fr) minmax(0, 1.3fr);
    gap: 14px;
    align-items: start;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
  }

  .inventory-table tbody tr:hover td:first-child,
  .inventory-table tbody tr:hover td:last-child {
    background: #fff;
  }

  .inventory-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .inventory-table td:last-child {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }

  .inventory-table td:last-child::before {
    display: none;
  }

  .occupancy-cell {
    min-width: 0;
  }

  .occupancy-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .occupancy-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .table-action {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 600px) {
  .gallery-open-label {
    right: 10px;
    bottom: 10px;
    min-height: 34px;
    padding: 7px 11px;
    font-size: .68rem;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .inventory-table td,
  .inventory-table td:first-child,
  .inventory-table td:last-child {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .inventory-table td:last-child::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-link svg,
  .explain-card,
  .choice-card,
  .offer-card,
  .room-card,
  .amenity-card,
  .room-occupancy-card,
  .feature-item,
  .faq-item,
  .faq-answer,
  .faq-question,
  .gallery-link img,
  .floorplan-link img {
    transition: none !important;
  }

  .explain-card:hover,
  .choice-card:hover,
  .offer-card:hover,
  .room-card:hover,
  .amenity-card:hover,
  .room-occupancy-card:hover,
  .feature-item:hover,
  .faq-item:hover,
  .gallery-link:hover img,
  .floorplan-link:hover img {
    transform: none !important;
  }
}
