/*
Theme Name:   MomsFunch
Theme URI:    https://momsfunch.com
Description:  영유아 발달 및 육아 정보 블로그 MomsFunch 전용 워드프레스 테마
Author:       MomsFunch
Author URI:   https://momsfunch.com
Version:      1.0.1
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  momsfunch
Tags:         blog, parenting, two-columns, right-sidebar, custom-menu, featured-images, sticky-post
*/

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */
:root {
  --mf-yellow:        oklch(0.87 0.13 82);
  --mf-yellow-light:  oklch(0.95 0.06 85);
  --mf-yellow-dark:   oklch(0.70 0.15 78);
  --mf-blue:          oklch(0.78 0.09 232);
  --mf-blue-light:    oklch(0.93 0.04 230);
  --mf-blue-dark:     oklch(0.55 0.12 232);
  --mf-green:         oklch(0.82 0.10 148);
  --mf-green-light:   oklch(0.94 0.05 148);
  --mf-green-dark:    oklch(0.60 0.13 148);
  --mf-peach:         oklch(0.88 0.08 45);
  --mf-peach-dark:    oklch(0.55 0.12 45);
  --mf-lavender:      oklch(0.87 0.07 295);
  --mf-lavender-dark: oklch(0.50 0.12 295);
  --mf-bg:            #FFFDF8;
  --mf-bg-warm:       oklch(0.97 0.015 80);
  --mf-border:        oklch(0.91 0.02 80);
  --mf-text:          oklch(0.20 0.02 60);
  --mf-text-mid:      oklch(0.45 0.02 60);
  --mf-text-light:    oklch(0.65 0.02 60);
  --mf-font-display:  'Nunito', 'Noto Sans KR', sans-serif;
  --mf-font-body:     'Noto Sans KR', sans-serif;
  --mf-radius-sm:     8px;
  --mf-radius-md:     12px;
  --mf-radius-lg:     16px;
  --mf-radius-xl:     20px;
  --mf-radius-full:   9999px;
  --mf-shadow-sm:     0 1px 4px oklch(0 0 0 / 0.06);
  --mf-shadow-md:     0 4px 16px oklch(0 0 0 / 0.08);
  --mf-shadow-lg:     0 8px 32px oklch(0 0 0 / 0.10);
  --mf-container:     1100px;
  --mf-content:       68%;
  --mf-sidebar:       28%;
  --mf-gap:           4%;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mf-font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--mf-text);
  background-color: var(--mf-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; list-style: none;}
a { color: var(--mf-yellow-dark); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--mf-text); }
p { margin: 0 0 1.2em; color: var(--mf-text-mid); }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.mf-container {
  max-width: var(--mf-container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.mf-layout {
  display: grid;
  grid-template-columns: var(--mf-content) var(--mf-sidebar);
  gap: var(--mf-gap);
  align-items: start;
  margin-top: 40px;
}

@media (max-width: 900px) {
  .mf-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mf-font-display);
  font-weight: 700;
  color: var(--mf-text);
  line-height: 1.3;
  margin: 0 0 0.6em;
  text-wrap: pretty;
}
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
h4 { font-size: 1.05rem; }

/* ==========================================================================
   5. HEADER
   ========================================================================== */
.mf-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mf-border);
  transition: box-shadow 0.25s;
}

.mf-site-header.is-scrolled {
  box-shadow: var(--mf-shadow-sm);
}

.mf-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

/* Logo */
.mf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.mf-logo__mark {
  flex-shrink: 0;
}

.mf-logo__text {
  font-family: var(--mf-font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--mf-text);
  line-height: 1;
}

.mf-logo__text span {
  color: var(--mf-yellow-dark);
}

.mf-logo__sub {
  font-size: 0.65rem;
  color: var(--mf-text-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Main nav */
.mf-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mf-nav li { position: relative; }

.mf-nav > li > a {
  display: block;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mf-text-mid);
  border-radius: var(--mf-radius-md);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.mf-nav > li > a:hover,
.mf-nav > li.current-menu-item > a,
.mf-nav > li.current-menu-ancestor > a {
  background: var(--mf-yellow-light);
  color: var(--mf-text);
}

/* Dropdown */
.mf-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: white;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-md);
  box-shadow: var(--mf-shadow-md);
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 200;
}

.mf-nav li:hover > .sub-menu { display: block; }

.mf-nav .sub-menu li a {
  display: block;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--mf-text-mid);
  border-radius: var(--mf-radius-sm);
  transition: background 0.12s, color 0.12s;
}

.mf-nav .sub-menu li a:hover {
  background: var(--mf-yellow-light);
  color: var(--mf-text);
}

/* Header search */
.mf-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  min-width: 190px;
  transition: border-color 0.15s;
}

.mf-header-search:focus-within {
  border-color: var(--mf-yellow);
}

.mf-header-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--mf-font-body);
  font-size: 0.85rem;
  color: var(--mf-text);
  width: 100%;
  padding: 0;
  margin: 0;
}

.mf-header-search input::placeholder { color: var(--mf-text-light); }

/* Mobile toggle */
.mf-menu-toggle {
  display: none;
  background: white;
  border: 1.5px solid var(--mf-border);
  border-radius: var(--mf-radius-full);
  padding: 7px 16px;
  font-family: var(--mf-font-body);
  font-size: 0.8rem;
  color: var(--mf-text-mid);
  cursor: pointer;
}

@media (max-width: 768px) {
  .mf-menu-toggle { display: flex; align-items: center; gap: 6px; }
  .mf-nav-wrap { display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: white; border-bottom: 1px solid var(--mf-border);
    padding: 12px 20px; box-shadow: var(--mf-shadow-md); z-index: 99; }
  .mf-nav-wrap.is-open { display: block; }
  .mf-nav { flex-direction: column; align-items: flex-start; gap: 2px; }
  .mf-nav > li > a { width: 100%; }
  .mf-header-search { display: none; }
}

/* ==========================================================================
   6. READING PROGRESS BAR
   ========================================================================== */
.mf-progress-bar {
  position: fixed;
  top: 64px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mf-yellow), var(--mf-yellow-dark));
  z-index: 99;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ==========================================================================
   7. HERO
   ========================================================================== */
.mf-hero {
  background: linear-gradient(160deg, var(--mf-yellow-light) 0%, var(--mf-yellow) 55%, var(--mf-blue-light) 100%);
  border-radius: var(--mf-radius-xl);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.mf-hero::before {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px;
  border-radius: 50%; background: white; opacity: 0.18; pointer-events: none;
}

.mf-hero::after {
  content: '';
  position: absolute; right: 60px; bottom: -30px;
  width: 140px; height: 140px;
  border-radius: 50%; background: var(--mf-blue); opacity: 0.12; pointer-events: none;
}

.mf-hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border-radius: var(--mf-radius-full);
  padding: 5px 16px; margin-bottom: 18px;
  box-shadow: var(--mf-shadow-sm);
  font-family: var(--mf-font-display); font-weight: 700;
  font-size: 0.78rem; color: var(--mf-green-dark);
}

.mf-hero__title {
  font-family: var(--mf-font-display); font-weight: 900;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--mf-text); line-height: 1.2;
  margin-bottom: 14px; text-wrap: pretty;
}

.mf-hero__desc {
  font-size: 0.95rem; color: var(--mf-text-mid);
  line-height: 1.75; max-width: 420px; margin-bottom: 28px;
}

.mf-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   8. BUTTONS
   ========================================================================== */
.mf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--mf-radius-full);
  font-family: var(--mf-font-display); font-weight: 700; font-size: 0.875rem;
  padding: 11px 24px; border: none; cursor: pointer;
  text-decoration: none; transition: all 0.15s; line-height: 1;
}

.mf-btn--primary  { background: var(--mf-yellow); color: var(--mf-text); }
.mf-btn--primary:hover { background: var(--mf-yellow-dark); color: white; }

.mf-btn--dark     { background: var(--mf-text); color: white; }
.mf-btn--dark:hover { background: oklch(0.30 0.02 60); color: white; }

.mf-btn--secondary {
  background: white; color: var(--mf-text-mid);
  border: 1.5px solid var(--mf-border);
}
.mf-btn--secondary:hover { background: var(--mf-bg-warm); color: var(--mf-text); }

.mf-btn--sm { padding: 8px 18px; font-size: 0.8rem; }
.mf-btn--lg { padding: 14px 32px; font-size: 1rem; }

/* WP submit override */
input[type="submit"], button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--mf-yellow); color: var(--mf-text);
  border-radius: var(--mf-radius-full);
  font-family: var(--mf-font-display); font-weight: 700; font-size: 0.875rem;
  padding: 11px 24px; border: none; cursor: pointer; transition: all 0.15s;
}

input[type="submit"]:hover, button[type="submit"]:hover {
  background: var(--mf-yellow-dark); color: white;
}

/* ==========================================================================
   9. BADGES
   ========================================================================== */
.mf-badge {
  display: inline-block; border-radius: var(--mf-radius-full);
  padding: 4px 12px; font-family: var(--mf-font-display);
  font-weight: 700; font-size: 0.72rem; white-space: nowrap; line-height: 1.6;
  text-decoration: none;
}

.mf-badge--yellow   { background: var(--mf-yellow-light);         color: var(--mf-yellow-dark); }
.mf-badge--blue     { background: var(--mf-blue-light);           color: var(--mf-blue-dark); }
.mf-badge--green    { background: var(--mf-green-light);          color: var(--mf-green-dark); }
.mf-badge--peach    { background: oklch(0.96 0.04 45);            color: var(--mf-peach-dark); }
.mf-badge--lavender { background: oklch(0.95 0.04 295);           color: var(--mf-lavender-dark); }

/* ==========================================================================
   10. CATEGORY BAR
   ========================================================================== */
.mf-cat-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 32px; scrollbar-width: none;
}
.mf-cat-bar::-webkit-scrollbar { display: none; }

.mf-cat-bar__item {
  flex-shrink: 0; padding: 8px 18px; border-radius: var(--mf-radius-full);
  border: none; background: white; color: var(--mf-text-mid);
  font-family: var(--mf-font-display); font-weight: 700; font-size: 0.8rem;
  cursor: pointer; box-shadow: var(--mf-shadow-sm);
  text-decoration: none; transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.mf-cat-bar__item:hover, .mf-cat-bar__item.is-active {
  background: var(--mf-text); color: white;
}

/* ==========================================================================
   11. POST GRID
   ========================================================================== */
.mf-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 40px;
}

@media (max-width: 900px) { .mf-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mf-post-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   12. POST CARD
   ========================================================================== */
.mf-card {
  background: white; border-radius: var(--mf-radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--mf-shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.mf-card:hover { box-shadow: var(--mf-shadow-md); transform: translateY(-3px); }

.mf-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--mf-radius-xl);
}

@media (max-width: 700px) {
  .mf-card--featured { grid-template-columns: 1fr; }
}

.mf-card__thumb {
  overflow: hidden; background: var(--mf-yellow-light); flex-shrink: 0;
}

.mf-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
  aspect-ratio: 16/9;
}

.mf-card--featured .mf-card__thumb img {
  height: 100%; min-height: 280px;
}

.mf-card:hover .mf-card__thumb img { transform: scale(1.05); }

/* Placeholder when no thumbnail */
.mf-card__thumb-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--mf-yellow-light), var(--mf-blue-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}

.mf-card--featured .mf-card__thumb-placeholder {
  aspect-ratio: auto; min-height: 280px; font-size: 4rem;
}

.mf-card__body {
  padding: 18px 20px 16px; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}

.mf-card--featured .mf-card__body {
  padding: 36px 40px 32px;
  justify-content: space-between;
}

.mf-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mf-card__title {
  font-family: var(--mf-font-display); font-weight: 700;
  font-size: 1rem; color: var(--mf-text); line-height: 1.4;
  margin: 0; text-wrap: pretty;
}

.mf-card--featured .mf-card__title {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 800;
}

.mf-card__title a { color: var(--mf-text); text-decoration: none; }
.mf-card__title a:hover { color: var(--mf-yellow-dark); }

.mf-card__excerpt {
  font-size: 0.85rem; color: var(--mf-text-mid);
  line-height: 1.7; flex: 1; margin: 0;
}

.mf-card__footer {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: auto; padding-top: 6px;
}

.mf-card__date { font-size: 0.75rem; color: var(--mf-text-light); }

.mf-card__more {
  font-size: 0.78rem; color: var(--mf-yellow-dark);
  font-family: var(--mf-font-display); font-weight: 600;
  text-decoration: none;
}

.mf-card__more:hover { color: var(--mf-text); }

/* ==========================================================================
   13. ARCHIVE HEADER
   ========================================================================== */
.mf-archive-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--mf-border);
}

.mf-archive-header .page-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 8px;
}

.mf-archive-header .archive-description {
  font-size: 0.9rem;
  color: var(--mf-text-mid);
  line-height: 1.7;
}

/* ==========================================================================
   14. SINGLE POST
   ========================================================================== */
.mf-single-header { margin-bottom: 32px; }

.mf-single-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; color: var(--mf-text-light);
  flex-wrap: wrap; margin-bottom: 14px;
}

.mf-entry-title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900; line-height: 1.2; margin-bottom: 16px;
}

.mf-entry-lead {
  font-size: 1.05rem; color: var(--mf-text-mid);
  line-height: 1.75; border-left: 3px solid var(--mf-yellow);
  padding-left: 16px; margin-bottom: 0;
}

.mf-post-thumbnail {
  border-radius: var(--mf-radius-xl);
  overflow: hidden; margin-block: 32px;
  box-shadow: var(--mf-shadow-md);
}

.mf-post-thumbnail img { width: 100%; height: auto; }

/* Entry content */
.mf-entry-content { font-size: 1rem; line-height: 1.85; color: var(--mf-text-mid); }

.mf-entry-content h2 {
  font-size: 1.4rem; margin-top: 2.5em; margin-bottom: 0.7em;
  padding-bottom: 0.4em; border-bottom: 2px solid var(--mf-yellow);
  color: var(--mf-text);
}

.mf-entry-content h3 {
  font-size: 1.15rem; margin-top: 2em; margin-bottom: 0.5em; color: var(--mf-text);
}

.mf-entry-content ul, .mf-entry-content ol {
  padding-left: 1.5em; margin-bottom: 1.4em;
}

.mf-entry-content li { margin-bottom: 0.45em; }

.mf-entry-content blockquote {
  border-left: 4px solid var(--mf-yellow);
  margin: 2em 0; padding: 16px 24px;
  background: var(--mf-yellow-light);
  border-radius: 0 var(--mf-radius-md) var(--mf-radius-md) 0;
}

.mf-entry-content blockquote p { margin: 0; font-style: normal; }

.mf-entry-content img {
  border-radius: var(--mf-radius-lg);
  box-shadow: var(--mf-shadow-sm);
  cursor: zoom-in;
}

.mf-entry-content a {
  color: var(--mf-yellow-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* TOC */
.mf-toc {
  background: var(--mf-bg-warm); border: 1.5px solid var(--mf-border);
  border-radius: var(--mf-radius-lg); padding: 22px 28px; margin: 2.4em 0;
}

.mf-toc__title {
  font-family: var(--mf-font-display); font-weight: 800; font-size: 0.95rem;
  color: var(--mf-text); margin-bottom: 12px;
}

.mf-toc ol { padding-left: 1.2em; margin: 0; }
.mf-toc li { margin-bottom: 5px; font-size: 0.875rem; }
.mf-toc a { color: var(--mf-text-mid); text-decoration: none; }
.mf-toc a:hover { color: var(--mf-yellow-dark); }

/* Tags */
.mf-entry-tags {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--mf-border);
}

.mf-entry-tags a {
  padding: 5px 14px; border-radius: var(--mf-radius-full);
  border: 1.5px solid var(--mf-border);
  font-size: 0.78rem; color: var(--mf-text-mid);
  text-decoration: none; transition: all 0.15s;
}

.mf-entry-tags a:hover {
  background: var(--mf-yellow-light);
  border-color: var(--mf-yellow); color: var(--mf-text);
}

/* Post navigation */
.mf-post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px;
}

@media (max-width: 560px) { .mf-post-nav { grid-template-columns: 1fr; } }

.mf-post-nav__item {
  display: block; background: white; border-radius: var(--mf-radius-lg);
  padding: 18px 22px; border: 1.5px solid var(--mf-border);
  text-decoration: none; transition: all 0.15s;
}

.mf-post-nav__item:hover {
  border-color: var(--mf-yellow); box-shadow: var(--mf-shadow-sm); color: inherit;
}

.mf-post-nav__item--next { text-align: right; }

.mf-post-nav__label {
  font-size: 0.72rem; color: var(--mf-text-light);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}

.mf-post-nav__title {
  font-family: var(--mf-font-display); font-weight: 700;
  font-size: 0.9rem; color: var(--mf-text); line-height: 1.4;
}

/* Related posts */
.mf-related { margin-top: 60px; padding-top: 36px; border-top: 1px solid var(--mf-border); }

.mf-related__title {
  font-family: var(--mf-font-display); font-weight: 800; font-size: 1.25rem;
  color: var(--mf-text); margin-bottom: 22px;
}

.mf-related__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}

@media (max-width: 700px) { .mf-related__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   15. BREADCRUMB
   ========================================================================== */
.mf-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--mf-text-light); margin-bottom: 22px;
}

.mf-breadcrumb a { color: var(--mf-text-light); text-decoration: none; }
.mf-breadcrumb a:hover { color: var(--mf-yellow-dark); }
.mf-breadcrumb .sep { color: var(--mf-border); }

/* ==========================================================================
   16. SIDEBAR
   ========================================================================== */
.mf-sidebar { display: flex; flex-direction: column; gap: 24px; }

.mf-widget {
  background: white; border-radius: var(--mf-radius-lg);
  padding: 24px; box-shadow: var(--mf-shadow-sm);
}

.mf-widget__title {
  font-family: var(--mf-font-display); font-weight: 800; font-size: 0.95rem;
  color: var(--mf-text); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--mf-yellow);
}

.mf-widget-newsletter {
  background: linear-gradient(135deg, var(--mf-yellow-light), var(--mf-yellow)) !important;
  text-align: center;
}

.mf-widget-newsletter .mf-widget__title { border-bottom-color: oklch(0.80 0.12 82); }

.mf-widget-newsletter p {
  font-size: 0.85rem; color: var(--mf-text-mid); margin-bottom: 16px; line-height: 1.6;
}

.mf-widget input[type="email"] {
  width: 100%; padding: 10px 16px; border-radius: var(--mf-radius-full);
  border: 1.5px solid var(--mf-border); font-family: var(--mf-font-body);
  font-size: 0.85rem; margin-bottom: 10px; outline: none;
  transition: border-color 0.15s;
}

.mf-widget input[type="email"]:focus { border-color: var(--mf-yellow-dark); }

/* Category list */
.mf-cat-list { list-style: none; padding: 0; margin: 0; }

.mf-cat-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--mf-border);
}

.mf-cat-list li:last-child { border-bottom: none; }

.mf-cat-list a {
  font-size: 0.875rem; color: var(--mf-text-mid);
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}

.mf-cat-list a::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--mf-yellow);
}

.mf-cat-list .count { font-size: 0.72rem; color: var(--mf-text-light); }

/* Tag cloud */
.mf-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.mf-tag-cloud a {
  padding: 5px 12px; border-radius: var(--mf-radius-full);
  border: 1.5px solid var(--mf-border);
  font-size: 0.78rem; color: var(--mf-text-mid); text-decoration: none;
  background: white; transition: all 0.15s;
}

.mf-tag-cloud a:hover {
  background: var(--mf-yellow-light);
  border-color: var(--mf-yellow); color: var(--mf-text);
}

/* Recent posts */
.mf-recent-list { list-style: none; padding: 0; margin: 0; }

.mf-recent-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--mf-border);
}

.mf-recent-list li:last-child { border-bottom: none; }

.mf-recent-list__num {
  font-family: var(--mf-font-display); font-weight: 800;
  font-size: 1.2rem; color: var(--mf-yellow-dark); min-width: 30px; line-height: 1;
}

.mf-recent-list a {
  font-size: 0.85rem; color: var(--mf-text); font-weight: 500;
  line-height: 1.45; text-decoration: none;
  display: block; margin-top: 4px;
}

.mf-recent-list a:hover { color: var(--mf-yellow-dark); }

/* ==========================================================================
   17. FORMS (search, comment)
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%; padding: 11px 16px;
  border-radius: var(--mf-radius-full);
  border: 1.5px solid var(--mf-border);
  font-family: var(--mf-font-body); font-size: 0.875rem;
  color: var(--mf-text); background: white; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  border-radius: var(--mf-radius-lg); resize: vertical; min-height: 120px;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--mf-yellow);
  box-shadow: 0 0 0 3px oklch(0.87 0.13 82 / 0.22);
}

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] { flex: 1; }
.search-form input[type="submit"] { flex-shrink: 0; }

/* Comment form */
#respond {
  background: white; border-radius: var(--mf-radius-xl);
  padding: 32px; margin-top: 48px; box-shadow: var(--mf-shadow-sm);
}

#reply-title {
  font-family: var(--mf-font-display); font-size: 1.15rem;
  font-weight: 800; color: var(--mf-text); margin-bottom: 20px;
}

.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-size: 0.8rem; margin-bottom: 5px; color: var(--mf-text-mid); }

/* ==========================================================================
   18. COMMENTS
   ========================================================================== */
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }

.comment-list .comment-body {
  background: white; border-radius: var(--mf-radius-lg);
  padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--mf-shadow-sm);
}

.comment-list .comment-author .fn {
  font-family: var(--mf-font-display); font-weight: 700; font-size: 0.9rem;
}

.comment-list .comment-metadata {
  font-size: 0.72rem; color: var(--mf-text-light); margin-bottom: 10px;
}

.comment-list .comment-metadata a { color: var(--mf-text-light); }

.comment-list .comment-content p {
  font-size: 0.9rem; color: var(--mf-text-mid); line-height: 1.7; margin: 0;
}

/* ==========================================================================
   19. PAGINATION
   ========================================================================== */
.mf-pagination {
  display: flex; justify-content: center;
  gap: 8px; margin: 40px 0; flex-wrap: wrap;
}

.mf-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--mf-radius-full);
  font-family: var(--mf-font-display); font-weight: 700; font-size: 0.875rem;
  text-decoration: none; transition: all 0.15s;
  background: white; color: var(--mf-text-mid); box-shadow: var(--mf-shadow-sm);
}

.mf-pagination .page-numbers:hover,
.mf-pagination .page-numbers.current {
  background: var(--mf-text); color: white; box-shadow: none;
}

.mf-pagination .page-numbers.dots {
  background: transparent; box-shadow: none; color: var(--mf-text-light);
}

/* ==========================================================================
   20. FOOTER
   ========================================================================== */
.mf-site-footer {
  background: var(--mf-text); color: white; margin-top: 80px;
}

.mf-footer-main {
  padding: 48px 0 36px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px;
}

@media (max-width: 700px) { .mf-footer-main { grid-template-columns: 1fr; gap: 28px; } }

.mf-footer-brand__logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; text-decoration: none;
}

.mf-footer-brand__name {
  font-family: var(--mf-font-display); font-weight: 800;
  font-size: 1.15rem; color: white; line-height: 1;
}

.mf-footer-brand__name span { color: var(--mf-yellow); }

.mf-footer-brand__desc {
  font-size: 0.85rem; color: oklch(0.65 0.02 60);
  line-height: 1.7; margin: 0;
}

.mf-footer-col__title {
  font-family: var(--mf-font-display); font-weight: 700;
  font-size: 0.85rem; color: white; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.mf-footer-col ul { list-style: none; padding: 0; margin: 0; }

.mf-footer-col li { margin-bottom: 8px; }

.mf-footer-col a {
  font-size: 0.85rem; color: oklch(0.65 0.02 60); text-decoration: none;
  transition: color 0.15s;
}

.mf-footer-col a:hover { color: var(--mf-yellow); }

.mf-footer-bottom {
  border-top: 1px solid oklch(0.30 0.02 60);
  padding: 16px 0; text-align: center;
  font-size: 0.75rem; color: oklch(0.50 0.02 60);
}

/* ==========================================================================
   21. BACK TO TOP
   ========================================================================== */
.mf-back-to-top {
  position: fixed; bottom: 26px; right: 26px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--mf-text); color: white; border: none;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--mf-shadow-md); transition: all 0.2s;
  opacity: 0; pointer-events: none; z-index: 90;
}

.mf-back-to-top.is-visible { opacity: 1; pointer-events: auto; }
.mf-back-to-top:hover { background: var(--mf-yellow-dark); transform: translateY(-3px); }

/* ==========================================================================
   22. 404 & EMPTY STATES
   ========================================================================== */
.mf-empty-state {
  text-align: center; padding: 80px 20px;
}

.mf-empty-state__icon { font-size: 3.5rem; margin-bottom: 16px; }

.mf-empty-state h1 {
  font-size: 1.6rem; margin-bottom: 10px;
}

.mf-empty-state p {
  color: var(--mf-text-mid); margin-bottom: 24px; max-width: 400px; margin-inline: auto;
}

/* ==========================================================================
   23. WP CORE HELPERS
   ========================================================================== */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.alignleft  { float: left; margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter, .wp-block-image.aligncenter { display: block; margin-inline: auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--mf-text-light); text-align: center; margin-top: 6px; }

.sticky { /* WP sticky post — no special style needed */ }

/* Gutenberg block basics */
.wp-block-quote {
  border-left: 4px solid var(--mf-yellow);
  margin: 2em 0; padding: 16px 24px;
  background: var(--mf-yellow-light);
  border-radius: 0 var(--mf-radius-md) var(--mf-radius-md) 0;
}

.wp-block-code, pre {
  background: oklch(0.15 0.02 60); color: oklch(0.90 0.02 80);
  padding: 20px 24px; border-radius: var(--mf-radius-md);
  font-size: 0.875rem; overflow-x: auto; line-height: 1.6;
}

.wp-block-table table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}

.wp-block-table th, .wp-block-table td {
  padding: 10px 14px; border: 1px solid var(--mf-border); text-align: left;
}

.wp-block-table th { background: var(--mf-bg-warm); font-weight: 700; color: var(--mf-text); }

/* ==========================================================================
   24. RESPONSIVE HELPERS
   ========================================================================== */
@media (max-width: 768px) {
  .mf-hero { border-radius: var(--mf-radius-lg); }
  .mf-footer-main { padding: 36px 0 28px; }
}
.mf-layout > * { min-width: 0; }
