/* Glossary term pages (/glossary/<term>/, shortcode [ayedu_glossary_term] in production's must-use files). The
   glossary's own stylesheet is removed by class-legacy-glossary.php; this file restyles the same markup as a blog
   article (what-is-a-nikah is the reference): light page, blog breadcrumb, a dotted eyebrow from the category tag,
   a Playfair H1 with a quiet lead, an article column at the blog's measure with Host Grotesk H2s, flat sections
   (no cards), hairline FAQ rows, Keep-reading style blog cards, and the CTA as the blog's sticky wine side card on
   desktop and its blush "Plan it with AyeDu" panel below 1100px. Shared frame + FAQ open state:
   widgets-glossary-legacy.css. Every selector starts with `html body .ayedu-term-wrapper` to outrank the kit. */

html body .ayedu-term-wrapper {
  --gt-measure: 708px;
  --gt-aside: 320px;
  --gt-gutter: 24px;
  line-height: 1.6;
  padding-bottom: 88px;
  overflow-wrap: break-word;
}

/* ---------- Hero: breadcrumb, eyebrow, H1, lead (no dark band) ---------- */
html body .ayedu-term-wrapper .ayedu-term-hero { background: none; color: var(--ay-ink-body); padding: 36px var(--gt-gutter) 0; }
html body .ayedu-term-wrapper .ayedu-term-hero-container { max-width: 1128px; margin: 0 auto; }
html body .ayedu-term-wrapper .ayedu-term-hero-container > :not(.ayedu-term-breadcrumbs) { max-width: var(--gt-measure); }

html body .ayedu-term-wrapper .ayedu-term-breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0 0 56px;
  font: 400 15.5px/1.4 var(--ay-sans); color: var(--ay-ink-quiet);
}
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs a {
  color: var(--ay-ink-quiet); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px;
  transition: color .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs a:first-child { color: var(--ay-wine); font-weight: 700; }
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs a:hover { color: var(--ay-wine-hover); text-decoration: underline; text-underline-offset: 3px; }
/* The separators are literal ">" spans; show the blog's quiet middle dot instead. */
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs > span:not(:last-child) { font-size: 0; line-height: 0; color: var(--ay-ink-caption); }
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs > span:not(:last-child)::before { content: "\00B7"; font-size: 15.5px; line-height: 1.4; }
html body .ayedu-term-wrapper .ayedu-term-breadcrumbs > span:last-child { color: var(--ay-ink-body); }

/* Category tag as the blog's eyebrow: small tracked caps with a wine dot. */
html body .ayedu-term-wrapper .ayedu-term-badge {
  display: flex; align-items: center; gap: 9px; margin: 0 0 18px; padding: 0; background: none; border: 0; border-radius: 0;
  font: 600 13px/1.2 var(--ay-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ay-ink);
}
html body .ayedu-term-wrapper .ayedu-term-badge::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ay-wine);
}

html body .ayedu-term-wrapper .ayedu-term-h1 {
  margin: 0 0 22px; font-family: var(--ay-serif); font-weight: 400; font-size: clamp(36px, 3.9vw, 56px);
  line-height: 1.08; letter-spacing: -.018em; color: var(--ay-ink-deep); text-wrap: balance;
}
html body .ayedu-term-wrapper .ayedu-term-desc {
  margin: 0; font: 400 20px/1.6 var(--ay-sans); color: var(--ay-ink-quiet); text-wrap: pretty;
}

/* ---------- Article body ---------- */
html body .ayedu-term-wrapper .ayedu-term-main { max-width: calc(1128px + 2 * var(--gt-gutter)); margin: 0 auto; padding: 8px var(--gt-gutter) 0; }
html body .ayedu-term-wrapper .ayedu-term-main > * { max-width: var(--gt-measure); }

/* Flat sections: no card, no shadow, spacing does the separating. */
html body .ayedu-term-wrapper .ayedu-card-section {
  background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 44px 0 0;
}
html body .ayedu-term-wrapper .ayedu-sec-h2 {
  display: block; margin: 0 0 14px; font: 700 30px/1.15 var(--ay-sans); letter-spacing: -.02em; color: var(--ay-ink-deep);
  text-wrap: balance;
}
html body .ayedu-term-wrapper .ayedu-sec-p {
  margin: 0 0 22px; font: 400 18.5px/1.85 var(--ay-sans); color: var(--ay-ink-body); text-wrap: pretty;
}
html body .ayedu-term-wrapper .ayedu-sec-p:last-child { margin-bottom: 0; }
html body .ayedu-term-wrapper .ayedu-sec-p a {
  color: var(--ay-link) !important; font-weight: 400 !important; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; word-break: break-word;
}
html body .ayedu-term-wrapper .ayedu-sec-p a:hover { color: var(--ay-link-hover) !important; }

/* The fallback layout (terms without an outline) has a quick-definition box: a quiet blush note, not a card. */
html body .ayedu-term-wrapper .ayedu-snippet-box {
  margin: 36px 0 0; padding: 22px 24px; background: var(--ay-blush); border: 0; border-radius: 16px; box-shadow: none;
}
html body .ayedu-term-wrapper .ayedu-snippet-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font: 600 13px/1.2 var(--ay-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ay-wine);
}
html body .ayedu-term-wrapper .ayedu-snippet-title svg { display: none; }
html body .ayedu-term-wrapper .ayedu-snippet-text { margin: 0; font: 400 18.5px/1.75 var(--ay-sans); color: var(--ay-ink-body); }

/* The link sections close the article with a hairline, like the blog's "Keep reading". */
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-blog-grid),
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-chips-grid) { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--ay-line); }
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-blog-grid:not(:empty)) + .ayedu-card-section:has(.ayedu-chips-grid) { margin-top: 40px; padding-top: 0; border-top: 0; }
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-blog-grid) .ayedu-sec-h2,
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-chips-grid) .ayedu-sec-h2 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; margin-bottom: 18px; }
/* An outline with a "Related Blogs" heading and no links renders an empty grid: hide the whole section. */
html body .ayedu-term-wrapper .ayedu-card-section:has(.ayedu-blog-grid:empty) { display: none; }

/* Related blogs: the blog's Keep-reading cards (white, hairline, 16px radius, serif title). */
html body .ayedu-term-wrapper .ayedu-blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 216px), 1fr)); gap: 12px; margin: 0;
}
html body .ayedu-term-wrapper .ayedu-blog-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 112px; padding: 20px;
  background: var(--ay-white); border: 1px solid var(--ay-line); border-radius: 16px; box-shadow: none;
  color: var(--ay-wine); text-decoration: none; transition: border-color .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-blog-card::after {
  content: ""; width: 18px; height: 10px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10'%3E%3Cpath d='M0 5h16M12 1l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-blog-card:hover { border-color: var(--ay-wine); background: var(--ay-white); }
html body .ayedu-term-wrapper .ayedu-blog-card:hover::after { transform: translateX(3px); }
html body .ayedu-term-wrapper .ayedu-blog-title {
  margin: 0; font: 400 18px/1.3 var(--ay-serif); letter-spacing: 0; color: var(--ay-ink-deep); text-wrap: balance;
}
html body .ayedu-term-wrapper .ayedu-blog-card:hover .ayedu-blog-title { color: var(--ay-ink-deep); }

/* Related glossary terms: the site's pills. */
html body .ayedu-term-wrapper .ayedu-chips-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
html body .ayedu-term-wrapper .ayedu-chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px;
  background: var(--ay-white); border: 1px solid var(--ay-line);
  font: 600 15.5px/1.2 var(--ay-sans); color: var(--ay-ink); text-decoration: none;
  transition: border-color .2s var(--ay-ease-ui), color .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-chip:hover { border-color: var(--ay-wine); color: var(--ay-wine); background: var(--ay-white); }

/* ---------- FAQ: hairline rows, wine chevron that turns when open ---------- */
html body .ayedu-term-wrapper #sec-faqs { margin-top: 56px; }
html body .ayedu-term-wrapper .ayedu-faq-list { margin: 8px 0 0; border-bottom: 1px solid var(--ay-line); }
html body .ayedu-term-wrapper .ayedu-faq-item { margin: 0; border: 0; border-top: 1px solid var(--ay-line); border-radius: 0; overflow: visible; background: none; }
html body .ayedu-term-wrapper .ayedu-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; padding: 18px 0;
  background: none; cursor: pointer; font: 600 18px/1.45 var(--ay-sans); color: var(--ay-ink);
  transition: color .2s var(--ay-ease-ui); -webkit-tap-highlight-color: transparent;
}
html body .ayedu-term-wrapper .ayedu-faq-q:hover { color: var(--ay-wine-hover); }
html body .ayedu-term-wrapper .ayedu-faq-q:focus-visible { outline: 2px solid var(--ay-magenta); outline-offset: 2px; border-radius: 4px; }
html body .ayedu-term-wrapper .ayedu-faq-q > span {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--ay-line); background: var(--ay-white); color: var(--ay-wine) !important;
  transition: background-color .2s var(--ay-ease-ui), border-color .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-faq-q > span svg { width: 16px; height: 16px; transition: transform .25s var(--ay-ease-ui); }
html body .ayedu-term-wrapper .ayedu-faq-q:hover > span { border-color: var(--ay-wine); }
html body .ayedu-term-wrapper .ayedu-faq-item.active .ayedu-faq-q > span { background: var(--ay-blush); border-color: var(--ay-blush); }
html body .ayedu-term-wrapper .ayedu-faq-item.active .ayedu-faq-q > span svg { transform: rotate(180deg); }
html body .ayedu-term-wrapper .ayedu-faq-a {
  padding: 0 52px 22px 0; margin: 0; border: 0; background: none;
  font: 400 17.5px/1.75 var(--ay-sans); color: var(--ay-ink-quiet);
}

/* ---------- CTA: blush panel in the column (the blog's "Plan it with AyeDu") ---------- */
html body .ayedu-term-wrapper .ayedu-cta-box {
  margin: 56px 0 0; padding: 28px; text-align: left; color: var(--ay-ink-body);
  background: var(--ay-blush); border: 1px solid color-mix(in srgb, var(--ay-wine) 8%, transparent);
  border-radius: var(--ay-radius-card); box-shadow: none;
}
html body .ayedu-term-wrapper .ayedu-cta-box h3 {
  margin: 0 0 8px; font: 400 26px/1.18 var(--ay-serif); letter-spacing: 0; color: var(--ay-ink-deep); text-wrap: balance;
}
html body .ayedu-term-wrapper .ayedu-cta-box p { margin: 0 0 22px; font: 400 17px/1.7 var(--ay-sans); color: var(--ay-ink-body); max-width: 60ch; }
html body .ayedu-term-wrapper .ayedu-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
html body .ayedu-term-wrapper :is(.ayedu-btn-white, .ayedu-btn-trans) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 26px;
  border-radius: 999px; font: 700 16px/1.2 var(--ay-sans); text-decoration: none; box-shadow: none; transform: none;
  transition: background-color .2s var(--ay-ease-ui), color .2s var(--ay-ease-ui), border-color .2s var(--ay-ease-ui);
}
html body .ayedu-term-wrapper .ayedu-btn-white { background: var(--ay-wine); color: var(--ay-white); border: 1px solid var(--ay-wine); }
html body .ayedu-term-wrapper .ayedu-btn-white:hover { background: var(--ay-wine-hover); border-color: var(--ay-wine-hover); color: var(--ay-white); transform: none; }
html body .ayedu-term-wrapper .ayedu-btn-white:active { background: var(--ay-wine-pressed); }
html body .ayedu-term-wrapper .ayedu-btn-trans { background: transparent; color: var(--ay-wine); border: 1px solid var(--ay-wine); }
html body .ayedu-term-wrapper .ayedu-btn-trans:hover { background: var(--ay-white); color: var(--ay-wine-hover); border-color: var(--ay-wine-hover); }

/* ---------- Desktop: article + sticky wine side card (the blog's "Plan your wedding on AyeDu") ---------- */
@media (min-width: 1100px) {
  html body .ayedu-term-wrapper .ayedu-term-main {
    display: grid; grid-template-columns: minmax(0, var(--gt-measure)) var(--gt-aside); justify-content: space-between;
    column-gap: 56px; align-items: start;
  }
  html body .ayedu-term-wrapper .ayedu-term-main > * { grid-column: 1; }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box {
    grid-column: 2; grid-row: 1 / span 40; align-self: start; position: sticky; top: calc(var(--ay-nav-offset) + 40px);
    margin: 44px 0 0; padding: 28px; background: var(--ay-wine); border: 0; color: var(--ay-white);
    box-shadow: var(--ay-shadow-card);
  }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box h3 { color: var(--ay-white); margin-bottom: 12px; }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box p { color: color-mix(in srgb, var(--ay-white) 84%, transparent); font-size: 16.5px; line-height: 1.6; margin-bottom: 22px; }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box .ayedu-cta-actions { flex-direction: column; gap: 10px; }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box :is(.ayedu-btn-white, .ayedu-btn-trans) { width: 100%; }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box .ayedu-btn-white { background: var(--ay-page); border-color: var(--ay-page); color: var(--ay-wine); }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box .ayedu-btn-white:hover { background: var(--ay-blush); border-color: var(--ay-blush); color: var(--ay-wine); }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box .ayedu-btn-trans { color: var(--ay-white); border-color: color-mix(in srgb, var(--ay-white) 45%, transparent); }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box .ayedu-btn-trans:hover { background: var(--ay-wine-hover); border-color: var(--ay-white); color: var(--ay-white); }
  html body .ayedu-term-wrapper .ayedu-term-main > .ayedu-cta-box :is(a):focus-visible { outline-color: var(--ay-white); }
}

/* ---------- Tablets and phones: one centred column at the article measure ---------- */
@media (max-width: 1099px) {
  html body .ayedu-term-wrapper .ayedu-term-hero-container { max-width: var(--gt-measure); }
  html body .ayedu-term-wrapper .ayedu-term-main { max-width: calc(var(--gt-measure) + 2 * var(--gt-gutter)); }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  html body .ayedu-term-wrapper { --gt-gutter: 22px; padding-bottom: 64px; }
  html body .ayedu-term-wrapper .ayedu-term-hero { padding-top: 24px; }
  html body .ayedu-term-wrapper .ayedu-term-breadcrumbs { margin-bottom: 36px; font-size: 15px; }
  html body .ayedu-term-wrapper .ayedu-term-breadcrumbs a { min-height: 44px; }
  html body .ayedu-term-wrapper .ayedu-term-h1 { font-size: clamp(32px, 9.4vw, 40px); line-height: 1.1; margin-bottom: 18px; }
  html body .ayedu-term-wrapper .ayedu-term-desc { font-size: 18.5px; line-height: 1.6; }
  html body .ayedu-term-wrapper .ayedu-card-section { margin-top: 40px; }
  html body .ayedu-term-wrapper .ayedu-sec-h2 { font-size: 25px; line-height: 1.2; }
  html body .ayedu-term-wrapper .ayedu-sec-p { font-size: 18px; line-height: 1.75; }
  html body .ayedu-term-wrapper .ayedu-blog-grid { gap: 10px; }
  html body .ayedu-term-wrapper .ayedu-blog-card { flex-direction: row; align-items: center; min-height: 64px; padding: 16px 18px; }
  html body .ayedu-term-wrapper .ayedu-faq-q { font-size: 17px; padding: 16px 0; }
  html body .ayedu-term-wrapper .ayedu-faq-a { padding-right: 0; font-size: 17px; }
  html body .ayedu-term-wrapper .ayedu-cta-box { padding: 24px 22px; }
  html body .ayedu-term-wrapper .ayedu-cta-box h3 { font-size: 24px; }
  html body .ayedu-term-wrapper .ayedu-cta-actions { flex-direction: column; }
  html body .ayedu-term-wrapper :is(.ayedu-btn-white, .ayedu-btn-trans) { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html body .ayedu-term-wrapper *, html body .ayedu-term-wrapper *::after { transition: none !important; }
}
