/*
 * NTM Google Reviews — "Google Reviews (Featured)" widget.
 * Loaded only on pages that contain the widget (Elementor get_style_depends).
 * All values below are also the defaults of the widget's Style controls.
 */

.ntm-gr {
	--ntm-gr-star-full: #E3A72F;
	--ntm-gr-star-empty: #C9C4BB;
	display: flex;
	flex-direction: column;
	height: 100%; /* lets the link sit at the bottom of the parent */
	font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Summary row */
.ntm-gr__summary { display: flex; align-items: center; justify-content: var(--ntm-gr-flex, flex-start); flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.ntm-gr__stars   { display: inline-flex; gap: 2px; font-size: 17px; line-height: 1; letter-spacing: 0; }
.ntm-gr__star.is-full  { color: var(--ntm-gr-star-full); }
.ntm-gr__star.is-empty { color: var(--ntm-gr-star-empty); }
.ntm-gr__star.is-half {
	color: var(--ntm-gr-star-empty);
	background: linear-gradient(90deg, var(--ntm-gr-star-full) 50%, var(--ntm-gr-star-empty) 50%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.ntm-gr__summary-text        { font-size: 14px; font-weight: 500; letter-spacing: -0.04em; color: #4A4A4A; }
.ntm-gr__summary-text strong { font-weight: 700; color: #2B2B2B; }

/* Featured review */
.ntm-gr figure { padding: 0; }
.ntm-gr__featured { margin: 0 0 22px; }

/* Reset theme blockquote styles (borders, italics, decorative quote marks). */
.ntm-gr .ntm-gr__quote {
	margin: 0; padding: 0; border: 0;
	background: none; box-shadow: none;
	font-style: normal; quotes: none; text-align: inherit;
	font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
	font-weight: 400;
}
.ntm-gr .ntm-gr__quote::before,
.ntm-gr .ntm-gr__quote::after { content: none; display: none; }

.ntm-gr .ntm-gr__quote--featured { font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; color: #1F3B5C; margin-bottom: 15px; }

/* Meta (base = secondary; featured modifier declared after so it wins) */
.ntm-gr__meta { font-size: 13px; font-weight: 400; letter-spacing: -0.04em; color: #7A7A7A; line-height: 1.4; font-style: normal; }
.ntm-gr__meta.ntm-gr__meta--featured { font-size: 14px; font-weight: 600; letter-spacing: -0.04em; color: #555555; line-height: 1.4; }
.ntm-gr__sep  { margin: 0 3px; }
.ntm-gr a.ntm-gr__author { color: inherit; text-decoration: none; box-shadow: none; }
.ntm-gr a.ntm-gr__author:hover,
.ntm-gr a.ntm-gr__author:focus-visible { text-decoration: underline; }

/* Divider */
.ntm-gr .ntm-gr__divider {
	height: 0; background: none;
	border: 0; border-top: 1px solid #E6E2DA;
	margin: 0 0 21px;
}

/* Secondary reviews */
.ntm-gr__list { display: flex; flex-direction: column; gap: 14px; }
.ntm-gr__item { margin: 0; }
.ntm-gr .ntm-gr__item .ntm-gr__quote { font-size: 17px; line-height: 1.4; color: #2B2B2B; margin-bottom: 8px; }

/* Link pinned to bottom */
.ntm-gr .ntm-gr__link {
	margin-top: auto;
	padding-top: 40px;
	align-self: var(--ntm-gr-flex, flex-start);
	font-size: 14px; font-weight: 600;
	color: #1F3B5C;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	padding-bottom: 2px;
	line-height: 1.3;
	box-shadow: none;
}
.ntm-gr .ntm-gr__link:hover,
.ntm-gr .ntm-gr__link:focus-visible { opacity: .8; text-decoration: none; }
.ntm-gr--unpinned .ntm-gr__link { margin-top: 0; }

/*
 * "Pin link to bottom": stretch the Elementor widget wrapper so .ntm-gr can fill
 * the container height. Works with and without Elementor's optimized markup
 * (which removes .elementor-widget-container). The parent must have a height
 * (e.g. equal-height columns / a stretched flex container).
 */
.elementor-widget.ntm-gr-pin-yes { flex-grow: 1; display: flex; flex-direction: column; }
.elementor-widget.ntm-gr-pin-yes > .elementor-widget-container { flex-grow: 1; display: flex; flex-direction: column; }
.elementor-widget.ntm-gr-pin-yes .ntm-gr { flex-grow: 1; }

/* Editor/admin-only notices */
.ntm-gr-notice {
	padding: 12px 14px;
	border: 1px dashed #C9C4BB;
	border-radius: 4px;
	background: #FBFAF7;
	color: #4A4A4A;
	font: 13px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
	margin-bottom: 12px;
}

@media (max-width: 767px) {
	.ntm-gr .ntm-gr__quote--featured { font-size: 20px; line-height: 1.4; }
	.ntm-gr .ntm-gr__item .ntm-gr__quote { font-size: 16px; line-height: 1.55; }
	/* Featured (1.4.0): stars stay beside the rating text, which wraps next to them. */
	.ntm-gr:not(.ntm-gr--carousel) .ntm-gr__summary { flex-wrap: nowrap; margin-bottom: 20px; }
	.ntm-gr:not(.ntm-gr--carousel) .ntm-gr__summary-text { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
	.ntm-gr:not(.ntm-gr--carousel) .ntm-gr__stars { flex: 0 0 auto; }
	.ntm-gr:not(.ntm-gr--carousel) .ntm-gr__link { padding-top: 25px; }
}

/* =====================================================================
 * Carousel template (.ntm-gr--carousel). Values = Style control defaults.
 * Buttons use (0,3,0) selectors so theme button styles can't restyle them.
 * ===================================================================== */
.ntm-gr--carousel {
	--ntm-gr-per-view: 1;
	--ntm-gr-gap: 20px;
	--ntm-gr-nav-size: 46px;
	height: auto;
}

/* Heading + summary on the left, arrows on the right */
.ntm-gr--carousel .ntm-gr__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.ntm-gr--carousel .ntm-gr__intro { min-width: 0; }
.ntm-gr.ntm-gr--carousel .ntm-gr__heading {
	margin: 0 0 11px; padding: 0;
	font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
	font-size: 40px; font-weight: 700; line-height: 1.15; letter-spacing: -0.5px;
	color: #00355E;
}
.ntm-gr--carousel .ntm-gr__summary { margin-bottom: 0; }
.ntm-gr.ntm-gr--carousel .ntm-gr__stars { font-size: 15px; }
.ntm-gr--carousel .ntm-gr__navs { display: flex; gap: 8px; flex-shrink: 0; }

.ntm-gr.ntm-gr--carousel .ntm-gr__nav {
	display: inline-flex; align-items: center; justify-content: center;
	box-sizing: border-box;
	width: var(--ntm-gr-nav-size); height: var(--ntm-gr-nav-size);
	min-width: 0; min-height: 0; margin: 0; padding: 0;
	border: 1px solid #DAD7D0; border-radius: 50%;
	background: #FFFFFF; background-image: none; box-shadow: none;
	color: #00355E; font: inherit; font-size: 17px; line-height: 1; text-transform: none; letter-spacing: 0;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease, opacity .25s ease;
}
.ntm-gr.ntm-gr--carousel .ntm-gr__nav:hover,
.ntm-gr.ntm-gr--carousel .ntm-gr__nav:focus-visible { background-color: #00355E; color: #FFFFFF; border-color: #00355E; }
.ntm-gr.ntm-gr--carousel .ntm-gr__nav:focus-visible { outline: 2px solid #6EB8BB; outline-offset: 2px; }
.ntm-gr.ntm-gr--carousel .ntm-gr__nav[disabled] { opacity: .4; cursor: default; pointer-events: none; }

/* Track: native horizontal scroll with snap (swipe works without JS) */
.ntm-gr--carousel .ntm-gr__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--ntm-gr-per-view) - 1) * var(--ntm-gr-gap)) / var(--ntm-gr-per-view));
	gap: var(--ntm-gr-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.ntm-gr--carousel .ntm-gr__track::-webkit-scrollbar { display: none; }
.ntm-gr--carousel .ntm-gr__track:focus-visible { outline: 2px solid #6EB8BB; outline-offset: 3px; border-radius: 20px; }

/* Review card */
.ntm-gr.ntm-gr--carousel .ntm-gr__slide {
	display: flex; flex-direction: column;
	box-sizing: border-box;
	min-width: 0; min-height: 230px; margin: 0;
	padding: 39px 34px 36px;
	border-radius: 20px;
	background-color: #F6F4EF;
	scroll-snap-align: start;
}
.ntm-gr--carousel .ntm-gr__slide-stars { display: flex; gap: 2px; margin-bottom: 20px; font-size: 16px; line-height: 1; letter-spacing: 0; color: #C08A2E; }
.ntm-gr--carousel .ntm-gr__slide-stars .is-empty { opacity: .45; }
.ntm-gr.ntm-gr--carousel .ntm-gr__quote--slide { font-size: 20px; line-height: 1.45; letter-spacing: -0.35px; color: #3A3A36; margin-bottom: 24px; }
.ntm-gr.ntm-gr--carousel .ntm-gr__meta--slide { margin-top: auto; font-size: 13px; font-weight: 400; letter-spacing: -0.2px; line-height: 1.4; color: #6B6B66; }

/* Dots + link */
.ntm-gr--carousel .ntm-gr__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-top: 19px; }
.ntm-gr--carousel .ntm-gr__dots {
	--ntm-gr-dot: 8px;
	--ntm-gr-dot-active: 26px;
	--ntm-gr-dot-color: #D5DDDF;
	--ntm-gr-dot-active-color: #6EB8BB;
	display: flex; align-items: center; gap: 7px;
}
.ntm-gr.ntm-gr--carousel .ntm-gr__dot {
	display: block; flex: 0 0 auto;
	box-sizing: border-box;
	width: var(--ntm-gr-dot); height: var(--ntm-gr-dot);
	min-width: 0; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 999px;
	background: var(--ntm-gr-dot-color); box-shadow: none;
	font-size: 0; line-height: 0;
	cursor: pointer;
	transition: width .35s cubic-bezier(.4, 0, .2, 1), background-color .35s ease;
}
.ntm-gr.ntm-gr--carousel .ntm-gr__dot:hover { background: var(--ntm-gr-dot-active-color); }
.ntm-gr.ntm-gr--carousel .ntm-gr__dot:focus-visible { outline: 2px solid var(--ntm-gr-dot-active-color); outline-offset: 3px; }
.ntm-gr.ntm-gr--carousel .ntm-gr__dot[aria-current="true"] { width: var(--ntm-gr-dot-active); background: var(--ntm-gr-dot-active-color); cursor: default; }
.ntm-gr.ntm-gr--carousel .ntm-gr__dot[hidden] { display: none; }
.ntm-gr.ntm-gr--carousel .ntm-gr__link { margin: 0 0 0 auto; padding-top: 0; align-self: center; }
.ntm-gr--carousel .ntm-gr__link { color: #00355E; padding-bottom: 0; }

@media (max-width: 767px) {
	.ntm-gr.ntm-gr--carousel .ntm-gr__heading { font-size: 26px; }
	.ntm-gr--carousel .ntm-gr__top { flex-wrap: wrap; row-gap: 18px; }
	.elementor-widget:not(.ntm-gr-arrows-mobile-show) .ntm-gr--carousel .ntm-gr__navs { display: none; }
	.ntm-gr.ntm-gr--carousel .ntm-gr__quote--slide { font-size: 18px; line-height: 1.6; text-wrap: pretty; } /* No single word alone on the last line. */
	.ntm-gr--carousel .ntm-gr__slide-stars { margin-bottom: 18px; }
	.ntm-gr--carousel .ntm-gr__bottom { margin-top: 68px; }
}

@media (prefers-reduced-motion: reduce) {
	.ntm-gr--carousel .ntm-gr__track { scroll-behavior: auto; }
	.ntm-gr.ntm-gr--carousel .ntm-gr__dot,
	.ntm-gr.ntm-gr--carousel .ntm-gr__nav { transition: none; }
}
