/*
Theme Name: Maitri Clinic
Theme URI: https://maitrihk.com
Author: Hermes (for Maitri Chinese Medicine Clinic)
Description: 100% replica of the localhost Next.js design — 卓和中醫診所. Pink #ca2667 / teal #00A2B9 branding, hero carousel, service cards, news/talks grids.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: maitri-clinic
*/

/* ============ BASE ============ */
:root {
  --m-primary: #ca2667;
  --m-primary-subtle: rgba(202, 38, 103, 0.12);
  --m-secondary: #00a2b9;
  --m-dark: #111827;
  --m-gray: #6b7280;
  --m-light: #f9fafb;
  --m-border: #f3f4f6;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: #1f2937;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

a { color: var(--m-primary); text-decoration: none; }
a:hover { color: var(--m-secondary); }

h1, h2, h3, h4 { font-weight: 700; color: var(--m-dark); line-height: 1.3; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HEADER ============ */
.m-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--m-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.m-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.m-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.m-logo-img,
.m-logo img,
.custom-logo {
  height: 36px !important;
  width: 36px !important;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.m-logo-text { line-height: 1.2; }

.m-logo-cn {
  font-size: 19px;
  font-weight: 700;
  color: var(--m-primary);
  display: block;
}

.m-logo-en {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--m-secondary);
  display: block;
}

.m-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.m-nav a {
  color: #374151;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.m-nav a:hover {
  color: var(--m-primary);
  border-bottom-color: var(--m-primary);
}

.m-nav .current-menu-item > a,
.m-nav .current_page_item > a {
  color: var(--m-primary);
  border-bottom-color: var(--m-primary);
}

.m-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--m-dark);
  cursor: pointer;
}

/* ============ LANGUAGE SWITCH ============ */
.m-lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 4px;
}

.m-lang-current {
  color: var(--m-secondary);
}

.m-lang-sep {
  color: #d1d5db;
}

.m-lang-switch a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.m-lang-switch a:hover {
  color: var(--m-primary);
}

/* ============ HERO (CSS-only carousel) ============ */
.m-hero {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: var(--m-dark);
}

/* JS-driven slides: only .active is visible */
.m-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.m-hero-slide.active {
  opacity: 1;
}

.m-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: mKenBurns 12s ease-out forwards;
}

.m-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 2;
}

/* ============ HERO ARROWS ============ */
.m-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s;
  backdrop-filter: blur(4px);
}

.m-hero-arrow:hover {
  background: var(--m-primary);
  border-color: var(--m-primary);
}

.m-hero-prev { left: 22px; }
.m-hero-next { right: 22px; }

/* ============ HERO DOTS (mid-bottom) ============ */
.m-hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
}

.m-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s, width 0.25s;
}

.m-hero-dot.active {
  background: #fff;
  width: 26px;
  border-radius: 9999px;
}

.m-hero-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
  .m-hero { height: 420px; }
  .m-hero-arrow { width: 36px; height: 36px; font-size: 20px; }
  .m-hero-prev { left: 12px; }
  .m-hero-next { right: 12px; }
}

.m-hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 0 24px;
  color: #fff;
}

.m-hero-tag {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin: 0 0 14px;
}

.m-hero-content h1 {
  font-size: 44px;
  margin: 0 0 10px;
  color: #fff;
}

.m-hero-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.92);
  max-width: 600px;
  margin: 0;
}

.m-hero-btn {
  margin-top: 26px;
  display: inline-block;
  background: var(--m-primary);
  color: #fff;
  padding: 13px 34px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}

.m-hero-btn:hover {
  background: var(--m-secondary);
  color: #fff;
  transform: translateY(-2px);
}

.m-hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.m-hero-btns .m-hero-btn {
  margin-top: 20px;
}

.m-hero-btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.m-hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ============ SECTION DIVIDER BAND (分隔帶) ============ */
.m-divider-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 36px 0;
  background: linear-gradient(to bottom, #fff, rgba(202, 38, 103, 0.05), #fff);
}

.m-divider-band::before,
.m-divider-band::after {
  content: "";
  height: 1px;
  width: 72px;
  background: rgba(202, 38, 103, 0.3);
}

.m-divider-band::after {
  width: 72px;
}

/* diamond ornament */
.m-divider-band .m-divider-diamond {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(202, 38, 103, 0.5);
  flex-shrink: 0;
}

@keyframes mKenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* ============ SECTIONS ============ */
.m-section { padding: 72px 0; }

.m-section-alt { background: var(--m-light); }

.m-section-title {
  text-align: center;
  font-size: 30px;
  margin: 0 0 8px;
}

.m-section-sub {
  text-align: center;
  color: var(--m-gray);
  font-size: 15px;
  margin: 0 0 18px;
}

.m-divider {
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--m-primary);
  margin: 0 auto 44px;
}

/* ============ CARDS GRID ============ */
.m-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

.m-card {
  background: #fff;
  border: 1px solid var(--m-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.m-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  color: inherit;
}

.m-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--m-light);
}

.m-card-body { padding: 18px; }

.m-card h3 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--m-dark);
}

.m-card p {
  font-size: 13.5px;
  color: var(--m-gray);
  margin: 0 0 8px;
  line-height: 1.6;
}

.m-card-meta {
  font-size: 12px;
  color: var(--m-primary);
  font-weight: 600;
}

/* ============ ABOUT ============ */
.m-about-row {
  display: flex;
  gap: 36px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.m-about-img {
  max-width: 360px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.m-about-text { max-width: 540px; flex: 1; min-width: 280px; }

.m-about-text h3 {
  color: var(--m-primary);
  font-size: 20px;
  margin: 0 0 12px;
}

.m-about-text p {
  color: #374151;
  line-height: 1.9;
  margin: 0 0 14px;
}

/* ============ SERVICE BLOCK ============ */
.m-service-block {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid var(--m-border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.m-service-block img {
  width: 320px;
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.m-service-info { flex: 1; min-width: 280px; }

.m-service-info h3 {
  color: var(--m-primary);
  font-size: 22px;
  margin: 0 0 4px;
}

.m-service-en {
  color: var(--m-secondary);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.m-service-desc {
  color: #374151;
  line-height: 1.8;
  margin: 0 0 10px;
}

.m-service-meta {
  color: var(--m-gray);
  font-size: 13px;
  margin: 0;
}

.m-service-meta strong { color: var(--m-primary); }

/* ============ CONTACT ============ */
.m-contact-row {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}

.m-contact-img-wrap { flex: 1; min-width: 300px; max-width: 560px; }

.m-contact-img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.m-contact-cards { flex: 1; min-width: 300px; max-width: 480px; }

.m-contact-info {
  background: var(--m-light);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.m-contact-info h3 {
  color: var(--m-secondary);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}

.m-contact-info p {
  color: #374151;
  margin: 0;
  line-height: 1.7;
}

/* ============ POSTS / ARCHIVE ============ */
.m-post-header {
  background: var(--m-secondary);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}

/* Photo banner variant (news/talks — like localhost) */
.m-post-header-photo {
  position: relative;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  padding: 84px 0;
}

.m-post-header-photo .m-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
}

.m-post-header-photo .m-photo-content {
  position: relative;
  z-index: 2;
}

.m-post-header h1 {
  color: #fff;
  font-size: 34px;
  margin: 0;
}

.m-post-header p { color: rgba(255,255,255,0.9); margin: 8px 0 0; }

.m-post-content {
  max-width: 800px;
  margin: 48px auto;
  padding: 0 24px;
  line-height: 1.9;
  color: #374151;
}

.m-post-content h2 { margin-top: 36px; }

/* About page: wider container so photo + text sit side by side on desktop */
.m-post-content-wide {
  max-width: 1080px;
}

/* Desktop (≥900px): photo RIGHT, text LEFT */
@media (min-width: 900px) {
  .m-about-content .m-about-row,
  .m-about-row.m-about-row-wide {
    flex-direction: row-reverse !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 48px !important;
    flex-wrap: nowrap !important;
  }
  .m-about-content .m-about-row img,
  .m-about-row.m-about-row-wide img {
    max-width: 420px !important;
    flex: 0 0 420px !important;
  }
  .m-about-content .m-about-row > div,
  .m-about-row.m-about-row-wide > div {
    max-width: 520px !important;
    flex: 1 1 auto !important;
  }
}

/* Mobile: keep original stacked order (photo on top, text below) */

.m-post-meta {
  color: var(--m-gray);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ============ FOOTER ============ */
.m-footer {
  background: #f9fafb;
  color: #6b7280;
  padding: 60px 0 0;
  margin-top: 64px;
  border-top: 1px solid #e5e7eb;
}

.m-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 44px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 44px;
}

.m-footer-col h3 {
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: 0.04em;
}

.m-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.m-footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
}

.m-footer a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.m-footer a:hover {
  color: var(--m-primary);
}

/* Brand column */
.m-footer-brand-cn {
  display: block;
  color: var(--m-primary);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.04em;
}

.m-footer-brand-en {
  display: block;
  color: var(--m-secondary);
  font-size: 12px;
  letter-spacing: 0.14em;
  margin-top: 4px;
}

.m-footer-brand p {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.9;
  color: #9ca3af;
}

/* Phone (copy on click) */
.m-footer-phone {
  color: #374151;
}

.m-footer-phone a {
  color: var(--m-primary);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.m-footer-phone a:hover {
  color: var(--m-secondary);
}

.m-footer-phone .m-copied {
  margin-left: 6px;
  font-size: 12px;
  color: #10b981;
  font-weight: 500;
}

/* Bottom bar */
.m-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  padding: 18px 24px;
  font-size: 13px;
  color: #9ca3af;
  max-width: 1200px;
  margin: 0 auto;
}

.m-footer-legal {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.m-footer-legal a {
  color: #9ca3af;
}

.m-footer-legal a:hover {
  color: var(--m-primary);
}

@media (max-width: 900px) {
  .m-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .m-footer-inner {
    grid-template-columns: 1fr;
  }
  .m-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ============ HIDE LIKE / SHARE BUTTONS ============ */
.sharedaddy,
.sd-sharing,
.sd-like,
.sd-rating,
div.sharedaddy.sd-sharing-enabled,
.sd-content,
.sd-button,
.entry-content .sharedaddy,
.jetpack-likes-widget-wrapper,
.post-likes,
.actnbr-popover {
  display: none !important;
}

/* Hide the WordPress.com action bar */
#actionbar,
.actnbr-actions,
.actnbr-btn {
  display: none !important;
}

/* ============ FILTER BAR (search + sort) ============ */
.m-filter-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.m-filter-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 280px;
  max-width: 560px;
}

.m-filter-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.m-filter-search {
  position: relative;
  flex: 1;
}

.m-filter-search input {
  width: 100%;
  padding: 11px 42px 11px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #fff;
  color: #1f2937;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.m-filter-search input:focus {
  border-color: var(--m-primary);
  box-shadow: 0 0 0 3px var(--m-primary-subtle);
}

.m-filter-search .m-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.m-filter-select {
  padding: 11px 38px 11px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 14px center;
  -webkit-appearance: none;
  appearance: none;
  color: #1f2937;
  cursor: pointer;
  outline: none;
}

.m-filter-select:focus {
  border-color: var(--m-primary);
}

.m-filter-btn {
  padding: 11px 26px;
  border: none;
  border-radius: 10px;
  background: var(--m-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.m-filter-btn:hover {
  background: var(--m-secondary);
}

.m-filter-results {
  text-align: center;
  color: var(--m-gray);
  font-size: 13px;
  margin-bottom: 24px;
}

/* ============ HOME SECTION "MORE" BUTTONS ============ */
.m-home-more {
  text-align: center;
  margin-top: 36px;
}

.m-home-more-btn {
  display: inline-block;
  padding: 10px 36px;
  border: 1px solid var(--m-primary);
  border-radius: 9999px;
  background: #fff;
  color: var(--m-primary);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.m-home-more-btn:hover {
  background: var(--m-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ============ WHATSAPP BUTTONS ============ */
.m-wa-band {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: #e8f9ef;
  border: 1px solid #b7ebc9;
  border-radius: 18px;
  padding: 22px 28px;
  margin-bottom: 36px;
}

.m-wa-band-icon {
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.m-wa-band-text {
  flex: 1;
  min-width: 220px;
}

.m-wa-band-text h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #14532d;
}

.m-wa-band-text p {
  margin: 0;
  font-size: 13.5px;
  color: #4b7f5e;
  line-height: 1.6;
}

.m-wa-band .m-wa-btn {
  flex-shrink: 0;
}

.m-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
}

.m-wa-btn:hover {
  background: #1ebe5b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
}

/* Footer WhatsApp link */
.m-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #25d366 !important;
  font-weight: 600;
}

.m-wa-link:hover {
  color: #1ebe5b !important;
}

.m-wa-icon {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .m-wa-band {
    justify-content: center;
    text-align: center;
  }
  .m-wa-band-text {
    flex-basis: 100%;
  }
}

/* ============ SINGLE POST CTA BUTTON ============ */
.m-single-cta {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--m-border);
  text-align: center;
}

.m-single-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 52px;
  background: var(--m-primary);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(202, 38, 103, 0.35);
  transition: transform 0.2s, box-shadow 0.25s, background 0.25s;
}

.m-single-cta-btn:hover {
  background: var(--m-secondary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 162, 185, 0.4);
}

.m-single-cta-arrow {
  font-size: 22px;
  line-height: 1;
}

.m-single-cta-sub {
  margin-top: 14px;
  font-size: 13px;
  color: #9ca3af;
}

@media (max-width: 560px) {
  .m-single-cta-btn {
    padding: 16px 36px;
    font-size: 17px;
  }
}

/* ============ LOAD MORE (查看更多) ============ */
.m-loadmore-wrap {
  text-align: center;
  margin-top: 44px;
}

.m-loadmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 38px;
  border: 2px solid var(--m-primary);
  border-radius: 9999px;
  background: #fff;
  color: var(--m-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.m-loadmore-btn:hover {
  background: var(--m-primary);
  color: #fff;
  transform: translateY(-2px);
}

.m-loadmore-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.m-loadmore-btn .m-loadmore-left {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.8;
}

.m-loadmore-end {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  letter-spacing: 0.05em;
  margin: 0;
}

/* Align the cards grid with the filter bar (same container width) */
.m-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ PAGINATION ============ */
.m-pagination-wrap {
  text-align: center;
  margin-top: 48px;
}

.m-pagination {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid var(--m-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.m-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--m-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.m-pagination .page-numbers:hover {
  background: var(--m-primary-subtle);
  color: var(--m-primary);
}

.m-pagination .page-numbers.current {
  background: var(--m-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(202, 38, 103, 0.35);
}

.m-pagination .page-numbers.prev,
.m-pagination .page-numbers.next {
  background: var(--m-light);
  font-weight: 600;
  padding: 0 14px;
}

.m-pagination .page-numbers.prev:hover,
.m-pagination .page-numbers.next:hover {
  background: var(--m-secondary);
  color: #fff;
}

.m-pagination .page-numbers.dots {
  color: #9ca3af;
  background: transparent;
}

.m-pagination-count {
  margin-top: 14px;
  font-size: 13px;
  color: var(--m-gray);
}

/* ============ BOOKING FORM ============ */
.m-contact-form {
  flex: 1;
  min-width: 300px;
  max-width: 540px;
  background: #fff;
  border: 1px solid var(--m-border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.m-booking-form .m-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.m-form-field {
  margin-bottom: 16px;
}

.m-form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.m-form-field input,
.m-form-field select,
.m-form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.m-form-field input:focus,
.m-form-field select:focus,
.m-form-field textarea:focus {
  border-color: var(--m-secondary);
  box-shadow: 0 0 0 3px rgba(0, 162, 185, 0.12);
}

.m-form-field textarea {
  resize: vertical;
}

.m-form-msg {
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
}

.m-form-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.m-form-err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

@media (max-width: 560px) {
  .m-booking-form .m-form-row {
    grid-template-columns: 1fr;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .m-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--m-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    padding: 16px 24px;
  }

  .m-nav.open { display: block; }

  .m-nav ul { flex-direction: column; gap: 12px; }

  .m-nav-toggle { display: block; }

  .m-hero { height: 400px; }
  .m-hero-content h1 { font-size: 30px; }
  .m-section { padding: 48px 0; }
  .m-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .m-grid { grid-template-columns: 1fr; }
}
