/*
Theme Name: Mai Danh
Theme URI: https://homaidanh.vn
Author: Dòng họ Mai Danh
Description: Giao diện trang thông tin dòng họ Mai Danh: đỏ son, vàng kim, hoa văn truyền thống. Nhẹ, không dùng trình dựng trang.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: mai-danh
*/

/* ---------- Tokens ---------- */
:root {
  --red-950: #3f0807;
  --red-900: #5c0d0b;
  --red-800: #7a1616;
  --red-700: #941f1a;
  --red-600: #b0281f;
  --gold-600: #b8862b;
  --gold-500: #d4a43a;
  --gold-400: #e6be5c;
  --gold-200: #f6e2a8;
  --green-800: #0c4f31;
  --green-700: #0f6340;
  --cream: #fbf5e6;
  --paper: #fffdf6;
  --ink: #2b1d14;
  --muted: #6b5848;
  --line: #ead9b4;

  --font-head: 'Phudu', 'Be Vietnam Pro', system-ui, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Dancing Script', cursive;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px -12px rgba(92, 13, 11, 0.28);
  --container: 1200px;
  --gutter: 16px;

  /* Hồi văn (Greek key) band, gold on transparent. */
  --hoi-van: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28' fill='none' stroke='%23d4a43a' stroke-width='2.2' stroke-linecap='square'%3E%3Cpath d='M0 25h24V3H7v15h11V9h-5v4'/%3E%3Cpath d='M24 25h4'/%3E%3C/svg%3E");
  /* Small coin-and-flower motif for the red backgrounds. */
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%23e6be5c' stroke-width='1'%3E%3Ccircle cx='32' cy='32' r='9'/%3E%3Cpath d='M32 23v18M23 32h18'/%3E%3Cpath d='M0 0l6 6M64 0l-6 6M0 64l6-6M64 64l-6-6'/%3E%3Ccircle cx='0' cy='0' r='3'/%3E%3Ccircle cx='64' cy='0' r='3'/%3E%3Ccircle cx='0' cy='64' r='3'/%3E%3Ccircle cx='64' cy='64' r='3'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--red-700); text-underline-offset: 3px; }
a:hover { color: var(--red-600); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; color: var(--red-800); margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.md-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 24px; } }
.md-narrow { max-width: 860px; }
.md-center { text-align: center; }

.md-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 14px; border-radius: 8px; }
.md-skip:focus { left: 8px; }

.md-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.md-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 1.4em; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.md-btn:hover { transform: translateY(-1px); }
.md-btn-gold { background: linear-gradient(180deg, var(--gold-400), var(--gold-500)); color: var(--red-900); box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); }
.md-btn-gold:hover { color: var(--red-950); background: linear-gradient(180deg, var(--gold-200), var(--gold-400)); }
.md-btn-ghost { color: var(--gold-200); border-color: rgba(246, 226, 168, .55); }
.md-btn-ghost:hover { color: var(--red-900); background: var(--gold-200); }
.md-btn-outline { color: var(--red-700); border-color: var(--red-700); background: transparent; }
.md-btn-outline:hover { color: var(--paper); background: var(--red-700); }
.md-btn-red { color: var(--paper); background: var(--red-700); }
.md-btn-red:hover { color: var(--paper); background: var(--red-600); }

/* ---------- Top bar & header ---------- */
.md-topbar { background: var(--red-900); color: var(--gold-200); font-size: 14px; }
.md-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.md-topbar-motto { font-family: var(--font-script); font-size: 18px; color: var(--gold-400); }
.md-topbar-links { display: none; gap: 20px; }
.md-topbar-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--gold-200); text-decoration: none; }
.md-topbar-links a:hover { color: #fff; }
@media (min-width: 768px) { .md-topbar-links { display: inline-flex; } }

.md-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 246, .96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 3px solid var(--gold-500);
  transition: box-shadow .2s ease;
}
.md-scrolled .md-header { box-shadow: 0 6px 20px -12px rgba(63, 8, 7, .35); }
.md-header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.md-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; margin-right: auto; }
.md-brand-logo { width: 52px; height: 52px; flex: none; }
.md-brand-text { display: flex; flex-direction: column; min-width: 0; }
.md-brand-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--red-800); line-height: 1.15; }
.md-brand-tagline { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.md-nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--red-800); cursor: pointer;
}
.md-nav-toggle .md-icon { width: 24px; height: 24px; }
.md-icon-close, .md-nav-open .md-icon-open { display: none; }
.md-nav-open .md-icon-close { display: block; }

.md-nav { display: none; }
.md-nav-open .md-nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 3px solid var(--gold-500);
  box-shadow: 0 20px 30px -20px rgba(63, 8, 7, .4);
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.md-menu { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.md-menu a {
  display: block; padding: 12px 4px; border-bottom: 1px solid var(--line);
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.md-menu a:hover, .md-menu .current-menu-item > a { color: var(--red-700); }
.md-menu .menu-item-type-custom.current-menu-item > a:not(:hover) { color: var(--ink); }
.md-menu .sub-menu { list-style: none; margin: 0; padding-left: 16px; }

@media (min-width: 992px) {
  .md-header-inner { min-height: 84px; }
  .md-brand-logo { width: 60px; height: 60px; }
  .md-brand-name { font-size: 22px; }
  .md-nav-toggle { display: none; }
  .md-nav, .md-nav-open .md-nav { display: block; position: static; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible; }
  .md-menu { display: flex; gap: 4px; padding: 0; }
  .md-menu > li { position: relative; }
  .md-menu a { border: 0; padding: 10px 14px; border-radius: 999px; font-size: 15px; }
  .md-menu > li > a:hover, .md-menu > .current-menu-item > a { background: rgba(212, 164, 58, .16); color: var(--red-800); }
  /* Links to sections of the home page all count as "current" there: no highlight. */
  .md-menu > .menu-item-type-custom.current-menu-item > a:not(:hover) { background: none; color: var(--ink); }
  .md-menu .sub-menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px;
    background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .md-menu li:hover > .sub-menu, .md-menu li:focus-within > .sub-menu { display: block; }
}

/* ---------- Ornaments ---------- */
.md-border-pattern {
  height: 28px;
  background: var(--hoi-van) repeat-x center / 28px 28px, var(--red-900);
  border-top: 2px solid var(--gold-500);
  border-bottom: 2px solid var(--gold-500);
}
.md-border-bottom { position: absolute; left: 0; right: 0; bottom: 0; }
.md-divider { display: block; width: 220px; height: 22px; margin: 10px auto 0; }
.md-hero-pattern {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--motif) repeat center / 64px 64px; opacity: .09;
}

/* ---------- Hero ---------- */
.md-hero {
  position: relative; overflow: hidden; color: var(--gold-200);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(230, 190, 92, .22), transparent 60%),
    radial-gradient(ellipse at 50% 120%, var(--red-950), transparent 70%),
    linear-gradient(160deg, var(--red-700), var(--red-900));
  padding: 48px 0 92px;
}
.md-hero-inner { position: relative; display: grid; gap: 28px; justify-items: center; text-align: center; }
.md-hero-seal { position: relative; width: min(230px, 62vw); }
.md-hero-seal::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px dashed rgba(230, 190, 92, .55);
}
.md-hero-logo { display: block; width: 100%; height: auto; border-radius: 50%; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
.md-hero-kicker { font-family: var(--font-script); font-size: 30px; line-height: 1.2; color: var(--gold-400); margin: 0 0 4px; }
.md-hero-title {
  font-size: clamp(34px, 8vw, 64px); font-weight: 700; margin: 0 0 14px;
  color: var(--gold-200);
  background: linear-gradient(180deg, #fff1c4 10%, var(--gold-400) 60%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none; filter: drop-shadow(0 3px 0 rgba(63, 8, 7, .55));
}
.md-hero-lead { max-width: 560px; margin: 0 auto 26px; font-size: 17px; color: #f8e9c4; }
.md-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.md-cloud { position: absolute; width: 150px; color: var(--gold-400); opacity: .4; pointer-events: none; }
.md-cloud-left { left: -30px; top: 40px; }
.md-cloud-right { right: -30px; bottom: 70px; transform: scaleX(-1); }

@media (min-width: 900px) {
  .md-hero { padding: 72px 0 120px; }
  .md-hero-inner { grid-template-columns: 340px 1fr; text-align: left; justify-items: start; gap: 56px; align-items: center; }
  .md-hero-seal { width: 300px; justify-self: center; }
  .md-hero-lead { margin-left: 0; }
  .md-hero-actions { justify-content: flex-start; }
  .md-cloud { width: 220px; }
  .md-cloud-left { left: 2%; top: 30px; }
  .md-cloud-right { right: 3%; bottom: 80px; }
}

/* ---------- Sections ---------- */
.md-section { padding: 64px 0; }
@media (min-width: 900px) { .md-section { padding: 88px 0; } }
.md-section-head { text-align: center; margin-bottom: 36px; }
.md-kicker { font-family: var(--font-script); font-size: 24px; color: var(--gold-600); margin: 0; line-height: 1.3; }
.md-section-title { font-size: clamp(28px, 5vw, 40px); margin: 0; color: var(--red-800); }
.md-section-lead { max-width: 640px; margin: 14px auto 0; color: var(--muted); }
.md-empty { text-align: center; color: var(--muted); font-style: italic; }
.md-more { text-align: center; margin: 36px 0 0; }

/* Intro */
.md-intro { background: var(--paper); }
.md-intro-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .md-intro-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; } }
.md-intro-body { font-size: 17px; }
.md-intro-body > p:first-child::first-letter {
  float: left; font-family: var(--font-head); font-weight: 700; font-size: 3.4em; line-height: .9;
  margin: 6px 10px 0 0; color: var(--red-700);
}
.md-admin-hint { font-size: 14px; color: var(--muted); border-left: 3px solid var(--gold-500); padding-left: 12px; }

.md-frame {
  position: relative; text-align: center; padding: 36px 28px 30px;
  background: linear-gradient(180deg, #fff9ea, var(--cream));
  border: 1.5px solid var(--gold-500); border-radius: var(--radius);
  outline: 1px solid var(--line); outline-offset: 6px;
}
.md-corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--red-700); }
.md-corner::after { content: ''; position: absolute; width: 8px; height: 8px; background: var(--gold-500); transform: rotate(45deg); }
.md-corner-tl { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.md-corner-tr { top: -9px; right: -9px; border-left: 0; border-bottom: 0; }
.md-corner-bl { bottom: -9px; left: -9px; border-right: 0; border-top: 0; }
.md-corner-br { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.md-corner-tl::after { top: 4px; left: 4px; }
.md-corner-tr::after { top: 4px; right: 4px; }
.md-corner-bl::after { bottom: 4px; left: 4px; }
.md-corner-br::after { bottom: 4px; right: 4px; }
.md-intro-logo { width: 150px; height: 150px; margin: 0 auto 18px; display: block; filter: drop-shadow(0 10px 18px rgba(92, 13, 11, .3)); }
.md-quote { margin: 0; font-family: var(--font-script); font-size: 27px; line-height: 1.35; color: var(--red-800); }

/* Values */
.md-values { position: relative; background: var(--cream); }
.md-values-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
@media (min-width: 640px) { .md-values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .md-values-grid { grid-template-columns: repeat(4, 1fr); } }
.md-value {
  position: relative; text-align: center; padding: 34px 22px 26px;
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.md-value::before {
  content: ''; position: absolute; inset: 8px; border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid var(--line); pointer-events: none;
}
.md-value::after {
  content: ''; position: absolute; top: 0; left: 50%; width: 64px; height: 4px; margin-left: -32px;
  background: var(--red-700); border-radius: 0 0 4px 4px;
}
.md-value:hover { transform: translateY(-4px); }
.md-value-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; margin-bottom: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--red-600), var(--red-800));
  color: var(--gold-400); box-shadow: 0 0 0 4px var(--paper), 0 0 0 5.5px var(--gold-500);
}
.md-value-icon .md-icon { width: 32px; height: 32px; }
.md-value-title { font-size: 21px; margin-bottom: 8px; }
.md-value p { margin: 0; color: var(--muted); font-size: 15px; }

/* Family tree call to action: green band with brush-stroke edges */
.md-cta { position: relative; background: linear-gradient(135deg, var(--green-700), var(--green-800)); color: #eaf5ee; padding: 70px 0; }
.md-brush {
  position: absolute; left: 0; right: 0; height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath fill='%23fbf5e6' d='M0 0h1200v8c-20 6-38 2-60 9-24 7-45-3-70 4-30 8-52-4-80 3-26 6-48 0-74 6-30 7-50-6-82 2-28 7-54-3-80 5-26 7-52-4-78 1-28 6-50 0-76 6-28 6-48-5-76 2-30 8-54-2-82 4-26 5-48-6-74 0-30 7-52-2-80 4-26 6-50-4-76 1-28 6-52 0-78 6-26 6-46-6-74 1C66 22 36 10 0 16z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.md-brush-top { top: -1px; }
.md-brush-bottom { bottom: -1px; transform: scale(-1, -1); }
.md-cta-inner { display: grid; gap: 20px; justify-items: center; text-align: center; }
.md-cta-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid var(--gold-400); color: var(--gold-400);
}
.md-cta-icon .md-icon { width: 38px; height: 38px; }
.md-cta h2 { color: var(--gold-200); font-size: clamp(26px, 4.5vw, 34px); margin-bottom: 6px; }
.md-cta p { margin: 0; color: #d5eadc; max-width: 620px; }
@media (min-width: 900px) {
  .md-cta-inner { grid-template-columns: auto 1fr auto; text-align: left; gap: 32px; }
}

/* News cards */
.md-news { background: var(--paper); }
.md-cards { display: grid; gap: 24px; }
@media (min-width: 700px) { .md-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .md-cards { grid-template-columns: repeat(3, 1fr); } }
.md-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.md-card:hover { transform: translateY(-4px); }
.md-card-media { display: block; aspect-ratio: 16 / 10; background: var(--red-800); overflow: hidden; }
.md-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-card-placeholder {
  display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  background: var(--motif) repeat center / 48px 48px, linear-gradient(160deg, var(--red-700), var(--red-900));
}
.md-card-logo { width: 84px; height: 84px; }
.md-card-body { padding: 20px 22px 24px; border-top: 3px solid var(--gold-500); flex: 1; }
.md-card-date { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gold-600); margin: 0 0 6px; }
.md-card-date .md-icon { width: 16px; height: 16px; }
.md-card-title { font-size: 20px; margin: 0 0 8px; }
.md-card-title a { color: var(--red-800); text-decoration: none; }
.md-card-title a:hover { color: var(--red-600); }
.md-card-excerpt { margin: 0; color: var(--muted); font-size: 15px; }

/* Contact: a hanging scroll */
.md-contact { background: var(--cream); }
.md-scroll { position: relative; max-width: 860px; margin: 0 auto; padding: 0 18px; }
.md-scroll-body {
  position: relative; text-align: center; padding: 44px 24px 40px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.6), transparent 30%),
    #fbefcf;
  border-top: 6px solid var(--red-700); border-bottom: 6px solid var(--red-700);
  box-shadow: var(--shadow);
}
.md-scroll-rod {
  position: absolute; top: -12px; bottom: -12px; width: 22px; border-radius: 11px; z-index: 1;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-200) 45%, var(--gold-500) 70%, var(--gold-600));
  box-shadow: 0 4px 10px rgba(63, 8, 7, .3);
}
.md-scroll-rod-left { left: 4px; }
.md-scroll-rod-right { right: 4px; }
.md-contact-list { list-style: none; margin: 24px auto 0; padding: 0; display: grid; gap: 12px; justify-content: center; text-align: left; }
.md-contact-list li { display: flex; gap: 10px; align-items: flex-start; }
.md-contact-list .md-icon { color: var(--red-700); margin-top: 3px; }
.md-contact-list a { color: var(--ink); font-weight: 500; text-decoration: none; }
.md-contact-list a:hover { color: var(--red-700); text-decoration: underline; }

/* ---------- Inner pages ---------- */
.md-banner {
  position: relative; overflow: hidden; color: var(--gold-200); padding: 44px 0 76px;
  background: radial-gradient(ellipse at 50% 0%, rgba(230, 190, 92, .2), transparent 60%), linear-gradient(160deg, var(--red-700), var(--red-900));
}
.md-banner-inner { position: relative; text-align: center; }
.md-breadcrumb { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 14px; color: #f0d9a4; margin-bottom: 8px; }
.md-breadcrumb a { color: var(--gold-200); text-decoration: none; }
.md-breadcrumb a:hover { text-decoration: underline; }
.md-banner-title { color: var(--gold-200); font-size: clamp(28px, 6vw, 46px); margin: 0; }
.md-banner-meta { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 14px; color: #f0d9a4; }
.md-banner-meta .md-icon { width: 16px; height: 16px; }

.md-paper {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 28px 20px; margin-top: -40px; position: relative;
}
@media (min-width: 768px) { .md-paper { padding: 48px 56px; } }
.md-page { padding-top: 0; }

.md-prose { font-size: 17px; }
.md-prose h2 { font-size: 26px; margin-top: 1.6em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.md-prose h3 { font-size: 21px; margin-top: 1.4em; }
.md-prose h2:first-child, .md-prose h3:first-child { margin-top: 0; }
.md-prose ul, .md-prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.md-prose li { margin-bottom: .35em; }
.md-prose li::marker { color: var(--gold-600); }
.md-prose blockquote {
  margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--gold-500);
  background: #fbf1d8; border-radius: 0 var(--radius) var(--radius) 0; font-style: italic;
}
.md-prose img { border-radius: var(--radius); }
.md-prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; }
.md-prose th, .md-prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.md-prose th { background: #fbf1d8; }
.md-featured { margin: 0 0 24px; }
.md-featured img { width: 100%; height: auto; display: block; }

.md-post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.md-post-nav a { text-decoration: none; font-weight: 500; }
.md-pagination { margin-top: 36px; text-align: center; }
.md-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 10px; margin: 2px;
  border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--paper);
}
.md-pagination .page-numbers.current { background: var(--red-700); color: var(--paper); border-color: var(--red-700); }

/* WordPress alignment helpers */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.md-footer { background: var(--red-950); color: #e9d3a6; }
.md-footer-grid { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
@media (min-width: 768px) { .md-footer-grid { grid-template-columns: 1.6fr 1fr 1.2fr; gap: 48px; } }
.md-footer-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 14px; }
.md-footer-brand span { font-family: var(--font-head); font-weight: 700; font-size: 22px; color: var(--gold-400); }
.md-footer-logo { width: 56px; height: 56px; }
.md-footer-about p { margin: 0; font-size: 15px; color: #dcc59a; max-width: 420px; }
.md-footer-title { font-size: 18px; color: var(--gold-400); margin-bottom: 14px; }
.md-footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.md-footer-list a { color: #f1dfb6; text-decoration: none; }
.md-footer-list a:hover { color: #fff; text-decoration: underline; }
.md-footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.md-footer-contact .md-icon { color: var(--gold-500); margin-top: 3px; }
.md-footer-bottom { border-top: 1px solid rgba(230, 190, 92, .25); }
.md-footer-bottom-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; font-size: 14px; }
.md-footer-bottom p { margin: 0; color: #c9b083; }
.md-footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.md-footer-links a { color: var(--gold-200); text-decoration: none; }
.md-footer-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Floating quick contact ---------- */
.md-float { position: fixed; right: 14px; bottom: 18px; z-index: 40; display: grid; gap: 10px; }
.md-float-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
  color: #fff; box-shadow: 0 8px 18px -6px rgba(0,0,0,.4); transition: transform .15s ease;
}
.md-float-btn:hover { transform: scale(1.08); color: #fff; }
.md-float-btn .md-icon { width: 24px; height: 24px; }
.md-float-phone { background: var(--red-600); }
.md-float-chat { background: #0068ff; }
.md-float-facebook { background: #1877f2; }
.md-to-top { background: var(--green-700); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s, transform .2s, visibility .2s; }
.md-scrolled .md-to-top { opacity: 1; visibility: visible; transform: none; }

@media print {
  .md-topbar, .md-header, .md-float, .md-footer, .md-hero-pattern, .md-border-pattern { display: none !important; }
  .md-banner { background: none; color: #000; padding: 0; }
  .md-banner-title { color: #000; }
  .md-paper { box-shadow: none; margin: 0; padding: 0; }
}
