/* Agma Google Reviews – без border-radius */
.agr {
	--agr-cols: var(--agr-c-d, 3);
	--agr-gap: 24px;
	--agr-lines: 5;
	--agr-star: #fbbc05;
	--agr-star-empty: #e3e3e3;
	--agr-star-size: 15px;
	--agr-avatar: 44px;
	--agr-logo: 20px;
	--agr-logo-h: 34px;
	--agr-ink: #1d1d1f;
	--agr-muted: #8a8a8e;
	--agr-line: #ececec;
	--agr-dot: #d4d4d4;
	--agr-dot-active: #1d1d1f;
	--agr-tail: 32px;           /* хоризонтална позиция на "опашката" на балончето */
	position: relative;
	box-sizing: border-box;
	color: var(--agr-ink);
}
@media (max-width: 1024px) { .agr { --agr-cols: var(--agr-c-t, 2); } }
@media (max-width: 767px)  { .agr { --agr-cols: var(--agr-c-m, 1); } }

.agr *, .agr *::before, .agr *::after { box-sizing: border-box; }
.agr, .agr *, .agr img { border-radius: 0 !important; }

/* ── Header ─────────────────────────────── */
.agr__header {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 20px; margin-bottom: 32px;
}
.agr__title { margin: 0; }
.agr__summary { display: flex; align-items: center; gap: 14px; }
.agr__summary-row { display: flex; align-items: center; gap: 10px; }
.agr__avg { font-size: 26px; font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.agr__summary .agr-stars { --agr-star-size: 18px; }
.agr__count { font-size: 13px; color: var(--agr-muted); margin-top: 6px; letter-spacing: .01em; }
.agr__logo { width: var(--agr-logo-h); height: var(--agr-logo-h); }

/* ── Track ──────────────────────────────── */
.agr__viewport { position: relative; }
.agr__track {
	display: grid;
	grid-template-columns: repeat(var(--agr-cols), minmax(0, 1fr));
	gap: 40px var(--agr-gap);
}
.agr--carousel .agr__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	/* място за сянката, иначе overflow я реже */
	padding: 14px 10px 18px;
	margin: -14px -10px -18px;
	scroll-padding: 0 10px;
	outline: none;
}
.agr--carousel .agr__track::-webkit-scrollbar { display: none; }
.agr--carousel .agr-item {
	flex: 0 0 calc((100% - (var(--agr-cols) - 1) * var(--agr-gap)) / var(--agr-cols));
	scroll-snap-align: start;
}

/* ── Item: балонче + автор отдолу ───────── */
.agr-item { display: flex; flex-direction: column; margin: 0; min-width: 0; }

.agr-card {
	position: relative;
	flex: 1;
	display: flex; flex-direction: column;
	min-height: 190px;
	padding: 26px 28px 30px;
	background: #fff;
	border: 1px solid var(--agr-line);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px -12px rgba(16, 24, 40, .12);
	transition: box-shadow .3s ease, transform .3s ease;
}
.agr-item:hover .agr-card {
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 18px 40px -14px rgba(16, 24, 40, .2);
	transform: translateY(-2px);
}
/* опашка на балончето */
.agr-card::after {
	content: "";
	position: absolute;
	left: var(--agr-tail);
	bottom: -8px;
	width: 15px; height: 15px;
	background: inherit;
	border-right: inherit;
	border-bottom: inherit;
	transform: rotate(45deg);
	box-shadow: 4px 4px 8px -4px rgba(16, 24, 40, .08);
}

.agr-card__top {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	position: relative; z-index: 1;
}
.agr-card__logo { width: var(--agr-logo); height: var(--agr-logo); }
.agr-glogo { display: block; flex: 0 0 auto; }

.agr-card__text {
	position: relative; z-index: 1;
	margin-top: 18px;
	font-size: 15px;
	line-height: 1.7;
	color: #3a3a3c;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--agr-lines);
	line-clamp: var(--agr-lines);
	overflow: hidden;
}
.agr-card__text.is-open { display: block; -webkit-line-clamp: unset; line-clamp: unset; }

.agr-card__more {
	position: relative; z-index: 1;
	align-self: flex-start;
	margin-top: 12px; padding: 0 0 2px;
	background: none !important; border: 0; box-shadow: none;
	border-bottom: 1px solid currentColor;
	font: inherit; font-size: 12px; font-weight: 600;
	letter-spacing: .08em; text-transform: uppercase;
	color: var(--agr-ink); cursor: pointer;
	transition: opacity .2s;
}
.agr-card__more:hover { opacity: .6; }
/* Защита от hover/focus стиловете на темата и Elementor Kit за <button> */
.agr .agr-card__more,
.agr .agr-card__more:hover,
.agr .agr-card__more:focus,
.agr .agr-card__more:active {
	color: var(--agr-more, var(--agr-ink)) !important;
	background: transparent !important;
	border-color: currentColor !important;
	box-shadow: none !important;
	text-decoration: none !important;
	transform: none !important;
}
.agr .agr__arrow:not(:disabled):hover,
.agr .agr__arrow:not(:disabled):focus-visible {
	background: var(--agr-arrow-hover-bg, var(--agr-ink)) !important;
	border-color: var(--agr-arrow-hover-bg, var(--agr-ink)) !important;
	color: var(--agr-arrow-hover, #fff) !important;
}
.agr .agr__dot:hover, .agr .agr__dot:focus { background: var(--agr-dot-active) !important; box-shadow: none !important; }
.agr-card__more[hidden] { display: none; }

/* декоративни кавички */
.agr-card__quote {
	position: absolute; right: 22px; bottom: -52px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 120px; line-height: 1;
	color: rgba(0, 0, 0, .045);
	pointer-events: none; user-select: none;
}
.agr-card--empty .agr-card__quote { color: rgba(0, 0, 0, .06); font-size: 150px; bottom: -66px; }

/* ── Stars (SVG) ────────────────────────── */
.agr-stars { position: relative; display: inline-flex; line-height: 0; white-space: nowrap; }
.agr-stars__bg, .agr-stars__fg { display: inline-flex; gap: 2px; }
.agr-stars__bg { color: var(--agr-star-empty); }
.agr-stars__fg { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--agr-star); }
.agr-stars svg { width: var(--agr-star-size); height: var(--agr-star-size); flex: 0 0 auto; fill: currentColor; display: block; }

/* ── Author ─────────────────────────────── */
.agr-card__author {
	display: flex; align-items: center; gap: 14px;
	padding: 22px 0 0 calc(var(--agr-tail) + 7px - var(--agr-avatar) / 2);
}
.agr-card__avatar {
	position: relative; flex: 0 0 auto;
	width: var(--agr-avatar); height: var(--agr-avatar);
	overflow: hidden;
	background: #f2f2f2;
}
.agr-card__avatar img {
	position: absolute; inset: 0;
	width: 100%; height: 100%; max-width: none;
	object-fit: cover; display: block; margin: 0;
}
.agr-card__initial {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%;
	background: #2b3a42; color: #fff;
	font-weight: 500; font-size: calc(var(--agr-avatar) * .4);
}
.agr-card__meta { flex: 1; min-width: 0; }
.agr-card__name { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.agr-card__date { display: block; font-size: 12.5px; color: var(--agr-muted); margin-top: 3px; letter-spacing: .02em; }
.agr-card__label {
	font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--agr-muted);
}

/* ── Arrows ─────────────────────────────── */
.agr__arrow {
	position: absolute; top: calc(50% - 33px); z-index: 2;
	transform: translateY(-50%);
	display: flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; padding: 0;
	background: #fff; color: var(--agr-ink);
	border: 1px solid var(--agr-line);
	box-shadow: 0 6px 18px -8px rgba(16, 24, 40, .25);
	cursor: pointer;
	transition: background-color .25s, color .25s, opacity .25s, border-color .25s;
}
.agr__arrow svg { width: 20px; height: 20px; }
.agr__arrow--prev { left: -23px; }
.agr__arrow--next { right: -23px; }
.agr__arrow:not(:disabled):hover { background: var(--agr-ink); border-color: var(--agr-ink); color: #fff; }
.agr__arrow:disabled { opacity: 0; pointer-events: none; }

/* ── Dots ───────────────────────────────── */
.agr__dots { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.agr__dots[hidden] { display: none; }
.agr__dot {
	width: 22px; height: 3px; padding: 0; margin: 0;
	background: var(--agr-dot) !important; border: 0; cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}
.agr__dot.is-active { width: 40px; background: var(--agr-dot-active) !important; }
/* по-голяма зона за клик */
.agr__dot { position: relative; }
.agr__dot::before { content: ""; position: absolute; inset: -10px -2px; }

.agr__arrow:focus-visible, .agr-card__more:focus-visible, .agr__dot:focus-visible, .agr__track:focus-visible {
	outline: 2px solid var(--agr-ink); outline-offset: 3px;
}

@media (max-width: 1024px) {
	.agr__arrow--prev { left: 0; }
	.agr__arrow--next { right: 0; }
}
@media (max-width: 767px) {
	.agr-card { padding: 22px 22px 26px; min-height: 160px; }
	.agr__arrow { display: none; }
	.agr__dots { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	.agr--carousel .agr__track { scroll-behavior: auto; }
	.agr-card, .agr__dot, .agr__arrow { transition: none; }
	.agr-item:hover .agr-card { transform: none; }
}
