/* =========================================================
   Macherty Clinic — Stylesheet
   ========================================================= */

:root {
  --color-primary: #0f766e;
  --color-primary-dark: #0b5c56;
  --color-primary-light: #e6f4f2;
  --color-accent: #f4a261;
  --color-ink: #16241f;
  --color-body: #4b5b56;
  --color-muted: #7c8b86;
  --color-bg: #ffffff;
  --color-bg-soft: #f6faf9;
  --color-border: #e4ece9;

  --font-head: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px -12px rgba(15, 60, 55, 0.18);
  --shadow-card: 0 4px 18px -6px rgba(15, 60, 55, 0.12);
  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

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

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--color-ink);
  line-height: 1.2;
  font-weight: 700;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 100px 0; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.lead { color: var(--color-body); font-size: 1.05rem; max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(15, 118, 110, 0.55);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-light {
  background: #fff;
  color: var(--color-primary-dark);
}
.btn-light:hover { transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  box-shadow: 0 6px 24px -14px rgba(15, 60, 55, 0.25);
  border-color: var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-ink);
}
.logo span { color: var(--color-primary); }
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-primary);
}
.main-nav { display: flex; gap: 34px; }
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-body);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--color-primary); }
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 60px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-text .lead { margin-bottom: 32px; max-width: 50ch; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--color-ink);
}
.hero-stats span { font-size: 0.85rem; color: var(--color-muted); }

.hero-visual { position: relative; height: 440px; }
.hero-blob {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--color-primary-light), #dff3ee 60%, #fdece0 100%);
  border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.06);
}
.hero-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-head);
}
.hero-card svg { width: 26px; height: 26px; color: var(--color-primary); flex-shrink: 0; }
.hero-card strong { display: block; font-size: 0.9rem; color: var(--color-ink); }
.hero-card span { font-size: 0.78rem; color: var(--color-muted); }
.card-pulse { top: 14%; left: 4%; animation: float 5s ease-in-out infinite; }
.card-appt { bottom: 12%; right: 2%; animation: float 5s ease-in-out infinite 1.2s; }

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

/* ---------- Trust strip ---------- */
.trust-strip { padding: 34px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink);
}
.trust-item svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

/* ---------- Section head ---------- */
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head .lead { margin: 0 auto; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }

/* ---------- About ---------- */
.about { background: var(--color-bg-soft); }
.about-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
.about-frame {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--color-primary), #14a89b);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}
.about-avatar {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.03em;
}
.about-text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 18px; }
.about-text .lead { margin-bottom: 26px; }
.about-list { margin-bottom: 32px; }
.about-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 0.98rem;
  color: var(--color-body);
}
.about-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-primary-light);
  box-shadow: inset 0 0 0 4px var(--color-primary);
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

.icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  margin-bottom: 18px;
}
.icon-wrap svg { width: 24px; height: 24px; }
.icon-wrap.sm { width: 40px; height: 40px; margin-bottom: 0; flex-shrink: 0; }
.icon-wrap.sm svg { width: 19px; height: 19px; }

.service-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.service-card p { font-size: 0.94rem; }

/* ---------- Doctors ---------- */
.doctors { background: var(--color-bg-soft); }
.doctor-card { text-align: center; padding: 30px 24px; }
.doctor-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: hsl(var(--hue) 55% 30%);
  background: hsl(var(--hue) 55% 92%);
}
.doctor-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.doctor-card .role { font-size: 0.88rem; color: var(--color-muted); }

/* ---------- Testimonials ---------- */
.slider { max-width: 720px; margin: 0 auto; text-align: center; }
.slider-track { position: relative; min-height: 200px; }
.testimonial {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.testimonial.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.testimonial blockquote {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--color-ink);
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 24px;
}
.testimonial figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.75rem;
}
.slider-dots { display: flex; justify-content: center; gap: 10px; margin-top: 36px; }
.slider-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.slider-dots button.active { background: var(--color-primary); transform: scale(1.2); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-primary), #0c8f84);
  color: #fff;
  padding: 64px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; }
.cta-banner p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Contact ---------- */
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-info h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 16px; }
.contact-info .lead { margin-bottom: 34px; }
.info-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.info-list strong { display: block; font-size: 0.92rem; color: var(--color-ink); }
.info-list span { font-size: 0.9rem; color: var(--color-muted); }

.contact-form {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: #fff;
  color: var(--color-ink);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}
.field input.invalid, .field textarea.invalid { border-color: #e05252; }
.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  min-height: 1.2em;
  text-align: center;
}
.form-status.success { color: var(--color-primary-dark); }
.form-status.error { color: #c0392b; }
.botcheck { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-ink); color: rgba(255, 255, 255, 0.7); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 40px;
}
.footer-brand p { margin-top: 14px; font-size: 0.9rem; max-width: 34ch; }
.site-footer .logo { color: #fff; }
.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 0.92rem; margin-bottom: 10px; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-row a:hover { background: var(--color-primary); transform: translateY(-2px); }
.social-row svg { width: 17px; height: 17px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
  font-size: 0.85rem;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary-dark); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-visual { max-width: 360px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 78px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-130%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--color-border); }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 320px; order: -1; }
  .hero-stats { gap: 28px; }
}

@media (max-width: 640px) {
  section { padding: 70px 0; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
  .trust-inner { justify-content: center; text-align: center; }
}
