/*
 * SalehMatrimony — main stylesheet
 * Design tokens, base elements, layout, header/footer, shared components,
 * blog templates and WordPress core classes. Page-specific styles live in
 * listing.css, profile.css, dashboard.css and forms.css.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--sm-primary: #c8323f;
	--sm-primary-dark: #a4262f;
	--sm-primary-soft: #fbe9ea;
	--sm-accent: #c9a227;
	--sm-accent-soft: #faf3dc;
	--sm-ink: #3b2a1a;
	--sm-text: #2c2c2a;
	--sm-muted: #74604d;
	--sm-surface: #ffffff;
	--sm-bg: #fbf6ec;
	--sm-bg-deep: #f3e9d3;
	--sm-line: rgba(160, 125, 40, 0.24);
	--sm-line-strong: rgba(160, 125, 40, 0.42);
	--sm-success: #237a49;
	--sm-success-soft: #e6f4ec;
	--sm-warning: #8a6200;
	--sm-warning-soft: #fdf3d6;
	--sm-danger: #b42318;
	--sm-danger-soft: #fdeceb;
	--sm-info: #4527a0;
	--sm-info-soft: #efeafb;
	--sm-radius: 14px;
	--sm-radius-sm: 8px;
	--sm-shadow: 0 4px 24px rgba(59, 42, 26, 0.08);
	--sm-shadow-lg: 0 12px 40px rgba(59, 42, 26, 0.14);
	--sm-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", "Nirmala UI", "Noto Sans Bengali", "Kohinoor Bangla", "Bangla Sangam MN", Roboto, sans-serif;
	--sm-font-display: "Playfair Display", Georgia, "Times New Roman", "Nirmala UI", "Noto Serif Bengali", "Kohinoor Bangla", serif;
	--sm-container: 1180px;
	--sm-gutter: clamp(16px, 4vw, 32px);
	--sm-focus: 0 0 0 3px rgba(200, 50, 63, 0.35);

	/* Aliases used by the page stylesheets (kept from version 1.0 class names). */
	--rose: var(--sm-primary);
	--rose-dark: var(--sm-primary-dark);
	--rose-light: #e98a92;
	--rose-pale: var(--sm-primary-soft);
	--cream: var(--sm-bg);
	--cream-dark: var(--sm-bg-deep);
	--gold: var(--sm-accent);
	--gold-light: #e2cd86;
	--gold-pale: var(--sm-accent-soft);
	--brown: var(--sm-ink);
	--brown-light: #5c4033;
	--charcoal: var(--sm-text);
	--muted: var(--sm-muted);
	--muted-light: #7d6a57;
	--white: #ffffff;
	--border: var(--sm-line);
	--border-mid: var(--sm-line-strong);
	--border-strong: var(--sm-line-strong);
	--shadow: var(--sm-shadow);
	--font-display: var(--sm-font-display);
	--font-body: var(--sm-font-body);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }

body {
	margin: 0;
	font-family: var(--sm-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--sm-text);
	background: var(--sm-bg);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

img, video, svg { max-width: 100%; height: auto; }
img { display: block; }
.entry-content img, .widget img { display: inline-block; }

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	font-family: var(--sm-font-display);
	font-weight: 500;
	line-height: 1.25;
	color: var(--sm-ink);
}
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

p, ul, ol, dl, blockquote, pre, table, figure { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.4em; }

a { color: var(--sm-primary); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--sm-primary-dark); }

:focus-visible { outline: 2px solid var(--sm-primary); outline-offset: 2px; }
button:focus-visible, .sm-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--sm-focus); }

hr { border: 0; border-top: 1px solid var(--sm-line); margin: 2em 0; }

blockquote { border-left: 3px solid var(--sm-accent); padding: 0.4em 0 0.4em 1.2em; font-style: italic; color: var(--sm-ink); }

code, kbd, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
pre { background: var(--sm-surface); border: 1px solid var(--sm-line); padding: 1em; overflow: auto; border-radius: var(--sm-radius-sm); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.6em 0.8em; border-bottom: 1px solid var(--sm-line); text-align: left; }

input, select, textarea, button { font: inherit; color: inherit; }

/* ==========================================================================
   3. Accessibility helpers
   ========================================================================== */
.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 !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: var(--sm-ink);
	display: block; font-size: 0.9rem; font-weight: 700; height: auto; left: 8px;
	padding: 12px 20px; top: 8px; width: auto; z-index: 100000; border-radius: 6px; box-shadow: var(--sm-shadow-lg);
}
.skip-link:focus { position: fixed !important; }

@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; }
}

/* ==========================================================================
   4. Layout
   ========================================================================== */
.container { width: 100%; max-width: var(--sm-container); margin: 0 auto; padding-left: var(--sm-gutter); padding-right: var(--sm-gutter); }
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }
.sm-section { padding: clamp(28px, 5vw, 56px) 0; }

.content-area { padding: clamp(28px, 5vw, 56px) 0; }
.has-sidebar .content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .has-sidebar .content-layout { grid-template-columns: 1fr; } }
.content-narrow { max-width: 780px; margin: 0 auto; }

/* ==========================================================================
   5. Header & navigation
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 900;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--sm-line);
	backdrop-filter: saturate(1.2) blur(6px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.header-content { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-logo img, .custom-logo { max-height: 52px; width: auto; }
.site-title { margin: 0; font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.site-title a { color: var(--sm-ink); text-decoration: none; }
.site-title a:hover { color: var(--sm-primary); }
.site-description { margin: 0; font-size: 0.8rem; color: var(--sm-muted); }

.main-navigation { display: flex; align-items: center; gap: 18px; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; align-items: center; gap: 4px; }
.primary-menu li { position: relative; }
.primary-menu a {
	display: block; padding: 8px 12px; border-radius: var(--sm-radius-sm);
	color: var(--sm-ink); font-weight: 500; font-size: 0.95rem; text-decoration: none;
}
.primary-menu a:hover, .primary-menu .current-menu-item > a, .primary-menu .current_page_item > a { background: var(--sm-primary-soft); color: var(--sm-primary-dark); }
.primary-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px; z-index: 20;
	background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius-sm); box-shadow: var(--sm-shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: all 0.15s ease;
}
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-menu .sub-menu .sub-menu { top: 0; left: 100%; }

.user-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Language switcher */
.sm-lang { display: flex; gap: 2px; list-style: none; margin: 0; padding: 2px; border: 1px solid var(--sm-line-strong); border-radius: 999px; flex-shrink: 0; }
.sm-lang__item { display: block; padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; line-height: 1.4; color: var(--sm-ink); text-decoration: none; }
a.sm-lang__item:hover { background: var(--sm-primary-soft); color: var(--sm-primary-dark); }
.sm-lang__item.is-active { background: var(--sm-primary); color: #fff; font-weight: 600; }
[hidden] { display: none !important; }
html[lang^="bn"] body { line-height: 1.75; }

.menu-toggle {
	display: none; align-items: center; gap: 6px;
	background: transparent; border: 1px solid var(--sm-line-strong); border-radius: var(--sm-radius-sm);
	padding: 8px 12px; cursor: pointer; color: var(--sm-ink); font-weight: 500;
}

@media (max-width: 960px) {
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		position: fixed; inset: 72px 0 auto 0; z-index: 899;
		flex-direction: column; align-items: stretch; gap: 12px;
		max-height: calc(100vh - 72px); overflow-y: auto;
		background: #fff; padding: 16px var(--sm-gutter) 24px;
		border-bottom: 1px solid var(--sm-line); box-shadow: var(--sm-shadow-lg);
		visibility: hidden; opacity: 0; transform: translateY(-8px); transition: all 0.18s ease;
	}
	.admin-bar .main-navigation { top: 104px; }
	.main-navigation.is-open { visibility: visible; opacity: 1; transform: none; }
	.primary-menu { flex-direction: column; align-items: stretch; }
	.primary-menu a { padding: 12px; }
	.primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
	.user-actions { flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--sm-line); }
	.sm-lang { align-self: flex-start; }
	.user-actions .sm-btn { flex: 1 1 auto; }
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */
.sm-btn, .btn, .wp-block-button__link, input[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px;
	border: 1.5px solid transparent; border-radius: var(--sm-radius-sm);
	font-family: var(--sm-font-body); font-size: 0.95rem; font-weight: 500; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
	background: var(--sm-primary); color: #fff;
}
.sm-btn:hover, .btn:hover, input[type="submit"]:hover { background: var(--sm-primary-dark); color: #fff; }
.sm-btn:disabled, .sm-btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }

.sm-btn--primary, .btn-primary { background: var(--sm-primary); color: #fff; }
.sm-btn--outline, .sm-btn--secondary, .btn-secondary { background: transparent; color: var(--sm-ink); border-color: var(--sm-line-strong); }
.sm-btn--outline:hover, .sm-btn--secondary:hover, .btn-secondary:hover { background: var(--sm-bg); color: var(--sm-ink); border-color: var(--sm-accent); }
.sm-btn--accent { background: var(--sm-accent); color: var(--sm-ink); }
.sm-btn--accent:hover { background: #b38f1f; color: var(--sm-ink); }
.sm-btn--success, .btn-success { background: var(--sm-success); color: #fff; }
.sm-btn--success:hover { background: #1b5f39; color: #fff; }
.sm-btn--ghost { background: transparent; color: var(--sm-primary); padding-left: 8px; padding-right: 8px; }
.sm-btn--ghost:hover { background: var(--sm-primary-soft); color: var(--sm-primary-dark); }
.sm-btn--sm, .btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.875rem; }
.sm-btn--lg, .btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }
.sm-btn--block, .btn-block { width: 100%; }

/* ==========================================================================
   7. Forms (generic + WordPress forms)
   ========================================================================== */
label { font-weight: 500; color: var(--sm-ink); }

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"],
input[type="number"], input[type="tel"], input[type="date"], select, textarea, .form-control {
	width: 100%; padding: 11px 14px; min-height: 44px;
	border: 1.5px solid var(--sm-line-strong); border-radius: var(--sm-radius-sm);
	background: #fff; color: var(--sm-text); font-size: 0.95rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--sm-primary); box-shadow: var(--sm-focus); outline: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--sm-primary); width: 18px; height: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label, .form-label { display: block; margin-bottom: 6px; font-size: 0.9rem; }

.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; margin: 0; }
.search-form .search-field { width: 100%; }
.search-form .search-submit { flex-shrink: 0; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--sm-radius-sm); background: var(--sm-primary); color: #fff; cursor: pointer; font-weight: 500; }
.search-form .search-submit:hover { background: var(--sm-primary-dark); }

/* ==========================================================================
   8. Alerts, badges, notices, empty states
   ========================================================================== */
.sm-alert, .alert { padding: 14px 18px; border-radius: var(--sm-radius-sm); border-left: 4px solid; margin: 0 0 20px; font-size: 0.95rem; }
.sm-alert ul, .alert ul { margin: 0; padding-left: 1.2em; }
.sm-alert--success, .alert-success { background: var(--sm-success-soft); border-color: var(--sm-success); color: #164d2f; }
.sm-alert--error, .alert-error { background: var(--sm-danger-soft); border-color: var(--sm-danger); color: #7a1a12; }
.sm-alert--info { background: var(--sm-info-soft); border-color: var(--sm-info); color: #2f1b70; }
.sm-alert--warning { background: var(--sm-warning-soft); border-color: var(--sm-accent); color: #5c4200; }
.sm-notice { padding: 12px 16px; background: var(--sm-accent-soft); border-radius: var(--sm-radius-sm); }
.sm-muted { color: var(--sm-muted); font-size: 0.9rem; }

.sm-badge, .badge {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.5;
	border: 1px solid transparent; white-space: nowrap;
}
.sm-badge--verified, .badge-verified { background: var(--sm-info-soft); color: var(--sm-info); border-color: #c9bbf0; }
.sm-badge--verified::before { content: "\2713"; font-weight: 700; }
.sm-badge--premium, .badge-paid { background: var(--sm-accent-soft); color: #6b4e00; border-color: #e2cd86; }
.sm-badge--premium::before { content: "\2605"; }
.sm-badge--success { background: var(--sm-success-soft); color: var(--sm-success); border-color: #a8d5bc; }
.sm-badge--warning { background: var(--sm-warning-soft); color: var(--sm-warning); border-color: #ecd58c; }
.sm-badge--danger { background: var(--sm-danger-soft); color: var(--sm-danger); border-color: #f2b8b3; }
.sm-badge--neutral { background: var(--sm-bg); color: var(--sm-muted); border-color: var(--sm-line); }

.sm-empty { text-align: center; padding: clamp(36px, 7vw, 72px) 20px; background: var(--sm-surface); border: 1px dashed var(--sm-line-strong); border-radius: var(--sm-radius); }
.sm-empty__icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: var(--sm-primary-soft); color: var(--sm-primary); margin-bottom: 14px; }
.sm-empty__icon .sm-icon { width: 26px; height: 26px; }
.sm-empty h2, .sm-empty h3 { font-size: 1.3rem; margin-bottom: 6px; }
.sm-empty p { color: var(--sm-muted); margin-bottom: 18px; }

.sm-icon { display: inline-block; flex-shrink: 0; vertical-align: -0.2em; }

/* ==========================================================================
   9. Profile photo component
   ========================================================================== */
.sm-photo { position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(135deg, var(--sm-bg-deep), var(--sm-primary-soft)); display: flex; align-items: center; justify-content: center; }
.sm-photo__img { width: 100%; height: 100%; object-fit: cover; }
.sm-photo__img--blurred { filter: blur(14px) saturate(0.8); transform: scale(1.25); }
.sm-photo__img--placeholder { object-fit: cover; }
.sm-photo__note {
	position: absolute; left: 10px; right: 10px; bottom: 10px;
	padding: 6px 10px; border-radius: 8px; background: rgba(59, 42, 26, 0.78); color: #fff;
	font-size: 0.75rem; line-height: 1.35; text-align: center;
}
.sm-photo__badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--sm-warning-soft); color: var(--sm-warning); font-size: 0.72rem; font-weight: 600; }
.sm-photo--empty .sm-photo__note { background: rgba(255, 255, 255, 0.86); color: var(--sm-muted); }

/* ==========================================================================
   10. Profile card (listing grid)
   ========================================================================== */
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 2.5vw, 26px); margin: 0 0 32px; padding: 0; list-style: none; }

.profile-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius);
	overflow: hidden; box-shadow: var(--sm-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.profile-card:hover, .profile-card:focus-within { transform: translateY(-3px); box-shadow: var(--sm-shadow-lg); border-color: var(--sm-line-strong); }
.profile-card__media { aspect-ratio: 4 / 3; }
.profile-card__badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.profile-card__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; flex: 1; }
.profile-card__name { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.profile-card__name a { color: var(--sm-ink); text-decoration: none; }
.profile-card__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.profile-card__name a:focus-visible { outline: none; }
.profile-card:focus-within { box-shadow: var(--sm-focus), var(--sm-shadow-lg); }
.profile-card__meta { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 0.85rem; color: var(--sm-muted); }
.profile-card__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.profile-card__facts div { min-width: 0; }
.profile-card__facts dt { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-light); }
.profile-card__facts dd { margin: 2px 0 0; font-size: 0.9rem; font-weight: 500; color: var(--sm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sm-tag { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--sm-bg); border: 1px solid var(--sm-line-strong); color: var(--brown-light); font-size: 0.78rem; }
.profile-card__cta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--sm-line); font-size: 0.9rem; font-weight: 500; color: var(--sm-primary); }

/* ==========================================================================
   11. Pagination
   ========================================================================== */
.pagination, .sm-pagination { margin: 8px 0 24px; }
.pagination .nav-links, .sm-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 42px; padding: 0 12px; border-radius: var(--sm-radius-sm); border: 1px solid var(--sm-line-strong); background: #fff; color: var(--sm-ink); text-decoration: none; font-weight: 500; }
a.page-numbers:hover { border-color: var(--sm-primary); color: var(--sm-primary); }
.page-numbers.current { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; }
.page-numbers.dots { border: 0; background: transparent; }

/* ==========================================================================
   12. Blog / pages
   ========================================================================== */
.page-header { margin-bottom: 28px; }
.page-header .page-title { margin-bottom: 6px; }
.archive-description { color: var(--sm-muted); }

.entry { background: var(--sm-surface); border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: clamp(20px, 4vw, 40px); margin-bottom: 28px; box-shadow: var(--sm-shadow); }
.entry-header { margin-bottom: 18px; }
.entry-title { margin-bottom: 8px; }
.entry-title a { color: var(--sm-ink); text-decoration: none; }
.entry-title a:hover { color: var(--sm-primary); }
.entry-meta, .entry-footer { font-size: 0.875rem; color: var(--sm-muted); }
.entry-meta a, .entry-footer a { color: inherit; }
.entry-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--sm-line); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.post-thumbnail { margin: calc(-1 * clamp(20px, 4vw, 40px)) calc(-1 * clamp(20px, 4vw, 40px)) 24px; }
.post-thumbnail img { width: 100%; height: auto; }
.entry-summary p:last-child, .entry-content > :last-child { margin-bottom: 0; }
.entry-content { font-size: 1.02rem; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content a { word-break: break-word; }
.more-link { font-weight: 500; }
.sticky .entry { border-color: var(--sm-accent); }
.page-links { clear: both; margin-top: 20px; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; padding: 16px; background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius-sm); text-decoration: none; color: var(--sm-ink); }
.post-navigation .nav-next { text-align: right; }
.post-navigation .meta-nav { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sm-muted); }
@media (max-width: 600px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { text-align: left; } }

/* Sidebar & widgets */
.widget-area .widget { background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: 22px; margin-bottom: 22px; }
.widget-title { font-size: 1.1rem; margin-bottom: 12px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--sm-line); }
.widget li:last-child { border-bottom: 0; }

/* Comments */
.comments-area { background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: clamp(20px, 4vw, 36px); margin-top: 28px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: clamp(12px, 4vw, 40px); }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--sm-line); }
.comment-meta { font-size: 0.85rem; color: var(--sm-muted); margin-bottom: 8px; }
.comment-author .avatar { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-reply-link { font-size: 0.85rem; font-weight: 500; }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; margin-bottom: 4px; font-size: 0.9rem; }
.bypostauthor > .comment-body .fn::after { content: " \2022"; color: var(--sm-accent); }

/* 404 */
.error-404 { text-align: center; padding: clamp(40px, 8vw, 96px) 0; }
.error-404__code { font-family: var(--sm-font-display); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--sm-primary); opacity: 0.85; }
.error-404 .search-form { max-width: 460px; margin: 24px auto 0; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer { margin-top: auto; background: var(--sm-ink); color: #eadfcb; padding: clamp(36px, 6vw, 64px) 0 24px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sm-accent-soft); }
.site-footer .widget { background: transparent; border: 0; padding: 0; margin-bottom: 18px; }
.site-footer .widget li { border-color: rgba(255, 255, 255, 0.1); }
.site-footer h2, .site-footer h3, .site-footer .widget-title { color: #fff; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-brand__name { font-family: var(--sm-font-display); font-size: 1.35rem; color: #fff; margin: 0 0 8px; }
.footer-brand p { color: #d8c9ae; margin: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.14); color: #cdbb9b; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.footer-menu { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.footer-menu a { color: #eadfcb; text-decoration: none; }
.footer-menu a:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   14. Toast notifications (main.js)
   ========================================================================== */
.sm-toast-region { position: fixed; top: 16px; right: 16px; left: 16px; z-index: 100001; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.sm-toast { pointer-events: auto; max-width: 380px; padding: 12px 16px; border-radius: var(--sm-radius-sm); background: #fff; color: var(--sm-text); box-shadow: var(--sm-shadow-lg); border-left: 4px solid var(--sm-success); font-size: 0.92rem; animation: sm-toast-in 0.2s ease; }
.sm-toast--error { border-left-color: var(--sm-danger); }
@keyframes sm-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.sm-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: sm-spin 0.7s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   15. Payment form (shortcode) — also used on the dashboard Upgrade tab
   ========================================================================== */
.sm-payment { background: #fff; border: 1px solid var(--sm-line); border-radius: var(--sm-radius); padding: clamp(20px, 4vw, 32px); margin: 20px 0; box-shadow: var(--sm-shadow); }
.sm-payment__title { font-size: 1.4rem; }
.sm-plans { border: 0; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sm-plans legend { font-weight: 500; margin-bottom: 10px; padding: 0; color: var(--sm-ink); }
.sm-plan { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 16px 44px; border: 1.5px solid var(--sm-line-strong); border-radius: var(--sm-radius-sm); cursor: pointer; background: #fff; }
.sm-plan input { position: absolute; left: 16px; top: 18px; }
.sm-plan:has(input:checked) { border-color: var(--sm-primary); background: var(--sm-primary-soft); }
.sm-plan__name { font-weight: 600; color: var(--sm-ink); }
.sm-plan__price { font-family: var(--sm-font-display); font-size: 1.3rem; color: var(--sm-primary-dark); }
.sm-plan__save { font-size: 0.78rem; color: var(--sm-success); font-weight: 600; }
.sm-payment__instructions { background: var(--sm-accent-soft); border: 1px solid #e2cd86; border-radius: var(--sm-radius-sm); padding: 16px 18px; margin-bottom: 20px; }
.sm-payment__instructions h3 { font-size: 1.05rem; margin-bottom: 8px; }
.sm-payment__instructions p:last-child { margin-bottom: 0; }

/* ==========================================================================
   16. WordPress core classes
   ========================================================================== */
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { margin-left: calc(-1 * min(6vw, 80px)); margin-right: calc(-1 * min(6vw, 80px)); max-width: none; }
.alignfull { margin-left: calc(-1 * clamp(20px, 4vw, 40px)); margin-right: calc(-1 * clamp(20px, 4vw, 40px)); max-width: none; }
@media (max-width: 900px) { .alignwide { margin-left: 0; margin-right: 0; } }
.wp-caption { max-width: 100%; margin-bottom: 1.2em; }
.wp-caption-text, .wp-element-caption, figcaption { font-size: 0.85rem; color: var(--sm-muted); text-align: center; margin-top: 6px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery-item { margin: 0; }
.wp-block-image img { height: auto; }
.wp-block-quote { border-left-color: var(--sm-accent); }
.wp-block-button__link { background: var(--sm-primary); }
.wp-block-separator { border-color: var(--sm-line); }
.clear::after, .entry-content::after { content: ""; display: table; clear: both; }

/* ==========================================================================
   17. Utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sm-stack > * + * { margin-top: 12px; }

body:not(.has-sidebar) .content-primary { max-width: 820px; margin: 0 auto; }
.cp-char-count-inline { display: block; text-align: right; font-size: 0.75rem; margin-top: 4px; }
.gallery-caption { font-size: 0.85rem; color: var(--sm-muted); }

/* Member ID */
.sm-member-id { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 16px auto; padding: 16px 20px; max-width: 420px; text-align: center; background: var(--sm-accent-soft); border: 1px dashed var(--sm-accent); border-radius: var(--sm-radius-sm); }
.sm-member-id__label { font-size: 0.85rem; color: var(--sm-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sm-member-id__value { font-size: 1.6rem; letter-spacing: 0.08em; color: var(--sm-ink); font-variant-numeric: tabular-nums; user-select: all; }
.sm-member-id__help { font-size: 0.85rem; color: var(--sm-muted); }
.sm-member-id-welcome { padding-top: 20px; }
.sm-member-id-welcome .sm-alert { margin-bottom: 0; }
