/* =============================================================
   RAMAHFAKHIRIN.COM — Custom Stylesheet
   Accent : #7463FF  |  Body : #F7F7FD  |  Font: Phudu + Onest
   File   : assets/css/ramah.css
   ============================================================= */

/* ============================================================
   RAMAHFAKHIRIN.COM  —  Mobile App Light Style
   Accent: #7463FF  |  Body: #F7F7FD  |  Font: Phudu + Onest
   ============================================================ */
:root {
  --rf-accent: #7463FF;
  --rf-accent2: #9585FF;
  --rf-dk: #7463FF;
  --rf-bg: #F7F7FD;
  --rf-bg2: #EEEEF8;
  --rf-dark: #0E0F11;
  --rf-mid: #66666C;
  --rf-bdr: #E2E2F0;

  /* FIX #2 — Override template's green preloader with our violet palette */
  --tp-theme-green: #7463FF !important;
  --tp-theme-1: #7463FF !important;
  --tp-common-green-light: #9585FF !important;
  --tp-common-green-regular: #7463FF !important;
  --tp-common-green-1: #7463FF !important;
}

/* FIX #2 — Preloader background: override green → cool light grey */
#preloader {
  background-color: #F7F7FD !important;
}

.preloader span {
  background: #7463FF !important;
}

/* ---- Skill bars ---- */
.rf-sb-item {
  margin-bottom: 26px
}

.rf-sb-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px
}

.rf-sb-name {
  font-size: 14px;
  font-weight: 500;
  color: #3a3a5c;
  font-family: 'Onest', 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px
}

.rf-sb-pct {
  font-size: 13px;
  font-weight: 700;
  color: #7463FF
}

.rf-sb-track {
  height: 5px;
  background: rgba(116, 99, 255, .15);
  border-radius: 99px;
  overflow: hidden
}

.rf-sb-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7463FF, #9585FF);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(.16, 1, .3, 1)
}

.rf-sb-fill.go {
  transform: scaleX(1)
}

/* ---- Cert tags ---- */
.rf-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px
}

.rf-ctag {
  font-size: 11px;
  font-weight: 500;
  color: #7463FF;
  background: rgba(116, 99, 255, .08);
  border: 1.5px solid rgba(116, 99, 255, .25);
  border-radius: 99px;
  padding: 5px 14px;
  font-family: 'Onest', 'Inter', sans-serif;
  transition: all .25s
}

.rf-ctag:hover {
  background: rgba(116, 99, 255, .16);
  border-color: rgba(116, 99, 255, .5)
}

/* ---- Floating bubbles next to phone ---- */
.rf-bubble {
  animation: rfFloat 4s ease-in-out infinite;
}

.rf-bubble:nth-child(2) {
  animation-delay: -1.3s;
}

.rf-bubble:nth-child(3) {
  animation-delay: -2.7s;
}

@keyframes rfFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* FIX #1 — Phone centered below in ROW 2 — bubbles outside image area */
.rf-phone-wrap-bottom {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 80px 40px;
  text-align: center;
}

.rf-phone-main-bottom {
  display: block;
  width: 110%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.rf-phone-bg-bottom {
  position: absolute;
  top: 60%;
  left: 71%;
  transform: translate(-50%, -50%);
  width: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .7;
}

/* ---- Portfolio filter ---- */
.rf-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 44px
}

.rf-fbtn {
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--rf-bdr);
  background: transparent;
  color: var(--rf-mid);
  transition: all .3s;
  font-family: 'Onest', 'Inter', sans-serif
}

.rf-fbtn.on,
.rf-fbtn:hover {
  background: var(--rf-accent);
  border-color: var(--rf-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(116, 99, 255, .3)
}

/* ---- Portfolio cards ---- */
.rf-port-item {
  transition: opacity .3s, transform .3s
}

.rf-pcard {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  background: #e8e8f8
}

.rf-pcard-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block
}

/* ─── Card media wrapper: image + colorful gradient fallback ────────────────
   Structure: .rf-pcard-media (gradient bg, same as old .rf-ph-*)
                ├─ img.rf-pcard-img       (real screenshot, on top)
                └─ .rf-ph-fallback        (icon + label, hidden if img loads)

   If image fails to load (404), JS adds .rf-ph-empty to media wrapper,
   img hides itself, and .rf-ph-fallback becomes visible — showing the
   original colorful placeholder (icon + label) exactly as before.
   ──────────────────────────────────────────────────────────────────────────── */
.rf-pcard-media {
  position: relative;
  width: 100%;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
}

.rf-pcard-media .rf-pcard-img {
  height: 100%;
  position: relative;
  z-index: 1;
}

.rf-ph-fallback {
  position: absolute;
  inset: 0;
  display: none;              /* hidden by default — image is on top */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 0;
}

.rf-ph-fallback svg {
  width: 32px;
  height: 32px;
  opacity: .22
}

.rf-ph-fallback span {
  font-size: 10px;
  color: #8080b0;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: 'Onest', 'Inter', sans-serif
}

/* When image fails to load: show gradient + fallback icon/label */
.rf-pcard-media.rf-ph-empty .rf-ph-fallback {
  display: flex;
}

.rf-ph {
  width: 100%;
  height: 260px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.rf-ph svg {
  width: 32px;
  height: 32px;
  opacity: .22
}

.rf-ph span {
  font-size: 10px;
  color: #8080b0;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: 'Onest', 'Inter', sans-serif
}

.rf-ph-a {
  background: linear-gradient(135deg, #ddddf8, #c8c8f0)
}

.rf-ph-b {
  background: linear-gradient(135deg, #d8e4f4, #c0d0ec)
}

.rf-ph-c {
  background: linear-gradient(135deg, #e0d8f8, #ccc0f0)
}

.rf-ph-d {
  background: linear-gradient(135deg, #dce8f0, #c4d8ec)
}

.rf-ph-e {
  background: linear-gradient(135deg, #d8f0e8, #c0e0d4)
}

.rf-ph-f {
  background: linear-gradient(135deg, #e4e4f8, #d0d0f0)
}

.rf-pov {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(116, 99, 255, .9), rgba(10, 8, 28, .95));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 22px;
  opacity: 0;
  transition: opacity .3s;
  border-radius: 16px
}

.rf-pcard:hover .rf-pov {
  opacity: 1
}

.rf-pov-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 5px
}

.rf-pov-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.2;
  font-family: 'Phudu', serif
}

.rf-pov-link {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  padding-bottom: 2px;
  text-decoration: none
}

.rf-pcontent {
  padding: 14px 4px 4px
}

.rf-ptitle {
  font-size: 16px;
  font-weight: 700;
  color: var(--rf-dark);
  margin-bottom: 4px;
  font-family: 'Phudu', serif;
  text-transform: uppercase;
  letter-spacing: .04em
}

.rf-pmeta {
  font-size: 12px;
  color: var(--rf-mid)
}

.rf-pcard-media { position: relative; z-index: 0; }
.rf-pcard-media .rf-pcard-img { z-index: 1; }
.rf-ph-fallback { display: none; }            /* fallback gradient, hidden by default */
.rf-pcard-media.rf-ph-empty .rf-ph-fallback { display: flex; }  /* muncul jika img 404 */
.rf-pov { z-index: 2; }                        /* overlay SELALU di atas image */

/* ---- Photo placeholder ---- */
.rf-photo-ph {
  width: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, #ddddf8, #c8c8f0);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px
}

.rf-photo-ph svg {
  width: 60px;
  height: 60px;
  opacity: .22;
  color: var(--rf-accent)
}

.rf-photo-ph span {
  font-size: 11px;
  color: #8080b0;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: 'Onest', 'Inter', sans-serif
}

/* ---- FAQ custom ---- */
.rf-faq-item {
  border-bottom: 1px solid var(--rf-bdr)
}

.rf-faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Onest', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--rf-dark);
  text-align: left;
  gap: 16px
}

.rf-faq-btn:hover {
  color: var(--rf-accent)
}

.rf-faq-ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--rf-bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s
}

.rf-faq-ico svg {
  width: 14px;
  height: 14px;
  transition: transform .3s
}

.rf-faq-item.open .rf-faq-ico {
  background: var(--rf-accent)
}

.rf-faq-item.open .rf-faq-ico svg {
  color: #fff;
  transform: rotate(45deg)
}

.rf-faq-ans {
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s ease
}

.rf-faq-ans-in {
  padding: 0 0 18px;
  font-size: 14px;
  color: var(--rf-mid);
  line-height: 1.75;
  font-family: 'Onest', 'Inter', sans-serif
}

/* ---- CTA contacts ---- */
.rf-cta-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  justify-content: center
}

.rf-cta-ci {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: rgb(32, 32, 32);
  text-decoration: none;
  transition: color .3s;
  font-family: 'Onest', 'Inter', sans-serif
}

.rf-cta-ci:hover {
  color: #fff
}

/* ---- Hero badge ---- */
.rf-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--rf-accent);
  background: rgba(116, 99, 255, .12);
  padding: 7px 18px;
  border-radius: 99px;
  border: 1px solid rgba(116, 99, 255, .25);
  margin-bottom: 28px;
  font-family: 'Onest', 'Inter', sans-serif
}

.rf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rf-accent);
  animation: rfPulse 2s infinite
}

@keyframes rfPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .3;
    transform: scale(.75)
  }
}

/* ---- Section title override to Phudu ---- */
.tp-section-title-phudu,
.app-stack-title,
.app-review-title,
.app-feature-title,
.app-benefits-item-title {
  font-family: 'Phudu', serif !important;
}

body,
p,
span,
a,
li,
button,
input,
.app-hero-btn-text p {
  font-family: 'Onest', 'Inter', sans-serif;
}

/* ---- Smooth wrapper bg ---- */
#smooth-wrapper {
  background-color: #F7F7FD !important;
}

/* FIX #3 — Scroll offset for all anchor sections (compensate sticky header ~80px) */
#about,
#skills,
#portfolio,
#services,
#testimonial,
#faq,
#contact {
  scroll-margin-top: 80px;
}

/* FIX #3 — Portfolio: remove GSAP stack-pin classes that cause layout breakage */
.app-stack-area {
  transform: none !important;
  will-change: auto !important;
}

.stack-panel-pin-area {
  position: relative !important;
  height: auto !important;
}

/* ─── Testimonial loop: JS marquee, GSAP-safe ──────────────────────────────── */

/* 1. Section spacing — add padding-top */
.app-testimonial-area.app-testimonial-ptb {
  padding-top: 140px;
}

/* 2. Wrapper: block-level, no flex stretch */
.app-testimonial-wrapper {
  animation: none !important;
  display: block !important;
  /* not flex — prevents stretch */
  white-space: nowrap !important;
  /* keep items on one line */
  width: max-content !important;
  will-change: transform;
}

/* 3. Cards: inline-block, fixed width matching template */
.app-testimonial-item {
  display: inline-block !important;
  white-space: normal !important;
  /* text inside wraps normally */
  min-width: 460px !important;
  max-width: 460px !important;
  vertical-align: top;
}

/* 4. Mobile: shrink card to fit viewport, keep readable padding */
@media (max-width: 575px) {
  .app-testimonial-item {
    min-width: calc(100vw - 60px) !important;
    max-width: calc(100vw - 60px) !important;
    margin: 0 10px !important;
    padding: 24px !important;
  }

  .app-testimonial-area.app-testimonial-ptb {
    padding-top: 100px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .app-testimonial-item {
    min-width: 420px !important;
    max-width: 420px !important;
  }
}