/**
 * Motus Walk-In Chiropractic — Custom CSS
 * Extends theme.json with styles that require selectors beyond what theme.json supports.
 */

/* =========================================================
   GLOBAL RESETS & BASE
   ========================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Skip-to-content accessibility link */
.skip-to-content-link {
	position: absolute;
	top: -9999px;
	left: 1rem;
	z-index: 9999;
	padding: 0.75rem 1.5rem;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	border-radius: 0 0 6px 6px;
	transition: top 0.2s;
}
.skip-to-content-link:focus {
	top: 0;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Constrain body text line length for readability */
.wp-block-post-content p,
.wp-block-post-content li {
	max-width: 72ch;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 1px 0 rgba(13, 59, 79, 0.08);
}

/* Smooth nav link hover */
.primary-nav a {
	transition: color 0.2s ease;
	text-decoration: none;
	color: var(--wp--preset--color--dark);
}
.primary-nav a:hover {
	color: var(--wp--preset--color--accent);
}

/* Header CTA pulse on mobile */
@media (max-width: 600px) {
	.header-cta .wp-block-button__link {
		font-size: 0.8rem !important;
		padding: 8px 14px !important;
	}
}

/* =========================================================
   BUTTONS
   ========================================================= */

.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wp-element-button:active,
.wp-block-button__link:active {
	transform: translateY(0);
}

/* Outline button — primary style */
.is-style-primary-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--primary) !important;
	border: 2px solid var(--wp--preset--color--primary) !important;
}
.is-style-primary-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary) !important;
	color: #fff !important;
}

/* =========================================================
   CARDS & GROUPS
   ========================================================= */

.is-style-card {
	background: var(--wp--preset--color--white);
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(13, 59, 79, 0.07);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.is-style-card:hover {
	box-shadow: 0 6px 20px rgba(13, 59, 79, 0.12);
	transform: translateY(-2px);
}

/* =========================================================
   DETAILS / FAQ ACCORDION
   ========================================================= */

.wp-block-details {
	border: 1px solid var(--wp--preset--color--light-gray);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color 0.2s ease;
}
.wp-block-details[open] {
	border-color: var(--wp--preset--color--accent);
}

.wp-block-details summary {
	padding: 1.125rem 1.5rem;
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--wp--preset--color--white);
	transition: background-color 0.2s ease;
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	font-size: 1.375rem;
	font-weight: 300;
	color: var(--wp--preset--color--accent);
	flex-shrink: 0;
	margin-left: 1rem;
	transition: transform 0.2s ease;
}
.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}
.wp-block-details summary:hover {
	background-color: var(--wp--preset--color--light);
}

.wp-block-details > * + * {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	padding-bottom: 1.25rem;
}

/* =========================================================
   FORMS (Contact Form 7)
   ========================================================= */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1.5px solid var(--wp--preset--color--light-gray);
	border-radius: 6px;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	color: var(--wp--preset--color--dark);
	background: var(--wp--preset--color--white);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
}
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px rgba(74, 155, 111, 0.15);
}

.wpcf7 textarea {
	min-height: 130px;
	resize: vertical;
}

.wpcf7 input[type="submit"] {
	display: inline-block;
	padding: 14px 32px;
	background: var(--wp--preset--color--accent);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-weight: 700;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--accent-dark);
	transform: translateY(-1px);
}

/* =========================================================
   NAVIGATION — MOBILE OVERLAY
   ========================================================= */

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--primary);
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--white);
	font-size: 1.25rem;
}

/* =========================================================
   SOCIAL LINKS
   ========================================================= */

.wp-block-social-links .wp-block-social-link {
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.wp-block-social-links .wp-block-social-link:hover {
	transform: translateY(-2px);
	opacity: 0.85;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer-links li {
	margin-bottom: 0.5rem;
	list-style: none;
}
.footer-links a:hover {
	color: var(--wp--preset--color--accent) !important;
}

/* =========================================================
   HERO / COVER
   ========================================================= */

.wp-block-cover {
	background-attachment: scroll; /* prevent parallax jank on mobile */
}

/* =========================================================
   IMAGES
   ========================================================= */

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

/* =========================================================
   TABLE (hours)
   ========================================================= */

.wp-block-table td {
	padding: 0.4rem 1rem 0.4rem 0;
	border: none;
	vertical-align: top;
}
.wp-block-table tr:nth-child(even) td {
	background: transparent;
}

/* =========================================================
   BADGE PARAGRAPH STYLE
   ========================================================= */

.is-style-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--light);
	color: var(--wp--preset--color--accent);
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
	.site-header,
	.wp-block-navigation,
	.wp-block-social-links,
	.wp-block-buttons {
		display: none !important;
	}
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
