/* wpCodify theme — component styles. Tokens in style.css :root, optional 12-col grid in grid.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--wpcd-font);
	color: var(--wpcd-body);
	background: var(--wpcd-bg);
	line-height: 1.65;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { color: var(--wpcd-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--wpcd-primary); text-decoration: none; }
a:hover { color: var(--wpcd-primary-dark); }
img { max-width: 100%; height: auto; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.wpcd-skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; padding: 10px 16px; border-radius: 6px; }
.wpcd-skip-link:focus { left: 12px; top: 12px; }

/* ---------- Self-contained layout primitives (do NOT depend on grid.css) ---------- */
.wpcd-container { width: 100%; max-width: var(--wpcd-container); margin-inline: auto; padding-inline: var(--wpcd-gutter); }
.wpcd-py-4 { padding-block: 56px; }
.wpcd-py-3 { padding-block: 40px; }

/* Blog layout: content + optional sidebar. CSS Grid — never silently collapses. */
.wpcd-layout { width: 100%; }
.wpcd-layout__main { min-width: 0; }
@media (min-width: 900px) {
	.wpcd-layout--sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 44px;
		align-items: start;
	}
}

/* ---------- Buttons ---------- */
.wpcd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 22px; border-radius: var(--wpcd-radius-sm); font-weight: 600; font-size: 14.5px;
	border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
	line-height: 1;
}
.wpcd-btn:active { transform: translateY(1px); }
.wpcd-btn--primary { background: var(--wpcd-primary); color: #fff; }
.wpcd-btn--primary:hover { background: var(--wpcd-primary-dark); color: #fff; }
.wpcd-btn--accent { background: var(--wpcd-accent); color: #fff; }
.wpcd-btn--accent:hover { filter: brightness(.92); color: #fff; }
.wpcd-btn--ghost { background: transparent; color: var(--wpcd-primary); border-color: var(--wpcd-line); }
.wpcd-btn--ghost:hover { background: var(--wpcd-bg-tint); border-color: var(--wpcd-primary); }

/* ---------- Header ---------- */
.wpcd-header { background: var(--wpcd-bg); border-bottom: 1px solid var(--wpcd-line); position: sticky; top: 0; z-index: 50; }
.wpcd-header__inner { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.wpcd-header__brand { flex: none; display: flex; align-items: center; }
.wpcd-logo { display: inline-flex; align-items: center; font-weight: 700; font-size: 22px; color: var(--wpcd-ink); }
.wpcd-logo img { display: block; height: 36px; width: auto; }
.custom-logo { max-height: 40px; width: auto; }
.wpcd-nav { margin-left: auto; }
.wpcd-nav__empty { color: var(--wpcd-muted); font-size: 13px; margin: 0; }
.wpcd-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.wpcd-menu li { position: relative; }
.wpcd-menu a { display: block; padding: 9px 15px; color: var(--wpcd-ink); font-weight: 600; font-size: 15px; border-radius: 8px; transition: color .15s, background .15s; }
.wpcd-menu a:hover, .wpcd-menu .current-menu-item > a { color: var(--wpcd-primary); background: var(--wpcd-bg-tint); }
.wpcd-menu .sub-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; background: #fff; border: 1px solid var(--wpcd-line); border-radius: 12px; box-shadow: var(--wpcd-shadow); padding: 8px; z-index: 60; }
.wpcd-menu .sub-menu a { font-weight: 500; }
.wpcd-menu li:hover > .sub-menu { display: block; }
.wpcd-header__actions { flex: none; display: flex; align-items: center; gap: 12px; }
.wpcd-header__cta { white-space: nowrap; }
.wpcd-nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.wpcd-nav-toggle span { width: 24px; height: 2px; background: var(--wpcd-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---------- Footer (copyright bar only) ---------- */
.wpcd-footer { background: var(--wpcd-dark); color: #aeb6c4; margin-top: 72px; }
.wpcd-footer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; }
.wpcd-footer a { color: #aeb6c4; transition: color .15s; }
.wpcd-footer a:hover { color: #fff; }
.wpcd-copy { color: #8b94a4; }
.wpcd-footer__nav { margin-left: auto; }
.wpcd-footer__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; }

/* ---------- Blog cards ---------- */
.wpcd-posts { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
/* When a sidebar is present, keep the post list single-column so it reads cleanly. */
.wpcd-layout--sidebar .wpcd-posts { grid-template-columns: 1fr; }
.wpcd-card { background: #fff; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius); overflow: hidden; transition: box-shadow .2s, transform .15s, border-color .2s; }
.wpcd-card:hover { box-shadow: var(--wpcd-shadow-lg); transform: translateY(-3px); border-color: transparent; }
.wpcd-card__thumb img { width: 100%; height: 210px; object-fit: cover; display: block; }
.wpcd-card__body { padding: 24px; }
.wpcd-card__title { font-size: 20px; margin-bottom: 10px; }
.wpcd-card__title a { color: var(--wpcd-ink); }
.wpcd-card__title a:hover { color: var(--wpcd-primary); }
.wpcd-card__excerpt { font-size: 14.5px; margin: 12px 0 18px; color: var(--wpcd-body); }

/* ---------- Post meta ---------- */
.wpcd-post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--wpcd-muted); }
.wpcd-post__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.wpcd-meta-ico { color: var(--wpcd-primary); flex: none; }
.wpcd-post__meta a { color: var(--wpcd-muted); }
.wpcd-post__meta a:hover { color: var(--wpcd-primary); }
.wpcd-meta-cat a { color: var(--wpcd-primary); }

/* ---------- Single ---------- */
.wpcd-single__header { margin-bottom: 8px; }
.wpcd-single__title { font-size: 34px; }
.wpcd-single__thumb { margin: 22px 0; border-radius: var(--wpcd-radius); overflow: hidden; }
.wpcd-single__thumb img { width: 100%; display: block; }
.wpcd-single__content { font-size: 16.5px; }
.wpcd-single__content > * { margin-bottom: 1.1em; }
.wpcd-single__content h2 { margin-top: 1.4em; }
.wpcd-single__content img { border-radius: 10px; }
.wpcd-single__tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.wpcd-single__tags a { background: var(--wpcd-bg-tint); color: var(--wpcd-primary); padding: 4px 12px; border-radius: 99px; font-size: 13px; }

/* ---------- Sidebar + widgets ---------- */
.wpcd-sidebar { margin-top: 0; }
.wpcd-sidebar__inner { position: sticky; top: 94px; }
.wpcd-widget {
	background: #fff; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius);
	padding: 22px 24px; margin-bottom: 24px;
}
.wpcd-widget:last-child { margin-bottom: 0; }
/* Widget headings — works for legacy (.wpcd-widget__title) AND block widgets (their own h2/h3). */
.wpcd-widget__title,
.wpcd-widget > h2, .wpcd-widget > h3,
.wpcd-widget .wp-block-heading {
	font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
	color: var(--wpcd-ink); margin: 0 0 16px; padding-bottom: 12px;
	border-bottom: 1px solid var(--wpcd-bg-soft); position: relative;
}
.wpcd-widget__title::after,
.wpcd-widget > h2::after, .wpcd-widget > h3::after,
.wpcd-widget .wp-block-heading::after {
	content: ""; position: absolute; left: 0; bottom: -1px; width: 38px; height: 2px; background: var(--wpcd-primary); border-radius: 2px;
}
.wpcd-widget ul, .wpcd-widget ol { list-style: none; margin: 0; padding: 0; }
.wpcd-widget li { padding: 9px 0; border-bottom: 1px solid var(--wpcd-bg-soft); font-size: 14.5px; }
.wpcd-widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.wpcd-widget li:first-child { padding-top: 0; }
.wpcd-widget a { color: var(--wpcd-body); }
.wpcd-widget a:hover { color: var(--wpcd-primary); }
.wpcd-widget .children, .wpcd-widget .sub-menu { padding-left: 16px; margin-top: 4px; }

/* footer widgets inherit dark styles */
.wpcd-footer .wpcd-widget { background: transparent; border: 0; padding: 0; margin: 0; }
.wpcd-footer .wpcd-widget li { border-color: rgba(255,255,255,.08); }
.wpcd-footer .wpcd-widget a { color: #aeb6c4; }
.wpcd-footer .wpcd-widget a:hover { color: #fff; }
.wpcd-footer .wpcd-widget__title::after,
.wpcd-footer .wpcd-widget .wp-block-heading::after { display: none; }

/* ---------- Core WordPress BLOCK widgets (default since WP 5.8) ---------- */
/* Search block */
.wpcd-widget .wp-block-search__label,
.widget_search label { display: block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--wpcd-ink); margin-bottom: 10px; }
.wpcd-widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; border: 0; padding: 0; }
.wpcd-widget .wp-block-search__input,
.wp-block-search__input {
	flex: 1 1 auto; min-width: 0; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius-sm);
	padding: 11px 14px; font-family: inherit; font-size: 15px; background: #fff;
}
.wp-block-search__input:focus { outline: none; border-color: var(--wpcd-primary); box-shadow: 0 0 0 3px var(--wpcd-bg-tint); }
.wp-block-search__button,
.wpcd-widget .wp-block-search__button {
	background: var(--wpcd-primary); color: #fff; border: 0; border-radius: var(--wpcd-radius-sm);
	padding: 0 20px; font-weight: 600; font-size: 14.5px; cursor: pointer; margin: 0; min-height: 44px; transition: background .15s;
}
.wp-block-search__button:hover { background: var(--wpcd-primary-dark); color: #fff; }
.wp-block-search__button.has-icon { padding: 0 14px; }
.wp-block-search__button svg { fill: currentColor; }

/* Latest posts / recent entries */
.wp-block-latest-posts, .widget_recent_entries ul { padding: 0; }
.wp-block-latest-posts__post-date, .wp-block-latest-comments__comment-date { display: block; font-size: 12.5px; color: var(--wpcd-muted); margin-top: 3px; }
.wp-block-latest-posts.is-grid { display: grid; gap: 16px; }

/* Latest comments */
.wp-block-latest-comments { padding: 0; margin: 0; }
.wp-block-latest-comments__comment { padding: 9px 0; border-bottom: 1px solid var(--wpcd-bg-soft); font-size: 14.5px; line-height: 1.5; list-style: none; margin: 0; }
.wp-block-latest-comments__comment:last-child { border-bottom: 0; }
.wp-block-latest-comments__comment-meta { color: var(--wpcd-body); }
.wp-block-latest-comments__comment-author, .wp-block-latest-comments__comment-link { font-weight: 600; color: var(--wpcd-ink); }

/* Archives / Categories — list or dropdown */
.wp-block-archives-dropdown select, .wp-block-categories select, .widget select {
	width: 100%; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius-sm); padding: 11px 14px; font-family: inherit; font-size: 15px; background: #fff;
}
.wp-block-categories li, .wp-block-archives li { display: flex; justify-content: space-between; gap: 10px; }
.wp-block-page-list .current-menu-item > a { color: var(--wpcd-primary); font-weight: 600; }

/* Tag cloud */
.wp-block-tag-cloud, .tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-block-tag-cloud a, .tagcloud a {
	display: inline-block; background: var(--wpcd-bg-tint); color: var(--wpcd-primary) !important;
	padding: 5px 13px; border-radius: 99px; font-size: 13px !important; border: 0; transition: background .15s;
}
.wp-block-tag-cloud a:hover, .tagcloud a:hover { background: var(--wpcd-primary); color: #fff !important; }
.wpcd-widget .wp-block-tag-cloud a { padding: 5px 13px; }
.wpcd-widget .wp-block-tag-cloud li, .wpcd-widget .tagcloud li { border: 0; padding: 0; }

/* Calendar */
.wp-block-calendar table, .widget_calendar table { width: 100%; }
.wp-block-calendar th, .wp-block-calendar td { text-align: center; padding: 6px; font-size: 13.5px; }
.wp-block-calendar caption { color: var(--wpcd-muted); padding-bottom: 8px; }
.wp-block-calendar a { color: var(--wpcd-primary); font-weight: 600; }

/* ---------- Archive header ---------- */
.wpcd-archive__header { margin-bottom: 34px; }
.wpcd-archive__title { font-size: 30px; }
.wpcd-archive__title span { color: var(--wpcd-primary); }
.wpcd-archive__desc { color: var(--wpcd-muted); margin-top: 6px; }

/* ---------- Pagination ---------- */
.wpcd-pagination { margin-top: 44px; }
.wpcd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.wpcd-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--wpcd-line); border-radius: 9px; color: var(--wpcd-ink); font-weight: 600; transition: border-color .15s, color .15s, background .15s; }
.wpcd-pagination .page-numbers.current { background: var(--wpcd-primary); color: #fff; border-color: var(--wpcd-primary); }
.wpcd-pagination a.page-numbers:hover { border-color: var(--wpcd-primary); color: var(--wpcd-primary); }

/* ---------- Search form (theme) ---------- */
.wpcd-search { display: flex; gap: 8px; }
.wpcd-search__field { flex: 1; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius-sm); padding: 11px 14px; font-size: 15px; font-family: inherit; }
.wpcd-search__field:focus { outline: none; border-color: var(--wpcd-primary); box-shadow: 0 0 0 3px var(--wpcd-bg-tint); }
.wpcd-search__submit { background: var(--wpcd-primary); color: #fff; border: none; border-radius: var(--wpcd-radius-sm); padding: 0 20px; font-weight: 600; cursor: pointer; transition: background .15s; }
.wpcd-search__submit:hover { background: var(--wpcd-primary-dark); }

/* ---------- Comments ---------- */
.wpcd-comments { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--wpcd-line); }
.wpcd-comments__title { font-size: 22px; margin-bottom: 20px; }
.wpcd-comments__list { list-style: none; padding: 0; margin: 0; }
.wpcd-comments__list .children { list-style: none; padding-left: 28px; }
.wpcd-comments__list .comment-body { padding: 18px 0; border-bottom: 1px solid var(--wpcd-bg-soft); }
.wpcd-comments .comment-author { font-weight: 600; color: var(--wpcd-ink); }
.wpcd-comments .comment-author img { border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.wpcd-comments .comment-metadata, .wpcd-comments .comment-metadata a { font-size: 12.5px; color: var(--wpcd-muted); }
.wpcd-comments .comment-form { margin-top: 28px; }
.wpcd-comments .comment-form input[type=text], .wpcd-comments .comment-form input[type=email], .wpcd-comments .comment-form input[type=url], .wpcd-comments .comment-form textarea {
	width: 100%; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius-sm); padding: 11px 14px; font-family: inherit; font-size: 15px; margin-top: 4px;
}
.wpcd-comments .form-submit input { background: var(--wpcd-primary); color: #fff; border: 0; border-radius: var(--wpcd-radius-sm); padding: 12px 26px; font-weight: 600; cursor: pointer; transition: background .15s; }
.wpcd-comments .form-submit input:hover { background: var(--wpcd-primary-dark); }

/* ---------- Default WP block styling ---------- */
.wpcd-empty { color: var(--wpcd-muted); }
.wp-block-button__link, .wp-element-button { background: var(--wpcd-primary); border-radius: var(--wpcd-radius-sm); }
blockquote, .wp-block-quote { border-left: 4px solid var(--wpcd-primary); padding-left: 18px; margin-left: 0; color: var(--wpcd-ink); font-style: italic; }
.wp-block-pullquote { border-top: 3px solid var(--wpcd-primary); border-bottom: 3px solid var(--wpcd-primary); }
code, .wp-block-code { background: var(--wpcd-bg-soft); border-radius: 6px; padding: 2px 6px; font-size: 90%; }
table { border-collapse: collapse; width: 100%; }
.wpcd-entry table th, .wpcd-entry table td { border: 1px solid var(--wpcd-line); padding: 8px 12px; text-align: left; }
.wpcd-entry table th { background: var(--wpcd-bg-soft); }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=password], textarea, select {
	font-family: inherit; border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius-sm); padding: 10px 13px; font-size: 15px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--wpcd-primary); box-shadow: 0 0 0 3px var(--wpcd-bg-tint); }

/* ---------- Breadcrumbs ---------- */
/* Full-width breadcrumb bar (site-wide, under the header) */
.wpcd-breadcrumb-bar { background: var(--wpcd-bg-soft); border-bottom: 1px solid var(--wpcd-line); }
.wpcd-breadcrumb-bar .wpcd-container { padding-top: 0; padding-bottom: 0; }
.wpcd-breadcrumb-bar .wpcd-breadcrumb { margin: 0; background: transparent; border: 0; border-radius: 0; padding: 13px 0; }

.wpcd-breadcrumb { margin-bottom: 26px; font-size: 13.5px; background: var(--wpcd-bg-soft); border: 1px solid var(--wpcd-line); border-radius: 10px; padding: 11px 18px; }
.wpcd-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wpcd-breadcrumb li { display: inline-flex; align-items: center; color: var(--wpcd-muted); }
.wpcd-breadcrumb li + li::before { content: ""; width: 7px; height: 7px; margin-right: 8px; border-right: 2px solid var(--wpcd-line-strong); border-bottom: 2px solid var(--wpcd-line-strong); transform: rotate(-45deg); display: inline-block; }
.wpcd-breadcrumb a { color: var(--wpcd-muted); font-weight: 500; transition: color .15s; }
.wpcd-breadcrumb a:hover { color: var(--wpcd-primary); }
.wpcd-breadcrumb li:first-child a { display: inline-flex; align-items: center; gap: 5px; }
.wpcd-breadcrumb .is-current span { color: var(--wpcd-ink); font-weight: 600; }

/* ---------- 404 ---------- */
.wpcd-404 { max-width: 620px; margin: 0 auto; text-align: center; padding: 24px 0 8px; }
.wpcd-404__code {
	font-size: clamp(96px, 18vw, 168px); font-weight: 800; line-height: 1; letter-spacing: -.04em;
	background: linear-gradient(135deg, var(--wpcd-primary), var(--wpcd-accent));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--wpcd-primary);
	margin-bottom: 12px;
}
.wpcd-404__title { font-size: 28px; margin-bottom: 10px; }
.wpcd-404__text { color: var(--wpcd-muted); font-size: 16px; margin: 0 auto 26px; max-width: 460px; }
.wpcd-404__search { max-width: 440px; margin: 0 auto 18px; }
.wpcd-404__actions { margin-bottom: 40px; }
.wpcd-404__recent {
	text-align: left; max-width: 460px; margin: 0 auto; background: #fff;
	border: 1px solid var(--wpcd-line); border-radius: var(--wpcd-radius); padding: 24px 26px;
}
.wpcd-404__recent-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--wpcd-ink); margin-bottom: 14px; }
.wpcd-404__list { list-style: none; margin: 0; padding: 0; }
.wpcd-404__list li { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--wpcd-bg-soft); font-size: 14.5px; }
.wpcd-404__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.wpcd-404__list a { color: var(--wpcd-ink); font-weight: 500; }
.wpcd-404__list a:hover { color: var(--wpcd-primary); }
.wpcd-404__date { color: var(--wpcd-muted); font-size: 12.5px; white-space: nowrap; flex: none; }

/* ---------- Responsive ---------- */
@media (max-width: 899.98px) {
	.wpcd-sidebar { margin-top: 36px; }
	.wpcd-sidebar__inner { position: static; }
}
@media (max-width: 991.98px) {
	.wpcd-py-4 { padding-block: 40px; }
}
@media (max-width: 767.98px) {
	.wpcd-nav-toggle { display: flex; }
	.wpcd-nav { position: fixed; inset: 76px 0 auto 0; background: #fff; border-bottom: 1px solid var(--wpcd-line); margin: 0; padding: 12px 24px; display: none; box-shadow: var(--wpcd-shadow); }
	.wpcd-nav.is-open { display: block; }
	.wpcd-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.wpcd-menu .sub-menu { position: static; box-shadow: none; border: none; padding-left: 14px; display: block; }
	/* keep the toggle + CTA, but CTA can hide on very small screens */
	.wpcd-header__cta { display: none; }
	.wpcd-single__title { font-size: 26px; }
	.wpcd-copy { margin-left: 0; width: 100%; }
	.wpcd-footer__menu { gap: 8px 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}
