/* ==========================================================================
   Layout variants (Customize → MME Blog → Design & layout).
   Body classes come from inc/layouts.php: mmeb-h-* (header), mmeb-hero-* (top of the homepage),
   mmeb-cards-* (article cards), mmeb-titles-* (section titles). The defaults
   (standard / classic / classic / plain) need no rules here.
   ========================================================================== */

/* ---------- Header: logo in the middle (desktop) ---------- */
@media (min-width: 1024px) {
	.mmeb-h-centered .site-header__bar { grid-template-columns: 1fr auto 1fr; min-height: calc(var(--header-h) + 14px); }
	.mmeb-h-centered .site-header__brand { grid-column: 2; grid-row: 1; justify-self: center; }
	.mmeb-h-centered .site-header__bar .search-form { grid-column: 1; grid-row: 1; justify-self: start; max-width: 260px; }
	.mmeb-h-centered .header-actions { grid-column: 3; grid-row: 1; }
	.mmeb-h-centered .site-logo { font-size: calc(var(--logo-size) * 1.25); }
	.mmeb-h-centered .cat-nav__list { justify-content: center; }
}

/* ---------- Header: date bar on top (news) ---------- */
.topbar { background: var(--c-footer-bg); color: var(--c-footer-text); font-size: .75rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; }
.topbar time { font-weight: 600; color: var(--footer-heading); }
.topbar__links { display: flex; gap: 18px; }
.topbar__links a:hover { color: var(--footer-heading); }
.mmeb-h-news .site-header { border-bottom: 3px solid var(--c-primary); }
.mmeb-h-news .cat-nav__link { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.mmeb-h-news .cat-nav__link svg { display: none; }
@media (max-width: 599px) { .topbar__links { display: none; } }

/* ---------- Posts next to the featured article: tiles (image on top) ---------- */
.popular--tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; align-content: start; }
.popular--tiles .popular__label { grid-column: 1 / -1; margin-bottom: 0; }
.popular__item--tile { display: block; padding: 0; border: 0; }
.popular__item--tile .thumb { margin-bottom: 10px; }
.popular__item--tile .thumb__badge { display: none; }
.popular__item--tile .popular__title { font-size: .9375rem; }
@media (min-width: 900px) { .popular--row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }

/* ---------- Hero: featured article + 4 tiles (tech) ---------- */
@media (min-width: 900px) {
	.mmeb-hero-bento .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Hero: large image with the text on it (lifestyle) ---------- */
.mmeb-hero-overlay .hero__grid, .mmeb-hero-intro .hero__grid { grid-template-columns: minmax(0, 1fr) !important; gap: 30px; }
.hero--overlay .featured { position: relative; overflow: hidden; border-radius: var(--radius); }
.hero--overlay .thumb--lg { aspect-ratio: 21 / 9; border-radius: 0; }
.hero--overlay .thumb--lg .thumb__badge { top: 18px; bottom: auto; left: 18px; }
.hero--overlay .featured__body {
	position: absolute; inset: auto 0 0; z-index: 3; padding: 100px clamp(20px, 4vw, 48px) 36px;
	background: linear-gradient(to top, rgba(12, 10, 10, .85), rgba(12, 10, 10, .45) 55%, transparent);
	color: #fff; pointer-events: none;
}
.hero--overlay .featured__body a { color: #fff; pointer-events: auto; }
.hero--overlay .featured__title { max-width: 24ch; font-size: clamp(1.75rem, 4.2vw, 3.1rem); }
.hero--overlay .featured:hover .featured__title a { color: #fff; opacity: .9; }
.hero--overlay .featured__excerpt { color: rgba(255, 255, 255, .88); }
.hero--overlay .featured .meta { color: rgba(255, 255, 255, .8); }
.hero--overlay .featured .eyebrow { display: inline-block; padding: 4px 10px; border-radius: var(--radius-sm); background: var(--c-primary); color: #fff; }
@media (max-width: 767px) {
	.hero--overlay .thumb--lg { aspect-ratio: 4 / 5; }
	.hero--overlay .featured__body { padding: 80px 20px 22px; }
	.hero--overlay .featured__excerpt { display: none; }
}

/* ---------- Hero: lead story, 2 stories, most read (news) ---------- */
.hero__stories { display: grid; gap: 20px; align-content: start; }
.popular--ranked .popular__label { padding-bottom: 8px; border-bottom: 3px solid var(--c-primary); color: var(--c-text); font-weight: 800; }
.popular__list { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.popular__list li { counter-increment: rank; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--c-border); }
.popular__list li:last-child { border-bottom: 0; }
.popular__list li::before { content: counter(rank); font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--c-primary); }
.popular__item--headline { display: block; padding: 0; border: 0; }
.popular__item--headline .eyebrow { display: block; margin-bottom: 2px; }
.popular__item--headline .meta { margin-top: 4px; }
.mmeb-hero-news .featured__title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
@media (min-width: 600px) and (max-width: 899px) {
	.mmeb-hero-news .hero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mmeb-hero-news .featured { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
	.mmeb-hero-news .hero__grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, .95fr); gap: 26px; }
	.mmeb-hero-news .hero__stories, .mmeb-hero-news .popular--ranked { padding-left: 24px; border-left: 1px solid var(--c-border); }
}

/* ---------- Hero: text left, image right (health) ---------- */
.hero--intro .featured { display: grid; overflow: hidden; border-radius: var(--radius); background: var(--c-bg-soft); }
.hero--intro .thumb--lg { aspect-ratio: 4 / 3; height: 100%; border-radius: 0; }
.hero--intro .featured__body { padding: 30px clamp(20px, 4vw, 54px) 34px; }
.hero--intro .featured__title { font-size: clamp(1.9rem, 4vw, 3rem); }
.featured__btn { display: flex; width: max-content; margin-top: 20px; }
.featured__btn svg { width: 15px; height: 15px; }
@media (min-width: 900px) {
	.hero--intro .featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; }
	.hero--intro .featured .thumb { order: 2; }
}

/* ---------- Cards: image left, text right (list) ---------- */
.mmeb-cards-list .card-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.mmeb-cards-list .card { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 16px; align-items: center; }
.mmeb-cards-list .card .thumb { aspect-ratio: 4 / 3; }
.mmeb-cards-list .card .thumb__badge { display: none; }
.mmeb-cards-list .card__body { padding-top: 0; }
@media (min-width: 900px) { .mmeb-cards-list .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 30px; } }

/* ---------- Cards: tall images, 3 per row (magazine) ---------- */
.mmeb-cards-portrait .card .thumb { aspect-ratio: 4 / 5; }
.mmeb-cards-portrait .card .thumb__badge { left: 50%; transform: translateX(-50%); white-space: nowrap; }
.mmeb-cards-portrait .card:hover .thumb__badge { transform: translate(-50%, -3px); }
.mmeb-cards-portrait .card__body { padding-top: 16px; text-align: center; }
.mmeb-cards-portrait .card__title { font-size: 1.25rem; }
@media (min-width: 900px) { .mmeb-cards-portrait .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 28px; } }
@media (max-width: 599px) {
	.mmeb-cards-portrait .card__title { font-size: 1.02rem; }
	.mmeb-cards-portrait .card__excerpt { display: none; }
}

/* ---------- Cards: white boxes, 3 per row ---------- */
.mmeb-cards-boxed .card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.mmeb-cards-boxed .section:not(.section--soft) .card { box-shadow: var(--shadow), 0 0 0 1px var(--c-border); }
.mmeb-cards-boxed .card .thumb { border-radius: 0; }
.mmeb-cards-boxed .card__body { padding: 16px 18px 20px; }
@media (min-width: 900px) { .mmeb-cards-boxed .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; } }

/* ---------- Cards: compact, without teaser text (news) ---------- */
.mmeb-cards-compact .card-grid { gap: 22px 18px; }
.mmeb-cards-compact .card { padding-top: 10px; border-top: 3px solid var(--c-text); }
.mmeb-cards-compact .card:hover { transform: none; }
.mmeb-cards-compact .card .thumb { aspect-ratio: 16 / 9; }
.mmeb-cards-compact .card .thumb__badge { padding: 3px 8px; font-size: .6875rem; }
.mmeb-cards-compact .card__excerpt { display: none; }
.mmeb-cards-compact .card__title { font-size: .98rem; line-height: 1.3; }

/* ---------- Section titles ---------- */
.mmeb-titles-bar .section__title { padding-left: 14px; border-left: 4px solid var(--c-primary); line-height: 1.1; }
.mmeb-titles-line .section__head { align-items: center; padding-top: 10px; border-top: 3px solid var(--c-text); }
.mmeb-titles-line .section__title { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; }
.mmeb-titles-center .section__head { flex-direction: column; align-items: center; gap: 6px; margin-bottom: 30px; text-align: center; }
.mmeb-titles-center .section__title { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.mmeb-titles-center .section__title::after { content: ""; display: block; width: 44px; height: 2px; margin: 12px auto 0; background: var(--c-primary); }
.mmeb-titles-underline .section__title { position: relative; padding-bottom: 10px; }
.mmeb-titles-underline .section__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 4px; border-radius: 4px; background: var(--c-primary); }
