/* ========== RumahAdvisor Home Page ========== */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-brand: #1565C0;
  --color-brand-dark: #1a2e4a;
  --color-gradient-start: #3b82f6;
  --color-gradient-end: #7c3aed;
  --color-dark: #1e293b;
  --color-gray-700: #374151;
  --color-gray-600: #4b5563;
  --color-footer-bg: #0f172a;
  --color-green-badge: #22c55e;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

/* Scroll-triggered staggered animation (Hero): slide down + fade in */
.animate-hidden {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.home-page {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark);
  margin: 0;
  padding: 0;
  background: #fff;
}

/* ---------- Header ---------- */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.home-header-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Logo: image + brand text in a row; Flexbox, text vertically centered with logo */
.home-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  height: 100%;
  min-height: 40px;
  text-decoration: none;
  flex-shrink: 0;
}

.home-logo-icon {
  height: 34px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.home-logo-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.2;
}

/* "rumah": dark blue, normal weight — do NOT use bold */
.home-logo .logo-rumah {
  color: var(--color-brand-dark);
  font-weight: 400;
}

.home-logo .logo-advisor {
  color: var(--color-brand);
  font-weight: 700;
}

/* Hamburger: three horizontal stacked lines; shown only on mobile */
.home-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-brand-dark);
  border-radius: 8px;
  transition: background 0.2s;
}
.home-nav-toggle:hover {
  background: #f1f5f9;
}
.home-nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.home-nav a {
  color: var(--color-gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.home-nav a:hover { color: var(--color-brand); }

/* Header responsive: hamburger on mobile; full navbar on desktop */
@media (max-width: 768px) {
  .home-header-inner {
    padding: 0.6rem 1rem;
    min-height: 52px;
    gap: 0.75rem;
  }
  .home-logo-icon {
    height: 32px;
  }
  .home-nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }
  .home-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .home-header.menu-open .home-nav {
    display: flex;
  }
  .home-nav a,
  .home-nav .home-btn-login,
  .home-nav .home-btn-cta {
    padding: 0.75rem 1rem;
    border-radius: 8px;
  }
  .home-nav .home-btn-login,
  .home-nav .home-btn-cta {
    text-align: center;
    font-size: 0.95rem;
    padding: 10px 18px;
  }
}
@media (min-width: 769px) {
  .home-nav-toggle {
    display: none;
  }
  .home-nav {
    display: flex;
  }
}

/* Header buttons: brand blue #1565C0, white text, 12px 24px, radius 8px */
.home-btn-login {
  color: #ffffff;
  background: var(--color-brand);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(21, 101, 192, 0.2);
}

.home-btn-login:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.home-nav .home-btn-cta {
  display: inline-block;
  background: var(--color-brand);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(21, 101, 192, 0.2);
}

.home-nav .home-btn-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.home-btn-cta {
  display: inline-block;
  background: var(--color-brand);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 1px 3px rgba(21, 101, 192, 0.2);
}

.home-btn-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* ---------- Hero Section (Task 2 & 3 merged) ---------- */
.home-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1rem 4rem;   /* pt-16 mobile, pb-16; px-4 mobile */
  text-align: center;
  background: #fff;
}

@media (min-width: 640px) {
  .home-hero {
    padding-left: 2rem;   /* px-8 tablet */
    padding-right: 2rem;
  }
}

@media (min-width: 1024px) {
  .home-hero {
    padding-top: 6rem;   /* pt-24 desktop */
    padding-left: 4rem;  /* px-16 desktop */
    padding-right: 4rem;
  }
}

/* Scroll-triggered staggered animation: baris 3 + 4 kad slide down (IntersectionObserver adds .hero-in-view) */
.home-hero .hero-anim-subtitle,
.home-hero .home-steps-grid .home-step-card {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.home-hero.hero-in-view .hero-anim-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 350ms;
}
.home-hero.hero-in-view .home-steps-grid .home-step-card:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 500ms;
}
.home-hero.hero-in-view .home-steps-grid .home-step-card:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 700ms;
}
.home-hero.hero-in-view .home-steps-grid .home-step-card:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 900ms;
}
.home-hero.hero-in-view .home-steps-grid .home-step-card:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1100ms;
}

/* Wrapper badges (main pill + VERIFIED) above headline */
.home-hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
}

/* Badge pill: ikon Verified biru + teks PLATFORM PENGIRAAN HARTANAH NO.1 MALAYSIA; responsif semua device */
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  color: #1E40AF;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid #BFDBFE;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.10);
  margin: 0 auto 1.5rem;
  white-space: normal;
  text-align: center;
}

.home-hero-badge-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.home-hero-badge-icon--verified {
  /* SVG verified badge (lingkaran biru + check putih) – saiz dikawal oleh .home-hero-badge-icon */
}

/* Responsif: smartphone */
@media (max-width: 639px) {
  .home-hero-badge {
    font-size: 0.65rem;
    padding: 5px 10px;
  }
  .home-hero-badge-icon {
    width: 16px;
    height: 16px;
  }
}

/* Responsif: tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .home-hero-badge {
    font-size: 0.70rem;
    padding: 6px 12px;
  }
}

/* Responsif: laptop / PC (1024px+) – saiz penuh dalam .home-hero-badge asas */

/* Title block — plain solid colors, NO gradient */
.home-hero-title-block {
  margin: 0 auto;
}

/* Line 1: "Bantuan Anda" — plain black, no gradient */
/* Baris 2: "Langkah Demi Langkah Ke Rumah Impian" — medium-large, hitam, bold */
.home-hero-title-line1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

/* Line 2: "Langkah Demi Langkah Ke Rumah Impian" */
.home-hero-title-line2 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

/* Line 3: subtitle grey */
.home-hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* Steps wrapper: margin-top 48px; padding px-6 (24px) → px-12 (48px) → px-16 (64px) */
.home-steps-wrapper {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-left: 1.5rem;   /* px-6 mobile */
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .home-steps-wrapper {
    padding-left: 3rem;   /* px-12 tablet */
    padding-right: 3rem;
  }
}

@media (min-width: 1024px) {
  .home-steps-wrapper {
    padding-left: 4rem;   /* px-16 desktop */
    padding-right: 4rem;
  }
}

/* Grid: 1 col (mobile) → 2 col (640px+) → 4 col (1024px+); equal height */
.home-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .home-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .home-steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.home-step-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.home-step-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Whole card clickable when it has a link */
.home-step-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.home-step-card-link:hover {
  color: inherit;
}

.home-step-card-link:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 2px;
}

.home-step-icon {
  width: 40px;
  height: 40px;
  background: #F3F4F6;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1D4ED8;
  flex-shrink: 0;
}

.home-step-icon svg {
  width: 24px;
  height: 24px;
}

.home-step-num {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background: #1D4ED8;
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
  margin: 12px 0 0.5rem;
}

.home-step-card p {
  font-size: 0.875rem;
  transition: background 0.2s, color 0.2s;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.6;
  margin: 0;
}

.home-step-btn {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1D4ED8;
  text-decoration: none;
}

.home-step-card-link .home-step-btn {
  color: #1D4ED8;
}

/* ---------- Why Section ---------- */
.home-why {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.home-why h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 2.5rem;
  text-align: center;
}

.home-why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .home-why-grid { grid-template-columns: 1fr; }
}

.home-why-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.home-why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.home-why-item-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.home-why-item-icon.shield {
  background: #dcfce7;
  color: var(--color-green-badge);
}

.home-why-item-icon.bolt {
  background: #dbeafe;
  color: var(--color-primary);
}

.home-why-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin: 0 0 0.35rem;
}

.home-why-item p {
  font-size: 0.95rem;
  color: var(--color-gray-600);
  margin: 0;
  line-height: 1.5;
}

.home-why-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.home-why-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-testimonial-card {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: #fff;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-testimonial-avatars {
  display: flex;
}

.home-testimonial-avatars span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #93c5fd, #a78bfa);
  border: 2px solid #fff;
  margin-left: -8px;
}

.home-testimonial-avatars span:first-child { margin-left: 0; }

.home-testimonial-text {
  flex: 1;
  min-width: 140px;
}

.home-testimonial-text strong {
  display: block;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.home-testimonial-stars {
  color: #eab308;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

/* ---------- Footer ---------- */
.home-footer {
  background: var(--color-footer-bg);
  color: #94a3b8;
  padding: 3rem 1.5rem 2rem;
  margin-top: 3rem;
}

.home-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .home-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .home-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.home-footer-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.home-footer-logo .logo-advisor { color: #93c5fd; }

.home-footer p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  max-width: 280px;
}

.home-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.home-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-footer ul li {
  margin-bottom: 0.5rem;
}

.home-footer a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.home-footer a:hover {
  color: #fff;
}

.home-newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.home-newsletter input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e293b;
  color: #fff;
  font-size: 0.9rem;
}

.home-newsletter input::placeholder {
  color: #64748b;
}

.home-newsletter button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--color-primary);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s;
}

.home-newsletter button:hover {
  background: var(--color-primary-dark);
}

.home-footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}
