/* Web M Technology: layout and readability fixes from the UI/UX audit. Loaded after insur.css so
   these win without editing the theme file. Grouped by page section. */

/* ── Bootstrap 4 classes still used in the pages (Bootstrap 4 is no longer loaded twice) ── */
.text-left {
  text-align: left !important;
}

.form-group {
  margin-bottom: 1rem;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ── Decorative cursor: hidden until the mouse moves (it sat in the top-left corner) ── */
.custom-cursor__cursor,
.custom-cursor__cursor-two {
  opacity: 0;
}

html.has-cursor .custom-cursor__cursor,
html.has-cursor .custom-cursor__cursor-two {
  opacity: 1;
}

/* ── About: body copy in readable dark slate, not link blue ── */
.about-one__text-1 {
  color: #3b4658;
  font-size: 18px;
  line-height: 1.75;
}

/* ── Services We Provide: the four cards the same height ── */
.services-one .row > .col-md-3 {
  display: flex;
}

.services-one .service-card {
  flex: 1 1 auto;
  width: 100%;
}

/* ── Our Results: icons (Bootstrap Icons) sized like the old glyphs ── */
.counter-one__icon .bi {
  display: flex;
  font-size: 54px;
  line-height: 1;
  color: var(--insur-primary);
}

/* ── Industries We Serve: one image shape so the cards line up ── */
.services-one__single .service-one__img {
  overflow: hidden;
}

.services-one__single .service-one__img img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Two cards per row on phones (was one card per row: thousands of pixels of scrolling). */
@media (max-width: 767px) {
  .services-one__bottom .row {
    --bs-gutter-x: 14px;
  }

  .services-one__bottom .services-one__single {
    margin-bottom: 14px;
  }

  .services-one__bottom .service-one__content {
    padding: 14px 12px 16px;
  }

  .services-one__bottom .service-one__title {
    font-size: 15px;
    line-height: 1.3;
  }
}

/* ── Technologies We Work With: tags in a row instead of a thin bulleted list ── */
.tab-content .tab h4 {
  margin: 8px 0 14px;
  font-size: 20px;
  color: var(--insur-black);
}

.tab-content .tab ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tab-content .tab li {
  padding: 9px 18px;
  border: 1px solid #d6e2f2;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 16px -12px rgba(22, 36, 61, 0.35);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--insur-black);
}

/* ── Team: the three photos the same shape ── */
.team-one__img img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── Blog cards: the same height in a row ── */
.news-one .row > [class*="col-"] {
  display: flex;
}

.news-one .news-one__single {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.news-one .news-one__content {
  flex: 1 1 auto;
}

/* ── Header on tablets (below 1200px, the menu collapses to a button) ── */
@media (max-width: 1199px) {
  /* The menu button was dark blue on the blue bar: hard to see. */
  .main-menu__main-menu-box .mobile-nav__toggler {
    color: #ffffff !important;
    font-size: 28px;
    line-height: 1;
  }

  /* The top bar ran out of room: the address wrapped and the email ran into "About". */
  .main-header__top-address-list li:first-child {
    display: none !important;
  }

  .main-header__top-right {
    margin-left: 24px;
  }
}

/* ── About blocks: buttons side by side with a gap; the phone number on one line ── */
.about-one__btn-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.about-one__btn-box .about-one__btn {
  margin: 0 !important;
}

.about-one__call-content a {
  white-space: nowrap;
}

/* ══ Header and home hero: one screen together, the image clearly visible ══ */

/* A tighter menu row leaves more of the first screen for the hero. */
.main-menu__wrapper-inner {
  padding: 18px 0;
}

@media (max-width: 767px) {
  .main-menu__wrapper-inner {
    padding: 14px 0;
  }
}

/* The header's real height comes from assets/js/webm-fixes.js; these are fallbacks. */
:root {
  --wm-header-h: 128px;
}

@media (max-width: 1199px) {
  :root {
    --wm-header-h: 130px;
  }
}

@media (max-width: 991px) {
  :root {
    --wm-header-h: 90px;
  }
}

.main-slider .swiper-slide {
  display: flex;
  align-items: center;
  height: calc(100vh - var(--wm-header-h));
  height: calc(100svh - var(--wm-header-h));
  min-height: 440px;
  overflow: hidden;
}

.main-slider .container {
  width: 100%;
  padding-top: 28px;
  padding-bottom: 76px;
}

/* The picture across the whole hero (it covered only the right 63%), with a soft light fade
   behind the text on the left only, as in the original design. */
.main-slider .image-layer {
  left: 0;
  width: 100%;
  background-position: center right;
}

.main-slider .image-layer:before {
  left: 0;
  width: 100%;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(243, 246, 248, 0.97) 0%,
    rgba(243, 246, 248, 0.92) 30%,
    rgba(243, 246, 248, 0.55) 46%,
    rgba(243, 246, 248, 0) 62%
  );
}

/* Text that scales with the screen's width and height, so it always fits. */
.main-slider__tagline {
  margin-bottom: clamp(12px, 2.2vh, 22px);
}

.main-slider__title {
  font-size: clamp(30px, min(4vw, 6.6vh), 62px);
  margin-bottom: clamp(12px, 2.2vh, 22px);
}

.main-slider__text {
  font-size: clamp(15px, min(1.25vw, 2.3vh), 18px);
  margin-bottom: clamp(18px, 3.4vh, 32px);
}

/* Slider arrows: clear on the dark side of the picture, aligned with the content. */
.main-slider__nav {
  right: max(24px, calc((100vw - 1320px) / 2 + 12px));
  bottom: 28px;
  gap: 12px;
  z-index: 5;
}

.main-slider__nav .swiper-button-next,
.main-slider__nav .swiper-button-prev {
  width: 52px;
  height: 52px;
  margin: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background-color: rgba(10, 22, 46, 0.35);
  color: #ffffff;
  font-size: 20px;
  opacity: 1;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.main-slider__nav .swiper-button-next:hover,
.main-slider__nav .swiper-button-prev:hover {
  border-color: var(--insur-base);
  background-color: var(--insur-base);
  color: #ffffff;
  transform: translateY(-2px);
}

.main-slider__nav .swiper-button-next::after,
.main-slider__nav .swiper-button-prev::after {
  display: none;
}

/* Tablets: a wider fade, as the text takes more of the width. */
@media (max-width: 1199px) {
  .main-slider .image-layer:before {
    background: linear-gradient(
      90deg,
      rgba(243, 246, 248, 0.97) 0%,
      rgba(243, 246, 248, 0.9) 45%,
      rgba(243, 246, 248, 0.5) 64%,
      rgba(243, 246, 248, 0) 80%
    );
  }
}

/* Phones: the text runs across the picture, so the fade covers it top to bottom and the
   picture shows through at the bottom; the arrows give way to swiping and autoplay. */
@media (max-width: 767px) {
  .main-slider .swiper-slide {
    min-height: 480px;
  }

  .main-slider .container {
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .main-slider .image-layer:before {
    background: linear-gradient(
      180deg,
      rgba(243, 246, 248, 0.96) 0%,
      rgba(243, 246, 248, 0.9) 58%,
      rgba(243, 246, 248, 0.45) 100%
    );
  }

  .main-slider__title {
    font-size: clamp(26px, min(7.6vw, 5.4vh), 40px);
  }

  .main-slider__nav {
    display: none;
  }

  .main-slider__btn-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .main-slider__btn-box .thm-btn {
    margin: 0 !important;
  }
}

/* The picture fills the whole hero on phones too (the theme capped it at 60% of the screen). */
@media (max-width: 767px) {
  .main-slider .image-layer {
    top: 0;
    bottom: 0;
    height: auto;
  }
}

/* Tablets: keep the text on the light side of the picture. */
@media (min-width: 768px) and (max-width: 1199px) {
  .main-slider__title,
  .main-slider__text {
    max-width: 560px;
  }
}

/* Arrows clear of the chat button in the corner on narrower screens. */
.main-slider__nav {
  right: max(104px, calc((100vw - 1320px) / 2 + 12px));
}

/* Laptops: the title's blue line stays on the light side of the picture. */
@media (min-width: 1200px) {
  .main-slider__title {
    max-width: 640px;
  }
}
