/* MachineFinder theme: header, footer, page layout and general content.
   Colours from the banner: navy #003048, orange #FF9A0E, off-white #F8F8F8.
   Listing, form, guide and homepage components are styled by the MachineFinder plugins.
   No wording lives in the theme: header, footer and menus are edited in Appearance > Editor. */

:root {
	--mf-navy: #003048;
	--mf-orange: #FF9A0E;
	--mf-bg: #F8F8F8;
	--mf-line: #d9dee3;
	--mf-text: #1d2327;
	--mf-muted: #5b6670;
	--mf-radius: 8px;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid rgba(255,154,14,.7); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

/* ---------- Buttons: WordPress button blocks (the plugin styles its own .mf-btn buttons to match) */
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	background: var(--mf-orange); color: var(--mf-navy) !important; border: 2px solid var(--mf-orange);
	padding: .7em 1.3em; border-radius: var(--mf-radius); font-weight: 700; font-size: 1rem; line-height: 1.2;
	text-decoration: none !important; cursor: pointer; min-height: 48px; box-sizing: border-box;
}
.wp-block-button__link:hover { background: #ffad3d; border-color: #ffad3d; }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: var(--mf-navy) !important; border: 2px solid var(--mf-navy); }
.wp-block-button.mf-big .wp-block-button__link { font-size: 1.1rem; padding: .85em 1.6em; }
.mf-cta .wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: #fff !important; border-color: #fff; }

/* ---------- Header (Appearance > Editor > Patterns > Header) */
.mf-header { background: #fff; border-bottom: 1px solid var(--mf-line); position: relative; z-index: 20; }
.mf-header__in { max-width: 1200px; margin: 0 auto; padding: .6rem 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; }
.mf-logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none !important; color: var(--mf-navy); font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; white-space: nowrap; }
.mf-logo img { width: 36px; height: 36px; flex: 0 0 36px; }
.mf-logo b { color: var(--mf-orange); font-weight: 800; }
.mf-header .wp-block-navigation a { color: var(--mf-navy); text-decoration: none; font-weight: 600; }
.mf-header .wp-block-navigation a:hover { color: #b45f00; }
.mf-header__nav { display: none !important; gap: 1.4rem; }
.mf-header .mf-header__in > .mf-header__sell { margin-left: auto; flex-wrap: nowrap; }
.mf-header__sell .wp-block-button__link { min-height: 42px; padding: .5em 1em; white-space: nowrap; }
.mf-header__menu { flex: 0 0 auto; }
.mf-header__menu .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--mf-navy); }
.mf-header__menu .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.mf-header__menu .wp-block-navigation__responsive-container.is-menu-open { background: #fff; color: var(--mf-navy); padding: 1.5rem 16px; }
.mf-header__menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; }
.mf-header .mf-header__menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { font-size: 1.25rem; font-weight: 700; color: var(--mf-navy); padding: .55rem 0; }
@media (max-width: 380px) {
	.mf-logo { font-size: 1.15rem; gap: .35rem; }
	.mf-logo img { width: 30px; height: 30px; flex-basis: 30px; }
	.mf-header__in { gap: .6rem; }
}
@media (min-width: 900px) {
	.mf-header__nav { display: flex !important; }
	.mf-header .mf-header__in > .mf-header__nav { margin-left: auto; }
	.mf-header .mf-header__in > .mf-header__sell { margin-left: 1rem; }
	.mf-header__menu { display: none !important; }
}

/* ---------- Footer (Appearance > Editor > Patterns > Footer) */
.mf-footer { background: var(--mf-navy); color: #dfe7ec; margin-top: 3rem; border-top: 5px solid var(--mf-orange); }
.mf-footer__in.wp-block-columns { max-width: 1200px; margin: 0 auto; padding: 2rem 16px 1rem; gap: 1.5rem 2rem; box-sizing: border-box; flex-wrap: wrap !important; }
.mf-footer__in > .wp-block-column { flex: 1 1 100% !important; }
@media (min-width: 600px) { .mf-footer__in > .wp-block-column { flex: 1 1 calc(50% - 1rem) !important; } }
@media (min-width: 960px) {
	.mf-footer__in > .wp-block-column { flex: 1 1 0 !important; }
	.mf-footer__in > .mf-footer__brand { flex-grow: 1.3 !important; }
}
.mf-footer h2, .mf-footer .mf-footer__title { color: #fff; font-size: 1rem; margin: 0 0 .6rem; }
.mf-footer p { margin: .6rem 0 0; }
.mf-footer a { color: #dfe7ec; text-decoration: none; }
.mf-footer a:hover { color: #fff; text-decoration: underline; }
.mf-footer .wp-block-navigation { gap: .45rem; }
.mf-footer .wp-block-navigation a { font-weight: 400; }
.mf-footer .mf-logo { color: #fff; }
.mf-footer .mf-logo img { background: #fff; border-radius: 50%; padding: 2px; }
.mf-footer .mf-footer__copy { max-width: 1200px; margin: 0 auto; padding: 0 16px 1.5rem; font-size: .85rem; color: #9fb3bf; box-sizing: border-box; }

/* ---------- Page layout */
.mf-main { padding-top: clamp(1.25rem, 3vw, 2rem); padding-bottom: clamp(2rem, 5vw, 3rem); }
.mf-main > .wp-block-post-title { margin-bottom: 1rem; }

/* Machinery pages (browse, listings, hubs, My listings) mark themselves alignwide and use the
   1200px wide size; text pages and guides keep a readable line length. The homepage is full width. */
.mf-main--listing > .wp-block-post-title,
.mf-main:has(.alignwide) > .wp-block-post-title { max-width: var(--wp--style--global--wide-size); }
.mf-main .alignfull.mf-home { box-sizing: border-box; padding-left: 16px; padding-right: 16px; }
/* On wide screens WordPress gives the full-width block a negative side margin that stops it centring. */
@media (min-width: 1233px) {
	.mf-main .alignfull.mf-home { margin-left: auto !important; margin-right: auto !important; }
}

/* ---------- Content */
.wp-block-post-content h2 { margin-top: 2rem; }
.wp-block-post-content h3 { margin-top: 1.5rem; }
.wp-block-post-content ul, .wp-block-post-content ol { padding-left: 1.3rem; }
.wp-block-post-content li { margin: .35rem 0; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; }
.wp-block-post-content th, .wp-block-post-content td { border-bottom: 1px solid var(--mf-line); padding: .5rem .4rem; text-align: left; vertical-align: top; }
.wp-block-post-content figure { margin-left: 0; margin-right: 0; }
.wp-block-post-content figcaption { font-size: .85rem; color: var(--mf-muted); }
.wp-block-post-content blockquote { border-left: 4px solid var(--mf-orange); margin-left: 0; padding: .2rem 0 .2rem 1rem; color: var(--mf-navy); }
hr, .wp-block-separator { border: 0; border-top: 1px solid var(--mf-line); }

/* Guides and database pages: white reading panel on the off-white page */
.mf-main--article .wp-block-post-content { background: #fff; border: 1px solid var(--mf-line); border-radius: var(--mf-radius); padding: clamp(1rem, 4vw, 2rem); }
.mf-main--article > .wp-block-post-title { max-width: var(--wp--style--global--content-size); }
