/* Departures calendar: /kalendar and /kalendar/<month>-<year> (tools/pages/calendar.mjs, js/calendar.js).
   Built only from the template's own parts and tokens: the listing hero / grid / CTA box, pre-title badges, the
   CTA box's pastel panel with a dashed white inner line, the filter chips, the slider arrows, the tour page's
   sidebar, the offer cards and the small light button. Each month carries a season tint from the template's
   pastel palette (autumn sand, winter sky, spring turquoise, summer gold). */

.is-autumn { --ih-season: var(--color--primary-3); }
.is-winter { --ih-season: var(--color--primary-4); }
.is-spring { --ih-season: var(--color--primary-2); }
.is-summer { --ih-season: var(--color--primary-1); }

/* the italic serif year next to a month name (the template's accent face, brand turquoise) */
.ih-cal-tile-year {
  font-family: var(--_typography---font-family--alt-text); font-weight: var(--_typography---alt-text--font-weight-1);
  font-style: italic; color: var(--ih-turq-deep);
}

/* ================================================================ /kalendar: month board */
.ih-cal-board {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap--gap-6);
}
/* the CTA box's look: a pastel panel, 10px inside it a dashed white line */
.ih-cal-tile { border-radius: var(--border-radius--lg); background-color: var(--ih-season); padding: .625rem; }
.ih-cal-tile-inner {
  display: flex; flex-direction: column; height: 100%;
  border: 1px dashed var(--color--white); border-radius: var(--border-radius--md);
  padding: 1.25rem 1.25rem 1.125rem; color: var(--color--gray-1); text-decoration: none;
  transition: background-color .3s ease-in-out;
}
a.ih-cal-tile-inner:hover { background-color: var(--color--white-op50); }
a.ih-cal-tile-inner:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 4px; }
.ih-cal-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gap--gap-4); }
.ih-cal-tile-name { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--gap--gap-3); row-gap: 2px; min-width: 0; }
.ih-cal-tile-name h3 { flex-basis: 100%; }
.ih-cal-tile-name .ih-cal-tile-year { font-size: var(--_typography---body--body-xl); line-height: var(--_typography---body--line-height-2); }
/* the template button's round arrow (white circle), turning into the dark one on hover */
.ih-cal-tile-go.icon-wrapper { width: 40px; height: 40px; transition: background-color .3s ease-in-out; }
.ih-cal-tile-go .icon { transition: transform .3s ease-in-out, filter .3s ease-in-out; }
a.ih-cal-tile-inner:hover .ih-cal-tile-go { background-color: var(--ih-ink); }
a.ih-cal-tile-inner:hover .ih-cal-tile-go .icon { transform: rotate(45deg); filter: invert(1); }
.ih-cal-tile-stats {
  margin: .875rem 0 1.25rem; color: var(--color--gray-1-op70);
  font-size: var(--_typography---body--body-sm); line-height: var(--_typography---body--line-height-3);
}
.ih-cal-tile .featured-tours-divider { margin-top: auto; margin-bottom: 1.125rem; }
.ih-cal-tile-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--gap--gap-4); min-height: 36px; }
.ih-cal-tile-bottom .tours-pricing { align-items: baseline; white-space: nowrap; }
.ih-cal-tile-bottom .ih-price-from { color: var(--color--gray-1-op70); margin-right: 0; }
/* overlapping round photos, like the template's flag stack („View All Locations”) */
.ih-cal-faces { display: flex; align-items: center; padding-left: 10px; }
.ih-cal-face {
  flex: none; width: 36px; height: 36px; max-width: none; margin-left: -10px; border-radius: 50%;
  object-fit: cover; box-shadow: 0 0 0 2px var(--color--white); background-color: var(--color--white);
}
.ih-cal-faces > img.ih-cal-face:nth-of-type(n+4) { display: none; } /* three photos, then „+N” */
.ih-cal-face-more {
  display: flex; align-items: center; justify-content: center; color: var(--color--gray-1);
  font-size: var(--_typography---body--body-xs); font-weight: 600; line-height: 1;
}
/* months without departures stay in the grid, muted and without a link */
.ih-cal-tile.is-empty { background-color: var(--color--gray-4); }
.ih-cal-tile.is-empty .ih-cal-tile-inner { border-color: var(--color--gray-1-op10); }
.ih-cal-tile.is-empty h3, .ih-cal-tile.is-empty .ih-cal-tile-year { color: var(--color--gray-2); }
.ih-cal-tile.is-empty .ih-cal-tile-stats { color: var(--color--gray-2); }
.ih-cal-tile.is-empty .ih-cal-faces, .ih-cal-tile.is-empty .tours-pricing, .ih-cal-tile.is-empty .ih-cal-tile-go { display: none; }
.ih-cal-tile-soon, .ih-cal-now {
  border-radius: var(--border-radius--xl); font-size: var(--_typography---body--body-xs);
  line-height: var(--_typography---body--line-height-2); padding: .25rem .625rem .1875rem; white-space: nowrap;
}
.ih-cal-tile-soon { background-color: var(--color--white); color: var(--color--gray-2); }
/* „Този месец” (calendar.js, from the visitor's date) */
.ih-cal-now { background-color: var(--ih-ink); color: var(--color--white); font-weight: 600; }

/* ================================================================ /kalendar: „Най-близките заминавания” */
/* right after the board (whose section keeps the template's 150px bottom spacing), so no top spacing of its own */
.ih-cal-next-section { padding-bottom: var(--gap--gap-17); }
.ih-cal-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--gap--gap-6); }
.ih-cal-day { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: var(--gap--gap-8); align-items: start; }
/* the dashed line that strings the date leaves together: from each leaf down to the next shown one */
.ih-cal-day::before {
  content: ""; position: absolute; top: 88px; bottom: calc(-1 * var(--gap--gap-6)); left: 39px;
  border-left: 1px dashed var(--color--gray-1-op30);
}
.ih-cal-day:last-child::before, .ih-cal-day:has(+ .ih-cal-later)::before { display: none; }
.ih-cal-later { display: none; }
/* date leaf: the month's season tint with the dashed white inner line */
.ih-cal-chip {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 88px; border-radius: var(--border-radius--md); background-color: var(--ih-season); color: var(--color--gray-1);
  line-height: 1;
}
.ih-cal-chip::after {
  content: ""; position: absolute; inset: 5px; border: 1px dashed var(--color--white); border-radius: 15px; pointer-events: none;
}
.ih-cal-chip-wd { font-size: var(--_typography---body--body-xs); color: var(--color--gray-1-op70); }
.ih-cal-chip-d {
  margin: 5px 0 4px; font-family: var(--_typography---font-family--heading); font-size: var(--_typography---h5--h5);
  font-weight: var(--_typography---h5--font-weight-1);
}
.ih-cal-chip-m { font-size: var(--_typography---body--body-sm); }
.ih-cal-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--gap--gap-4); }
/* a row: the offer's facts are one link (like the template's cards), „Резервирай” its own link beside it */
.ih-cal-row {
  display: flex; align-items: center; gap: calc(var(--gap--gap-6) - .75rem); min-height: 88px; padding-right: 1.25rem;
  border-radius: var(--border-radius--md); background-color: var(--color--gray-4); transition: background-color .3s ease-in-out;
}
.ih-cal-row:hover { background-color: var(--color--primary-1); }
.ih-cal-row-link {
  flex: 1; min-width: 0; align-self: stretch; display: grid; align-items: center; column-gap: var(--gap--gap-6); row-gap: var(--gap--gap-3);
  grid-template-columns: 64px minmax(0, 1.15fr) minmax(0, 1fr) 9.5rem; grid-template-areas: "img main tags price";
  padding: .75rem; border-radius: var(--border-radius--md); color: inherit; text-decoration: none;
}
.ih-cal-row-link:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 2px; }
.ih-cal-row-img { grid-area: img; width: 64px; height: 64px; border-radius: var(--border-radius--sm); object-fit: cover; }
.ih-cal-row-main { grid-area: main; min-width: 0; }
.ih-cal-row-title {
  margin: 0 0 4px; font-family: var(--_typography---font-family--heading); color: var(--color--gray-1);
  font-size: var(--_typography---body--body-xl); line-height: var(--_typography---body--line-height-2); font-weight: 600;
}
.ih-cal-row-sub { margin: 0; color: var(--color--gray-2); font-size: var(--_typography---body--body-sm); line-height: var(--_typography---body--line-height-3); }
.ih-cal-row-tags { grid-area: tags; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ih-cal-tag {
  border-radius: var(--border-radius--xl); background-color: var(--color--white); color: var(--color--gray-1);
  font-size: var(--_typography---body--body-xs); line-height: var(--_typography---body--line-height-2); padding: .25rem .625rem .1875rem;
}
.ih-cal-row-tags .duration-badge, .ih-cal-row-tags .ih-promo-badge { font-size: var(--_typography---body--body-xs); padding: .25rem .625rem .1875rem; }
.ih-cal-row-price { grid-area: price; justify-content: flex-end; align-items: baseline; white-space: nowrap; }
.ih-cal-row-price .ih-old-price { margin-right: 2px; }
.ih-cal-book { flex: none; }
/* the template's small light button at its compact (tablet) size, so a row stays one calm line */
.ih-cal-book.button-black { grid-column-gap: var(--gap--gap-4); grid-row-gap: var(--gap--gap-4); padding: .1875rem .1875rem .1875rem 1.125rem; }
.ih-cal-book .defult-title, .ih-cal-book .hover-title { font-size: var(--_typography---body--body-md); }
.ih-cal-book .icon-wrapper { width: 36px; height: 36px; }
.ih-cal-none { margin: 0; color: var(--color--gray-2); }

/* ================================================================ /kalendar/<month>: month switcher */
.ih-cal-switch { display: flex; justify-content: center; align-items: center; gap: var(--gap--gap-6); }
.ih-cal-arrow { flex: none; }
.ih-cal-arrow.is-disabled { opacity: .35; }
.ih-cal-arrow:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 2px; }
.ih-cal-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--gap--gap-4); min-width: 0; }
.ih-cal-chips .tours-category-link { padding-left: 1rem; padding-right: 1rem; white-space: nowrap; }
.ih-cal-chips .ih-cal-all { margin-right: var(--gap--gap-4); }
.ih-cal-chip-year { font-family: var(--_typography---font-family--alt-text); font-weight: var(--_typography---alt-text--font-weight-1); font-style: italic; color: var(--ih-turq-deep); padding: 0 2px; }
.tours-category-link.is-disabled { opacity: .45; cursor: default; }
.tours-category-link.is-disabled:hover { border-color: var(--color--gray-1-op30); background-color: var(--color--gray-4); color: var(--color--gray-1); }

/* ================================================================ /kalendar/<month>: grid + facts */
/* the tour page's two columns (.grid-tours-detail: 1fr .6fr, 80px apart) */
.ih-cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .6fr); column-gap: var(--gap--gap-13); row-gap: var(--gap--gap-9); align-items: start; }
.ih-cal-main { display: flex; flex-direction: column; gap: var(--gap--gap-8); min-width: 0; }
.ih-cal-intro { display: flex; flex-direction: column; gap: var(--gap--gap-4); }
.ih-cal-intro p { max-width: 560px; }
.ih-cal-facts.tours-detail-right { position: static; }
.ih-cal-facts .tours-price .pricing-text { white-space: nowrap; }
.ih-cal-facts .ih-viber { color: var(--color--white); }
.ih-cal-facts .ih-viber:hover { color: var(--color--gray-1); }
.ih-cal-facts .ih-viber:hover .button-icon { filter: brightness(0); }

.ih-cal-picks-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--gap--gap-3); }
.ih-cal-pick-link {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; column-gap: var(--gap--gap-5);
  padding: .5rem 1rem .5rem .5rem; border-radius: var(--border-radius--md); background-color: var(--color--white);
  color: var(--color--gray-1); text-decoration: none; transition: background-color .3s ease-in-out;
}
.ih-cal-pick-link:hover { background-color: var(--color--primary-1); }
.ih-cal-pick-link:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 2px; }
.ih-cal-pick-img { width: 48px; height: 48px; max-width: none; border-radius: var(--border-radius--sm); object-fit: cover; }
.ih-cal-pick-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ih-cal-pick-title {
  font-family: var(--_typography---font-family--heading); font-weight: 600;
  font-size: var(--_typography---body--body-md); line-height: var(--_typography---body--line-height-2);
}
.ih-cal-pick-sub { color: var(--color--gray-1-op70); font-size: var(--_typography---body--body-xs); line-height: var(--_typography---body--line-height-2); }
.ih-cal-pick-price {
  font-family: var(--_typography---font-family--heading); font-weight: 600; white-space: nowrap;
  font-size: var(--_typography---body--body-lg); line-height: var(--_typography---body--line-height-2);
}

.ih-cal-panel { border-radius: var(--border-radius--lg); background-color: var(--ih-season); padding: .625rem; }
.ih-cal-panel-inner { border: 1px dashed var(--color--white); border-radius: var(--border-radius--md); padding: 1.5rem 1.875rem 1.25rem; }
.ih-cal-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--gap--gap-4); margin-bottom: var(--gap--gap-5); }
.ih-cal-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--gap--gap-5); font-size: var(--_typography---body--body-sm); color: var(--color--gray-1-op70); }
.ih-cal-legend li { display: flex; align-items: center; gap: 6px; }
.ih-cal-key { width: 14px; height: 14px; border-radius: 4px; background-color: var(--color--white); }
.ih-cal-key.is-deps { border: 1px dashed var(--ih-turq-deep); }
.ih-cal-key.is-today { box-shadow: inset 0 0 0 2px var(--ih-gold); background-color: transparent; }

.ih-cal-table { width: calc(100% + 12px); margin: -6px; table-layout: fixed; border-collapse: separate; border-spacing: 6px; }
.ih-cal-table th {
  padding: 0 0 4px; text-align: center; font-weight: 500; color: var(--color--gray-1-op70);
  font-size: var(--_typography---body--body-sm); line-height: var(--_typography---body--line-height-2);
}
.ih-cal-cell {
  position: relative; height: 74px; padding: 0; text-align: center; vertical-align: middle;
  border-radius: 14px; background-color: var(--color--white-op50); color: var(--color--gray-1-op70);
  font-size: var(--_typography---body--body-md); line-height: 1;
}
.ih-cal-cell.is-out { background-color: transparent; }
.ih-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--ih-gold); }
.ih-cal-cell.is-today .ih-cal-btn { border: 2px solid var(--ih-gold); }
.ih-cal-cell.is-past:not(.has-deps) { background-color: var(--color--white-op20); }
.ih-cal-cell.is-past .ih-cal-num { color: var(--color--gray-1-op30); }
/* a day with departures: a white card with the template's dashed line, the lowest price under the date */
.ih-cal-btn {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 0 4px; border: 1px dashed var(--ih-turq-deep); border-radius: 14px;
  background-color: var(--color--white); color: var(--color--gray-1); font: inherit;
  transition: background-color .2s ease-in-out, color .2s ease-in-out, border-color .2s ease-in-out;
}
button.ih-cal-btn { cursor: pointer; }
.ih-cal-btn .ih-cal-num { font-weight: 600; font-size: var(--_typography---body--body-lg); color: inherit; }
.ih-cal-price { font-size: var(--_typography---body--body-xs); font-weight: 600; color: var(--ih-navy); white-space: nowrap; }
.ih-cal-count {
  position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background-color: var(--ih-navy); color: var(--color--white); font-size: 11px; font-weight: 700; line-height: 18px;
}
button.ih-cal-btn:not(:disabled):not([aria-pressed="true"]):hover { background-color: var(--color--primary-2); }
.ih-cal-btn:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 2px; }
/* the chosen day: the dark state of the template's chips */
.ih-cal-btn[aria-pressed="true"] { border: 1px solid var(--ih-ink); background-color: var(--ih-ink); color: var(--color--white); }
.ih-cal-btn[aria-pressed="true"] .ih-cal-price { color: var(--ih-turq); }
.ih-cal-btn[aria-pressed="true"] .ih-cal-count { background-color: var(--ih-gold); color: var(--ih-ink); }
.ih-cal-btn:disabled { cursor: default; border-color: var(--color--gray-1-op30); background-color: var(--color--white-op50); color: var(--color--gray-1-op30); }
.ih-cal-btn:disabled .ih-cal-price { color: var(--color--gray-1-op30); text-decoration: line-through; }
.ih-cal-btn:disabled .ih-cal-count { background-color: var(--color--gray-1-op30); }
/* a departure today: no longer bookable online, but not a past day (gold ring, price not struck) */
.ih-cal-cell.is-today .ih-cal-btn:disabled .ih-cal-price { text-decoration: none; }
.ih-cal-note-row { display: flex; justify-content: space-between; align-items: center; gap: var(--gap--gap-4); min-height: 30px; margin-top: var(--gap--gap-5); }
.ih-cal-note { margin: 0; color: var(--color--gray-1-op70); font-size: var(--_typography---body--body-sm); line-height: var(--_typography---body--line-height-3); }
.ih-cal-note strong { color: var(--color--gray-1); font-weight: 600; }
.ih-cal-note a { color: var(--ih-navy); font-weight: 600; }

/* filter status above the cards */
.ih-cal-filter { margin-top: var(--gap--gap-9); scroll-margin-top: 30px; }
.ih-cal-status { margin: 0; text-align: center; }
.ih-cal-reset { flex: none; font-family: inherit; cursor: pointer; }
.ih-cal-note-row .ih-cal-reset { padding: .4375rem .875rem; background-color: var(--color--white); }
.ih-cal-reset:focus-visible, .ih-cal-status:focus-visible { outline: 2px solid var(--ih-navy); outline-offset: 2px; }
.ih-cal-status:focus { outline: none; }
.ih-cal-filter .ih-cal-none { text-align: center; }
.ih-cal-filter .ih-cal-none a { color: var(--ih-navy); font-weight: 600; }
/* cards left out by the day filter (calendar.js); without JS every card shows */
.ih-cal-off { display: none !important; }
@keyframes ih-cal-card-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.ih-cal-in { animation: ih-cal-card-in .6s cubic-bezier(.22, .61, .36, 1) both; animation-delay: calc(var(--ih-i, 0) * 70ms); }
.pagination .w-pagination-previous { display: block; }
.pagination .w-pagination-previous .w-pagination-previous-icon { margin-right: 4px; }
@media (prefers-reduced-motion: reduce) {
  .ih-cal-in { animation: none; }
  .ih-cal-tile-go .icon, .ih-cal-btn, .ih-cal-row, .ih-cal-tile-inner, .ih-cal-tile-go { transition: none; }
}

/* ================================================================ smaller laptop windows (992 to 1279 wide) */
@media screen and (min-width: 992px) and (max-width: 1279px) {
  /* four tiles would leave „Септември” no room beside its arrow: three per row */
  .ih-cal-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ih-cal-layout { column-gap: var(--gap--gap-9); }
  /* timeline rows: the pills move under the title */
  .ih-cal-row-link { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img main price" "img tags price"; }
  .ih-cal-row-tags { align-self: start; }
  .ih-cal-row-main { align-self: end; }
  .ih-cal-panel-inner { padding: 1.25rem 1.25rem 1rem; }
  .ih-cal-cell { height: 64px; }
  /* the month chips stay on one line between the arrows: a little less padding and gap */
  .ih-cal-chips { column-gap: 6px; }
  .ih-cal-chips .tours-category-link { padding-left: .625rem; padding-right: .625rem; }
}
@media screen and (min-width: 992px) and (max-width: 1151px) {
  .ih-cal-switch { gap: var(--gap--gap-5); }
  .ih-cal-count { top: 3px; right: 3px; min-width: 15px; height: 15px; line-height: 15px; font-size: 10px; padding: 0 4px; border-radius: 8px; }
  .ih-cal-chips .tours-category-link { padding-left: .5rem; padding-right: .5rem; }
}

/* ================================================================ tablets and phones (the template's own breakpoints) */
@media screen and (max-width: 991px) {
  .ih-cal-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ih-cal-layout { grid-template-columns: minmax(0, 1fr); }
  .ih-cal-day { grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--gap--gap-5); }
  .ih-cal-day::before { left: 31px; top: 76px; }
  .ih-cal-chip { height: 76px; }
  .ih-cal-row { padding-right: .75rem; }
  .ih-cal-row-link { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "img main price" "img tags price"; }
  .ih-cal-row-img { width: 56px; height: 56px; }
  .ih-cal-tile, .ih-cal-panel { border-radius: var(--border-radius--md); }
  .ih-cal-tile-inner, .ih-cal-panel-inner { border-radius: var(--border-radius--sm); }
}
@media screen and (max-width: 767px) {
  .ih-cal-switch { flex-wrap: wrap; }
  .ih-cal-chips { order: 3; flex-basis: 100%; }
  .ih-cal-row { flex-wrap: wrap; padding: 0 .75rem .75rem 0; }
  .ih-cal-row-link { flex-basis: 100%; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "img main" "tags tags" "price price"; }
  .ih-cal-book { margin-left: .75rem; }
  .ih-cal-row-img { width: 48px; height: 48px; }
  .ih-cal-row-price { justify-content: flex-start; }
  .ih-cal-panel-inner { padding: 1rem .75rem .875rem; }
  .ih-cal-table { border-spacing: 3px; width: calc(100% + 6px); margin: -3px; }
  .ih-cal-cell { height: 52px; border-radius: 10px; }
  .ih-cal-btn { border-radius: 10px; gap: 3px; }
  .ih-cal-price { font-size: 10px; }
  .ih-cal-count { top: 2px; right: 2px; min-width: 15px; height: 15px; line-height: 15px; font-size: 10px; padding: 0 3px; }
}
@media screen and (max-width: 479px) {
  .ih-cal-board { grid-template-columns: minmax(0, 1fr); }
  .ih-cal-price { display: none; }
}

/* ================================================================ /kalendar: month board, short laptop windows */
/* 2026-10-05, the client's ~1280x650 Windows laptop. From „Избери месец” to the last row of tiles the board is 832px:
   one screen at 1440x900, but on shorter windows its last row ran under the bottom edge. Under 864px of window height
   the tiles get a little more compact in step with the window (the space inside each tile, between the tiles and
   under the title), down to 698px from about 740px of window height: the whole board then fits windows from ~740px
   up (1440x760 included). On still shorter windows it can't fit without shrinking the tiles' text and photos, so it
   stays at that size and scrolls. Fonts, photos, prices and the 4 x 3 grid don't change; taller windows are unchanged.
   --ih-fit-cut = how much shorter the board gets; the parts below add up to exactly that (three rows of tiles). */
@media screen and (min-width: 992px) and (max-height: 863px) {
  .tours-content:has(> .ih-cal-board) {
    --ih-fit-cut: clamp(0px, 872px - 100vh, 134px);
    grid-row-gap: calc(40px - var(--ih-fit-cut) * 16 / 134); row-gap: calc(40px - var(--ih-fit-cut) * 16 / 134);
  }
  .ih-cal-board { gap: calc(20px - var(--ih-fit-cut) * 8 / 134); }
  .ih-cal-board .ih-cal-tile { margin-bottom: calc(10px - var(--ih-fit-cut) * 6 / 134); }
  .ih-cal-board .ih-cal-tile-inner {
    padding-top: calc(20px - var(--ih-fit-cut) * 6 / 134);
    padding-bottom: calc(18px - var(--ih-fit-cut) * 6 / 134);
  }
  .ih-cal-board .ih-cal-tile-stats {
    margin-top: calc(14px - var(--ih-fit-cut) * 4 / 134);
    margin-bottom: calc(20px - var(--ih-fit-cut) * 6 / 134);
  }
  .ih-cal-board .featured-tours-divider { margin-bottom: calc(18px - var(--ih-fit-cut) * 6 / 134); }
}

/* ================================================================ /kalendar/<month>: short laptop windows */
/* 2026-10-05, the client's ~1280x650 Windows laptop. From „Кой ден ти е удобен?” to the bottom of the month grid and
   of the facts beside it, the block is ~720px tall (a month of six weeks ~800px): one screen at 1440x900, but on
   shorter windows the last week and the contact buttons ran under the bottom edge. Under 864px of window height it
   shrinks in step with the window, so it stays 40px shorter than the window, as a smaller version of itself: the day
   cells get lower (74px down to 54px; 50px in a six-week month) and the gaps and paddings of the grid panel and of the
   facts tighten (the facts' paddings never under the template's own 20px). Fonts, widths and the number of rows don't
   change; windows at least 758px tall keep everything as before (a six-week month: 838px).
   --ih-fit-cut = how much shorter the grid column gets (the parts below add up to exactly that for a five-week month;
   a six-week month redefines it with steeper cells); --ih-fit-side = the same for the facts column: on windows under
   1340px wide its Viber and phone buttons sit on two rows, so it starts ~60px taller and shrinks a little faster. */
@media screen and (min-width: 992px) and (max-height: 863px) {
  .ih-cal-layout {
    --ih-fit-cut: clamp(0px, 758px - 100vh, 138px);
    --ih-fit-side: var(--ih-fit-cut);
    --ih-fit-cell: calc(var(--ih-fit-cut) * 20 / 138);
  }
  .ih-cal-layout:has(.ih-cal-table tbody tr:nth-child(6)) {
    --ih-fit-cut: clamp(0px, (838px - 100vh) * 138 / 182, 138px);
    --ih-fit-cell: calc(var(--ih-fit-cut) * 24 / 138);
  }
  .ih-cal-main { row-gap: calc(30px - var(--ih-fit-cut) * 10 / 138); }
  .ih-cal-panel-inner {
    padding-top: calc(24px - var(--ih-fit-cut) * 8 / 138);
    padding-bottom: calc(20px - var(--ih-fit-cut) * 8 / 138);
  }
  .ih-cal-panel-head { margin-bottom: calc(16px - var(--ih-fit-cut) * 6 / 138); }
  .ih-cal-cell { height: calc(74px - var(--ih-fit-cell)); }
  .ih-cal-note-row { margin-top: calc(16px - var(--ih-fit-cut) * 6 / 138); }
  .ih-cal-facts .tours-detail-top {
    padding-top: calc(40px - var(--ih-fit-side) * 16 / 138);
    padding-bottom: calc(40px - var(--ih-fit-side) * 16 / 138);
  }
  .ih-cal-facts .tours-detail-bottom {
    padding-top: calc(40px - var(--ih-fit-side) * 16 / 138);
    padding-bottom: calc(40px - var(--ih-fit-side) * 16 / 138);
    grid-row-gap: calc(40px - var(--ih-fit-side) * 16 / 138); row-gap: calc(40px - var(--ih-fit-side) * 16 / 138);
  }
  .ih-cal-facts .tours-info-wrap { grid-row-gap: calc(20px - var(--ih-fit-side) * 6.5 / 138); row-gap: calc(20px - var(--ih-fit-side) * 6.5 / 138); }
}
@media screen and (min-width: 992px) and (max-width: 1339px) and (max-height: 863px) {
  .ih-cal-layout { --ih-fit-side: min(172px, var(--ih-fit-cut) * 1.4); }
}
/* 992 to 1279 wide the grid is already a little lower (64px cells, 20 / 16px panel padding): same steps from there */
@media screen and (min-width: 992px) and (max-width: 1279px) and (max-height: 863px) {
  .ih-cal-cell { height: calc(64px - var(--ih-fit-cell) / 2); }
  .ih-cal-panel-inner {
    padding-top: calc(20px - var(--ih-fit-cut) * 4 / 138);
    padding-bottom: calc(16px - var(--ih-fit-cut) * 4 / 138);
  }
}

/* ===== phones & tablets: calendar ===== */
@media screen and (max-width: 991px) {
  /* the note for small phones (calendar.mjs; .ih-m-only hides it from 992 px) */
  .ih-cal-note-sm { display: none; }
}
@media screen and (max-width: 767px) {
  /* month switcher on one row: the arrows (44 px) either side of the chips, which swipe (.ih-scroll-row, theme.css,
     added by calendar.js at phone widths); the row stays between the arrows (no bleed to the window edges) */
  .ih-cal-switch { flex-wrap: nowrap; gap: var(--gap--gap-3); }
  .ih-cal-switch .ih-cal-arrow { width: 44px; height: 44px; }
  .ih-cal-switch .ih-cal-chips.ih-scroll-row {
    order: 0; flex: 1 1 auto; flex-basis: auto; min-width: 0; flex-wrap: nowrap; justify-content: flex-start;
    margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; scroll-padding-left: 0; scroll-padding-right: 0;
  }
  /* the facts box: price, „Виж N оферти” and the contacts; the fact rows repeat the board */
  [data-ih-cal-factrows] { display: none; }
}
@media screen and (max-width: 479px) {
  /* no prices in the cells here (above): while the note shows its default text, only its last part (what a tap does) */
  .ih-cal-note:has(> .ih-cal-note-sm) { font-size: 0; }
  .ih-cal-note-sm { display: block; font-size: var(--_typography---body--body-sm); line-height: var(--_typography---body--line-height-3); }
  /* wider day cells: thinner panel paddings and gaps */
  .ih-cal-panel { padding: .375rem; }
  .ih-cal-panel-inner { padding: 1rem .375rem .875rem; }
  .ih-cal-table { border-spacing: 2px; width: calc(100% + 4px); margin: -2px; }
  /* the count badge moves out of the corner, over the cell's edge, so it never covers the date */
  .ih-cal-cell { overflow: visible; }
  .ih-cal-count { top: -5px; right: -5px; z-index: 1; min-width: 16px; height: 16px; line-height: 16px; font-size: 11px; }
}
@media screen and (max-width: 991px) and (max-height: 500px) {
  /* phones in landscape: the month grid fits the window */
  .ih-cal-cell { height: 44px; }
}
