/*
Theme Name: DorpaDent
Theme URI: https://dorpadent.eu/
Author: DorpaDent
Description: A compact WordPress theme for DorpaDent Hambakliinik with HAMMAS booking support.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: dorpadent
*/

:root {
  --dd-bg: #fbfbf8;
  --dd-surface: #ffffff;
  --dd-ink: #17201c;
  --dd-muted: #5c6963;
  --dd-line: #dce4de;
  --dd-primary: #25756b;
  --dd-primary-dark: #15564f;
  --dd-primary-soft: #e6f2ef;
  --dd-accent: #d9a441;
  --dd-radius: 8px;
  --dd-shadow: 0 22px 70px rgba(23, 32, 28, 0.12);
  --dd-max: 1180px;
  --dd-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--dd-bg);
  color: var(--dd-ink);
  font-family: var(--dd-font);
  font-size: 16px;
  line-height: 1.65;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(37, 117, 107, 0.34);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 251, 248, 0.92);
  border-bottom: 1px solid rgba(220, 228, 222, 0.9);
  backdrop-filter: blur(16px);
}

.site-header__inner,
.section-inner,
.site-footer__inner {
  width: min(var(--dd-max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand__text {
  display: grid;
  gap: 1px;
}

.brand__name {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand__meta {
  color: var(--dd-muted);
  font-size: 0.74rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--dd-muted);
  font-size: 0.93rem;
  font-weight: 500;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--dd-primary-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dd-line);
  border-radius: 50%;
  background: var(--dd-surface);
  color: var(--dd-ink);
  cursor: pointer;
}

.menu-toggle__bar,
.menu-toggle__bar::before,
.menu-toggle__bar::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
}

.menu-toggle__bar {
  position: relative;
}

.menu-toggle__bar::before {
  position: absolute;
  top: -6px;
}

.menu-toggle__bar::after {
  position: absolute;
  top: 6px;
}

.button,
.wp-block-button__link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--dd-primary);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--dd-primary-dark);
  transform: translateY(-1px);
}

.button--ghost {
  border-color: var(--dd-line);
  background: transparent;
  color: var(--dd-ink);
}

.button--ghost:hover {
  border-color: var(--dd-primary);
  background: var(--dd-primary-soft);
  color: var(--dd-primary-dark);
}

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #17201c;
  color: #fff;
}

.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 24, 22, 0.22) 0%, rgba(13, 24, 22, 0.72) 78%);
  content: "";
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% 57%;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--dd-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 18vh 0 9vh;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--dd-accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 6.9rem);
  line-height: 0.95;
}

.hero__lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero__proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: min(560px, 100%);
  margin-top: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--dd-radius);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.proof-item {
  display: grid;
  gap: 2px;
  padding: 18px;
  background: rgba(12, 25, 23, 0.24);
}

.proof-item strong {
  font-size: 1.18rem;
}

.proof-item span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.hero .button--ghost {
  border-color: rgba(255, 255, 255, 0.48);
  color: #fff;
}

.hero .button--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.section {
  padding: 88px 0;
}

.section--muted {
  background: #f1f6f3;
}

.section--tight {
  padding: 64px 0;
}

.section-heading {
  display: grid;
  max-width: 760px;
  gap: 10px;
  margin-bottom: 42px;
}

.section-heading h2,
.content-page h1,
.booking-page h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.section-heading p,
.content-page__intro,
.booking-page__intro {
  margin: 0;
  color: var(--dd-muted);
  font-size: 1.05rem;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--dd-line);
  padding-bottom: 54px;
  margin-bottom: 54px;
}

.intro-strip h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 1.08;
}

.intro-strip p {
  margin: 0;
  color: var(--dd-muted);
}

.quick-contact {
  display: grid;
  gap: 10px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 22px;
  background: var(--dd-surface);
}

.quick-contact a {
  color: var(--dd-primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  display: grid;
  min-height: 100%;
  gap: 20px;
  align-content: start;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 28px;
  background: var(--dd-surface);
}

.service-card__icon {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.service-card h3,
.staff-card h3,
.contact-panel h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.25;
}

.service-card p,
.staff-card p,
.contact-panel p {
  margin: 0;
  color: var(--dd-muted);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.staff-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  background: var(--dd-surface);
}

.staff-card__image {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.staff-card__body {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 28px;
}

.certificate {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1.15fr);
  gap: 38px;
  align-items: center;
}

.certificate__image {
  overflow: hidden;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  background: var(--dd-surface);
  box-shadow: var(--dd-shadow);
}

.certificate__image img {
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 24px;
}

.contact-panel {
  display: grid;
  gap: 22px;
  align-content: start;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 32px;
  background: var(--dd-surface);
}

.contact-list {
  display: grid;
  gap: 16px;
  margin: 0;
}

.contact-list div {
  display: grid;
  gap: 2px;
}

.contact-list dt {
  color: var(--dd-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  font-weight: 600;
}

.map-embed {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  background: var(--dd-surface);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.booking-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border-radius: var(--dd-radius);
  padding: 32px;
  background: var(--dd-primary-dark);
  color: #fff;
}

.booking-cta h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.booking-cta p {
  max-width: 640px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.content-page,
.booking-page {
  padding: 82px 0;
}

.content-page__body,
.booking-shell {
  margin-top: 34px;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 34px;
  background: var(--dd-surface);
}

.booking-shell {
  min-height: 420px;
}

.booking-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.booking-note__item {
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 18px;
  background: var(--dd-surface);
}

.booking-note__item strong {
  display: block;
  margin-bottom: 4px;
}

.booking-note__item span {
  color: var(--dd-muted);
  font-size: 0.92rem;
}

.booking-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px dashed rgba(37, 117, 107, 0.38);
  border-radius: var(--dd-radius);
  padding: 28px;
  background: var(--dd-primary-soft);
  text-align: center;
}

.booking-placeholder h2 {
  margin: 0 0 10px;
}

.booking-placeholder p {
  max-width: 660px;
  margin: 0 auto;
  color: var(--dd-muted);
}

/* HAMMAS calendar overrides */
.booking-shell .hp-calendar-container {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.booking-shell .hp-calendar-container,
.booking-shell .hp-calendar,
.booking-shell .hp-calendar-info,
.booking-shell .hp-tooltip {
  font-family: var(--dd-font) !important;
}

.booking-shell .hp-calendar {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  border: 0;
  margin: 0;
  color: var(--dd-ink);
  line-height: 1.45 !important;
}

.booking-shell .hp-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.booking-shell .hp-loc-list[style*="display: none"] {
  display: none !important;
}

.booking-shell .hp-loc-list,
.booking-shell .hp-clinic-list,
.booking-shell .hp-profile-list,
.booking-shell .hp-doctor-list {
  width: 100% !important;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 0 12px;
  background-color: #fff;
  color: var(--dd-ink);
  font: 700 0.95rem var(--dd-font);
}

.booking-shell .hp-calendar-wrapper {
  width: 100%;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 16px;
  background: #fff;
}

.booking-shell .hp-month-header {
  display: flex;
  height: auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.booking-shell .hp-month-prev,
.booking-shell .hp-month-next {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  float: none;
  border: 1px solid var(--dd-line);
  border-radius: 999px;
  margin: 0;
  background: var(--dd-bg);
  color: var(--dd-primary-dark);
}

.booking-shell .hp-month-prev {
  order: 1;
}

.booking-shell .hp-month-title {
  order: 2;
  flex: 1 1 auto;
  margin: 0;
  color: var(--dd-ink);
  font: 800 1rem var(--dd-font);
  line-height: 1.2;
  text-align: center;
}

.booking-shell .hp-month-next {
  order: 3;
}

.booking-shell .hp-month-prev:hover,
.booking-shell .hp-month-next:hover {
  border-color: rgba(37, 117, 107, 0.32);
  background: var(--dd-primary-soft);
}

.booking-shell .hp-month-prev div,
.booking-shell .hp-month-next div {
  margin: 0;
}

.booking-shell .hp-month-prev div::after,
.booking-shell .hp-month-next div::after {
  font: 900 1.25rem var(--dd-font);
  line-height: 1;
}

.booking-shell .hp-week-header,
.booking-shell .hp-days-box {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-shell .hp-week-header {
  border: 0;
  margin-bottom: 6px;
}

.booking-shell .hp-days-box {
  gap: 5px;
}

.booking-shell .hp-day-box {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  float: none;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--dd-ink);
  font: 700 0.84rem var(--dd-font);
  line-height: 1;
}

.booking-shell .hp-week-header .hp-day-box {
  min-height: 30px;
  color: var(--dd-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.booking-shell .hp-day-box .hp-day-label {
  width: auto;
  height: auto;
  padding: 0;
}

.booking-shell .hp-day-box.hp-other-month {
  color: #9ea8a2;
  background: #f4f7f5;
}

.booking-shell .hp-day-box.hp-holiday {
  color: #b96b70;
}

.booking-shell .hp-day-box.hp-nohk {
  color: #a9691f;
}

.booking-shell .hp-day-box.hp-today {
  background: var(--dd-accent);
  color: #fff;
}

.booking-shell .hp-day-box.hp-available {
  border-color: rgba(37, 117, 107, 0.18);
  background: var(--dd-primary-soft);
  color: var(--dd-primary-dark);
  cursor: pointer;
}

.booking-shell .hp-day-box.hp-available:hover {
  border-color: var(--dd-primary);
  background: #d8ece8;
}

.booking-shell .hp-day-box.hp-available.hp-active {
  border-color: var(--dd-primary);
  background: var(--dd-primary);
  color: #fff;
  font-size: 0.9rem;
}

.booking-shell .hp-calendar-info {
  width: auto;
  min-height: 260px;
  float: none;
  border: 1px solid var(--dd-line);
  border-radius: var(--dd-radius);
  padding: 24px;
  background: #f7faf8;
  color: var(--dd-ink);
}

.booking-shell .hp-calendar-info:empty {
  display: none;
}

.booking-shell .hp-tooltip {
  width: 100%;
  color: var(--dd-ink);
  font-size: 0.96rem;
  line-height: 1.55;
}

.booking-shell .hp-tooltip-header,
.booking-shell .hp-tooltip strong {
  color: var(--dd-ink);
  font-size: 1rem;
}

.booking-shell .hp-tooltip-container {
  max-height: 420px;
}

.booking-shell .hp-tooltip-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--dd-line);
  padding: 12px 0;
  color: var(--dd-primary-dark);
  font-weight: 800;
  line-height: 1.35;
}

.booking-shell .hp-tooltip-slot button,
.booking-shell .hp-slot-button {
  min-height: 38px;
  min-width: 92px;
  float: none;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--dd-primary);
  color: #fff;
  font: 800 0.86rem var(--dd-font);
  cursor: pointer;
}

.booking-shell .hp-tooltip-slot button:hover,
.booking-shell .hp-slot-button:hover {
  background: var(--dd-primary-dark);
}

.site-footer {
  border-top: 1px solid var(--dd-line);
  padding: 34px 0;
  background: #fff;
  color: var(--dd-muted);
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer a {
  color: var(--dd-primary-dark);
  text-decoration: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-grid,
  .certificate,
  .contact-grid,
  .intro-strip,
  .booking-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header__inner,
  .section-inner,
  .site-footer__inner,
  .hero__content {
    width: min(100% - 28px, var(--dd-max));
  }

  .site-header__inner {
    min-height: 68px;
  }

  .brand__meta {
    display: none;
  }

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

  .site-nav {
    position: absolute;
    top: 100%;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--dd-line);
    border-radius: var(--dd-radius);
    padding: 8px;
    background: var(--dd-surface);
    box-shadow: var(--dd-shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .site-nav .button {
    margin-top: 6px;
  }

  .hero {
    min-height: 660px;
  }

  .hero__content {
    padding-bottom: 58px;
  }

  .hero__proof {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .section {
    padding: 64px 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .staff-card {
    grid-template-columns: 1fr;
  }

  .staff-card__image {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .booking-cta {
    grid-template-columns: 1fr;
  }

  .content-page__body,
  .booking-shell,
  .contact-panel {
    padding: 24px;
  }

  .booking-shell .hp-calendar {
    grid-template-columns: 1fr;
  }

  .booking-shell .hp-calendar-container {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .booking-shell .hp-lists {
    grid-template-columns: 1fr;
  }

  .booking-shell .hp-calendar-wrapper {
    max-width: none;
  }

  .booking-shell .hp-calendar-info {
    min-height: 0;
    padding: 18px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
