/* =====================================================
   TheLight – enhancements (v4)
   1) Background slideshows (home hero + about section)
   2) Readable text on any background
   3) Cinematic entrance + looping image motion
   4) "Continue reading" (home + about only)
   5) Scroll reveal
   Upload to: /assets/templates/ptc_prime/css/thelight-enhance.css
   ===================================================== */

:root {
  --tl-gold: #c9a24d;          /* accent colour */
  --tl-text: #f0e6d0;          /* readable body text colour */
  --tl-fade-ms: 2200ms;        /* crossfade between slides */
  --tl-zoom-ms: 13000ms;       /* slow zoom per slide (longer than the 10s interval) */
}

/* ---------- 1. BACKGROUND SLIDESHOWS ---------- */
.banner-section,
section.about,
section.account {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tl-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #000;
}

.tl-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity var(--tl-fade-ms) ease-in-out;
  will-change: opacity, transform;
}

/* the leaving slide keeps zooming while it fades out (no visual jump) */
.tl-hero-slide.is-active,
.tl-hero-slide.is-leaving {
  animation: tlKenBurns var(--tl-zoom-ms) ease-out forwards;
}
.tl-hero-slide.is-active { opacity: 1; }

@keyframes tlKenBurns {
  from { transform: scale(1.08); }
  to   { transform: scale(1);    }
}

/* overlay: darkest behind the text (left), lighter on the right */
.tl-hero-slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.84) 0%, rgba(0,0,0,.58) 48%, rgba(0,0,0,.34) 100%),
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.88) 100%);
}
.tl-slides--about::after {
  background:
    linear-gradient(180deg, rgba(0,0,0,.80) 0%, rgba(0,0,0,.72) 50%, rgba(0,0,0,.88) 100%);
}

@media (max-width: 991px) {
  .tl-hero-slides::after {
    background:
      linear-gradient(180deg, rgba(0,0,0,.70) 0%, rgba(0,0,0,.66) 55%, rgba(0,0,0,.90) 100%);
  }
}

.banner-section > .container,
section.about > .container,
section.account > .container {
  position: relative;
  z-index: 2;
}

/* ---------- 2. READABLE TEXT ---------- */
html body .banner-section .banner-content__desc,
html body .banner-section .banner-content__client p,
html body section.about .section-heading__desc,
html body section.about .about-item__subtitle,
html body section.about p {
  color: var(--tl-text) !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .85);
}

html body .banner-section .banner-content__desc,
html body section.about .section-heading__desc {
  font-size: 17px;
  line-height: 1.9;
}

html body .banner-section .banner-content__subtitle span,
html body section.about .about-item__title {
  color: #fff !important;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}

/* ---------- 3. ENTRANCE + LOOPING MOTION ---------- */
/* hidden only while JS is running; JS then plays the entrance */
.tl-js .banner-content > *,
.tl-js .banner-content-thumb { opacity: 0; }

.tl-hero-in .banner-content > * {
  animation: tlSlideIn 1.2s cubic-bezier(.22, .61, .36, 1) both;
}
.tl-hero-in .banner-content > *:nth-child(1) { animation-delay: .15s; }
.tl-hero-in .banner-content > *:nth-child(2) { animation-delay: .40s; }
.tl-hero-in .banner-content > *:nth-child(3) { animation-delay: .65s; }
.tl-hero-in .banner-content > *:nth-child(4) { animation-delay: .90s; }
.tl-hero-in .banner-content > *:nth-child(5) { animation-delay: 1.10s; }
.tl-hero-in .banner-content > *:nth-child(6) { animation-delay: 1.30s; }

.tl-hero-in .banner-content-thumb {
  animation: tlSlideInRight 1.4s cubic-bezier(.22, .61, .36, 1) .5s both;
}

@keyframes tlSlideIn {
  from { opacity: 0; transform: translateX(-64px); }
  to   { opacity: 1; transform: none; }
}
@keyframes tlSlideInRight {
  from { opacity: 0; transform: translateX(64px); }
  to   { opacity: 1; transform: none; }
}

/* picture keeps "breathing" slowly, like a looping video */
.banner-content-thumb,
.about__thumb { overflow: hidden; }

.banner-content-thumb img,
.about__thumb img {
  animation: tlDrift 16s ease-in-out infinite alternate;
  transform-origin: 60% 50%;
  will-change: transform, filter;
}
@keyframes tlDrift {
  from { transform: scale(1)    translate3d(0, 0, 0);          filter: brightness(.90) saturate(1);    }
  to   { transform: scale(1.09) translate3d(-1.5%, -1%, 0);    filter: brightness(1.08) saturate(1.15); }
}

/* ---------- 4. CONTINUE READING ---------- */
.tl-rm-text {
  overflow: hidden;
  transition: max-height .7s cubic-bezier(.4, 0, .2, 1);
  white-space: pre-line;
}
.tl-rm-text.is-collapsed {
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

.tl-rm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 6px 0;
  background: none;
  border: 0;
  color: var(--tl-gold);
  font: inherit;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .8);
}
.tl-rm-toggle::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  transition: width .35s ease;
}
.tl-rm-toggle:hover::before,
.tl-rm-toggle:focus-visible::before { width: 54px; }
.tl-rm-toggle:focus-visible { outline: 1px solid var(--tl-gold); outline-offset: 4px; }

/* ---------- 4b. SIGN IN / SIGN UP / CONTACT FORMS ---------- */
.tl-slides--auth::after {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0,0,0,.50) 0%, rgba(0,0,0,.86) 100%);
}

html body .account-form {
  background: rgba(8, 6, 6, .74) !important;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border: 1px solid rgba(201, 162, 77, .30) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}

html body .account-form__title { color: #fff !important; text-shadow: 0 1px 12px rgba(0,0,0,.8); }

html body .account-form__desc,
html body .account-form .have-account__text,
html body .account-form .form-check-label,
html body .account-form .form-check-label label { color: var(--tl-text) !important; }

html body .account-form .form--label { color: #e8d9b5 !important; }

html body .account-form .form--control,
html body .account-form .form-control {
  color: #fff !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(201, 162, 77, .38) !important;
}
html body .account-form .form--control:focus,
html body .account-form .form-control:focus {
  border-color: var(--tl-gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 162, 77, .18) !important;
}
html body .account-form .form--control::placeholder { color: rgba(240, 230, 208, .45); }

html body .account-form .have-account__link,
html body .account-form .text--base,
html body .account-form .password-show-hide { color: var(--tl-gold) !important; }

/* ---------- 4c. CURRENT PAGE IN NAVBAR ---------- */
html body .navbar .nav-link.is-current {
  color: var(--tl-gold) !important;
}
/* mobile / tablet menu: gold bar on the left + soft highlight */
html body .navbar .nav-link.is-current {
  box-shadow: inset 3px 0 0 var(--tl-gold);
  background: rgba(201, 162, 77, .10);
}
/* desktop menu: gold line under the current link */
@media (min-width: 1200px) {
  html body .navbar .nav-link.is-current {
    box-shadow: inset 0 -2px 0 var(--tl-gold);
    background: transparent;
  }
}

/* ---------- 4d. FLOATING WHATSAPP BUTTON ---------- */
:root {
  --tl-red: #e11d2e;
  --tl-wa-right: 27px;     /* align with the arrow button */
  --tl-wa-bottom: 30px;    /* position when the arrow button is hidden */
  --tl-wa-lift: 92px;      /* position when the arrow button is showing */
}

.tl-whatsapp {
  position: fixed;
  right: var(--tl-wa-right);
  bottom: var(--tl-wa-bottom);
  z-index: 990;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #000;
  color: var(--tl-red);
  border: 1px solid rgba(225, 29, 46, .65);
  font-size: 26px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .7), 0 0 18px rgba(225, 29, 46, .35);
  opacity: 0;
  transform: translateY(14px);
  animation:
    tlWaIn .8s ease 1.6s forwards,
    tlWaPulse 3s ease-out 2.6s infinite;
  transition: bottom .45s ease, background .3s ease, color .3s ease;
}
/* sit above the arrow button whenever it is visible */
body:has(.scroll-top.show) .tl-whatsapp { bottom: var(--tl-wa-lift); }

.tl-whatsapp:hover,
.tl-whatsapp:focus-visible { background: var(--tl-red); color: #000; }
.tl-whatsapp:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.tl-whatsapp__label {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translate(8px, -50%);
  padding: 8px 14px;
  background: #000;
  color: var(--tl-red);
  border: 1px solid rgba(225, 29, 46, .55);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.tl-whatsapp:hover .tl-whatsapp__label,
.tl-whatsapp:focus-visible .tl-whatsapp__label {
  opacity: 1;
  transform: translate(0, -50%);
}

@keyframes tlWaIn { to { opacity: 1; transform: none; } }
@keyframes tlWaPulse {
  0%   { box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 0 0    rgba(225,29,46,.55); }
  70%  { box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 0 16px rgba(225,29,46,0);   }
  100% { box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 0 0    rgba(225,29,46,0);   }
}

/* ---------- 5. SCROLL REVEAL ---------- */
.tl-js [data-tl-reveal] {
  opacity: 0;
  transition: opacity .9s ease, transform .9s cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--tl-delay, 0ms);
  will-change: opacity, transform;
}
.tl-js [data-tl-reveal="up"]    { transform: translateY(32px); }
.tl-js [data-tl-reveal="left"]  { transform: translateX(-56px); }
.tl-js [data-tl-reveal="right"] { transform: translateX(56px); }
.tl-js [data-tl-reveal="fade"]  { transform: none; }
/* form fields "pop" in with a gentle overshoot */
.tl-js [data-tl-reveal="pop"] {
  transform: translateY(24px) scale(.95);
  transition: opacity .6s ease, transform .75s cubic-bezier(.34, 1.35, .64, 1);
  transition-delay: var(--tl-delay, 0ms);
}
.tl-js [data-tl-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 6. ABOUT PAGE VISUAL (main picture + framed accent picture) ---------- */
.about__visual { position: relative; }
.about__visual .about__thumb { position: relative; z-index: 1; }

.about__accent {
  position: relative;
  z-index: 3;
  width: 58%;
  margin: -48px 0 0 16px;
  border: 6px solid #000;
  box-shadow: 0 0 0 1px rgba(201, 162, 77, .55), 0 28px 60px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.about__accent img {
  display: block;
  width: 100%;
  height: auto;
  animation: tlDrift 18s ease-in-out infinite alternate;
}

@media (min-width: 992px) {
  /* thin gold frame offset behind the main picture */
  .about__visual::before {
    content: "";
    position: absolute;
    top: 22px;
    right: -16px;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(201, 162, 77, .55);
    z-index: 0;
  }
  .about__accent {
    position: absolute;
    left: 20px;
    bottom: -44px;
    width: 40%;
    margin: 0;
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  .tl-hero-slide,
  .tl-hero-slide.is-active,
  .tl-hero-slide.is-leaving,
  .banner-content-thumb img,
  .about__thumb img,
  .about__accent img { animation: none; transition: none; transform: none; }
  .tl-hero-in .banner-content > *,
  .tl-hero-in .banner-content-thumb { animation: none; opacity: 1; }
  .tl-js .banner-content > *,
  .tl-js .banner-content-thumb { opacity: 1; }
  .tl-rm-text { transition: none; }
  .tl-whatsapp { animation: none; opacity: 1; transform: none; }
  .tl-js [data-tl-reveal] { opacity: 1; transform: none; transition: none; }
}
