/* ============================================================
   Perkhidmatan — "Midnight Gold Estate" redesign
   NOTE: Loaded LAST in index.php. Uses #services for specificity so it
   overrides main.css / tm-pro.css / tm-ambient.css without edits there.
   CMS ids + data-var attributes are untouched (Visual Edit still works).
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;1,9..144,500&display=swap");

.tm-pro #services.services-slider {
  --svc-gold: #ffc736;
  --svc-gold-soft: #ffe3a1;
  --svc-navy: #08182c;
  --svc-navy-2: #10294a;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 104px 0 150px;
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(255, 199, 54, .16), transparent 60%),
    radial-gradient(900px 600px at 5% 40%, rgba(54, 122, 214, .22), transparent 60%),
    linear-gradient(180deg, #071427 0%, #0b2140 55%, #071427 100%);
}

/* NOTE: Blueprint grid fading out toward the edges */
.tm-pro #services.services-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

/* NOTE: Giant outlined watermark behind the heading */
.tm-pro #services.services-slider::after {
  content: "PERKHIDMATAN";
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  font: 800 clamp(4rem, 15vw, 13rem)/1 "Plus Jakarta Sans", sans-serif;
  letter-spacing: -.04em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
  pointer-events: none;
  user-select: none;
}

/* ---------- floating glow orbs ---------- */
.svc-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  animation: svc-float 14s ease-in-out infinite alternate;
}
.svc-orb--gold { width: 360px; height: 360px; right: 6%; top: 28%; background: rgba(255, 199, 54, .20); }
.svc-orb--blue { width: 420px; height: 420px; left: -4%; bottom: 8%; background: rgba(48, 120, 220, .26); animation-delay: -6s; }
@keyframes svc-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(30px, -40px, 0) scale(1.15); }
}

/* ---------- skyline silhouette at the base ---------- */
.svc-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background:
    linear-gradient(180deg, transparent, #071427 92%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 130' preserveAspectRatio='none'%3E%3Cpath fill='%23163258' d='M0 130V82h40V60h30v22h30V40h38v42h26V70h34v12h40V30h44v52h30V64h36v18h34V48h40v34h28V74h46v8h34V36h42v46h30V58h38v24h40V68h30v14h38V44h44v38h30V70h40v60z'/%3E%3C/svg%3E") bottom/1200px 130px repeat-x;
}

/* ---------- section heading ---------- */
.tm-pro #services .section-title { padding: 0 24px 56px; max-width: 880px; }
.tm-pro #services .section-title .tm-section-label {
  padding: 8px 18px;
  border: 1px solid rgba(255, 199, 54, .35);
  border-radius: 999px;
  background: rgba(255, 199, 54, .08);
  color: var(--svc-gold);
  letter-spacing: .28em;
  font-size: .72rem;
  backdrop-filter: blur(8px);
}
.tm-pro #services .section-title h2 {
  margin-top: 18px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  letter-spacing: -.03em;
  background: linear-gradient(100deg, #fff 30%, var(--svc-gold-soft) 55%, #fff 80%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  animation: svc-sheen 7s ease-in-out infinite alternate;
}
@keyframes svc-sheen { to { background-position: 100% 0; } }
.tm-pro #services .section-title p { color: #c9d6e6; }

/* ---------- slider layout: wider, two big cards ---------- */
.tm-pro #services .services-swiper { max-width: 1180px; padding: 28px 24px 64px; overflow: hidden; }
.tm-pro #services .services-swiper .swiper-pagination {
  position: absolute; top: auto; bottom: 18px; left: 0; right: 0; width: 100%;
  transform: none; display: flex; justify-content: center; align-items: center; gap: 6px;
}
.tm-pro #services .services-swiper .swiper-pagination-bullet { margin: 0; }
.tm-pro #services .services-swiper .swiper-wrapper { align-items: stretch; }
.tm-pro #services .services-swiper .swiper-slide { height: auto; }

/* ---------- the card ---------- */
.tm-pro #services .service-slide-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  min-height: 560px;
  padding: 0;
  display: flex;
  align-items: flex-end;
  border: 0;
  border-radius: 32px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s ease;
}
/* NOTE: Cinematic colour grade + bottom fade */
.tm-pro #services .service-slide-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 24, 44, .35) 0%, rgba(8, 24, 44, 0) 30%, rgba(8, 24, 44, .78) 62%, #071427 100%),
    linear-gradient(120deg, rgba(255, 199, 54, .14), transparent 40%);
  transition: opacity .4s ease;
}
/* NOTE: Cursor-following spotlight + animated gold hairline border */
.tm-pro #services .service-slide-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 224, 140, .22), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
}
.tm-pro #services .service-slide-card:hover {
  transform: translate3d(0, -10px, 0) scale(1.01);
  box-shadow: 0 50px 90px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 199, 54, .55), 0 0 60px -10px rgba(255, 199, 54, .35);
}
.tm-pro #services .service-slide-card:hover::after { opacity: 1; }

/* NOTE: Gold viewfinder corner marks (architect's drawing feel) */
.service-slide-card__corner { position: absolute; inset: 20px; pointer-events: none; z-index: 2; }
.service-slide-card__corner::before,
.service-slide-card__corner::after {
  content: "";
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid var(--svc-gold, #ffc736);
  opacity: .75;
  transition: width .4s ease, height .4s ease, opacity .4s ease;
}
.service-slide-card__corner::before { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.service-slide-card__corner::after  { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.tm-pro #services .service-slide-card:hover .service-slide-card__corner::before,
.tm-pro #services .service-slide-card:hover .service-slide-card__corner::after { width: 60px; height: 60px; opacity: 1; }

/* NOTE: Huge outlined numeral in the top-right */
.tm-pro #services .service-slide-card__index {
  top: 12px; right: 30px;
  padding: 0;
  border: 0;
  background: none;
  font: 700 clamp(5rem, 9vw, 7.5rem)/1 "Fraunces", Georgia, serif;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .55);
  letter-spacing: -.04em;
  transition: -webkit-text-stroke-color .4s ease, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.tm-pro #services .service-slide-card:hover .service-slide-card__index {
  -webkit-text-stroke-color: var(--svc-gold);
  transform: translateY(6px) scale(1.06);
}

/* NOTE: Frosted-glass content panel */
.tm-pro #services .service-slide-card__content {
  position: relative;
  z-index: 3;
  width: calc(100% - 40px);
  max-width: none;
  margin: 0 20px 20px;
  padding: 28px 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  text-align: left;
}
.tm-pro #services .service-slide-card__eyebrow {
  margin-bottom: 14px;
  padding: 7px 14px;
  font-size: .68rem;
  letter-spacing: .14em;
  font-weight: 700;
  color: #1a1204;
  border: 0;
  background: linear-gradient(100deg, #ffd35c, #ffb71f);
  box-shadow: 0 6px 18px -4px rgba(255, 183, 31, .55);
}
.tm-pro #services .service-slide-card h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 12px;
}
.tm-pro #services .service-slide-card p {
  font-size: .98rem;
  line-height: 1.65;
  color: #dbe6f3;
  margin-bottom: 18px;
}

/* ---------- feature chips ---------- */
.service-slide-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; min-height: 34px; }
.service-slide-card__chips li {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: .7rem; font-weight: 600; letter-spacing: .01em;
  color: #fff;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(8, 24, 44, .45);
}
.service-slide-card__chips i { color: var(--svc-gold, #ffc736); font-size: .85rem; }

/* ---------- CTA button: gold pill with a rotating arrow disc ---------- */
.tm-pro #services .service-slide-card__btn {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  padding: 6px 6px 6px 26px;
  border-radius: 999px;
  background: #fff;
  color: #08182c;
  font-size: .95rem;
  font-weight: 700;
  transition: background .35s ease, color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.tm-pro #services .service-slide-card__btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, #ffd35c, #ffb71f);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  z-index: 0;
}
.tm-pro #services .service-slide-card__btn > * { position: relative; z-index: 1; }
.tm-pro #services .service-slide-card__btn i {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #08182c;
  color: var(--svc-gold, #ffc736);
  font-size: 1.15rem;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
.tm-pro #services .service-slide-card__btn:hover,
.tm-pro #services .service-slide-card__btn:focus-visible { background: #fff; color: #08182c; transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(255, 183, 31, .6); }
.tm-pro #services .service-slide-card__btn:hover::before,
.tm-pro #services .service-slide-card__btn:focus-visible::before { transform: translateX(0); }
.tm-pro #services .service-slide-card__btn:hover i { transform: rotate(45deg); }

/* ---------- nav arrows + dots ---------- */
.tm-pro #services .services-swiper .swiper-button-prev,
.tm-pro #services .services-swiper .swiper-button-next {
  width: 56px; height: 56px;
  border: 1px solid rgba(255, 199, 54, .5);
  background: rgba(8, 24, 44, .6);
  color: var(--svc-gold);
}
.tm-pro #services .services-swiper .swiper-pagination-bullet { background: rgba(255, 255, 255, .4); }
.tm-pro #services .services-swiper .swiper-pagination-bullet-active { background: var(--svc-gold); }

/* ---------- entrance animation ---------- */
@keyframes svc-rise { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }
.tm-pro #services .swiper-slide { animation: svc-rise .9s cubic-bezier(.22, 1, .36, 1) both; }
.tm-pro #services .swiper-slide:nth-child(2) { animation-delay: .15s; }

/* ---------- responsive ---------- */
@media (max-width: 767px) {
  .tm-pro #services.services-slider { padding: 64px 0 110px; }
  .tm-pro #services .section-title { padding-bottom: 32px; }
  .tm-pro #services .services-swiper { max-width: 440px; padding: 8px 14px 44px; }
  .tm-pro #services .service-slide-card { min-height: 520px; border-radius: 26px; }
  .tm-pro #services .service-slide-card__content { padding: 22px 20px 20px; margin: 0 12px 12px; width: calc(100% - 24px); }
  .tm-pro #services .service-slide-card__index { font-size: 4.4rem; right: 20px; }
  .service-slide-card__chips li:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-orb, .tm-pro #services .section-title h2, .tm-pro #services .swiper-slide { animation: none; }
  .tm-pro #services .service-slide-card, .tm-pro #services .service-slide-card:hover { transform: none; transition: none; }
}

/* ============================================================
   Fit-in-one-screen pass (desktop): section height tracks viewport.
   NOTE: 108px ≈ sticky header; card height = viewport minus header minus title block.
   ============================================================ */
@media (min-width: 992px) {
  .tm-pro #services.services-slider {
    padding: 28px 0 72px;
    min-height: calc(100vh - 108px);
    display: flex; flex-direction: column; justify-content: center;
  }
  .tm-pro #services.services-slider::after { top: 8px; font-size: clamp(4rem, 11vw, 9rem); }
  .tm-pro #services .section-title { padding: 0 24px 22px; max-width: 980px; }
  .tm-pro #services .section-title .tm-section-label { padding: 6px 16px; }
  .tm-pro #services .section-title h2 { margin-top: 10px; font-size: clamp(2.2rem, 4.2vw, 3.2rem); }
  .tm-pro #services .section-title p { margin-top: 8px; font-size: 1rem; max-width: 900px; }
  .tm-pro #services .services-swiper { padding: 14px 24px 38px; }
  .tm-pro #services .services-swiper .swiper-pagination { bottom: 8px; }
  .tm-pro #services .service-slide-card { min-height: clamp(440px, calc(100vh - 108px - 330px), 540px); }
  .tm-pro #services .service-slide-card__content { padding: 22px 24px 20px; }
  .tm-pro #services .service-slide-card h3 { font-size: clamp(1.7rem, 2.4vw, 2.2rem); margin-bottom: 8px; }
  .tm-pro #services .service-slide-card p { margin-bottom: 14px; font-size: .92rem; line-height: 1.55; }
  .service-slide-card__chips { margin-bottom: 16px; }
  .tm-pro #services .service-slide-card__btn { min-height: 52px; }
  .tm-pro #services .service-slide-card__btn i { width: 40px; height: 40px; }
  .svc-skyline { height: 90px; }
}
@media (min-width: 992px) {
  .tm-pro #services.services-slider { padding: 20px 0 52px; }
  .tm-pro #services .section-title { padding-bottom: 8px; }
  .tm-pro #services .service-slide-card { min-height: clamp(420px, calc(100vh - 108px - 400px), 540px); }
}

/* Fit-in-one-screen pass 2: browsers at 125% scale have ~800px CSS height */
@media (min-width: 992px) {
  .tm-pro #services .section-title { margin-bottom: 0; }
  .tm-pro #services.services-slider { padding: 16px 0 44px; }
  .tm-pro #services .service-slide-card { min-height: clamp(400px, calc(100vh - 108px - 300px), 540px); }
  .tm-pro #services .service-slide-card p {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .service-slide-card__chips { flex-wrap: nowrap; min-height: 0; margin-bottom: 14px; }
  .service-slide-card__chips li { padding: 5px 9px; font-size: .68rem; }
  .tm-pro #services .service-slide-card__eyebrow { margin-bottom: 10px; }
}
@media (min-width: 992px) and (max-height: 860px) {
  .tm-pro #services .section-title h2 { font-size: 2.3rem; }
  .tm-pro #services .section-title p { font-size: .92rem; }
  .tm-pro #services .service-slide-card__content { padding: 18px 22px 16px; }
}

/* Match Visi & Dasar Kualiti height (~590px): fixed compact cards, no viewport-tall section */
@media (min-width: 992px) {
  .tm-pro #services.services-slider { min-height: 0; display: block; padding: 14px 0 34px; }
  .tm-pro #services .service-slide-card { min-height: 360px; }
  .tm-pro #services .services-swiper { padding: 10px 24px 30px; }
  .tm-pro #services .section-title h2 { font-size: 2.4rem; margin-top: 8px; }
  .tm-pro #services .service-slide-card__content { padding: 16px 22px 16px; margin-bottom: 16px; }
  .tm-pro #services .service-slide-card__eyebrow { padding: 5px 12px; margin-bottom: 8px; }
  .tm-pro #services .service-slide-card h3 { font-size: 1.8rem; margin-bottom: 6px; }
  .tm-pro #services .service-slide-card p { margin-bottom: 10px; }
  .service-slide-card__chips { margin-bottom: 12px; }
  .tm-pro #services .service-slide-card__btn { min-height: 48px; }
  .tm-pro #services .service-slide-card__btn i { width: 38px; height: 38px; }
  .tm-pro #services .service-slide-card__index { font-size: 4.5rem; top: 8px; }
}

/* ---- Berita Peristiwa: sub-caption on ONE row on desktop ---- */
@media (min-width: 1200px) {
  .tm-pro #berita-peristiwa .section-title { max-width: none; }
  .tm-pro #berita-peristiwa .section-title p { max-width: none; width: 100%; white-space: nowrap; margin-left: auto; margin-right: auto; }
}

/* ---- ALL homepage section captions (the line under each big heading) on ONE row on desktop ---- */
@media (min-width: 1280px) {
  /* NOTE: some sections give the heading box a narrow / off-centre width — make it full width so the one-row caption is centred */
  .tm-pro section .section-title {
    width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important;
  }
  .tm-pro section .section-title p {
    max-width: none !important; width: auto !important; margin-left: 0 !important; margin-right: 0 !important;
    white-space: nowrap; text-align: center; font-size: clamp(.88rem, 1.12vw, 1.05rem);
  }
}
