/* ============================================================
   Klinik Pergigian Suria - demo oleh Webg
   Light theme, sky blue, bersih dan menenangkan
   ============================================================ */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --heading: #0C4A6E;
  --body: #475569;
  --muted: #64748B;
  --surface: #FFFFFF;
  --surface-alt: #F0F9FF;
  --border: #E2E8F0;
  --border-blue: #BAE6FD;
  --radius: 14px;
  --radius-sm: 10px;
  --ribbon-h: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--surface);
  padding-bottom: var(--ribbon-h);
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  color: var(--heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.1rem; }

p { margin: 0; }

a { color: var(--primary-dark); }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow { max-width: 780px; }

.center { text-align: center; margin-top: 1.5rem; }

/* ---------- Butang ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--heading);
  font-size: 1rem;
}
.nav-logo svg { color: var(--primary); flex-shrink: 0; }
.nav-logo strong { color: var(--primary-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--body);
  font-weight: 400;
  font-size: 0.95rem;
}
.nav-links a:not(.btn):hover { color: var(--primary-dark); }

.nav-cta { padding: 0.55rem 1.1rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 0 3rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--surface-alt);
  border: 1px solid var(--border-blue);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero-copy h1 { margin-bottom: 1rem; }

.lead {
  font-size: 1.05rem;
  margin-bottom: 1.6rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.hero-trust li::before {
  content: "\2713";
  color: var(--primary);
  font-weight: 700;
  margin-right: 0.4rem;
}

.hero-art { text-align: center; }
.hero-art svg { width: min(100%, 400px); }

/* ---------- Seksyen ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--surface-alt); }

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}
.section-head p { margin-top: 0.6rem; }

/* ---------- Grid & Kad ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border-blue);
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ---------- Kenapa pilih kami ---------- */
.why-item { text-align: center; padding: 0.5rem; }
.why-item h3 { margin: 0.9rem 0 0.4rem; font-size: 1.02rem; }
.why-item p { font-size: 0.92rem; }

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border-blue);
  color: var(--primary);
}

/* ---------- Jadual harga ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.price-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.price-table th, .price-table td {
  text-align: left;
  padding: 0.9rem 1.25rem;
}

.price-table thead th {
  background: var(--surface-alt);
  color: var(--heading);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.price-table tbody tr + tr td { border-top: 1px solid var(--border); }
.price-table td:last-child { color: var(--heading); font-weight: 700; white-space: nowrap; }

.table-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.9rem;
  text-align: center;
}

/* ---------- Doktor ---------- */
.doctors { max-width: 820px; margin: 0 auto; }
.doctor-card { text-align: center; }
.doctor-card .avatar { width: 96px; height: 96px; margin-bottom: 1rem; }
.doctor-cred {
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

/* ---------- Testimoni ---------- */
.testi blockquote {
  font-size: 0.95rem;
  margin: 0.75rem 0 1rem;
}
.testi figcaption {
  font-weight: 700;
  color: var(--heading);
  font-size: 0.9rem;
}
.stars { color: #F59E0B; letter-spacing: 2px; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 1.3rem;
  font-weight: 700;
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-chev {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-chev { transform: rotate(225deg); }

.faq-body { padding: 0 1.3rem 1.2rem; }
.faq-body p { font-size: 0.95rem; }

/* ---------- Hubungi ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}

.contact-card h3 { margin-bottom: 0.7rem; }
.contact-card h3 + .hours,
.contact-card address { margin-bottom: 1.4rem; }

.hours { list-style: none; display: grid; gap: 0.45rem; font-size: 0.95rem; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.45rem;
}
.hours li span:last-child { color: var(--heading); text-align: right; }

address { font-style: normal; font-size: 0.95rem; }

.map-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  display: flex;
}
.map-wrap svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface);
}
.footer-inner {
  text-align: center;
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer strong { color: var(--heading); }
.footer-copy { font-size: 0.8rem; }

/* ---------- Ribbon demo Webg ---------- */
.demo-ribbon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  min-height: var(--ribbon-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--heading);
  color: #E0F2FE;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.85rem;
}
.demo-ribbon strong { color: #FFFFFF; }
.demo-ribbon a { color: #7DD3FC; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-wrap { min-height: 260px; }
}

@media (max-width: 680px) {
  .section { padding: 3rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-cta {
    margin-top: 0.9rem;
    justify-content: center;
  }
}
