/* Visual audit fixes: responsive readability, touch targets and floating controls. */

@media (min-width: 901px) {
  /* Keep all Russian Stay headings on two lines and align the copy below them. */
  .section-stay-ru .stay-grid {
    row-gap: 60px;
  }

  .section-stay-ru .copy-block h3 {
    min-height: 2.6em;
  }

  .section-stay-ru .stay-title-line {
    display: block;
  }
}

@media (max-width: 767px) {
  /* Keep one compact floating action and never stack it with Back to top. */
  .back-to-top {
    display: none !important;
  }

  .whatsapp-fixed {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    display: inline-flex !important;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    gap: 0;
  }

  .whatsapp-fixed-icon {
    width: 24px;
    height: 24px;
  }

  .whatsapp-fixed-label {
    display: none;
  }

  .company-page:not(.privacy-page) .company-row,
  .company-page:not(.privacy-page) .company-document-links > p,
  .company-page:not(.privacy-page) .company-document-links > a {
    padding-right: 52px;
  }

  /* Short collection captions stay readable on a single line. */
  .section-collection .residence-copy > p:first-of-type {
    max-width: 100%;
    min-height: 1.45em;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(12px, 3.1vw, 12.5px) !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    text-wrap: nowrap;
  }

  /* Preserve the visual dot while enlarging the interactive target. */
  .pagination button,
  .pagination button.is-active,
  .pagination button.perf-active,
  .section-experiences .pagination button.perf-active {
    width: 44px !important;
    height: 44px !important;
  }

  /* Never split the long Russian policy title inside the word. */
  .privacy-page[lang="ru"] .privacy-content h1 {
    max-width: 100%;
    font-size: clamp(25px, 6.8vw, 28px) !important;
    line-height: 1.04;
    letter-spacing: -0.04em;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    text-wrap: balance;
  }

  /* Helper and privacy copy is functional, not decorative. */
  .section-contact .privacy-notice,
  .section-contact .form-consent {
    color: rgba(255, 255, 255, 0.84) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
}

@media (min-width: 768px) {
  /* End the Beachside amenities grid without a separator before the next block. */
  .property-page[data-residence="laguna-beachside-residences"] .bf-about-amenities li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  /* Legal and company layouts use a compact edge control outside the copy column. */
  body:has(.company-page) .whatsapp-fixed {
    right: 24px;
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    gap: 0;
  }

  body:has(.company-page) .whatsapp-fixed-label {
    display: none;
  }
}

@media (max-width: 767px) {
  .property-page[data-residence="laguna-beachside-residences"] .bf-about-amenities li:last-child {
    border-bottom: 0;
  }
}
