/* ── WordPress Admin Bar Fix ─────────────────────────────────────────────
   When logged in, WP adds margin-top:32px to <html> and the admin bar is
   position:fixed at top:0. Our sticky header must offset by admin bar height.
────────────────────────────────────────────────────────────────────────── */
.admin-bar .mm-header { top: 32px; }
.admin-bar .mm-drawer { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar .mm-header { top: 46px; }
  .admin-bar .mm-drawer { top: 46px; }
}
@media screen and (max-width: 600px) {
  .admin-bar .mm-header { top: 0; }
  .admin-bar .mm-drawer { top: 0; }
  html.admin-bar { margin-top: 0 !important; }
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.mm-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  width: 100%;
  background: rgba(253,251,212,.97);
  backdrop-filter: blur(12px);
  transition: box-shadow .25s ease;
}
.mm-header--scrolled { box-shadow: 0 2px 20px rgba(43,31,20,.12); }
.mm-main { padding-top: 72px; }
.mm-header__bar {
  border-bottom: 1px solid rgba(135,174,115,.2);
  transition: box-shadow .2s;
}
.mm-header--scrolled .mm-header__bar { box-shadow: 0 2px 16px rgba(43,31,20,.1); }
.mm-header__inner {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 1.5rem; padding-block: 1rem;
}

/* Logo */
.mm-header__logo { text-decoration: none; display: flex; align-items: center; }
.mm-header__logo img { height: 44px; width: auto; }
.mm-header__logo-lockup { display: flex; align-items: center; gap: .75rem; }
.mm-header__logo-mark {
  width: 42px; height: 42px;
  background: var(--terra); color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-disp); font-size: 1.4rem; font-weight: 800;
  flex-shrink: 0;
}
.mm-header__logo-name {
  display: block;
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 700;
  color: var(--espresso); line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px;
}
.mm-header__logo-tag {
  display: block;
  font-family: var(--font-ui); font-size: .62rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--terra);
}

/* Nav */
.mm-nav { flex: 1; display: flex; justify-content: center; }
.mm-nav__list { display: flex; list-style: none; gap: .25rem; margin: 0; padding: 0; }
.mm-nav__list a {
  display: block; padding: .5rem 1rem;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; color: var(--gray-5);
  text-decoration: none; border-radius: var(--r-md);
  transition: color .15s, background .15s;
}
.mm-nav__list a:hover,
.mm-nav__list .current-menu-item > a { color: var(--terra); background: rgba(224,90,58,.07); }

/* Sub-menu */
.mm-nav__list li { position: relative; }
.mm-nav__list .sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--gray-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: .5rem; min-width: 220px; list-style: none;
  opacity: 0; pointer-events: none;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s; z-index: 100;
}
.mm-nav__list .sub-menu a {
  display: block; padding: .6rem 1rem; color: var(--espresso) !important;
  font-size: .88rem; font-weight: 600; border-radius: 6px;
  text-decoration: none; transition: background .15s, color .15s;
}
.mm-nav__list .sub-menu a:hover { background: var(--gray-1); color: var(--terra) !important; }
.mm-nav__list li:hover > .sub-menu { opacity: 1; pointer-events: auto; transform: none; }

/* Header actions */
.mm-header__actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.mm-header__burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; padding: .5rem; cursor: pointer;
  width: 40px; height: 40px;
}
.mm-header__burger span {
  display: block; height: 2px; background: var(--espresso);
  border-radius: 2px; transition: transform .25s, opacity .2s;
}
.mm-header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mm-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mm-header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ────────────────────────────────────────────────────────
   CRITICAL: display:none when closed so it CANNOT intercept any clicks.
   Only display:flex when .is-open is present.
────────────────────────────────────────────────────────────────────────── */
.mm-drawer {
  display: none;
  position: fixed; inset: 0; z-index: 300;
}
.mm-drawer.is-open {
  display: flex;
}
.mm-drawer__overlay {
  position: absolute; inset: 0;
  background: rgba(43,31,20,.5);
  cursor: pointer;
}
.mm-drawer__panel {
  position: relative;
  width: min(360px, 88vw); height: 100vh;
  background: #fff; padding: 1.5rem;
  overflow-y: auto; margin-left: auto;
}
.mm-drawer__close {
  display: block; margin-left: auto; margin-bottom: 1.5rem;
  background: none; border: none; cursor: pointer; color: var(--gray-5);
  padding: .25rem; border-radius: var(--r-sm); font-size: 1.2rem;
}
.mm-drawer__list { list-style: none; padding: 0; margin-bottom: 1rem; }
.mm-drawer__list li { border-bottom: 1px solid var(--gray-1); }
.mm-drawer__list a {
  display: block; padding: 1rem .5rem;
  font-family: var(--font-head); font-size: 1.2rem;
  color: var(--espresso); text-decoration: none;
}
.mm-drawer__list a:hover { color: var(--terra); }

/* ── MAIN & SECTION ──────────────────────────────────────────────────────── */
.mm-main { min-height: 60vh; }
.mm-section { padding-block: 5rem; }
.section-pad { padding-block: 4rem; }
.mm-section-intro { max-width: 640px; margin: 0 auto 3.5rem; }
.mm-section-intro h2 { font-family: var(--font-disp); font-weight: 700; letter-spacing: -.02em; margin-bottom: .5rem; }
.mm-section-intro p { color: var(--gray-5); font-size: 1.05rem; }
.text-center { text-align: center; }

/* ── GRID ────────────────────────────────────────────────────────────────── */
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }

/* ── PAGE HERO ───────────────────────────────────────────────────────────── */
.mm-page-hero { background: var(--espresso); padding: 4rem 0 3rem; text-align: center; }
.mm-page-hero h1 { font-family: var(--font-disp); color: #fff; font-size: clamp(1.8rem,4vw,3rem); }

/* ── ENTRY CONTENT ───────────────────────────────────────────────────────── */
.entry-content { font-size: 1.0625rem; line-height: 1.85; color: var(--gray-5); }
.entry-content h2 { font-family: var(--font-disp); font-size: clamp(1.5rem,3vw,2rem); color: var(--espresso); margin: 2.5rem 0 .75rem; }
.entry-content h3 { font-size: 1.3rem; color: var(--espresso); margin: 2rem 0 .6rem; }
.entry-content p  { margin-bottom: 1.25rem; }
.entry-content ul, .entry-content ol { padding-left: 1.75rem; margin-bottom: 1.25rem; }
.entry-content li { margin-bottom: .4rem; }
.entry-content a  { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--r-lg); max-width: 100%; }
.entry-content blockquote { border-left: 4px solid var(--terra); padding: 1rem 1.5rem; background: var(--creme); border-radius: 0 var(--r-md) var(--r-md) 0; font-family: var(--font-head); font-size: 1.2rem; font-style: italic; margin: 2rem 0; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.mm-footer { background: var(--espresso); }

.mm-footer__cta { background: linear-gradient(135deg, var(--terra) 0%, #4a2818 100%); padding: 4rem 0; }
.mm-footer__cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.mm-footer__cta h2 { font-family: var(--font-disp); color: #fff; font-size: clamp(1.5rem,3vw,2.2rem); margin-bottom: .5rem; }
.mm-footer__cta p  { color: rgba(255,255,255,.75); margin: 0; }
.mm-footer__cta-btns { display: flex; flex-direction: column; gap: .75rem; flex-shrink: 0; }

.mm-footer__main { padding: 3.5rem 0; }
.mm-footer__grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 3rem; }

.mm-footer__brand .mm-header__logo-name { color: var(--creme); }
.mm-footer__desc { color: rgba(253,251,212,.5); font-size: .9rem; margin: 1rem 0 1.25rem; line-height: 1.7; }
.mm-footer__social { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.mm-social { width: 34px; height: 34px; background: rgba(255,255,255,.08); color: rgba(253,251,212,.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-ui); font-weight: 700; font-size: .85rem; text-decoration: none; transition: background .15s, color .15s; }
.mm-social:hover { background: var(--terra); color: #fff; }

.mm-footer__subscribe { display: flex; flex-wrap: wrap; gap: .5rem; }
.mm-footer__email-input { flex: 1; min-width: 140px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: var(--creme); font-size: .9rem; padding: .65rem .9rem; border-radius: var(--r-md); }
.mm-footer__email-input::placeholder { color: rgba(253,251,212,.3); }
.mm-footer__email-input:focus { border-color: var(--terra); }
.mm-footer__sub-msg { flex-basis: 100%; font-size: .8rem; color: var(--sage); margin: 0; }

.mm-footer__nav-title { font-family: var(--font-ui); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(253,251,212,.35); font-weight: 600; margin-bottom: 1rem; }
.mm-footer-nav { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.mm-footer-nav a { color: rgba(253,251,212,.6); text-decoration: none; font-size: .9rem; transition: color .15s; }
.mm-footer-nav a:hover { color: var(--creme); }

.mm-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.25rem 0; }
.mm-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mm-footer__bottom-inner p { color: rgba(253,251,212,.3); font-size: .8rem; margin: 0; }
.mm-footer__bottom-inner p a { color: rgba(253,251,212,.5); text-decoration: none; }
.mm-footer__bottom-inner nav { display: flex; gap: 1.25rem; }
.mm-footer__bottom-inner nav a { color: rgba(253,251,212,.3); font-size: .75rem; font-family: var(--font-ui); letter-spacing: .06em; text-decoration: none; }
.mm-footer__bottom-inner nav a:hover { color: var(--creme); }

/* Pagination */
.mm-pagination { display: flex; justify-content: center; padding-top: 2.5rem; }
.mm-pagination ul { display: flex; list-style: none; gap: .5rem; padding: 0; flex-wrap: wrap; justify-content: center; }
.mm-pagination a, .mm-pagination span.current {
  display: flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 .75rem;
  border-radius: var(--r-full); font-family: var(--font-ui);
  font-size: .8rem; font-weight: 600;
  border: 2px solid var(--gray-2); text-decoration: none; color: var(--espresso);
  transition: all .15s;
}
.mm-pagination a:hover { background: var(--terra); border-color: var(--terra); color: #fff; }
.mm-pagination span.current { background: var(--terra); border-color: var(--terra); color: #fff; }

/* Blog single */
.mm-single-hero { background: var(--espresso); padding: 3.5rem 0 0; }
.mm-single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.mm-single-meta time, .mm-single-meta span { font-family: var(--font-ui); font-size: .75rem; letter-spacing: .06em; color: rgba(255,255,255,.45); }
.mm-single-hero h1 { font-family: var(--font-disp); color: #fff; font-size: clamp(1.8rem,4vw,3rem); line-height: 1.1; margin-bottom: 2rem; }
.mm-single-img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--r-xl) var(--r-xl) 0 0; display: block; margin-top: 2rem; }

/* Post card */
.mm-post-card { background: #fff; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-2); transition: transform .2s, box-shadow .2s; }
.mm-post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mm-post-card__img { overflow: hidden; }
.mm-post-card__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform .4s; }
.mm-post-card:hover .mm-post-card__img img { transform: scale(1.04); }
.mm-post-card__body { padding: 1.5rem; }
.mm-post-card__title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.mm-post-card__title a { color: var(--espresso); text-decoration: none; transition: color .15s; }
.mm-post-card__title a:hover { color: var(--terra); }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .mm-nav { display: none; }
  .mm-header__burger { display: flex; }
  .mm-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .mm-footer__cta-inner { grid-template-columns: 1fr; gap: 2rem; }
  .mm-footer__cta-btns { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  /* Header */
  .mm-header__actions .btn:first-child { display: none; }

  /* Footer */
  .mm-footer__grid { grid-template-columns: 1fr; }
  .mm-footer__cta-btns { flex-direction: column; }
  .mm-footer__cta-btns .btn { width: 100%; justify-content: center; }
  .mm-footer__bottom-inner { flex-direction: column; text-align: center; gap: .75rem; }
  .mm-footer__subscribe { flex-direction: column; }
  .mm-footer__email-input { width: 100%; }

  /* Sections */
  .mm-section { padding-block: 3rem; }
  .section-pad { padding-block: 2.5rem; }

  /* Post grid */
  .mm-grid { grid-template-columns: 1fr; }

  /* Single post */
  .mm-single-hero h1 { font-size: clamp(1.6rem,7vw,2.2rem); }

  /* Entry content */
  .entry-content { font-size: 1rem; }
  .entry-content h2 { font-size: 1.4rem; }
  .entry-content blockquote { padding: .75rem 1rem; font-size: 1.05rem; }

  /* Pagination */
  .mm-pagination ul { gap: .25rem; }
  .mm-pagination a, .mm-pagination span.current { min-width: 36px; height: 36px; font-size: .75rem; }
}

/* Prevent any horizontal overflow globally */
@media (max-width: 768px) {
  img, video, iframe, embed, object { max-width: 100%; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── ELEMENTOR COMPATIBILITY ──────────────────────────────────────────────── */
.mm-elementor-full { width: 100%; max-width: 100%; padding: 0; margin: 0; }

/* Elementor sections should be full width */
.elementor-section-boxed > .elementor-container { max-width: 1240px; }
.mm-elementor-full .elementor-section,
.mm-elementor-full .e-con { width: 100% !important; max-width: 100% !important; }

/* Elementor uses these button classes - map to our brand */
.elementor-button-wrapper .elementor-button,
.elementor-widget-button .elementor-button {
    font-family: var(--font-ui) !important;
    font-weight: 600 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    border-radius: var(--r-full) !important;
    transition: all .2s var(--ease) !important;
}

/* Elementor heading widget uses our fonts */
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-head); }
.elementor-widget-heading h1.elementor-heading-title { font-family: var(--font-disp); }

/* ── MOBILE OVERFLOW GLOBAL FIX ──────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Ensure container always has breathing room */
  .container { padding-inline: 1.25rem; }

  /* Header: shrink logo text on very small screens */
  .mm-header__logo-name { font-size: .95rem; max-width: 150px; }
  .mm-header__logo-tag  { display: none; }
  .mm-header__logo-mark { width: 36px; height: 36px; font-size: 1.2rem; }
  .mm-header__logo-lockup { gap: .5rem; }

  /* Buttons full-width in hero */
  .mm-hero__actions .btn { font-size: .75rem; padding: .8rem 1.5rem; }

  /* Section headings scale down */
  .mm-section-intro h2 { font-size: 1.5rem; }
  .mm-page-hero h1 { font-size: 1.8rem; }

  /* Footer */
  .mm-footer__cta { padding: 2.5rem 0; }
  .mm-footer__main { padding: 2rem 0; }
  .mm-footer__grid { gap: 1.5rem; }
}
