/* ============================================================
   Formium Alliance – SEO & Mobile Friendliness Patch
   ============================================================ */

/* 1. Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 2. Minimum touch target size (WCAG 2.5.5) */
a, button, [role="button"], input[type="submit"], input[type="button"], label[for] {
  min-height: 44px;
  min-width: 44px;
}

/* 3. Better tap highlight */
* {
  -webkit-tap-highlight-color: rgba(134, 79, 254, 0.15);
}

/* 4. Font scaling on very small screens */
@media (max-width: 375px) {
  html { font-size: 15px; }
}

/* 5. Safe area insets for notched phones */
@media (max-width: 640px) {
  .main-container, header, nav {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
  header[class*="fixed"], header[class*="sticky"] {
    padding-top: max(0px, env(safe-area-inset-top));
  }
}

/* 6. Images never overflow */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* 7. Tables scroll horizontally */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 8. Swiper max width guard */
.swiper { max-width: 100vw; }

/* 9. Skip-nav for accessibility/SEO */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: #864ffe;
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}
.skip-to-content:focus { top: 0; }

/* 10. Better readability on mobile */
@media (max-width: 640px) {
  p { line-height: 1.7; }
  h1, h2, h3 { word-break: break-word; overflow-wrap: break-word; }
}

/* 11. Forms: prevent iOS zoom on focus */
input, textarea, select {
  font-size: 16px !important;
  border-radius: 8px;
}

/* 12. Visible focus ring */
:focus-visible {
  outline: 2px solid #864ffe;
  outline-offset: 2px;
}

/* 13. Hide oversized decorative blobs on mobile */
@media (max-width: 768px) {
  [class*="size-[800px]"],
  [class*="size-[1000px]"],
  [class*="size-[860px]"],
  [class*="size-[882px]"] {
    display: none !important;
  }
}

/* 14. Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
