/*
Theme Name: Maks Bylica
Theme URI: https://maksbylica.com
Author: MaksBylica
Author URI: https://maksbylica.com
Description: Revue intellectuelle des sciences humaines appliquées. Formation, psychologie, management et dynamiques sociales. Comprendre l'humain pour mieux réussir.
Version: 1.3.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: maksbylica
Tags: blog, education, lifestyle, custom-logo, custom-menu, featured-images, light-mode

Maks Bylica - L'intelligence sociale au service de votre réussite.
*/

/* ================================
   DESIGN TOKENS - EDITORIAL PALETTE
   ================================ */
:root {
    /* Primary Colors - Sophisticated Blue */
    --mb-primary: #1e3a5f;
    --mb-primary-dark: #152a45;
    --mb-primary-light: #2d4a6f;
    
    /* Accent - Antique Gold */
    --mb-accent: #b8860b;
    --mb-accent-light: #d4a84b;
    --mb-accent-muted: rgba(184, 134, 11, 0.15);
    
    /* Neutral Warm */
    --mb-cream: #fdfbf7;
    --mb-warm-white: #f8f6f1;
    --mb-warm-gray: #e8e4dc;
    --mb-paper: #fffef9;
    
    /* Text Colors */
    --mb-text-primary: #1f2937;
    --mb-text-secondary: #4b5563;
    --mb-text-muted: #6b7280;
    --mb-text-light: #9ca3af;
    
    /* Surfaces */
    --mb-surface: #ffffff;
    --mb-surface-elevated: #ffffff;
    --mb-border: #e5e2db;
    --mb-border-light: #f0ede6;
    
    /* Shadows - Soft and Natural */
    --mb-shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.04);
    --mb-shadow-md: 0 4px 12px rgba(31, 41, 55, 0.06);
    --mb-shadow-lg: 0 12px 32px rgba(31, 41, 55, 0.08);
    --mb-shadow-xl: 0 24px 48px rgba(31, 41, 55, 0.1);
    
    /* Typography */
    --mb-font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --mb-font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing Scale */
    --mb-space-xs: 4px;
    --mb-space-sm: 8px;
    --mb-space-md: 16px;
    --mb-space-lg: 24px;
    --mb-space-xl: 32px;
    --mb-space-2xl: 48px;
    --mb-space-3xl: 64px;
    --mb-space-4xl: 96px;
    
    /* Layout */
    --mb-container-sm: 720px;
    --mb-container-md: 960px;
    --mb-container-lg: 1200px;
    --mb-container-xl: 1400px;
    
    /* Border Radius */
    --mb-radius-sm: 4px;
    --mb-radius-md: 8px;
    --mb-radius-lg: 12px;
    --mb-radius-xl: 16px;
    
    /* Transitions */
    --mb-transition-fast: 150ms ease;
    --mb-transition-base: 250ms ease;
    --mb-transition-slow: 400ms ease;
}

/* ================================
   RESET & BASE STYLES
   ================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

body {
    font-family: var(--mb-font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--mb-text-primary);
    background-color: var(--mb-cream);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--mb-primary);
    text-decoration: none;
    transition: color var(--mb-transition-fast);
}

a:hover {
    color: var(--mb-accent);
}

/* ================================
   TYPOGRAPHY SYSTEM
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--mb-font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--mb-text-primary);
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
    font-family: var(--mb-font-sans);
    font-weight: 600;
}

p {
    margin-bottom: 1.5em;
}

p:last-child {
    margin-bottom: 0;
}

/* Lead text */
.mb-lead {
    font-size: 1.25rem;
    color: var(--mb-text-secondary);
    line-height: 1.8;
}

/* Small caps for labels */
.mb-label {
    font-family: var(--mb-font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mb-text-muted);
}

/* Accent text */
.mb-accent-text {
    color: var(--mb-accent);
}

/* ================================
   LAYOUT UTILITIES
   ================================ */
.mb-container {
    width: 100%;
    max-width: var(--mb-container-lg);
    margin: 0 auto;
    padding: 0 var(--mb-space-lg);
}

.mb-container--narrow {
    max-width: var(--mb-container-sm);
}

.mb-container--wide {
    max-width: var(--mb-container-xl);
}

.mb-section {
    padding: var(--mb-space-4xl) 0;
}

.mb-section--compact {
    padding: var(--mb-space-3xl) 0;
}

/* ================================
   HEADER NAVIGATION
   ================================ */
.mb-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--mb-border-light);
    transition: all var(--mb-transition-base);
}

.mb-header--scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--mb-shadow-sm);
}

.mb-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: var(--mb-container-xl);
    margin: 0 auto;
    padding: 0 var(--mb-space-lg);
}

/* Logo */
.mb-logo {
    display: flex;
    align-items: center;
    gap: var(--mb-space-sm);
}

.mb-logo__mark {
    width: 44px;
    height: 44px;
    background: var(--mb-primary);
    border-radius: var(--mb-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--mb-transition-base);
}

.mb-logo:hover .mb-logo__mark {
    transform: scale(1.05);
}

.mb-logo__text {
    font-family: var(--mb-font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--mb-text-primary);
    letter-spacing: -0.02em;
}

/* Navigation */
.mb-nav {
    display: flex;
    align-items: center;
    gap: var(--mb-space-xl);
}

.mb-nav__list {
    display: flex;
    align-items: center;
    gap: var(--mb-space-md);
    list-style: none;
}

.mb-nav__link {
    display: block;
    padding: var(--mb-space-sm) var(--mb-space-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mb-text-secondary);
    border-radius: var(--mb-radius-sm);
    transition: all var(--mb-transition-fast);
}

.mb-nav__link:hover {
    color: var(--mb-primary);
    background: var(--mb-warm-gray);
}

.mb-nav__link--active {
    color: var(--mb-primary);
    background: rgba(30, 58, 95, 0.08);
}

/* Mobile menu toggle */
.mb-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.mb-menu-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--mb-text-primary);
    margin: 5px auto;
    transition: all var(--mb-transition-fast);
}

/* ================================
   BUTTONS
   ================================ */
.mb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mb-space-sm);
    padding: 14px 28px;
    font-family: var(--mb-font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--mb-radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--mb-transition-base);
    text-decoration: none;
}

.mb-btn--primary {
    background: var(--mb-primary);
    color: #ffffff;
}

.mb-btn--primary:hover {
    background: var(--mb-primary-dark);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--mb-shadow-lg);
}

.mb-btn--secondary {
    background: transparent;
    color: var(--mb-text-primary);
    border: 2px solid var(--mb-border);
}

.mb-btn--secondary:hover {
    border-color: var(--mb-primary);
    color: var(--mb-primary);
}

.mb-btn--accent {
    background: var(--mb-accent);
    color: #ffffff;
}

.mb-btn--accent:hover {
    background: var(--mb-accent-light);
    color: #ffffff;
}

.mb-btn--sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

.mb-btn--lg {
    padding: 18px 36px;
    font-size: 1rem;
}

/* ================================
   CARDS - ARTICLE DISPLAY
   ================================ */
.mb-card {
    background: var(--mb-surface);
    border-radius: var(--mb-radius-lg);
    overflow: hidden;
    transition: all var(--mb-transition-base);
    border: 1px solid var(--mb-border-light);
}

.mb-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mb-shadow-xl);
    border-color: transparent;
}

.mb-card__image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.mb-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--mb-transition-slow);
}

.mb-card:hover .mb-card__image img {
    transform: scale(1.05);
}

.mb-card__content {
    padding: var(--mb-space-lg);
}

.mb-card__meta {
    display: flex;
    align-items: center;
    gap: var(--mb-space-md);
    margin-bottom: var(--mb-space-sm);
}

.mb-card__category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mb-accent);
}

.mb-card__date {
    font-size: 0.8125rem;
    color: var(--mb-text-muted);
}

.mb-card__title {
    font-family: var(--mb-font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--mb-text-primary);
    margin-bottom: var(--mb-space-sm);
    transition: color var(--mb-transition-fast);
}

.mb-card:hover .mb-card__title {
    color: var(--mb-primary);
}

.mb-card__excerpt {
    font-size: 0.9375rem;
    color: var(--mb-text-secondary);
    line-height: 1.65;
}

.mb-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--mb-space-md);
    margin-top: var(--mb-space-md);
    border-top: 1px solid var(--mb-border-light);
}

.mb-card__reading-time {
    font-size: 0.8125rem;
    color: var(--mb-text-muted);
}

.mb-card__link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--mb-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mb-card__link svg {
    transition: transform var(--mb-transition-fast);
}

.mb-card__link:hover svg {
    transform: translateX(4px);
}

/* Featured Card - Large */
.mb-card--featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
}

.mb-card--featured .mb-card__image {
    aspect-ratio: auto;
    min-height: 400px;
}

.mb-card--featured .mb-card__content {
    padding: var(--mb-space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mb-card--featured .mb-card__title {
    font-size: 1.75rem;
}

/* ================================
   HERO SECTION
   ================================ */
.mb-hero {
    padding: 160px 0 var(--mb-space-4xl);
    background: linear-gradient(180deg, var(--mb-warm-white) 0%, var(--mb-cream) 100%);
    position: relative;
    overflow: hidden;
}

.mb-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(184, 134, 11, 0.03) 100%);
    pointer-events: none;
}

.mb-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mb-space-3xl);
    align-items: center;
    position: relative;
}

.mb-hero__content {
    max-width: 560px;
}

.mb-hero__label {
    display: inline-block;
    padding: var(--mb-space-sm) var(--mb-space-md);
    background: var(--mb-accent-muted);
    color: var(--mb-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--mb-radius-sm);
    margin-bottom: var(--mb-space-lg);
}

.mb-hero__title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--mb-text-primary);
    margin-bottom: var(--mb-space-lg);
}

.mb-hero__title span {
    color: var(--mb-primary);
}

.mb-hero__description {
    font-size: 1.1875rem;
    color: var(--mb-text-secondary);
    line-height: 1.75;
    margin-bottom: var(--mb-space-xl);
}

.mb-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mb-space-md);
}

.mb-hero__visual {
    position: relative;
}

.mb-hero__image {
    border-radius: var(--mb-radius-xl);
    overflow: hidden;
    box-shadow: var(--mb-shadow-xl);
}

.mb-hero__image img {
    width: 100%;
    height: auto;
}

.mb-hero__float-card {
    position: absolute;
    bottom: -24px;
    left: -32px;
    background: var(--mb-surface);
    padding: var(--mb-space-lg);
    border-radius: var(--mb-radius-lg);
    box-shadow: var(--mb-shadow-lg);
    max-width: 280px;
}

.mb-hero__float-stat {
    font-family: var(--mb-font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mb-primary);
    line-height: 1;
}

.mb-hero__float-label {
    font-size: 0.875rem;
    color: var(--mb-text-muted);
    margin-top: var(--mb-space-xs);
}

/* ================================
   ARTICLE GRID LAYOUTS
   ================================ */
.mb-articles-grid {
    display: grid;
    gap: var(--mb-space-xl);
}

.mb-articles-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.mb-articles-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.mb-articles-grid--featured {
    grid-template-columns: 1.5fr 1fr;
}

/* ================================
   SECTION HEADERS
   ================================ */
.mb-section-header {
    margin-bottom: var(--mb-space-2xl);
}

.mb-section-header--center {
    text-align: center;
}

.mb-section-header__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mb-accent);
    margin-bottom: var(--mb-space-sm);
}

.mb-section-header__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--mb-space-sm);
}

.mb-section-header__description {
    font-size: 1.0625rem;
    color: var(--mb-text-secondary);
    max-width: 600px;
}

.mb-section-header--center .mb-section-header__description {
    margin: 0 auto;
}

.mb-section-header__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--mb-space-md);
}

/* ================================
   CATEGORY NAVIGATION
   ================================ */
.mb-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mb-space-sm);
}

.mb-category-tag {
    padding: var(--mb-space-sm) var(--mb-space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mb-text-secondary);
    background: var(--mb-warm-gray);
    border-radius: var(--mb-radius-md);
    transition: all var(--mb-transition-fast);
}

.mb-category-tag:hover,
.mb-category-tag--active {
    background: var(--mb-primary);
    color: #ffffff;
}

/* ================================
   NEWSLETTER SECTION
   ================================ */
.mb-newsletter {
    background: var(--mb-primary);
    padding: var(--mb-space-4xl) 0;
    position: relative;
    overflow: hidden;
}

.mb-newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.mb-newsletter__inner {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.mb-newsletter__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #ffffff;
    margin-bottom: var(--mb-space-md);
}

.mb-newsletter__description {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--mb-space-xl);
}

.mb-newsletter__form {
    display: flex;
    gap: var(--mb-space-sm);
    max-width: 480px;
    margin: 0 auto var(--mb-space-lg);
}

.mb-newsletter__input {
    flex: 1;
    padding: 16px 20px;
    font-family: var(--mb-font-sans);
    font-size: 1rem;
    color: var(--mb-text-primary);
    background: #ffffff;
    border: none;
    border-radius: var(--mb-radius-md);
    outline: none;
}

.mb-newsletter__input::placeholder {
    color: var(--mb-text-muted);
}

.mb-newsletter__submit {
    padding: 16px 28px;
    font-family: var(--mb-font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mb-primary);
    background: var(--mb-accent);
    border: none;
    border-radius: var(--mb-radius-md);
    cursor: pointer;
    transition: all var(--mb-transition-base);
    white-space: nowrap;
}

.mb-newsletter__submit:hover {
    background: var(--mb-accent-light);
    transform: translateY(-2px);
}

.mb-newsletter__trust {
    display: flex;
    justify-content: center;
    gap: var(--mb-space-lg);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

.mb-newsletter__trust span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ================================
   FOOTER
   ================================ */
.mb-footer {
    background: var(--mb-warm-white);
    border-top: 1px solid var(--mb-border);
    padding: var(--mb-space-3xl) 0 var(--mb-space-xl);
}

.mb-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--mb-space-2xl);
    margin-bottom: var(--mb-space-2xl);
}

.mb-footer__brand {
    max-width: 300px;
}

.mb-footer__tagline {
    font-size: 0.9375rem;
    color: var(--mb-text-secondary);
    margin-top: var(--mb-space-md);
    line-height: 1.7;
}

.mb-footer__column-title {
    font-family: var(--mb-font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mb-text-primary);
    margin-bottom: var(--mb-space-md);
}

.mb-footer__links {
    list-style: none;
}

.mb-footer__links li {
    margin-bottom: var(--mb-space-sm);
}

.mb-footer__links a {
    font-size: 0.9375rem;
    color: var(--mb-text-secondary);
    transition: color var(--mb-transition-fast);
}

.mb-footer__links a:hover {
    color: var(--mb-primary);
}

.mb-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--mb-space-xl);
    border-top: 1px solid var(--mb-border);
    font-size: 0.875rem;
    color: var(--mb-text-muted);
}

.mb-footer__social {
    display: flex;
    gap: var(--mb-space-md);
}

.mb-footer__social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mb-warm-gray);
    border-radius: var(--mb-radius-sm);
    color: var(--mb-text-secondary);
    transition: all var(--mb-transition-fast);
}

.mb-footer__social a:hover {
    background: var(--mb-primary);
    color: #ffffff;
}

/* ================================
   SINGLE POST
   ================================ */
.mb-post {
    padding-top: 120px;
}

.mb-post__header {
    max-width: var(--mb-container-sm);
    margin: 0 auto var(--mb-space-2xl);
    text-align: center;
    padding: 0 var(--mb-space-lg);
}

.mb-post__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mb-accent);
    margin-bottom: var(--mb-space-md);
}

.mb-post__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--mb-space-lg);
}

.mb-post__meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--mb-space-lg);
    font-size: 0.9375rem;
    color: var(--mb-text-muted);
}

.mb-post__featured-image {
    max-width: var(--mb-container-md);
    margin: 0 auto var(--mb-space-2xl);
    padding: 0 var(--mb-space-lg);
}

.mb-post__featured-image img {
    width: 100%;
    border-radius: var(--mb-radius-xl);
    box-shadow: var(--mb-shadow-lg);
}

.mb-post__content {
    max-width: var(--mb-container-sm);
    margin: 0 auto;
    padding: 0 var(--mb-space-lg);
}

.mb-post__content p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--mb-text-secondary);
}

.mb-post__content h2 {
    margin-top: var(--mb-space-2xl);
    margin-bottom: var(--mb-space-md);
}

.mb-post__content h3 {
    margin-top: var(--mb-space-xl);
    margin-bottom: var(--mb-space-sm);
}

.mb-post__content blockquote {
    margin: var(--mb-space-xl) 0;
    padding: var(--mb-space-lg) var(--mb-space-xl);
    background: var(--mb-warm-white);
    border-left: 4px solid var(--mb-accent);
    font-family: var(--mb-font-serif);
    font-size: 1.1875rem;
    font-style: italic;
    color: var(--mb-text-primary);
}

.mb-post__content ul,
.mb-post__content ol {
    margin: var(--mb-space-lg) 0;
    padding-left: var(--mb-space-xl);
}

.mb-post__content li {
    margin-bottom: var(--mb-space-sm);
    color: var(--mb-text-secondary);
}

/* ================================
   ARCHIVE / CATEGORY PAGE
   ================================ */
.mb-archive {
    padding-top: 120px;
}

.mb-archive__header {
    background: var(--mb-warm-white);
    padding: var(--mb-space-3xl) 0;
    margin-bottom: var(--mb-space-2xl);
}

.mb-archive__title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--mb-space-sm);
}

.mb-archive__description {
    font-size: 1.0625rem;
    color: var(--mb-text-secondary);
    max-width: 600px;
}

.mb-archive__count {
    font-size: 0.875rem;
    color: var(--mb-text-muted);
    margin-top: var(--mb-space-md);
}

/* ================================
   404 PAGE
   ================================ */
.mb-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--mb-space-2xl);
}

.mb-404__code {
    font-family: var(--mb-font-serif);
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 700;
    color: var(--mb-border);
    line-height: 1;
}

.mb-404__title {
    font-size: 1.5rem;
    margin-bottom: var(--mb-space-md);
}

.mb-404__description {
    color: var(--mb-text-secondary);
    margin-bottom: var(--mb-space-xl);
}

/* ================================
   PAGINATION
   ================================ */
.mb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--mb-space-sm);
    padding: var(--mb-space-2xl) 0;
}

.mb-pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--mb-space-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--mb-text-secondary);
    background: var(--mb-surface);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius-md);
    transition: all var(--mb-transition-fast);
}

.mb-pagination__link:hover {
    border-color: var(--mb-primary);
    color: var(--mb-primary);
}

.mb-pagination__link--current {
    background: var(--mb-primary);
    border-color: var(--mb-primary);
    color: #ffffff;
}

/* ================================
   SEARCH PAGE
   ================================ */
.mb-search-form {
    display: flex;
    gap: var(--mb-space-sm);
    max-width: 600px;
}

.mb-search-form__input {
    flex: 1;
    padding: 14px 20px;
    font-family: var(--mb-font-sans);
    font-size: 1rem;
    color: var(--mb-text-primary);
    background: var(--mb-surface);
    border: 2px solid var(--mb-border);
    border-radius: var(--mb-radius-md);
    outline: none;
    transition: border-color var(--mb-transition-fast);
}

.mb-search-form__input:focus {
    border-color: var(--mb-primary);
}

/* ================================
   STATISTICS BAR
   ================================ */
.mb-stats-bar {
    background: var(--mb-surface);
    border-top: 1px solid var(--mb-border-light);
    border-bottom: 1px solid var(--mb-border-light);
    padding: var(--mb-space-xl) 0;
}

.mb-stats-bar__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--mb-space-xl);
    text-align: center;
}

.mb-stats-bar__item {
    padding: 0 var(--mb-space-md);
}

.mb-stats-bar__number {
    font-family: var(--mb-font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mb-primary);
    line-height: 1;
    margin-bottom: var(--mb-space-xs);
}

.mb-stats-bar__label {
    font-size: 0.875rem;
    color: var(--mb-text-muted);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .mb-hero__inner {
        grid-template-columns: 1fr;
        gap: var(--mb-space-2xl);
    }
    
    .mb-hero__visual {
        order: -1;
    }
    
    .mb-hero__float-card {
        display: none;
    }
    
    .mb-articles-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mb-card--featured {
        grid-template-columns: 1fr;
    }
    
    .mb-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mb-stats-bar__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--mb-space-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --mb-space-4xl: 64px;
        --mb-space-3xl: 48px;
    }
    
    .mb-header__inner {
        height: 70px;
    }
    
    .mb-nav__list {
        display: none;
    }
    
    .mb-menu-toggle {
        display: block;
    }
    
    .mb-hero {
        padding: 120px 0 var(--mb-space-3xl);
    }
    
    .mb-hero__actions {
        flex-direction: column;
    }
    
    .mb-hero__actions .mb-btn {
        width: 100%;
    }
    
    .mb-articles-grid--3,
    .mb-articles-grid--2 {
        grid-template-columns: 1fr;
    }
    
    .mb-newsletter__form {
        flex-direction: column;
    }
    
    .mb-newsletter__trust {
        flex-direction: column;
        gap: var(--mb-space-sm);
    }
    
    .mb-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--mb-space-xl);
    }
    
    .mb-footer__bottom {
        flex-direction: column;
        gap: var(--mb-space-md);
        text-align: center;
    }
    
    .mb-stats-bar__inner {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mb-stats-bar__number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .mb-container {
        padding: 0 var(--mb-space-md);
    }
    
    .mb-card__content {
        padding: var(--mb-space-md);
    }
    
    .mb-post__meta {
        flex-direction: column;
        gap: var(--mb-space-sm);
    }
}

/* ================================
   UTILITY CLASSES
   ================================ */
.mb-text-center { text-align: center; }
.mb-text-left { text-align: left; }
.mb-text-right { text-align: right; }

.mb-hidden { display: none; }
.mb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mb-mt-0 { margin-top: 0; }
.mb-mb-0 { margin-bottom: 0; }
.mb-mt-lg { margin-top: var(--mb-space-lg); }
.mb-mb-lg { margin-bottom: var(--mb-space-lg); }
.mb-mt-xl { margin-top: var(--mb-space-xl); }
.mb-mb-xl { margin-bottom: var(--mb-space-xl); }

/* ================================
   NEWSLETTER MESSAGES
   ================================ */
.mb-newsletter__message {
    display: none;
    margin-top: var(--mb-space-md);
    padding: var(--mb-space-sm) var(--mb-space-md);
    border-radius: var(--mb-radius-md);
    text-align: center;
    font-size: 0.875rem;
}

.mb-newsletter__message--success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.mb-newsletter__message--error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================================
   POST FOOTER STYLES (replaced inline)
   ================================ */
.mb-post__breadcrumbs {
    max-width: var(--mb-container-sm);
    margin: 0 auto;
    padding: var(--mb-space-lg) var(--mb-space-lg) 0;
}

.mb-post__footer {
    max-width: var(--mb-container-sm);
    margin: var(--mb-space-2xl) auto 0;
    padding: 0 var(--mb-space-lg);
}

.mb-post__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mb-space-sm);
    margin-bottom: var(--mb-space-xl);
}

.mb-post__share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mb-space-lg) 0;
    border-top: 1px solid var(--mb-border);
    border-bottom: 1px solid var(--mb-border);
}

.mb-post__share-label {
    font-weight: 600;
    color: var(--mb-text-primary);
}

.mb-post__share-buttons {
    display: flex;
    gap: var(--mb-space-sm);
}

/* ================================
   SEARCH STYLES (replaced inline)
   ================================ */
.mb-section--search {
    padding-top: 140px;
}

.mb-search__breadcrumbs {
    margin-bottom: var(--mb-space-lg);
}

.mb-search__query {
    color: var(--mb-accent);
}

.mb-search__form-wrapper {
    max-width: 600px;
    margin: var(--mb-space-xl) 0 var(--mb-space-2xl);
}

.mb-search__no-results {
    padding: var(--mb-space-2xl) 0;
    text-align: center;
}

.mb-search__no-results-text {
    color: var(--mb-text-secondary);
    margin-bottom: var(--mb-space-xl);
}

/* ================================
   ARCHIVE STYLES (replaced inline)
   ================================ */
.mb-archive__no-results {
    padding: var(--mb-space-4xl) 0;
    text-align: center;
}

.mb-archive__no-results h2 {
    margin-bottom: var(--mb-space-md);
}

.mb-archive__no-results p {
    color: var(--mb-text-secondary);
    margin-bottom: var(--mb-space-xl);
}

/* ================================
   RELATED SECTION
   ================================ */
.mb-section--related {
    background: var(--mb-warm-white);
}

/* ================================
   READING PROGRESS BAR
   ================================ */
.mb-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1001;
    background: transparent;
}

.mb-reading-progress__bar {
    height: 100%;
    width: 0%;
    background: var(--mb-accent);
    transition: width 50ms ease-out;
}

/* ================================
   SCREEN READER ONLY (accessibility)
   ================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ================================
   SECTION VARIANTS
   ================================ */
.mb-section--alt {
    background: var(--mb-warm-white);
}

.mb-section--compact {
    padding: var(--mb-space-2xl) 0;
}

.mb-about-text {
    text-align: center;
    margin-top: var(--mb-space-xl);
}

.mb-about-text p {
    color: var(--mb-text-secondary);
    margin-top: var(--mb-space-lg);
}

.mb-about-text .mb-lead {
    color: var(--mb-text-primary);
}

.mb-about-cta {
    margin-top: var(--mb-space-xl);
}

/* ================================
   ARTICLES GRID SPACING FIX
   ================================ */
.mb-articles-grid {
    margin-top: var(--mb-space-xl);
}

.mb-section-header__actions + .mb-articles-grid {
    margin-top: var(--mb-space-xl);
}

/* ================================
   MOBILE NAVIGATION OVERLAY
   ================================ */
.mb-mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(253, 251, 247, 0.98);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--mb-transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-mobile-nav--open {
    opacity: 1;
    visibility: visible;
}

.mb-mobile-nav__inner {
    text-align: center;
}

.mb-mobile-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mb-mobile-nav__list li {
    margin-bottom: var(--mb-space-lg);
}

.mb-mobile-nav__link {
    font-family: var(--mb-font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--mb-text-primary);
    transition: color var(--mb-transition-fast);
}

.mb-mobile-nav__link:hover {
    color: var(--mb-accent);
}

/* Mobile menu toggle animation */
.mb-menu-toggle--active .mb-menu-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mb-menu-toggle--active .mb-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.mb-menu-toggle--active .mb-menu-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Body overflow when nav open */
body.mb-nav-open {
    overflow: hidden;
}

/* ================================
   BREADCRUMBS
   ================================ */
.mb-breadcrumbs {
    margin-bottom: var(--mb-space-lg);
}

.mb-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--mb-space-sm);
    list-style: none;
    padding: 0;
    margin: 0;
}

.mb-breadcrumbs li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--mb-text-muted);
}

.mb-breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: var(--mb-space-sm);
    color: var(--mb-border);
}

.mb-breadcrumbs a {
    color: var(--mb-text-muted);
    transition: color var(--mb-transition-fast);
}

.mb-breadcrumbs a:hover {
    color: var(--mb-primary);
}

/* ================================
   IMAGE LOADING ANIMATION
   ================================ */
.mb-card__image img,
.mb-hero__image img,
.mb-post__featured-image img {
    opacity: 0;
    transition: opacity var(--mb-transition-slow);
}

.mb-card__image img.mb-image--loaded,
.mb-hero__image img.mb-image--loaded,
.mb-post__featured-image img.mb-image--loaded,
.mb-card__image img[loading="eager"],
.mb-hero__image img[loading="eager"],
.mb-post__featured-image img[loading="eager"] {
    opacity: 1;
}

/* Fallback for browsers without JS */
.no-js .mb-card__image img,
.no-js .mb-hero__image img,
.no-js .mb-post__featured-image img {
    opacity: 1;
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {
    .mb-header,
    .mb-footer,
    .mb-newsletter,
    .mb-pagination,
    .mb-mobile-nav,
    .mb-menu-toggle {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }
    
    .mb-post__content {
        max-width: 100%;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .mb-card {
        break-inside: avoid;
    }
}

/* ================================
   ACCESSIBILITY - FOCUS VISIBLE
   ================================ */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--mb-accent);
    outline-offset: 2px;
    border-radius: var(--mb-radius-sm);
}

/* Skip Link - Visible on Focus */
.mb-sr-only:focus,
.mb-sr-only:focus-visible {
    position: fixed;
    top: var(--mb-space-md);
    left: var(--mb-space-md);
    width: auto;
    height: auto;
    padding: var(--mb-space-md) var(--mb-space-lg);
    background: var(--mb-primary);
    color: #ffffff;
    font-weight: 600;
    z-index: 9999;
    clip: auto;
    clip-path: none;
    overflow: visible;
    white-space: nowrap;
    border-radius: var(--mb-radius-md);
    box-shadow: var(--mb-shadow-lg);
}

/* Button States */
.mb-btn:disabled,
.mb-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.mb-btn:focus-visible {
    outline: 3px solid var(--mb-accent);
    outline-offset: 2px;
}

/* Input Focus */
.mb-newsletter__input:focus-visible,
.mb-search-form__input:focus-visible {
    outline: 3px solid var(--mb-accent);
    outline-offset: 0;
    border-color: var(--mb-primary);
}

/* Card Link Focus */
.mb-card__title a:focus-visible {
    outline: 3px solid var(--mb-accent);
    outline-offset: 2px;
    border-radius: var(--mb-radius-sm);
}

/* Navigation Focus */
.mb-nav__link:focus-visible,
.mb-mobile-nav__link:focus-visible {
    outline: 3px solid var(--mb-accent);
    outline-offset: 2px;
}

/* ================================
   PAGE TEMPLATE STYLES
   ================================ */
.mb-page {
    padding-top: 120px;
}

.mb-page__header {
    max-width: var(--mb-container-sm);
    margin: 0 auto var(--mb-space-2xl);
    padding: 0 var(--mb-space-lg);
    text-align: center;
}

.mb-page__title {
    margin-top: var(--mb-space-lg);
}

.mb-page__content {
    max-width: var(--mb-container-sm);
    margin: 0 auto;
    padding: 0 var(--mb-space-lg) var(--mb-space-4xl);
}

/* ================================
   404 PAGE STYLES
   ================================ */
.mb-404__inner {
    max-width: 600px;
    margin: 0 auto;
}

.mb-404__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--mb-space-md);
    justify-content: center;
    margin-bottom: var(--mb-space-2xl);
}

.mb-404__explore {
    border-top: 1px solid var(--mb-border);
    padding-top: var(--mb-space-xl);
}

.mb-404__explore-label {
    font-size: 0.875rem;
    color: var(--mb-text-muted);
    margin-bottom: var(--mb-space-md);
}

.mb-404__categories {
    justify-content: center;
}

/* ================================
   INDEX PAGE STYLES
   ================================ */
.mb-index {
    padding-top: 140px;
}

.mb-index__grid {
    margin-top: var(--mb-space-2xl);
}

.mb-index__empty {
    padding: var(--mb-space-4xl) 0;
    text-align: center;
}

.mb-index__empty p {
    color: var(--mb-text-secondary);
}

/* ================================
   TOUCH TARGET SIZES (Mobile UX)
   ================================ */
@media (max-width: 768px) {
    .mb-btn {
        min-height: 48px;
        padding: 14px 24px;
    }
    
    .mb-btn--sm {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    .mb-newsletter__input {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .mb-newsletter__submit {
        min-height: 48px;
    }
    
    .mb-search-form__input {
        min-height: 48px;
        font-size: 16px;
    }
    
    .mb-nav__link,
    .mb-mobile-nav__link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .mb-category-tag {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    .mb-pagination__link {
        min-width: 48px;
        min-height: 48px;
    }
    
    .mb-footer__social a {
        width: 48px;
        height: 48px;
    }
}

/* ================================
   HIGH CONTRAST MODE
   ================================ */
@media (prefers-contrast: high) {
    :root {
        --mb-border: #666666;
        --mb-text-muted: #555555;
    }
    
    .mb-card {
        border-width: 2px;
    }
    
    .mb-btn--secondary {
        border-width: 3px;
    }
}

/* ================================
   REDUCED MOTION
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .mb-card:hover {
        transform: none;
    }
    
    .mb-btn:hover {
        transform: none;
    }
    
    .mb-card:hover .mb-card__image img {
        transform: none;
    }
}
