/*
Theme Name: FarrierHub
Theme URI: https://farrierservices.net/
Author: Scott Gregory
Author URI: https://farrierservices.net/
Description: Block theme for Scott Gregory's farrier practice site. The practice comes first. FarrierHub Solo is a separate product.
Version: 0.1.4
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: farrierhub
Tags: block-patterns, full-site-editing, blog, custom-colors, custom-menu
*/

/* Keep the dark-mode switch inside the phone width. */
.wp-dark-mode-floating-switch {
	left: auto !important;
	right: 0.75rem !important;
}

/* Full-bleed sections use 100vw, which is wider than the layout once a
   vertical scrollbar is present. Hide that sliver instead of letting the
   page scroll sideways. */
html,
body {
	overflow-x: hidden;
}
.fh-header,
.fh-footer {
	background: #7a1f2b;
	color: #fffcf8;
}

.fh-header {
	position: relative;
}

.fh-header-inner,
.fh-footer-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
}

.fh-footer-inner {
	justify-content: flex-start;
}

.fh-header a,
.fh-footer a,
.wp-block-site-title a {
	color: #fffcf8;
	text-decoration: none;
}

.fh-header a:hover,
.fh-footer a:hover,
.fh-menu a:hover,
.fh-menu a:focus {
	color: #e6b800;
}

.fh-title,
.fh-header .wp-block-site-title,
.fh-footer .wp-block-site-title {
	margin: 0;
	font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", serif;
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.2;
}

.fh-menu-toggle {
	background: transparent;
	color: #fffcf8;
	border: 1px solid #fffcf8;
	border-radius: 8px;
	min-height: 44px;
	padding: 0.35rem 0.85rem;
	font: inherit;
	cursor: pointer;
	list-style: none;
}

.fh-menu-toggle::-webkit-details-marker {
	display: none;
}

.fh-nav-details {
	position: static;
}

.fh-menu,
.fh-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fh-menu a {
	color: #fffcf8;
	text-decoration: none;
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0.2rem 0.75rem;
	overflow-wrap: anywhere;
}

.fh-menu .current-menu-item > a,
.fh-menu .current-menu-ancestor > a {
	color: #e6b800;
}

.fh-main {
	padding: 1.5rem 1.25rem 3rem;
}

.fh-main .wp-block-post-content,
.fh-main .wp-block-query,
.fh-page-title,
.fh-meta {
	max-width: 1040px;
	margin-left: auto;
	margin-right: auto;
}

.fh-page-title {
	font-family: Georgia, "Iowan Old Style", Palatino, "Palatino Linotype", serif;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	line-height: 1.15;
	margin: 0 0 0.4rem;
}

.fh-meta {
	color: #5c4f45;
	margin: 0 0 1.25rem;
}

.fh-main a {
	color: #b86b4a;
}

.fh-main a:hover,
.fh-main a:focus {
	color: #7a1f2b;
}

.fh-main .wp-block-button__link,
.fh-main .wp-element-button {
	text-decoration: none;
}

img,
video,
svg {
	max-width: 100%;
	height: auto;
}

button,
input[type="submit"],
input[type="button"] {
	background: #e6b800;
	color: #1a1410;
	border: 0;
	border-radius: 8px;
	padding: 0.7rem 1.1rem;
	font: inherit;
	cursor: pointer;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	background: #b86b4a;
	color: #1a1410;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	background: #fffcf8;
	color: #1a1410;
	border: 1px solid #cdbeae;
	border-radius: 6px;
	padding: 0.55rem 0.7rem;
	font: inherit;
	max-width: 100%;
}

.fh-main .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

@media (min-width: 782px) {
	.fh-menu-toggle {
		display: none;
	}

	.fh-nav-details > .fh-nav,
	.fh-nav-details[open] > .fh-nav,
	.fh-nav-details:not([open]) > .fh-nav {
		display: block;
	}

	.fh-menu {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 0.15rem;
	}

	.fh-menu > li {
		position: relative;
	}

	.fh-menu .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: auto;
		right: 0;
		min-width: 240px;
		background: #1a1410;
		z-index: 20;
		padding: 0.35rem 0;
	}

	.fh-menu .sub-menu .sub-menu {
		top: 0;
		right: 100%;
	}

	.fh-menu li:hover > .sub-menu,
	.fh-menu li:focus-within > .sub-menu {
		display: block;
	}
}

@media (max-width: 781px) {
	.fh-header-inner {
		align-items: flex-start;
	}

	.fh-nav-details:not([open]) > .fh-nav {
		display: none;
	}

	.fh-nav {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: #7a1f2b;
		z-index: 30;
		max-height: min(70vh, 32rem);
		overflow-y: auto;
	}

	.fh-menu .sub-menu {
		background: #1a1410;
		padding-left: 0.5rem;
	}
}
