/*
Theme Name: MME Blog
Theme URI: https://mme-pro.de/
Author: MME-Pro
Author URI: https://mme-pro.de/
Description: Fast, lightweight blog and magazine theme by MME-Pro. No page builder needed; pairs with the MME Community plugin for member sign-up, guest posts and article analytics.
Version: 1.8.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mme-blog
*/

/* ==========================================================================
   0. FONT – Inter (variable, weights 100–900), self-hosted
   ========================================================================== */
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("assets/fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
	src: url("assets/fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   1. DESIGN TOKENS – change colours / fonts / spacing here
   ========================================================================== */
:root {
	/* Brand */
	--c-primary:        #2d7a73;
	--c-primary-dark:   #22594f;
	--c-accent:         #f0b840;
	--c-accent-dark:    #d9a32c;

	/* Neutrals */
	--c-text:           #1f2a30;
	--c-text-muted:     #5d6a70;
	--c-bg:             #ffffff;
	--c-bg-soft:        #f1f6f5;
	--c-border:         #e3eaea;
	--c-footer-bg:      #1f2a30;
	--c-footer-text:    #c9d3d6;

	/* Category tones (bg = image placeholder, badge = label, ink = category text) */
	--tone-1-bg: #d8ebe5; --tone-1-badge: #22594f; --tone-1-ink: #22594f;
	--tone-2-bg: #f8e3c3; --tone-2-badge: #7a4a0e; --tone-2-ink: #7a4a0e;
	--tone-3-bg: #dce6f3; --tone-3-badge: #2b5a8a; --tone-3-ink: #2b5a8a;
	--tone-4-bg: #f3dadf; --tone-4-badge: #8c3a4e; --tone-4-ink: #8c3a4e;
	--tone-5-bg: #e4dff1; --tone-5-badge: #4e3f8c; --tone-5-ink: #4e3f8c;

	/* Typography: Inter everywhere (self-hosted below, no request to Google = GDPR friendly) */
	--font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-heading: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Layout */
	--container:   1160px;
	--gutter:      20px;
	--radius:      10px;
	--radius-sm:   6px;
	--shadow:      0 1px 2px rgba(31, 42, 48, .06), 0 4px 14px rgba(31, 42, 48, .05);
	--header-h:    64px;
	--header-bg:   #ffffff;      /* Customize → Header */
	--header-text: #1f2a30;
	--footer-heading: #ffffff;   /* Customize → Footer */
	--logo-size:   24px;
	--fs-p:        16px;         /* paragraph text: 16 desktop / 15 tablet / 14 mobile (Customize → Fonts) */
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--c-text);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-primary); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 8px 14px; clip: auto; width: auto; height: auto; }

/* Tone helper classes – set the three tone variables used by components */
.tone-1 { --tone-bg: var(--tone-1-bg); --tone-badge: var(--tone-1-badge); --tone-ink: var(--tone-1-ink); }
.tone-2 { --tone-bg: var(--tone-2-bg); --tone-badge: var(--tone-2-badge); --tone-ink: var(--tone-2-ink); }
.tone-3 { --tone-bg: var(--tone-3-bg); --tone-badge: var(--tone-3-badge); --tone-ink: var(--tone-3-ink); }
.tone-4 { --tone-bg: var(--tone-4-bg); --tone-badge: var(--tone-4-badge); --tone-ink: var(--tone-4-ink); }
.tone-5 { --tone-bg: var(--tone-5-bg); --tone-badge: var(--tone-5-badge); --tone-ink: var(--tone-5-ink); }

/* ==========================================================================
   3. HEADER + NAVIGATION
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	color: var(--header-text);
	border-bottom: 1px solid var(--c-border);
	transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(31, 42, 48, .08); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }

.site-logo { font-family: var(--font-heading); font-size: var(--logo-size); font-weight: 700; letter-spacing: -.02em; color: inherit; line-height: 1.1; }
.site-logo span { color: var(--c-primary); }
.site-logo:hover { color: inherit; }
.site-logo--img img, .site-logo .custom-logo { display: block; width: auto; max-height: calc(var(--header-h) - 18px); height: auto; }
.site-logo--img a { display: block; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input[type="search"] {
	width: 220px; max-width: 100%; height: 40px; padding: 0 14px;
	border: 1px solid var(--c-border); border-radius: var(--radius-sm);
	background: var(--c-bg-soft); color: var(--c-text); font-size: .875rem;
}
.search-form input[type="search"]:focus { border-color: var(--c-primary); background: #fff; }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 40px; padding: 0 18px; border: 0; border-radius: var(--radius-sm);
	background: var(--c-primary); color: #fff; font-weight: 600; font-size: .875rem;
	cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--c-primary-dark); color: #fff; }
.btn--accent { background: var(--c-accent); color: #3b2d05; }
.btn--accent:hover { background: var(--c-accent-dark); color: #3b2d05; }
.btn svg { width: 15px; height: 15px; }

.cat-nav { border-top: 1px solid var(--c-border); background: var(--header-bg); }
.cat-nav__list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.cat-nav__list::-webkit-scrollbar { display: none; }
.cat-nav__link {
	display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
	padding: 12px 12px; font-size: .8125rem; font-weight: 500; color: var(--header-text);
	border-bottom: 2px solid transparent;
}
.cat-nav__link svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }
.cat-nav__link:hover, .cat-nav__link.is-active { color: var(--c-primary); border-bottom-color: var(--c-primary); }

/* ==========================================================================
   4. SHARED COMPONENTS
   ========================================================================== */
.section { padding-block: 48px; }
.section--soft { background: var(--c-bg-soft); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section__title { font-size: 1.625rem; font-weight: 600; }
.section__more { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--c-primary); }
.section__more svg { width: 14px; height: 14px; }

.eyebrow { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tone-ink, var(--c-primary)); }
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--c-text-muted); }
.meta svg { width: 13px; height: 13px; }

/* Image / placeholder block with decorative circles and badge */
.thumb {
	position: relative; display: block; overflow: hidden;
	aspect-ratio: 16 / 10; border-radius: var(--radius);
	background: var(--tone-bg, var(--tone-1-bg));
}
.thumb::before, .thumb::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); pointer-events: none; }
.thumb::before { width: 62%; aspect-ratio: 1; top: -26%; right: -14%; }
.thumb::after  { width: 30%; aspect-ratio: 1; bottom: -14%; left: -6%; background: rgba(255, 255, 255, .3); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.thumb__badge {
	position: absolute; left: 10px; bottom: 10px; z-index: 2;
	padding: 4px 10px; border-radius: var(--radius-sm);
	background: var(--tone-badge, var(--tone-1-badge)); color: #fff;
	font-size: .75rem; font-weight: 700; line-height: 1.3;
}
.thumb--lg { aspect-ratio: 16 / 8.6; }
.thumb--lg .thumb__badge { left: 14px; bottom: 14px; padding: 8px 14px; font-size: 1.25rem; font-family: var(--font-heading); }
.thumb--sm { aspect-ratio: 1; width: 64px; border-radius: var(--radius-sm); flex: none; }
.thumb--sm .thumb__badge { display: none; }

/* ==========================================================================
   5. HERO (featured + popular)
   ========================================================================== */
.hero { padding-block: 28px 48px; }
.hero__grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.hero__grid:not(:has(.popular)) { grid-template-columns: minmax(0, 1fr) !important; } /* "Popular this week" switched off */
@media (max-width: 1023px) { :root { --fs-p: 15px; } }
@media (max-width: 767px) { :root { --fs-p: 14px; } }
.featured__body { padding-top: 14px; }
.featured__title { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; margin: 8px 0 12px; line-height: 1.12; }
.featured__excerpt { color: var(--c-text-muted); font-size: var(--fs-p); margin-bottom: 14px; max-width: 60ch; }

.popular__label { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-muted); margin-bottom: 12px; }
.popular__item { display: flex; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--c-border); align-items: flex-start; }
.popular__item:last-child { border-bottom: 0; }
.popular__title { font-size: .9375rem; font-weight: 600; line-height: 1.3; margin-top: 2px; }

/* ==========================================================================
   6. CARDS + GRIDS
   ========================================================================== */
.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card__body { padding-top: 12px; }
.card__title { font-size: 1.0625rem; font-weight: 600; margin: 4px 0 8px; line-height: 1.25; }
.card__excerpt { font-size: .8125rem; color: var(--c-text-muted); line-height: 1.55; }
.card .meta { margin-top: 2px; }
.card:hover .card__title { color: var(--c-primary); }

/* ==========================================================================
   7. ABOUT + NEWSLETTER
   ========================================================================== */
.info-grid { display: grid; gap: 22px; grid-template-columns: 1fr; padding-block: 48px; }
.about-box { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 26px; background: #fff; }
.about-box h2 { font-size: 1.375rem; margin-bottom: 12px; }
.about-box p { color: var(--c-text-muted); font-size: .875rem; margin-bottom: 14px; }
.about-box a.link { color: var(--c-primary); font-weight: 600; font-size: .875rem; }

.newsletter { background: var(--c-primary); color: #fff; border-radius: var(--radius); padding: 26px; }
.newsletter h2 { font-size: 1.375rem; display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.newsletter h2 svg { width: 22px; height: 22px; }
.newsletter p { font-size: .875rem; opacity: .95; margin-bottom: 14px; }
.newsletter__form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter__form input[type="email"] {
	flex: 1 1 200px; height: 46px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); color: var(--c-text);
}
.newsletter__form .btn { height: 46px; }
.newsletter__legal { margin-top: 12px; font-size: .6875rem; opacity: .85; }
.newsletter__legal a { text-decoration: underline; }
.newsletter__notice { margin-bottom: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .16); font-size: .8125rem; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer { background: var(--c-footer-bg); color: var(--c-footer-text); padding-top: 44px; font-size: .8125rem; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); padding-bottom: 32px; }
.footer__brand { grid-column: 1 / -1; }
.footer__brand strong { display: block; color: var(--footer-heading); font-family: var(--font-heading); font-size: 1.125rem; margin-bottom: 8px; }
.footer__brand p { max-width: 28ch; }
.footer__col h3 { color: var(--footer-heading); font-size: .8125rem; font-weight: 600; margin-bottom: 12px; }
.footer__col li { margin-bottom: 8px; }
.footer__col a:hover, .footer__legal a:hover { color: var(--footer-heading); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-block: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .75rem; }

/* Empty state */
.empty { padding: 60px 0; text-align: center; color: var(--c-text-muted); }

/* ==========================================================================
   9. RESPONSIVE (mobile-first: base = phone)
   ========================================================================== */
@media (max-width: 599px) {
	.search-form input[type="search"] { width: 120px; }
	.search-form .btn span { display: none; }
	.search-form .btn { padding: 0 12px; }
}
@media (min-width: 600px) {
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer__grid { grid-template-columns: repeat(4, 1fr); }
	.footer__brand { grid-column: auto; }
}
@media (min-width: 900px) {
	.hero__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 36px; }
	.card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.info-grid { grid-template-columns: 1fr 1.25fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* reCAPTCHA v2 widget in the newsletter form (MME Community) */
.newsletter__form .mmec-captcha { flex-basis: 100%; margin: 4px 0 0; }

/* Language switch (DE | EN) in the header, from MME Community */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--c-border, #e3eaea); border-radius: 999px; }
.lang-switch a { min-width: 34px; height: 28px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; color: var(--c-text-muted, #5d6a70); text-decoration: none; }
.lang-switch a:hover { color: var(--c-primary, #2d7a73); }
.lang-switch a.is-active { background: var(--c-primary, #2d7a73); color: #fff; }
@media (max-width: 640px) { .lang-switch a { min-width: 30px; height: 26px; padding: 0 6px; font-size: 12px; } }
