/* Villa pages — fix invisible Webflow IX elements, light mobile polish only */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Sticky footer from Webflow covers #book when it sits right above footer */
.page-villa .footer_component {
  position: relative !important;
  bottom: auto !important;
}

.page-villa #book.section_home_book {
  position: relative;
  z-index: 3;
  scroll-margin-top: 5.5rem;
  scroll-margin-bottom: 2rem;
  /* Webflow: #book wstawione w miejsce villa_info-cta w siatce 2-kolumnowej */
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.page-villa #book .home_book-subheadline {
  width: 100% !important;
  max-width: 36rem !important;
}

.page-villa #book .form_component {
  width: 100% !important;
  max-width: none !important;
}

.page-villa #book .home_book-form {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

.page-villa .booking-layout {
  width: 100% !important;
  max-width: min(520px, 100%) !important;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr !important;
}

.page-villa .booking-layout > .booking-calendar-wrap,
.page-villa .booking-layout > .form_component {
  width: 100% !important;
  max-width: 100% !important;
}

.page-villa .booking-calendar-wrap,
.page-villa .jh-cal {
  width: 100% !important;
  max-width: 100% !important;
}

.page-villa .jh-cal {
  padding-bottom: 1.5rem;
}

.page-villa .jh-cal-day {
  min-height: 2.5rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* Webflow hides these until IX runs — force visible on our static host */
html.w-mod-js :is(
  .nav-menu_component,
  .nav-menu,
  .nav_menu-list-item,
  .nav-menu_contact-item,
  .nav,
  .villa_heading-name,
  .villa_heading-summary,
  .villa_galley-image-item,
  .villa_info-details,
  .villa_info-description-1,
  .villa_info-description-2,
  .villa_info-amenities,
  .villa_info-location,
  .villa_info-cta,
  #book.section_home_book,
  .booking-calendar-wrap,
  .jh-cal
) {
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 991px) {
  .main-wrapper .padding-global {
    padding-left: max(1.25rem, env(safe-area-inset-left)) !important;
    padding-right: max(1.25rem, env(safe-area-inset-right)) !important;
  }

  /* Hero — full-bleed cover photo like Webflow */
  .section_villa_heading > .padding-global {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .section_villa_heading .spacer-xhuge {
    padding-top: 1.5rem !important;
  }

  .section_villa_heading .container.w-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
  }

  .section_villa_heading .villa_heading-name h1 {
    font-size: clamp(1.85rem, 8vw, 2.75rem) !important;
    letter-spacing: 0.1em;
    text-align: center;
  }

  .villa_info-description-1,
  .villa_info-description-2,
  .villa_heading-summary {
    width: 100% !important;
    max-width: 100% !important;
  }

  .villa_info-description .text-size-medium,
  .section_villa_info > .padding-global > .paragraph {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }

  .villa_info-cta-button .button.is-primary {
    width: 100%;
    min-height: 48px;
  }

  .nav_brand-image-wrapper {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }

  .page-villa .section_villa_heading > .padding-global:first-child .spacer-xhuge:first-child {
    padding-top: calc(4.5rem + env(safe-area-inset-top)) !important;
  }

  .footer_component {
    position: static !important;
  }

  .footer_padding {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .page-villa #book .padding-global {
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
  }

  .page-villa .booking-layout {
    max-width: 100% !important;
    width: 100% !important;
    gap: 1.25rem;
    margin-left: 0;
    margin-right: 0;
  }

  .page-villa .jh-cal,
  .page-villa #book form.form_form-wrapper,
  .page-villa #book .form_form-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .page-villa .jh-cal {
    padding: 1rem;
  }

  .page-villa #book form.form_form-wrapper,
  .page-villa #book .form_form-wrapper {
    padding: 1rem;
  }

  .page-villa .jh-cal-nav {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .page-villa .jh-cal-day {
    min-height: 40px;
  }
}

@media (max-width: 479px) {
  .nav-menu {
    width: 100% !important;
    max-width: 100%;
    height: 100dvh;
    padding: 1.25rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu_list .text-size-large {
    font-size: 1.35rem !important;
  }
}
