:root {
  --brown-dark: #9c7a3e;
  --brown: #b8954f;
  --brown-mid: #c7a463;
  --brown-light: #e2c88f;
  --cream: #f8efdf;
  --cream-light: #fdfaf4;
  --text-dark: #4a3a1f;
}

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

body {
  font-family: 'Kanit', 'Segoe UI', Tahoma, sans-serif;
  font-weight: 300;
  background: var(--cream-light);
  color: var(--text-dark);
  line-height: 1.6;
}

h1, h2, h3, h4, .btn, .logo-text, .service-num {
  font-weight: 600;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Header */
.site-header {
  background: var(--brown-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.1rem;
}

.logo small { font-size: 0.7rem; opacity: 0.85; font-weight: normal; }

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.95rem;
  opacity: 0.9;
}
.nav a:hover { opacity: 1; text-decoration: underline; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  transition: 0.2s;
}

.btn-call {
  background: var(--brown-light);
  color: var(--brown-dark);
}
.btn-call:hover { background: #fff; }

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(50,36,18,0.82) 0%, rgba(35,24,10,0.88) 100%),
    url('images/clinic-interior.jpg') center / cover no-repeat;
  color: #fff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.hero-inner { text-align: center; position: relative; z-index: 1; }

.hero h1 {
  font-size: 2rem;
  margin-bottom: 18px;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

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

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* Sections */
.section { padding: 60px 0; }

.section-title {
  text-align: center;
  color: #6b5436;
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 36px;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--brown-mid);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* About */
.about { background: var(--cream); padding: 90px 0; }

.about-inner {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.about-img { flex: 1 1 340px; }

.doctor-img {
  width: 100%;
  max-width: 440px;
  display: block;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.about-text { flex: 1.2 1 420px; }

.about-eyebrow {
  display: block;
  letter-spacing: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown-light);
  margin-bottom: 10px;
}

.about-text h2 {
  font-size: 2.7rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.about-text .degree {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 500;
  color: #fff;
  background: var(--brown-dark);
  padding: 16px 22px;
  border-radius: 10px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.about-text .about-desc {
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.calendar-img,
.map-img {
  margin-top: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.calendar-img img,
.map-img img {
  width: 100%;
  display: block;
}

/* Services */
.services-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.services-eyebrow {
  display: block;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--brown-light);
  margin-bottom: 8px;
}

.services-title {
  font-size: 1.9rem;
  color: var(--brown-dark);
  margin: 0;
}

.btn-contact-doc {
  background: var(--brown-dark);
  color: #fff;
  border: 2px solid var(--brown-dark);
  white-space: nowrap;
}
.btn-contact-doc:hover { background: var(--brown); border-color: var(--brown); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}

.service-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 460px;
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  background: #fff;
  border: 1px solid #ece1d6;
  padding: 32px 28px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: 0.2s;
}
.service-card:hover {
  border-color: var(--brown-light);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.service-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  color: var(--brown);
}
.service-icon svg { width: 100%; height: 100%; }

.service-body h3 {
  font-size: 1.15rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.service-body p {
  font-size: 0.93rem;
  color: #6b5848;
  line-height: 1.55;
}

/* Gallery */
.gallery { background: var(--cream); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  aspect-ratio: 4 / 3;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s;
  cursor: pointer;
}
.gallery-item:hover {
  transform: scale(1.8);
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
  z-index: 5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-more-btn {
  display: block;
  margin: 28px auto 0;
  background: none;
  border: 2px solid var(--brown-dark);
  color: var(--brown-dark);
  padding: 12px 32px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.gallery-more-btn:hover {
  background: var(--brown-dark);
  color: #fff;
}

/* Hours */
.hours { background: var(--cream); }

.hours-table {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(91,58,41,0.1);
  border: 1px solid var(--brown-light);
}

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid var(--cream);
  transition: background 0.2s;
}
.hours-row:last-child { border-bottom: none; }
.hours-row:hover { background: var(--cream-light); }

.hours-day {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-dark);
}
.hours-day svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--brown);
}

.hours-time {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brown-dark);
  background: var(--cream);
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.hours-row.closed .hours-day svg { color: #b04545; }
.hours-closed-pill {
  color: #b04545;
  background: #fbe6e6;
}

/* Location */
.address-text {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.map-embed {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.map-cta {
  text-align: center;
  margin-bottom: 24px;
}

.btn-primary-alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brown-dark);
  color: #fff;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
}
.btn-primary-alt:hover { background: var(--brown); }

/* Articles */
.articles-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 30px;
  color: var(--brown-mid);
}

.fb-embed-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  overflow-x: auto;
}

.articles-cta {
  text-align: center;
}

.btn-fb {
  background: #1877f2;
  color: #fff;
  padding: 14px 32px;
  font-size: 1rem;
}
.btn-fb:hover { background: #145dc4; }

/* Contact */
.contact { background: var(--cream); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.contact-card {
  background: #fff;
  text-align: center;
  padding: 44px 24px;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: 0.25s;
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--brown);
}
.contact-icon svg { width: 28px; height: 28px; }
.contact-card:hover .contact-icon {
  background: var(--brown);
  color: #fff;
}

.contact-label {
  display: block;
  font-size: 0.95rem;
  color: var(--brown-mid);
  margin-bottom: 6px;
}

.contact-card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brown-dark);
}

/* Footer */
.site-footer {
  background: var(--brown-dark);
  color: #fff;
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
}
.hashtags { opacity: 0.7; margin-top: 8px; font-size: 0.8rem; }

@media (max-width: 700px) {
  .header-inner { flex-direction: column; text-align: center; }
  .nav { justify-content: center; }
}

/* Encourage-the-doctor chat widget */
.encourage-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  font-family: 'Kanit', 'Segoe UI', Tahoma, sans-serif;
}

.encourage-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--brown-dark);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: 0.2s;
}
.encourage-btn:hover { background: var(--brown); transform: translateY(-2px); }
.encourage-btn svg { width: 20px; height: 20px; flex: 0 0 auto; }

.encourage-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: 20px;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.encourage-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.encourage-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.encourage-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--brown-mid);
  cursor: pointer;
}

.encourage-sub {
  font-size: 0.82rem;
  color: #7a6a52;
  margin-bottom: 12px;
  line-height: 1.5;
}

.encourage-text {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  border: 1px solid #e6d9c4;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.encourage-text:focus { outline: none; border-color: var(--brown); }

.btn-copy {
  display: block;
  width: 100%;
  border: none;
  background: var(--cream);
  color: var(--brown-dark);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  transition: 0.2s;
}
.btn-copy:hover { background: var(--brown-light); }

.encourage-actions {
  display: flex;
  gap: 10px;
}

.encourage-actions a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: none;
  padding: 10px 8px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}

.btn-send-fb { background: #1877f2; color: #fff; }
.btn-send-fb:hover { background: #145dc4; }

.btn-send-line { background: #06c755; color: #fff; }
.btn-send-line:hover { background: #05a647; }

.encourage-toast {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--brown-dark);
  text-align: center;
  opacity: 0;
  transition: 0.3s;
}
.encourage-toast.show { opacity: 1; }

@media (max-width: 480px) {
  .encourage-btn span { display: none; }
  .encourage-btn { padding: 14px; border-radius: 50%; }
}
