/* ============================================================
   APM Consultants Sdn Bhd — Main Stylesheet
   Clean, light, fresh aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=Playfair+Display:wght@400;500;600&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --green:       #4caf50;
  --green-dark:  #388e3c;
  --green-light: #e8f5e9;
  --green-mid:   #a5d6a7;
  --charcoal:    #1e1e1e;
  --slate:       #4a4a5a;
  --muted:       #8a8a9a;
  --border:      #e5e7eb;
  --bg:          #ffffff;
  --bg-soft:     #f8faf8;
  --bg-alt:      #f0f4f0;
  --radius:      12px;
  --radius-lg:   20px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.06);
  --shadow-md:   0 6px 24px rgba(0,0,0,.09);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.12);
  --font-body:   'DM Sans', sans-serif;
  --font-display:'Playfair Display', serif;
  --transition:  .25s ease;
  --max-w:       1180px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ── Utility ────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 24px; }

.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.2;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 580px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green);
}
.btn-outline:hover { background: var(--green-light); transform: translateY(-2px); }

/* ── Top Bar ────────────────────────────────────────────── */
.topbar {
  background: var(--charcoal);
  color: #aaa;
  font-size: .78rem;
  padding: 9px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a { color: #ccc; transition: color var(--transition); }
.topbar a:hover { color: var(--green); }

.topbar-links { display: flex; align-items: center; gap: 20px; }
.topbar-links svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 5px; }

/* ── Header / Nav ───────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-logo img { height: 52px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 8px; }

.main-nav a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--slate);
  padding: 8px 16px;
  border-radius: 50px;
  transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--green-dark);
  background: var(--green-light);
}

.nav-cta {
  background: var(--green) !important;
  color: #fff !important;
}
.nav-cta:hover { background: var(--green-dark) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero / Slider ──────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  min-height: 540px;
}

.hero-slides { position: relative; }

.hero-slide {
  display: none;
  position: relative;
  min-height: 540px;
  align-items: center;
}

.hero-slide.active { display: flex; }

.hero-slide img.slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 600px;
  padding: 80px 0;
  animation: fadeSlide .6s ease both;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content .tag { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.3); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  margin-bottom: 18px;
  font-weight: 500;
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,.88);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-nav {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0;
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

.hero-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 5;
  pointer-events: none;
}

.hero-arrow {
  pointer-events: all;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.2rem;
}
.hero-arrow:hover { background: rgba(255,255,255,.3); }

/* ── About Strip ────────────────────────────────────────── */
.about-strip {
  background: var(--bg);
  padding: 72px 0;
}

.about-strip .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img-wrap img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.about-badge {
  position: absolute;
  top: -16px;
  right: -16px;
  background: var(--green);
  color: #fff;
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-badge strong { display: block; font-size: 1.9rem; font-weight: 700; line-height: 1; }
.about-badge span   { font-size: .78rem; opacity: .85; }

.about-text .section-title { margin-bottom: 16px; }

.about-text p { color: var(--slate); margin-bottom: 16px; line-height: 1.75; }

.about-highlights {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--slate);
}

.highlight-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
  flex-shrink: 0;
}

/* ── Services ───────────────────────────────────────────── */
.services {
  background: var(--bg-soft);
  padding: 80px 0;
}

.services .section-head {
  text-align: center;
  margin-bottom: 56px;
}

.services .section-sub { margin-inline: auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 0;
  background: var(--green);
  transition: height .3s ease;
  border-radius: 0 0 4px 0;
}

.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--green-mid); }
.service-card:hover::before { height: 100%; }

.service-icon {
  width: 60px; height: 60px;
  border-radius: var(--radius);
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
}

.service-icon img { width: 32px; height: 32px; object-fit: contain; filter: none; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--charcoal);
}

.service-card p { font-size: .9rem; color: var(--slate); line-height: 1.7; }

.service-card a {
  font-size: .84rem;
  font-weight: 600;
  color: var(--green-dark);
  display: flex; align-items: center; gap: 5px;
  margin-top: auto;
  transition: gap var(--transition);
}
.service-card a:hover { gap: 10px; }

/* ── Stats Banner ───────────────────────────────────────── */
.stats-banner {
  background: var(--charcoal);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item { color: #fff; }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--green);
  line-height: 1;
  display: block;
}

.stat-label { font-size: .82rem; color: #aaa; margin-top: 8px; letter-spacing: .05em; text-transform: uppercase; }

/* ── Why APM ────────────────────────────────────────────── */
.why-apm {
  padding: 80px 0;
  background: var(--bg);
}

.why-apm .container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}

.why-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }

.why-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.why-item:hover { box-shadow: var(--shadow-sm); border-color: var(--green-mid); }

.why-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--green);
  line-height: 1;
  min-width: 36px;
}

.why-text h4 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.why-text p  { font-size: .88rem; color: var(--slate); }

.why-image img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ── Contact CTA ────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2e7d32 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.cta-band .container { position: relative; }

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: #fff;
  margin-bottom: 16px;
  font-weight: 500;
}

.cta-band p { color: rgba(255,255,255,.82); max-width: 500px; margin: 0 auto 32px; }

.cta-band .btn-primary { background: #fff; color: var(--green-dark); }
.cta-band .btn-primary:hover { background: var(--green-light); }

/* ── Contact Page ───────────────────────────────────────── */
.page-hero {
  background: linear-gradient(120deg, var(--bg-soft) 0%, var(--green-light) 100%);
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.page-hero .section-title { font-size: clamp(2rem, 4vw, 3rem); }

.contact-section { padding: 80px 0 40px; }

.contact-section .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-map-section {
  padding: 0 0 80px;
}

.contact-map-section .map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.contact-map-section .map-wrap iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: none;
}

.contact-form-wrap h3 { font-size: 1.4rem; font-family: var(--font-display); margin-bottom: 28px; }

.form-group { margin-bottom: 20px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate); margin-bottom: 7px; letter-spacing: .03em; }

input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--charcoal);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(76,175,80,.12);
}

textarea { min-height: 130px; resize: vertical; }

.form-submit { margin-top: 8px; }

.contact-info-wrap { display: flex; flex-direction: column; gap: 20px; }

.info-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }

.info-card p { font-size: .92rem; color: var(--slate); line-height: 1.75; }

.info-card a { color: var(--green-dark); font-weight: 500; }
.info-card a:hover { text-decoration: underline; }

.info-icon {
  width: 38px; height: 38px;
  background: var(--green-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.map-wrap {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-wrap iframe { display: block; width: 100%; height: 240px; border: none; }

/* ── Products & Services Page ───────────────────────────── */
.services-page { padding: 72px 0; }

.service-block {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.service-block:last-child { border-bottom: none; }

.service-block .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.service-block.reverse .container { direction: rtl; }
.service-block.reverse .container > * { direction: ltr; }

.service-block-img img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.service-block-text .tag { margin-bottom: 10px; }
.service-block-text h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; font-weight: 500; }
.service-block-text p { color: var(--slate); margin-bottom: 12px; line-height: 1.75; font-size: .97rem; }

.service-features { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }

.service-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .9rem;
  color: var(--slate);
}

.service-feature::before {
  content: '✓';
  color: var(--green-dark);
  font-weight: 700;
  background: var(--green-light);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  flex-shrink: 0;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 9px 18px;
  border-radius: 50px;
  margin-top: 10px;
  transition: var(--transition);
}
.download-link:hover { background: var(--green-mid); transform: translateY(-1px); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #111;
  color: #888;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid #222;
}

.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .footer-logo-wrap {
  display: inline-block;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
}
.footer-brand .footer-logo-wrap img { height: 44px; width: auto; display: block; }
.footer-brand p { font-size: .86rem; color: #777; line-height: 1.7; max-width: 280px; }

.footer-col h5 {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #eee;
  margin-bottom: 18px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .86rem; color: #777; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--green); }

.footer-col address { font-style: normal; font-size: .86rem; color: #777; line-height: 1.8; }
.footer-col address a { color: #999; transition: color var(--transition); }
.footer-col address a:hover { color: var(--green); }

.social-row { display: flex; gap: 10px; margin-top: 16px; }

.social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #333;
  display: flex; align-items: center; justify-content: center;
  color: #888;
  font-size: .9rem;
  transition: var(--transition);
}
.social-btn:hover { border-color: var(--green); color: var(--green); background: rgba(76,175,80,.08); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
  color: #555;
}

.footer-bottom a { color: var(--green); }
.footer-bottom a:hover { text-decoration: underline; }

/* ── WhatsApp Button ────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.whatsapp-bubble {
  background: #25d366;
  color: #fff;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.4);
  transition: var(--transition);
  cursor: pointer;
  animation: waFloat 3s ease-in-out infinite;
}
.whatsapp-bubble:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,.5); animation: none; }

@keyframes waFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.whatsapp-bubble svg { width: 28px; height: 28px; }

.whatsapp-tooltip {
  background: #fff;
  color: var(--charcoal);
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; transform: translateX(0); }

/* ── Mobile Nav ─────────────────────────────────────────── */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 12px 24px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--slate);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--green-dark); background: var(--green-light); }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-top: 16px;
  display: none;
}
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid var(--green-mid); }
.alert-error   { background: #fce8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.alert.show    { display: block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .main-nav  { display: none; }
  .hamburger { display: flex; }

  .about-strip .container,
  .why-apm .container,
  .contact-section .container { grid-template-columns: 1fr; gap: 40px; }

  .about-badge { bottom: 10px; right: 10px; }

  .service-block .container,
  .service-block.reverse .container { grid-template-columns: 1fr; direction: ltr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .form-row { grid-template-columns: 1fr; }

  .topbar { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 60px 0; }
  .whatsapp-float { bottom: 20px; right: 16px; }
}
