/* IST home-page hero slider text (home pages only). Load after ist-responsive.css.
   Works WITH LayerSlider's own layout: the text keeps its natural line breaks and is only
   re-positioned into the free space of each photo.
   Slide 1 = woman portrait (light, text on the right). Slides 2-4 = text on the left. */

#mainslider { background: #0b2540; overflow: hidden; }
#mainslider .ls-bg { object-fit: cover; }

/* soft shade behind the text on the dark/busy photos only (slides 2-4) */
#mainslider .ls-slide:not([data-ls*="10000"])::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 55%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,28,52,.70) 0%, rgba(7,28,52,.35) 60%, rgba(7,28,52,0) 100%);
}

/* slide 4 (Urgent Visas): the photo has a pale square baked into it behind the text -
   a stronger shade on the left hides the square's edges */
#mainslider .ls-slide:has(img[src="images/4.jpg"])::before { width: 62%;
  background: linear-gradient(90deg, rgba(7,28,52,.92) 0%, rgba(7,28,52,.80) 40%, rgba(7,28,52,.45) 65%, rgba(7,28,52,0) 100%); }

/* slide 3 (Visit Boyfriend / Girlfriend): long heading, couple starts at about 48% - keep the text clear of them */
#mainslider .ls-slide:has(img[src="images/5.jpg"]) .ls-l p:first-child,
#mainslider .ls-slide:has(img[src="images/5.jpg"]) .ls-l p:first-child font { font-size: clamp(28px, 3.2vw, 48px) !important; }

/* common text block */
#mainslider .ls-l { z-index: 5 !important; text-align: left !important; white-space: nowrap; }
#mainslider .ls-l p { margin: 0 0 16px; }
#mainslider .ls-l p:first-child,
#mainslider .ls-l p:first-child font { font-size: clamp(32px, 3.9vw, 58px) !important; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; }
#mainslider .ls-l p:nth-child(2),
#mainslider .ls-l p:nth-child(2) font { font-size: clamp(18px, 1.75vw, 26px) !important; line-height: 1.45; font-weight: 400; }
#mainslider .ls-l p:first-child::after { content: ""; display: block; width: 72px; height: 5px; margin-top: 14px; border-radius: 2px; background: #12A0C3; }

/* slides 2-4: white text, left side, top of the block at ~22% so it never runs off the bottom */
#mainslider .ls-slide:not([data-ls*="10000"]) .ls-l { left: 9% !important; top: 16% !important; }
#mainslider .ls-slide:not([data-ls*="10000"]) .ls-l,
#mainslider .ls-slide:not([data-ls*="10000"]) .ls-l font { color: #fff !important; }
#mainslider .ls-slide:not([data-ls*="10000"]) .ls-l p:first-child { text-shadow: 0 2px 12px rgba(0,0,0,.45); }

/* slide 1: dark text on the light right-hand side of the portrait */
#mainslider .ls-slide[data-ls*="10000"] .ls-l { left: 58% !important; top: 16% !important; }
#mainslider .ls-slide[data-ls*="10000"] .ls-l,
#mainslider .ls-slide[data-ls*="10000"] .ls-l font { color: #0b2540 !important; }

/* pill button, no arrow */
#mainslider .ls-l .button {
  display: inline-block; background: #12A0C3; color: #fff !important; border: 0; border-radius: 999px;
  padding: 16px 40px; font-size: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(18,160,195,.4);
}
#mainslider .ls-l .button:hover { background: #0e86a4; }
#mainslider .ls-l .button img { display: none; }

/* tablets */
@media (max-width: 991px) {
  #mainslider .ls-slide:not([data-ls*="10000"]) .ls-l { left: 7% !important; }
  #mainslider .ls-slide[data-ls*="10000"] .ls-l { left: 52% !important; }
}

/* phones: text wraps and sits over a bottom shade so it stays readable on every photo */
@media (max-width: 767px) {
  #mainslider .ls-slide::before { content: ""; position: absolute; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 70%; z-index: 2; pointer-events: none;
    background: linear-gradient(0deg, rgba(7,28,52,.88) 0%, rgba(7,28,52,.55) 55%, rgba(7,28,52,0) 100%); }
  #mainslider .ls-l { white-space: normal; width: 88% !important; max-width: 88%; }
  #mainslider .ls-slide .ls-l, #mainslider .ls-slide .ls-l font { color: #fff !important; }
  #mainslider .ls-slide .ls-l { left: 6% !important; top: auto !important; bottom: 8% !important; }
  #mainslider .ls-l p:first-child, #mainslider .ls-l p:first-child font { font-size: 22px !important; }
  #mainslider .ls-l p:nth-child(2), #mainslider .ls-l p:nth-child(2) font { font-size: 14px !important; }
  #mainslider .ls-l p:nth-child(2) br { display: none; }
  #mainslider .ls-l .button { padding: 8px 16px; font-size: 12px; }
}
