/* Zibihelp4you UI fixes - 2026-05-11 v2
 * - Fix .alignfull breaking out of parent (touches edge)
 * - Cap Xvw font sizes (huge on desktop)
 * - Fix word-break in narrow cards
 * - Respect parent padding
 */

/* === DESKTOP === */
@media (min-width: 1100px) {
  /* Use full screen width with padding (no max-width constraint) */
  .wp-site-blocks .site-container,
  .wp-site-blocks .content-wrap,
  body.content-width-fullwidth .content-container {
    max-width: 100%;
    padding-left: 3rem;
    padding-right: 3rem;
  }
  
  /* Cap vw-based font sizes */
  h1[style*="vw"], h2[style*="vw"], h3[style*="vw"],
  h4[style*="vw"], h5[style*="vw"], h6[style*="vw"],
  [style*="font-size:1.5vw"], [style*="font-size: 1.5vw"],
  [style*="font-size:1.6vw"], [style*="font-size: 1.6vw"],
  [style*="font-size:2.4vw"], [style*="font-size: 2.4vw"],
  [style*="font-size:2.5vw"], [style*="font-size: 2.5vw"],
  [style*="font-size:1.2vw"], [style*="font-size: 1.2vw"] {
    font-size: clamp(14px, 2vw, 28px) !important;
  }
}

/* === MOBILE/TABLET === */
@media (max-width: 1099px) {
  .wp-site-blocks .entry-content-wrap,
  .wp-site-blocks .content-wrap,
  .wp-block-columns,
  .wp-block-cover__inner-container {
    padding-left: max(1rem, env(safe-area-inset-left)) !important;
    padding-right: max(1rem, env(safe-area-inset-right)) !important;
  }
  .wp-block-column[style*="padding-left:60px"],
  .wp-block-column[style*="padding-left: 60px"] {
    padding-left: 0 !important;
  }
  .wp-block-cover[style*="padding-left:6%"],
  .wp-block-cover[style*="padding-left: 6%"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .wp-block-cover[style*="min-height:750px"] {
    min-height: 450px !important;
  }
}

@media (max-width: 767px) {
  .wp-block-buttons[style*="font-size:1.5vw"],
  .wp-block-buttons[style*="font-size: 1.5vw"] {
    font-size: 1rem !important;
  }
  .wp-block-buttons {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
}

/* === UNIVERSAL FIXES === */

/* alignfull MUST respect parent padding (no edge-touching) */
/* This catches .alignfull in ANY nesting context: columns, groups, group__inner-container etc. */
.entry-content .alignfull,
.entry-content-wrap .alignfull,
.wp-site-blocks .alignfull {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  width: auto !important;
  left: auto !important;
  right: auto !important;
}
/* Same for alignwide (less aggressive but still escapes) */
.entry-content .alignwide,
.entry-content-wrap .alignwide,
.wp-site-blocks .wp-block-group .alignwide {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
}

/* Prevent word break (Administracja+, Whatsapp etc.) */
h1, h2, h3, h4, h5, h6 {
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

/* "Administracja+" specific — keep on one line if possible */
h5[style*="font-size:2.4vw"],
h5[style*="font-size: 2.4vw"] {
  white-space: nowrap;
  text-align: center;
}

/* Footer card titles need cap */
.beforefootericons h6[style*="vw"],
.undertextform[style*="vw"] {
  font-size: clamp(13px, 1.5vw, 18px) !important;
  line-height: 1.3 !important;
  white-space: normal !important;
}

/* Force readability — never line-height 0 */
[style*="line-height:0"]:not(svg):not(path) {
  line-height: 1.3 !important;
}

/* Prevent horizontal scroll from broken-out elements */
.wp-site-blocks {
  overflow-x: hidden;
}

/* Form button polish */
.wa-btn {
  background: #25D366 !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.wa-btn:hover {
  background: #1da651 !important;
}
