/*
 * Responsive + image visibility fixes.
 * Loaded after the main template stylesheet so these rules win.
 */

img {
  max-width: 100%;
  height: auto;
}

/*
 * The .mode__image preview thumbnails were hidden via opacity:0 and
 * faded in on hover. Touch devices have no hover state, so the
 * service preview images never appeared. Show them inline below the
 * label on small screens.
 */
@media (hover: none), (max-width: 1024px) {
  .mode__image {
    opacity: 1;
    position: static;
    display: block;
    margin-top: 8px;
  }
  .mode__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
  }
  .mode__block {
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 12px;
  }
  .mode__block.mode__block_more {
    min-height: 64px;
  }
}

/* Welcome banner — keep the background visible and proportional on small screens. */
@media (max-width: 1024px) {
  .section_welcome {
    height: auto;
    min-height: 100vh;
    background-size: cover;
  }
  .first-banner {
    max-height: none;
    height: 100%;
    background-size: cover !important;
  }
  .cont_about-salon {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 768px) {
  .about-salon__name {
    font-size: 44px;
    line-height: 1.1;
  }
  .about-salon__btn {
    margin-top: 24px;
    font-size: 18px;
    height: 52px;
    line-height: 52px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .about-salon__name {
    font-size: 32px;
  }
}

/* k1 event banner image on mobile */
.k1-event-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Events block — stack date / info / photo vertically on small screens. */
@media (max-width: 768px) {
  .events__block {
    flex-direction: column;
  }
  .events__date,
  .events__inform,
  .events__photo {
    width: 100% !important;
    box-sizing: border-box;
  }
  .events__inform {
    border-left: none;
    border-top: 4px solid #fff;
  }
  .events__photo {
    height: auto;
  }
  .events__photo img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* Resources block — make the row a wrapping flex layout on smaller screens. */
@media (max-width: 1024px) {
  .resources__row {
    display: flex;
    flex-wrap: wrap;
  }
  .resources__col {
    width: 50%;
    box-sizing: border-box;
  }
  .resources__image {
    position: relative;
    margin-top: 12px;
  }
  .resources__image img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 600px) {
  .resources__col {
    width: 100%;
  }
}

/* Report photos — stack and scale on small screens. */
@media (max-width: 640px) {
  .report__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .report__photos .report__col {
    width: 100%;
    margin-right: 0;
  }
  .report__photo img {
    width: 100%;
    height: auto;
    display: block;
  }
}

/* Avoid horizontal overflow on the page. */
html, body, .page, .page__inner {
  max-width: 100%;
  overflow-x: hidden;
}

.cont {
  box-sizing: border-box;
}
