/**
 * Senvivah public site — phone + tablet polish
 * Safe global rules; does not change desktop brand layout.
 */

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

body {
  overflow-x: hidden;
  max-width: 100vw;
}

img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

/* Prevent wide children from blowing the layout */
table {
  max-width: 100%;
}

.table-responsive,
.sv-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Touch-friendly form controls on public pages */
@media (max-width: 991.98px) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  button,
  .btn {
    font-size: 16px; /* iOS zoom prevent */
  }

  .container,
  .max-w-7xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl {
    max-width: 100% !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Hero / Glide banner — shorter on phone & tablet */
@media (max-width: 991.98px) {
  .banner-slide,
  .glide__slides {
    height: min(70vh, 520px) !important;
    min-height: 320px !important;
    max-height: 560px !important;
  }

  .banner-slide h1,
  .banner-slide .text-6xl {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.75rem !important;
  }

  .banner-slide .text-xl {
    font-size: 0.95rem !important;
    margin-bottom: 1rem !important;
  }

  .glide__arrow--left {
    left: 0.75rem !important;
  }

  .glide__arrow--right {
    right: 0.75rem !important;
  }

  .glide__bullets {
    bottom: 14px !important;
  }
}

@media (max-width: 575.98px) {
  .banner-slide,
  .glide__slides {
    height: min(58vh, 420px) !important;
    min-height: 280px !important;
  }

  .banner-slide h1,
  .banner-slide .text-6xl {
    font-size: 1.4rem !important;
  }

  /* Homepage grids: reduce side padding squeeze */
  .grid.px-12 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* About banner image height */
  .h-\[600px\] {
    height: 240px !important;
  }
}

/* Search / form cards */
@media (max-width: 767.98px) {
  .sv-search-field,
  select.rounded-lg,
  select.rounded-full,
  input.rounded-full {
    width: 100%;
  }

  /* Auth split layouts */
  .grid.grid-cols-2 {
    /* keep 2-col only for tiny name fields; full-width stacks handled by page utilities */
  }
}

/* Sticky public header: ensure content not under fixed bars */
@media (max-width: 767.98px) {
  main.pt-32,
  .pt-32 {
    padding-top: 6.5rem !important;
  }
}

/* Footer stacks cleanly */
@media (max-width: 767.98px) {
  footer .grid {
    gap: 1.5rem;
  }
}

/* Modal / popup full width on small screens */
@media (max-width: 575.98px) {
  .fixed .max-w-md,
  .fixed .max-w-lg,
  .fixed .max-w-xl,
  .fixed .max-w-2xl {
    max-width: calc(100vw - 1.5rem) !important;
    margin-left: auto;
    margin-right: auto;
  }
}
