/* MGA shortcodes - mga_attorney_quote */

.mga-quote {
	position: relative;
	margin: 0;
	padding: 8px 8px 0 56px;
}

.mga-quote::before {
	content: "\201C";
	position: absolute;
	top: -10px;
	left: 10px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 88px;
	line-height: 1;
	color: #FF8F00 !important;
}

.mga-quote__text {
	font-style: italic;
	font-size: 19px;
	line-height: 1.55;
}

.mga-quote__text p {
	margin: 0 0 18px;
}

.mga-quote__text p:last-child {
	margin-bottom: 0;
}

.mga-quote__text h1,
.mga-quote__text h2,
.mga-quote__text h3,
.mga-quote__text h4 {
	font-style: normal;
	font-weight: 700;
	margin: 0 0 14px;
}

.mga-quote__footer {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	font-style: normal;
}

.mga-quote__name {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.mga-quote__name + .mga-quote__role::before {
	content: "\2022";
	margin-right: 8px;
	color: currentColor;
}

@media (max-width: 480px) {
	.mga-quote {
		padding: 8px 8px 0 40px;
	}

	.mga-quote__text {
		font-size: 17px;
	}

	.mga-theme--dark.mga-quote {
		padding: 24px 20px 20px 48px !important;
	}

	.mga-theme--dark.mga-quote::before {
		top: 10px !important;
		left: 14px !important;
	}
}

/*
 * theme="dark" - a self-contained dark panel (own background + light text),
 * so it reads correctly on its own on the page's normal light background,
 * not just when manually dropped into an existing dark section.
 * theme="light" (the default) needs no override; these rules only apply
 * on top of it.
 */
.mga-theme--dark.mga-quote {
	background: #3a332a !important;
	padding: 32px 32px 24px 68px !important;
}

.mga-theme--dark.mga-quote::before {
	top: 14px !important;
	left: 24px !important;
	color: #FF8F00 !important;
}

.mga-theme--dark .mga-quote__text,
.mga-theme--dark .mga-quote__text a {
	color: #f1ede7 !important;
}

.mga-theme--dark .mga-quote__text h1,
.mga-theme--dark .mga-quote__text h2,
.mga-theme--dark .mga-quote__text h3,
.mga-theme--dark .mga-quote__text h4 {
	color: #E9CB47 !important;
}

.mga-theme--dark .mga-quote__name {
	color: #ffffff !important;
}

.mga-theme--dark .mga-quote__role {
	color: #cfc6b8 !important;
}

/* MGA shortcodes - mga_consult_cta */

.mga-cta {
	padding: 40px 36px;
	text-align: center;
	margin: 24px 0 32px;
}

.mga-cta__title {
	font-weight: 700;
	font-size: 24px;
	margin: 0 0 12px;
}

.mga-cta__text {
	font-size: 15px;
	line-height: 1.6;
	max-width: 520px;
	margin: 0 auto 28px;
}

.mga-cta__text p {
	margin: 0 0 16px;
}

.mga-cta__text p:last-child {
	margin-bottom: 0;
}

.mga-cta__offices {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 30px;
}

.mga-cta__office {
	flex: 1 1 33.333%;
	box-sizing: border-box;
	min-width: 0;
	padding: 20px 16px;
	text-decoration: none !important;
	transition: background .15s ease;
}

.mga-cta__office-label {
	display: block;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin-bottom: 8px;
	text-decoration: none !important;
}

.mga-cta__office-phone {
	display: block;
	font-weight: 700;
	font-size: 19px;
	text-decoration: none !important;
}

.mga-cta__btn {
	display: inline-block;
	background: #FF8F00 !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none !important;
	padding: 15px 34px;
}

.mga-cta__btn:visited {
	color: #fff !important;
	text-decoration: none !important;
}

.mga-cta__btn:hover,
.mga-cta__btn:focus {
	background: #e07f00 !important;
	color: #fff !important;
	text-decoration: none !important;
}

@media (max-width: 480px) {
	.mga-cta {
		padding: 32px 20px;
	}

	.mga-cta__office {
		flex: 1 1 100%;
	}
}

/*
 * theme="dark" (default) - the originally approved brown panel design.
 * theme="light" - a lighter, page-toned panel for use where a solid brown
 * block would be too heavy, same convention as the attorney quote block.
 */
.mga-cta.mga-theme--dark {
	background: #3a332a;
	color: #eae7e1;
}

.mga-cta.mga-theme--dark .mga-cta__title {
	color: #E9CB47;
}

.mga-cta.mga-theme--dark .mga-cta__text a {
	color: #f1ede7 !important;
	text-decoration: underline !important;
}

.mga-cta.mga-theme--dark .mga-cta__text a:hover {
	color: #FF8F00 !important;
}

.mga-cta.mga-theme--dark .mga-cta__offices {
	border-top: 1px solid rgba(255, 255, 255, .18);
	border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.mga-cta.mga-theme--dark .mga-cta__office {
	border-right: 1px solid rgba(255, 255, 255, .18);
}

.mga-cta.mga-theme--dark .mga-cta__office:last-child {
	border-right: none;
}

.mga-cta.mga-theme--dark .mga-cta__office:hover {
	background: rgba(255, 255, 255, .06);
}

.mga-cta.mga-theme--dark .mga-cta__office-label {
	color: #c9c2b3 !important;
}

.mga-cta.mga-theme--dark .mga-cta__office-phone {
	color: #fff !important;
}

.mga-cta.mga-theme--dark .mga-cta__office:hover .mga-cta__office-phone {
	color: #FF8F00 !important;
}

.mga-cta.mga-theme--light {
	background: #ffffff;
	color: #444444;
	border: 1px solid #d7d5cf;
	border-top: 4px solid #E9CB47;
}

.mga-cta.mga-theme--light .mga-cta__title {
	color: #675C4E;
}

.mga-cta.mga-theme--light .mga-cta__text a {
	text-decoration: underline;
}

.mga-cta.mga-theme--light .mga-cta__text a:hover {
	color: #FF8F00 !important;
}

.mga-cta.mga-theme--light .mga-cta__offices {
	border-top: 1px solid #d7d5cf;
	border-bottom: 1px solid #d7d5cf;
}

.mga-cta.mga-theme--light .mga-cta__office {
	border-right: 1px solid #d7d5cf;
}

.mga-cta.mga-theme--light .mga-cta__office:last-child {
	border-right: none;
}

.mga-cta.mga-theme--light .mga-cta__office:hover {
	background: rgba(0, 0, 0, .03);
}

.mga-cta.mga-theme--light .mga-cta__office-label {
	color: #7c7568 !important;
}

.mga-cta.mga-theme--light .mga-cta__office-phone {
	color: #675C4E !important;
}

.mga-cta.mga-theme--light .mga-cta__office:hover .mga-cta__office-phone {
	color: #FF8F00 !important;
}

@media (max-width: 480px) {
	.mga-cta.mga-theme--dark .mga-cta__office {
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, .18);
	}

	.mga-cta.mga-theme--dark .mga-cta__office:last-child {
		border-bottom: none;
	}

	.mga-cta.mga-theme--light .mga-cta__office {
		border-right: none;
		border-bottom: 1px solid #d7d5cf;
	}

	.mga-cta.mga-theme--light .mga-cta__office:last-child {
		border-bottom: none;
	}
}

/*
 * layout="split" - the same title/text/offices/button markup reflowed into
 * a two-column row (title/text left, office list right), with the button
 * centered below the row rather than tucked into either column. Only
 * layout (position, alignment, spacing) changes here; colors still come
 * entirely from the theme rules above.
 */
.mga-cta--split .mga-cta__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	flex-wrap: wrap;
	text-align: left;
	margin-bottom: 24px;
}

.mga-cta--split .mga-cta__row.mga-cta__row--no-btn {
	margin-bottom: 0;
}

/*
 * No offices means layout="split" has nothing to put beside the copy
 * column, so it's effectively single-column; center it like the stacked
 * default instead of leaving it stuck to the left with dead space beside it.
 */
.mga-cta--split .mga-cta__row.mga-cta__row--text-only {
	justify-content: center;
	text-align: center;
}

.mga-cta--split .mga-cta__row.mga-cta__row--text-only .mga-cta__copy {
	flex: 1 1 auto;
	width: 100%;
}

.mga-cta--split .mga-cta__row.mga-cta__row--text-only .mga-cta__text {
	text-align: center;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.mga-cta--split .mga-cta__copy {
	flex: 1 1 280px;
}

.mga-cta--split .mga-cta__title {
	margin: 0 0 8px;
}

.mga-cta--split .mga-cta__text {
	margin: 0;
	max-width: none;
	text-align: left;
}

.mga-cta--split .mga-cta__action {
	flex: 0 0 auto;
	width: 100%;
	max-width: 320px;
}

.mga-cta--split .mga-cta__offices {
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: flex-start;
	align-items: stretch;
	width: 100%;
	margin-bottom: 0;
}

.mga-cta--split .mga-cta__office {
	flex: 0 0 auto;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
}

/*
 * The theme rules above set border-top/bottom on .mga-cta__offices and
 * border-right on .mga-cta__office with three class selectors each
 * (.mga-cta.mga-theme--*  .mga-cta__*); a plain ".mga-cta--split ..."
 * reset only has two and loses that specificity fight, so these resets
 * are written at the same three-class-plus weight to actually win.
 */
.mga-cta.mga-theme--dark.mga-cta--split .mga-cta__offices,
.mga-cta.mga-theme--light.mga-cta--split .mga-cta__offices {
	border-top: none;
	border-bottom: none;
}

.mga-cta.mga-theme--dark.mga-cta--split .mga-cta__office,
.mga-cta.mga-theme--light.mga-cta--split .mga-cta__office {
	border-right: none;
}

.mga-cta--split .mga-cta__office:last-child {
	padding-bottom: 0;
}

.mga-cta--split .mga-cta__office-label {
	margin-bottom: 0;
}

.mga-cta.mga-theme--dark.mga-cta--split .mga-cta__office {
	border-bottom: 1px dotted rgba(255, 255, 255, .35);
}

.mga-cta.mga-theme--dark.mga-cta--split .mga-cta__office:last-child {
	border-bottom: none;
}

.mga-cta.mga-theme--light.mga-cta--split .mga-cta__office {
	border-bottom: 1px dotted #a89e8d;
}

.mga-cta.mga-theme--light.mga-cta--split .mga-cta__office:last-child {
	border-bottom: none;
}

@media (max-width: 560px) {
	.mga-cta--split .mga-cta__row {
		align-items: center;
	}

	/*
	 * Copy and action are supposed to wrap onto their own rows here via
	 * the row's flex-wrap once combined width no longer fits, but a
	 * theme conflict was overriding that math on the live site - forcing
	 * both to flex-basis:100% stacks them unconditionally instead of
	 * relying on wrap math that can be knocked off by outside CSS.
	 */
	.mga-cta--split .mga-cta__copy {
		flex: 1 1 100% !important;
		width: 100% !important;
	}

	.mga-cta--split .mga-cta__action {
		flex: 1 1 100% !important;
		width: 100% !important;
		max-width: 320px;
		margin: 0 auto;
	}

	.mga-cta--split .mga-cta__offices {
		width: 100% !important;
	}
}

/*
 * MGA shortcodes - numbered list utility classes
 *
 * Not tied to any shortcode: add class="mga-steps" directly to a plain
 * <ol> anywhere in page content to get a numbered orange-badge list
 * instead of default browser numbering. Add the "mga-steps--cards"
 * modifier alongside it for the bordered-panel-card variant instead.
 *
 * Note: this CSS file only loads on pages that already contain one of
 * this plugin's own shortcodes (see maybe_enqueue_assets() in the main
 * plugin file). If a page uses only this class with no [mga_*] shortcode
 * present, this stylesheet won't be enqueued and the class will do
 * nothing - if that's needed, ask to have the enqueue check adjusted.
 */
.mga-steps {
	list-style: none !important;
	counter-reset: mga-steps;
	margin: 0 0 20px;
	padding: 0;
}

.mga-steps li {
	position: relative;
	counter-increment: mga-steps;
	padding: 0 0 18px 44px;
	line-height: 1.6;
}

.mga-steps li:last-child {
	padding-bottom: 0;
}

.mga-steps li::before {
	content: counter(mga-steps);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #FF8F00;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	line-height: 28px;
	text-align: center;
}

.mga-steps.mga-steps--cards {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mga-steps.mga-steps--cards li {
	background: #f7f3ed;
	border: 1px solid #e8e1d6;
	border-radius: 10px;
	padding: 18px 20px 18px 60px;
}

.mga-steps.mga-steps--cards li::before {
	left: 18px;
	top: 18px;
	width: 26px;
	height: 26px;
	background: #675C4E;
	font-size: 13px;
	line-height: 26px;
}

@media (max-width: 480px) {
	.mga-steps.mga-steps--cards li {
		padding-left: 52px;
	}

	.mga-steps.mga-steps--cards li::before {
		left: 14px;
		top: 16px;
	}
}

/*
 * MGA shortcodes - responsive table ([mga_table] and the "mga-table" class)
 *
 * Works for any table regardless of column count. On mobile, rows stack
 * into cards and each cell shows its own column header as a label above
 * the value; the labels are generated automatically by
 * assets/js/mga-content-blocks.js reading the table's own header row, no
 * manual data-label authoring needed. Supports either a real <thead> with
 * <th> cells, or a pasted table whose header row uses plain <td> (common
 * from doc exports) inside or outside a <thead>.
 */
.mga-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 24px;
	font-size: 14px;
}

.mga-table th,
.mga-table thead td {
	background: #675C4E;
	color: #fff;
	text-align: left;
	padding: 12px 16px;
	font-weight: 700;
}

.mga-table th > *,
.mga-table thead td > * {
	margin: 0;
	color: #fff !important;
}

.mga-table td {
	padding: 12px 16px;
	border-bottom: 1px solid #e2e0da;
	vertical-align: top;
}

.mga-table td p {
	margin: 0;
}

.mga-table tbody tr:nth-child(even) {
	background: #f7f6f2;
}

.mga-table a {
	color: #00437F;
	text-decoration: underline;
}

.mga-table a:hover {
	color: #FF8F00;
}

@media (max-width: 680px) {
	.mga-table thead {
		display: none;
	}

	.mga-table,
	.mga-table tbody,
	.mga-table tr,
	.mga-table td {
		display: block;
		width: 100%;
	}

	.mga-table tr {
		margin-bottom: 16px;
		border: 1px solid #e2e0da;
		border-radius: 8px;
		overflow: hidden;
		background: #fff;
	}

	.mga-table tbody tr:nth-child(even) {
		background: #fff;
	}

	.mga-table td {
		display: flex;
		flex-direction: column;
		gap: 4px;
		border-bottom: 1px solid #eeece7;
		padding: 10px 14px;
	}

	.mga-table td:last-child {
		border-bottom: none;
	}

	.mga-table td::before {
		content: attr(data-mga-label);
		font-weight: 700;
		font-size: 11px;
		letter-spacing: .04em;
		text-transform: uppercase;
		color: #675C4E;
	}
}

/*
 * MGA shortcodes - office grid ([mga_office_grid] / [mga_office_grid_item])
 *
 * CSS grid, not a table: 3 offices per row on desktop, matching the site's
 * existing bordered location-card look (photo, uppercase linked title,
 * labeled address, labeled phone with icon). One fixed design, no theme
 * attribute. .mga-office-grid is the outer wrapper (clipped via
 * overflow:hidden); .mga-office-grid__track inside it is the actual
 * grid/slider - split out so the pagination dots (appended into the outer
 * element, not the track, see assets/js/mga-content-blocks.js) don't
 * become another slide to scroll to. slider="yes" on the shortcode adds
 * the "mga-office-grid--slider" modifier, swapping the tablet/mobile
 * behavior from stacking into fewer columns to a swipeable one-card
 * slider with those dots.
 *
 * Confirmed live (DevTools, mobile width) that the theme's own two-column
 * ".flex-item" wrapper refuses to shrink below the slider's un-scrolled
 * content width, blowing the whole column out past the viewport - a flex
 * item's default "auto" minimum size is based on its content, and that
 * default wins even though .mga-office-grid itself already has
 * overflow:hidden. min-width:0 on the theme's own flex item is what
 * actually fixes it (verified: dropped a 498px-wide column back to
 * 306px); scoped with :has() to only that wrapper so it doesn't touch
 * unrelated ".flex-item" uses elsewhere on the site.
 */
.flex-item:has(.mga-office-grid--slider) {
	min-width: 0;
}

.mga-office-grid {
	margin: 0 0 24px;
	overflow: hidden;
	/* The theme wraps block content in flex columns; a flex child won't
	   shrink below its content's natural width by default, and the
	   horizontally-scrollable __track below has no such limit on its own,
	   so without this the whole grid blows out past its column on any
	   flex-based layout. */
	min-width: 0;
}

.mga-office-grid__track {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	min-width: 0;
}

.mga-office-grid__item {
	background: #fff;
	border: 5px solid #665b4d;
	padding-bottom: 20px;
}

.mga-office-grid__photo {
	aspect-ratio: 4 / 3;
	margin-bottom: 16px;
	overflow: hidden;
}

.mga-office-grid__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mga-office-grid__title {
	font-size: 16px;
	letter-spacing: .02em;
	margin: 0 18px 10px;
}

.mga-office-grid__title a {
	color: #00437F;
	text-decoration: none;
	text-transform: uppercase;
}

.mga-office-grid__title a:hover {
	color: #FF8F00;
}

.mga-office-grid__address {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin: 0 18px 10px;
}

.mga-office-grid__address::before {
	content: "Address: ";
	font-weight: 700;
	color: #333;
}

.mga-office-grid__phone {
	font-size: 14px;
	margin: 0 18px;
}

.mga-office-grid__phone::before {
	content: "Phone: ";
	font-weight: 700;
	color: #333;
}

.mga-office-grid__phone a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-weight: 700;
	color: #00437F;
	text-decoration: underline;
}

.mga-office-grid__phone a:hover {
	color: #FF8F00;
}

.mga-office-grid__phone a::before {
	content: "";
	width: 13px;
	height: 13px;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.36 11.36 0 0 0 .57 3.57 1 1 0 0 1-.25 1.01Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24 11.36 11.36 0 0 0 3.57.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.36 11.36 0 0 0 .57 3.57 1 1 0 0 1-.25 1.01Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Default (no slider): collapse into fewer columns on smaller screens. */
@media (max-width: 900px) {
	.mga-office-grid:not(.mga-office-grid--slider) .mga-office-grid__track {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.mga-office-grid:not(.mga-office-grid--slider) .mga-office-grid__track {
		grid-template-columns: 1fr;
	}
}

/* slider="yes": swipeable one-card slider instead of column stacking. */
@media (max-width: 900px) {
	.mga-office-grid--slider .mga-office-grid__track {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.mga-office-grid--slider .mga-office-grid__track::-webkit-scrollbar {
		display: none;
	}

	.mga-office-grid--slider .mga-office-grid__item {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}
}

@media (max-width: 560px) {
	.mga-office-grid--slider .mga-office-grid__item {
		flex: 0 0 86%;
	}
}

.mga-office-grid__dots {
	display: none;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
}

.mga-office-grid__dots button {
	width: 8px !important;
	height: 8px !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: #d7d5cf;
	cursor: pointer;
}

.mga-office-grid__dots button.is-active {
	background: #FF8F00;
}

@media (max-width: 900px) {
	.mga-office-grid__dots {
		display: flex;
	}
}

/*
 * MGA shortcodes - FAQ accordion
 *
 * Covers both [mga_accordion]'s own generated markup (.mga-accordion
 * .faq-item / .accordion-label / .accordion-content) and hand-authored
 * <details>/<summary> FAQ markup using the same "pi-faq" / "faq-q"
 * classnames already in use on some pages, so both share one stylesheet.
 * Light is the default for both (add faq-theme-dark by hand on .pi-faq
 * markup, since it isn't generated through the shortcode's theme=""
 * attribute).
 */
.mga-accordion,
.pi-faq {
	margin-bottom: 24px;
}

.mga-accordion .faq-item,
.pi-faq details {
	border-bottom: 1px solid #e2e0da;
}

.mga-accordion .faq-item:first-child,
.pi-faq details:first-child {
	border-top: 1px solid #e2e0da;
}

.mga-accordion .faq-item summary,
.pi-faq details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	list-style: none;
	cursor: pointer;
	padding: 18px 4px;
}

.mga-accordion .faq-item summary::-webkit-details-marker,
.pi-faq details summary::-webkit-details-marker {
	display: none;
}

.mga-accordion .accordion-label,
.pi-faq .faq-q {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #675C4E;
}

.mga-accordion .faq-item summary::after,
.pi-faq details summary::after {
	content: "+";
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	line-height: 22px;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	color: #FF8F00;
	border: 1px solid #FF8F00;
	border-radius: 50%;
	transition: transform .2s ease;
}

.mga-accordion .faq-item[open] summary::after,
.pi-faq details[open] summary::after {
	transform: rotate(45deg);
}

.mga-accordion .accordion-content,
.pi-faq details > p,
.pi-faq details > ul {
	margin: 0 4px 14px;
	font-size: 14px;
	line-height: 1.6;
	color: #444;
}

.pi-faq details > p:last-child,
.pi-faq details > ul:last-child {
	margin-bottom: 0;
}

/*
 * .accordion-content is always the last (and only) answer element inside
 * its <details> (unlike .pi-faq's plain p/ul siblings above, where
 * :last-child correctly means "the last of several"), so zeroing its
 * margin the same way would always cancel out the bottom space entirely.
 * Padding instead, so it holds regardless of position.
 */
.mga-accordion .accordion-content {
	margin-bottom: 0;
	padding-bottom: 18px;
}

.mga-accordion .accordion-content p {
	margin: 0 0 14px;
}

.mga-accordion .accordion-content p:last-child {
	margin-bottom: 0;
}

.mga-accordion .accordion-content ul,
.pi-faq details > ul {
	padding-left: 20px;
}

.mga-accordion .accordion-content ul li,
.pi-faq details > ul li {
	margin-bottom: 8px;
}

.mga-accordion .accordion-content a,
.pi-faq details a {
	color: #00437F;
	text-decoration: underline;
}

.mga-accordion .accordion-content a:hover,
.pi-faq details a:hover {
	color: #FF8F00;
}

/* theme="dark" ([mga_accordion theme="dark"], or .pi-faq.faq-theme-dark
   added by hand) - self-contained dark panel, same convention as the
   other dark-theme blocks. */
.mga-accordion.faq-theme-dark,
.pi-faq.faq-theme-dark {
	background: #3a332a;
	padding: 24px;
}

.mga-accordion.faq-theme-dark .faq-item,
.pi-faq.faq-theme-dark details {
	border-bottom-color: rgba(255, 255, 255, .18);
}

/*
 * The panel's own padding already separates the first/last item from
 * the panel edge, so the outer top/bottom borders (meant to delimit the
 * list against the plain page background in the no-padding light theme)
 * are redundant here and just double up against that edge.
 */
.mga-accordion.faq-theme-dark .faq-item:first-child,
.pi-faq.faq-theme-dark details:first-child {
	border-top: none;
}

.mga-accordion.faq-theme-dark .faq-item:last-child,
.pi-faq.faq-theme-dark details:last-child {
	border-bottom: none;
}

.mga-accordion.faq-theme-dark .accordion-label,
.pi-faq.faq-theme-dark .faq-q {
	color: #eae7e1 !important;
}

.mga-accordion.faq-theme-dark .accordion-content,
.pi-faq.faq-theme-dark details > p,
.pi-faq.faq-theme-dark details > ul {
	color: #cfc6b8 !important;
}

.mga-accordion.faq-theme-dark .accordion-content a,
.pi-faq.faq-theme-dark details a {
	color: #f1ede7 !important;
}

.mga-accordion.faq-theme-dark .accordion-content a:hover,
.pi-faq.faq-theme-dark details a:hover {
	color: #FF8F00 !important;
}

/*
 * MGA shortcodes - FAQ accordion, standalone classname
 *
 * Same visual design as the .mga-accordion / .pi-faq accordion above,
 * replicated under its own "mga-faq" classname for markup that isn't
 * generated through [mga_accordion] and isn't called ".pi-faq" either.
 * Structure: <div class="mga-faq"><details><summary><h3 class="mga-faq__q">
 * Question</h3></summary>Answer content</details>...</div>. Modifiers are
 * plain BEM ("--dark"/"--light"), not the "theme" naming the rest of this
 * plugin uses, so this set stays independent of that convention.
 */
.mga-faq {
	margin-bottom: 24px;
}

.mga-faq details {
	border-bottom: 1px solid #e2e0da;
}

.mga-faq details:first-child {
	border-top: 1px solid #e2e0da;
}

.mga-faq details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	list-style: none;
	cursor: pointer;
	padding: 18px 4px;
}

.mga-faq details summary::-webkit-details-marker {
	display: none;
}

.mga-faq__q {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #675C4E;
}

.mga-faq details summary::after {
	content: "+";
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	line-height: 22px;
	text-align: center;
	font-size: 18px;
	font-weight: 700;
	color: #FF8F00;
	border: 1px solid #FF8F00;
	border-radius: 50%;
	transition: transform .2s ease;
}

.mga-faq details[open] summary::after {
	transform: rotate(45deg);
}

.mga-faq details > p,
.mga-faq details > ul {
	margin: 0 4px 14px;
	font-size: 14px;
	line-height: 1.6;
	color: #444;
}

.mga-faq details > p:last-child,
.mga-faq details > ul:last-child {
	margin-bottom: 0;
}

.mga-faq details > ul {
	padding-left: 20px;
}

.mga-faq details > ul li {
	margin-bottom: 8px;
}

.mga-faq details a {
	color: #00437F;
	text-decoration: underline;
}

.mga-faq details a:hover {
	color: #FF8F00;
}

/* --dark modifier - self-contained dark panel. */
.mga-faq--dark {
	background: #3a332a;
	padding: 24px;
}

.mga-faq--dark details {
	border-bottom-color: rgba(255, 255, 255, .18);
}

/* The panel's own padding already separates the first/last item from
   the panel edge, so the outer top/bottom borders are redundant here. */
.mga-faq--dark details:first-child {
	border-top: none;
}

.mga-faq--dark details:last-child {
	border-bottom: none;
}

.mga-faq--dark .mga-faq__q {
	color: #eae7e1 !important;
}

.mga-faq--dark details > p,
.mga-faq--dark details > ul {
	color: #cfc6b8 !important;
}

.mga-faq--dark details a {
	color: #f1ede7 !important;
}

.mga-faq--dark details a:hover {
	color: #FF8F00 !important;
}

/*
 * MGA shortcodes - related articles ([mga_related_articles] / [mga_related_article])
 *
 * A list of article cards: small square image beside a linked title, two
 * per row on desktop, one per row on phones. theme="light" (the default)
 * sits on the page background; theme="dark" is a self-contained brown panel
 * (same convention as the quote and CTA blocks).
 */
.mga-related {
	margin: 24px 0 32px;
}

.mga-related .mga-related__title {
	margin: 0 0 20px;
	color: #675C4E;
}

.mga-related .mga-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
	gap: 16px;
}

.mga-related .mga-related__item {
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.mga-related .mga-related__item::before {
	content: none;
}

.mga-related .mga-related__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	align-items: center;
	box-sizing: border-box;
	height: 100%;
	padding: 12px;
	background: #fff;
	border: 1px solid #e2e0da;
	border-radius: 6px;
	color: #343333;
	text-decoration: none;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mga-related .mga-related__card:has(.mga-related__thumb) {
	grid-template-columns: 112px minmax(0, 1fr);
}

.mga-related .mga-related__thumb {
	display: block;
	width: 112px;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	overflow: hidden;
	background: #f3efe9;
}

.mga-related .mga-related__thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover !important;
	float: none !important;
}

.mga-related .mga-related__body {
	display: block;
	min-width: 0;
}

.mga-related .mga-related__name {
	display: block;
	font-family: "Playfair Display", Georgia, "Times New Roman", serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: #343333;
	text-wrap: balance;
}

.mga-related a.mga-related__card,
.mga-related a.mga-related__card:visited,
.mga-related a.mga-related__card:hover,
.mga-related a.mga-related__card:focus,
.mga-related a.mga-related__card:focus-visible {
	text-decoration: none !important;
}

.mga-related a.mga-related__card:hover,
.mga-related a.mga-related__card:focus-visible {
	border-color: #675C4E;
	box-shadow: 0 6px 18px rgba(52, 51, 51, .12);
	transform: translateY(-2px);
}

.mga-related a.mga-related__card:hover .mga-related__name,
.mga-related a.mga-related__card:focus-visible .mga-related__name {
	text-decoration: underline;
	text-decoration-color: #E9CB47;
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}

.mga-related a.mga-related__card:focus-visible {
	outline: 3px solid #E9CB47;
	outline-offset: 2px;
}

/* theme="dark" - brown panel, light text */
.mga-related.mga-theme--dark {
	background: #675C4E;
	padding: 32px;
	border-radius: 6px;
}

.mga-related.mga-theme--dark .mga-related__title {
	color: #fff;
}

.mga-related.mga-theme--dark .mga-related__card {
	background: rgba(255, 255, 255, .07);
	border-color: rgba(255, 255, 255, .22);
}

.mga-related.mga-theme--dark .mga-related__thumb {
	background: rgba(255, 255, 255, .12);
}

.mga-related.mga-theme--dark .mga-related__name {
	color: #fff;
}

.mga-related.mga-theme--dark a.mga-related__card:hover,
.mga-related.mga-theme--dark a.mga-related__card:focus-visible {
	border-color: #E9CB47;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

@media (max-width: 760px) {
	.mga-related .mga-related__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.mga-related.mga-theme--dark {
		padding: 20px;
	}
}

@media (max-width: 420px) {
	.mga-related .mga-related__card {
		gap: 12px;
		padding: 10px;
	}

	.mga-related .mga-related__card:has(.mga-related__thumb) {
		grid-template-columns: 88px minmax(0, 1fr);
	}

	.mga-related .mga-related__thumb {
		width: 88px;
	}

	.mga-related .mga-related__name {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mga-related .mga-related__card {
		transition: none;
	}

	.mga-related a.mga-related__card:hover,
	.mga-related a.mga-related__card:focus-visible {
		transform: none;
	}
}
