/* ── Local Nunito fonts (hosted in assets/fonts) ───────────────
   Place these files in assets/fonts with the exact names below:
   - nunito-v32-latin-regular.woff2
   - nunito-v32-latin-500.woff2
   - nunito-v32-latin-600.woff2
   - nunito-v32-latin-700.woff2
   - nunito-v32-latin-800.woff2
*/
/* nunito-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/nunito-v32-latin-regular.woff2') format('woff2');
}
/* nunito-500 - latin */
@font-face {
  font-display: swap;
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/nunito-v32-latin-500.woff2') format('woff2');
}
/* nunito-600 - latin */
@font-face {
  font-display: swap;
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/nunito-v32-latin-600.woff2') format('woff2');
}
/* nunito-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/nunito-v32-latin-700.woff2') format('woff2');
}
/* nunito-800 - latin */
@font-face {
  font-display: swap;
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/nunito-v32-latin-800.woff2') format('woff2');
}

/* ── WMD Design Tokens ────────────────────────────────────── */
:root {
  --wmd-topbar:    225 36% 34%;
  --wmd-hero-bg:   228 55% 91%;
  --wmd-teal:      200 97% 45%;
  --wmd-mint:      225 22% 47%;
  --wmd-text:      220 20% 14%;
  --wmd-muted:     215 12% 48%;
  --wmd-surface:   200 30% 96%;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: hsl(var(--wmd-text));
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

* { box-sizing: border-box; }

/* ── Color utility classes ─────────────────────────────────── */
.wmd-topbar-bg  { background-color: hsl(var(--wmd-topbar)); }
.wmd-teal-bg    { background-color: hsl(var(--wmd-teal)); }
.wmd-teal-text  { color: hsl(var(--wmd-teal)); }
.wmd-mint-bg    { background-color: hsl(var(--wmd-mint)); }
.wmd-hero-bg    { background-color: hsl(var(--wmd-hero-bg)); }
.wmd-surface-bg { background-color: hsl(var(--wmd-surface)); }
.wmd-muted-text { color: hsl(var(--wmd-muted)); }

/* ── Scroll-reveal ────────────────────────────────────────── */
.wmd-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease-out) var(--delay, 0ms),
    transform 0.7s var(--ease-out) var(--delay, 0ms);
}
.wmd-reveal.wmd-visible { opacity: 1; transform: translateY(0); }
.wmd-delay-100 { --delay: 100ms; }
.wmd-delay-200 { --delay: 200ms; }
.wmd-delay-300 { --delay: 300ms; }

/* ── Nav link — underline draws left→right ─────────────────── */
.wmd-link { position: relative; }
.wmd-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.wmd-link:hover::after { transform: scaleX(1); }

/* ── Button lift ──────────────────────────────────────────── */
.wmd-btn {
  display: inline-block;
  transition:
    color 0.2s var(--ease-out),
    background-color 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out),
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.wmd-btn:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
}
.wmd-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ── Image zoom on hover ──────────────────────────────────── */
.wmd-img-zoom { overflow: hidden; }
.wmd-img-zoom img { transition: transform 0.6s var(--ease-out); }
.wmd-img-zoom:hover img { transform: scale(1.04); }

/* ── Desktop nav dropdown ─────────────────────────────────── */
.wmd-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  border: 1px solid #f3f4f6;
  padding: 0.5rem 0;
  min-width: 220px;
  z-index: 50;
}
.wmd-dropdown.is-open { display: block; }
.wmd-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: white;
  border-left: 1px solid #f3f4f6;
  border-top: 1px solid #f3f4f6;
}

/* ── Testimonials carousel ────────────────────────────────── */
.testimonials-track {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.25rem;
  overflow: visible;
  margin-bottom: 2.5rem;
}
.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.testimonial-card.tc-center {
  width: 20rem;
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.testimonial-card.tc-side {
  width: 18rem;
  transform: scale(0.95);
  opacity: 0.6;
}
.testimonial-card.tc-side:hover { opacity: 0.8; }

/* ── Carousel dots ────────────────────────────────────────── */
.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.carousel-dot {
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background-color: #d1d5db;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active { width: 1.25rem; background-color: #029fe4; }

/* ── Blog filter pills ────────────────────────────────────── */
.filter-pill {
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  font-family: inherit;
}
.filter-pill.active  { background-color: #029fe4; color: white; box-shadow: 0 1px 4px rgba(2,159,228,0.3); }
.filter-pill.inactive { background-color: #f3f4f6; color: #4b5563; }
.filter-pill.inactive:hover { background-color: #e5e7eb; }

/* ── FAQ accordion ────────────────────────────────────────── */
.faq-answer { display: none; padding-bottom: 1rem; color: #6b7280; font-size: 0.875rem; line-height: 1.75; }
.faq-item.is-open .faq-answer { display: block; }
.faq-chevron { transition: transform 0.2s ease; }
.faq-item.is-open .faq-chevron { transform: rotate(180deg); }

/* ── Gallery hover overlay ────────────────────────────────── */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

/* ── Contact form focus ───────────────────────────────────── */
.wmd-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  font-size: 0.875rem;
  color: #374151;
}
.wmd-input:focus {
  border-color: #029fe4;
  box-shadow: 0 0 0 3px rgba(2,159,228,0.15);
}
.wmd-input::placeholder { color: #9ca3af; }

/* ── Service card hover ───────────────────────────────────── */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.service-card img {
  transition: transform 0.7s var(--ease-out);
}
.service-card:hover img { transform: scale(1.1); }

/* ── Dentist archive — decorative number ─────────────────── */
.dentist-num {
  position: absolute; bottom: 1rem; right: 1.5rem;
  font-size: 8rem; font-weight: 900; line-height: 1;
  pointer-events: none; user-select: none;
  color: hsl(228 55% 91%); opacity: 0.6;
}

/* ── Checklist (ACF WYSIWYG ul/li → teal checkmarks) ─────── */
.wmd-checklist ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.wmd-checklist ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}
.wmd-checklist ul li svg {
  align-self: flex-start;
  margin-top: 0;
  margin-bottom: 0;
}
.wmd-checklist ul li::before {
  content: '';
  display: block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23029fe4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ── Blog card hover ──────────────────────────────────────── */
.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.blog-card img { transition: transform 0.5s ease; }
.blog-card:hover img { transform: scale(1.05); }

/* ── Our dentists style ──────────────────────────────────────── */

.our-dentists .wmd-btn {
  transform: unset;
  box-shadow: unset;
}

/* ── Full-width breakout (for blocks inside a constrained article) ── */
.wmd-breakout {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ── Gutenberg block typography & spacing ─────────────────── */

/* Headings */
h1.wp-block-heading,
h2.wp-block-heading,
h3.wp-block-heading,
h4.wp-block-heading,
h5.wp-block-heading,
h6.wp-block-heading {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  color: hsl(var(--wmd-text));
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 1rem;
}

h1.wp-block-heading { font-size: clamp(2.25rem, 5.5vw, 4rem); }
h2.wp-block-heading { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3.wp-block-heading { font-size: clamp(1.375rem, 2.75vw, 2rem); }
h4.wp-block-heading { font-size: 1.375rem; }
h5.wp-block-heading { font-size: 1.25rem; }
h6.wp-block-heading { font-size: 1.125rem; }

/* Paragraphs */
.wp-block-paragraph {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: hsl(var(--wmd-text));
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Spacing between consecutive blocks */
.wp-block + .wp-block {
  margin-top: 2rem;
}

/* WMD section blocks carry their own py-* padding — collapse the gap between them */
.wp-block:has(> section) + .wp-block,
.wp-block:has(> section) {
  margin-top: 0;
}

/* Page content wrapper: constrain plain-text blocks to a readable column */
.wmd-page-content {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Paragraphs, headings, lists, and similar inline blocks get a max-width container */
.wmd-page-content > .wp-block-paragraph,
.wmd-page-content > .wp-block-heading,
.wmd-page-content > .wp-block-list,
.wmd-page-content > .wp-block-quote,
.wmd-page-content > .wp-block-table,
.wmd-page-content > .wp-block-image,
.wmd-page-content > .wp-block-buttons {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Blank template: constrain standard WP blocks (headings, rows, groups, etc.)
   WMD custom blocks render as bare <section> elements so :not(section) excludes them */
.page-template-page-blank article > :not(section) {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Logos */
.wmd-header-logo,
.wmd-footer-logo {
  width: auto;
  max-width: 280px;
  height: auto;
}

/* Open Now badge — hidden unless office is open or test mode is active */
.wmd-open-now-badge {
  display: none;
}
.wmd-open-now-badge.wmd-is-open,
.wmd-open-now-badge.wmd-open-now-test {
  display: inline-flex;
}

/* ── Plugin overrides ─────────────────────────────────────── */
.page #ez-toc-container {
  display: none;
}

/* ── Contact Form 7 — wmd-contact-form wrapper ───────────── */
.wmd-contact-form .wpcf7 {
  font-family: inherit;
}

/* Remove default paragraph spacing CF7 adds */
.wmd-contact-form form p {
  margin: 0;
}

/* Layout: stack all fields with consistent gap */
.wmd-contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Labels */
.wmd-contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

/* All text inputs, email, tel, select, textarea */
.wmd-contact-form .wpcf7-form-control.wpcf7-text,
.wmd-contact-form .wpcf7-form-control.wpcf7-email,
.wmd-contact-form .wpcf7-form-control.wpcf7-tel,
.wmd-contact-form .wpcf7-form-control.wpcf7-number,
.wmd-contact-form .wpcf7-form-control.wpcf7-select,
.wmd-contact-form .wpcf7-form-control.wpcf7-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
  font-family: inherit;
  font-size: 0.875rem;
  color: #374151;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.wmd-contact-form .wpcf7-form-control.wpcf7-text:focus,
.wmd-contact-form .wpcf7-form-control.wpcf7-email:focus,
.wmd-contact-form .wpcf7-form-control.wpcf7-tel:focus,
.wmd-contact-form .wpcf7-form-control.wpcf7-number:focus,
.wmd-contact-form .wpcf7-form-control.wpcf7-select:focus,
.wmd-contact-form .wpcf7-form-control.wpcf7-textarea:focus {
  border-color: #029fe4;
  box-shadow: 0 0 0 3px rgba(2, 159, 228, 0.15);
  background-color: #fff;
}

.wmd-contact-form .wpcf7-form-control::placeholder {
  color: #9ca3af;
}

/* Textarea: don't allow horizontal resize */
.wmd-contact-form .wpcf7-form-control.wpcf7-textarea {
  resize: vertical;
  min-height: 8rem;
}

/* Select: custom arrow */
.wmd-contact-form .wpcf7-form-control.wpcf7-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Submit button */
.wmd-contact-form .wpcf7-form-control.wpcf7-submit {
  width: 100%;
  padding: 1rem 2rem;
  background-color: #029fe4;
  color: #fff;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wmd-contact-form .wpcf7-form-control.wpcf7-submit:hover {
  background-color: #0284c0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.wmd-contact-form .wpcf7-form-control.wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner: keep it inline next to the button */
.wmd-contact-form .wpcf7-spinner {
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Validation error highlight */
.wmd-contact-form .wpcf7-not-valid {
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2) !important;
}

.wmd-contact-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ef4444;
}

/* Response output (success / error banner) */
.wmd-contact-form .wpcf7-response-output {
  margin: 0;
  padding: 0.875rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
}

.wmd-contact-form .wpcf7-form.sent .wpcf7-response-output {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.wmd-contact-form .wpcf7-form.failed .wpcf7-response-output,
.wmd-contact-form .wpcf7-form.aborted .wpcf7-response-output {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.wmd-contact-form .wpcf7-form.spam .wpcf7-response-output {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Hide empty response output */
.wmd-contact-form .wpcf7-response-output[aria-hidden="true"] {
  display: none;
}

/* Carousel scrollbar hide */
.wmd-scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.wmd-scrollbar-hide::-webkit-scrollbar { display: none; }