/**
 * AG Appointment Cards - widget styles.
 * Everything is scoped under .sac so no other Elementor widget is affected.
 */

.sac {
	/* Section palette */
	--sac-title-color: #142d54;
	--sac-text-color: #4f6586;
	--sac-primary: #1255bb;

	/* Neutral accent fallback (overridden per card modifier) */
	--sac-card-accent: #1768d6;
	--sac-card-accent-rgb: 23, 104, 214;
	--sac-card-accent-deep: #1459c5;
	--sac-card-accent-deep-rgb: 20, 89, 197;

	--sac-card-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.91), rgba(249, 251, 255, 0.79));
	--sac-card-border: rgba(207, 219, 235, 0.82);
	--sac-card-hover-glow: rgba(57, 99, 164, 0.16);
	--sac-wave-opacity: 1;
	--sac-glow-opacity: 0.55;
	--sac-scenery-opacity: 1;

	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 1282px;
	margin-inline: auto;
	padding: 30px 76px 23px;
	overflow: hidden;
	border: 1px solid rgba(154, 184, 228, 0.42);
	border-radius: 38px;
	background:
		radial-gradient(ellipse at 16% 53%, rgba(255, 255, 255, 0.98) 0 25%, rgba(247, 250, 255, 0.74) 49%, transparent 72%),
		radial-gradient(ellipse at 91% 30%, rgba(226, 237, 255, 0.9), transparent 52%),
		linear-gradient(180deg, #f5f8ff, #fff 70%, #f7fbff);
	box-shadow: 0 8px 28px rgba(83, 130, 199, 0.13), inset 0 1px 0 #fff;
	color: var(--sac-title-color);
	font-family: inherit;
	direction: rtl;
	text-align: center;
}

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

/* --- Theme-proofing -------------------------------------------------------
   WordPress themes ship post-content rules such as `.entry-content p`,
   `.entry-content h3` or `.entry-content ul`, which carry one more element in
   their selector than a bare single class and therefore out-specify it. The
   layout-critical properties are pinned here behind `.sac` so a theme cannot
   shift the widget's spacing or alignment. Elementor's own generated CSS is
   enqueued after this file and ties are resolved in its favour, so the
   Style-tab controls still win. */
.sac .sac-title,
.sac .sac-desc,
.sac .sac-card__title,
.sac .sac-card__desc,
.sac .sac-card__badge {
	padding: 0;
	border: 0;
	text-indent: 0;
	letter-spacing: normal;
}

.sac .sac-title {
	margin: 13px 0 7px;
	letter-spacing: -1.1px;
}

.sac .sac-desc {
	margin: 0 auto;
}

.sac .sac-card__title {
	margin: 0;
}

.sac .sac-card__desc {
	margin: 0 auto;
}

.sac .sac-card__badge {
	padding: 4px 14px 3px;
}

/* Colour is pinned only on the base selector so the Style-tab colour controls
   (which Elementor prints at the same weight, later in the cascade) still win
   for every state. Themes only ever fight us on text-decoration here. */
.sac .sac-card__button {
	color: #fff;
}

.sac .sac-card__button,
.sac .sac-card__button:hover,
.sac .sac-card__button:focus,
.sac .sac-card__button:visited {
	text-decoration: none;
}

/* Large decorative arcs behind the whole section */
.sac::before,
.sac::after {
	content: "";
	position: absolute;
	pointer-events: none;
	z-index: 1;
}

.sac::before {
	width: 1250px;
	height: 310px;
	right: -120px;
	top: 38px;
	border-radius: 50%;
	border-top: 1px solid rgba(187, 207, 237, 0.42);
	transform: rotate(-9deg);
	box-shadow: 0 -28px 0 -27px rgba(198, 216, 242, 0.32), 0 35px 0 -34px rgba(198, 216, 242, 0.27);
}

.sac::after {
	width: 1300px;
	height: 260px;
	left: -420px;
	bottom: -80px;
	border-radius: 50%;
	border-top: 1px solid rgba(177, 204, 239, 0.5);
	transform: rotate(9deg);
}

.sac__content {
	position: relative;
	z-index: 2;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.sac-header {
	margin-bottom: 20px;
	text-align: center;
}

.sac-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: 999px;
	background: linear-gradient(180deg, #eaf2ff, #e3edfc);
	box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9);
	color: var(--sac-primary);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

.sac-badge__icon {
	display: inline-flex;
	width: 17px;
	height: 17px;
}

.sac-badge__icon svg {
	width: 100%;
	height: 100%;
}

.sac-title {
	margin: 13px 0 7px;
	color: var(--sac-title-color);
	font-size: 36px;
	font-weight: 800;
	line-height: 1.45;
	letter-spacing: -1.1px;
}

.sac-desc {
	margin: 0 auto;
	max-width: 620px;
	color: var(--sac-text-color);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.9;
	text-align: var(--sac-header-align, center);
}

.sac-divider {
	position: relative;
	display: block;
	width: 155px;
	height: 2px;
	margin: 18px auto 0;
	background: var(--sac-divider, linear-gradient(90deg, transparent, #c9daf5, transparent));
}

.sac-divider__dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3c8cf0;
	box-shadow: 0 0 0 2px #e7f0ff;
	transform: translate(-50%, -50%);
}

/* ------------------------------------------------------------------ */
/* Cards grid                                                          */
/* ------------------------------------------------------------------ */

.sac-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
	direction: rtl;
}

.sac-card {
	position: relative;
	min-width: 0;
	min-height: 484px;
	overflow: hidden;
	border: 1px solid var(--sac-card-border);
	border-radius: 26px;
	background: var(--sac-card-bg);
	box-shadow:
		0 5px 12px rgba(57, 93, 143, 0.08),
		0 18px 28px rgba(70, 115, 178, 0.07),
		inset 0 1px 0 rgba(255, 255, 255, 0.95);
	transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
}

/* Accent schemes ---------------------------------------------------- */

.sac-card--teal {
	--sac-card-accent: #0b9daf;
	--sac-card-accent-rgb: 11, 157, 175;
	--sac-card-accent-deep: #078d9f;
	--sac-card-accent-deep-rgb: 7, 141, 159;
	--sac-card-title-color: #05869a;
	--sac-card-badge-color: #0791a2;
	--sac-card-badge-bg: #effafb;
	--sac-card-line: #b4dfe5;
	--sac-icon-bg: radial-gradient(circle, #e9f5f5 0%, #e5f2f4 58%, #f7fbfc 59%);
}

.sac-card--blue {
	--sac-card-accent: #1768d6;
	--sac-card-accent-rgb: 23, 104, 214;
	--sac-card-accent-deep: #1459c5;
	--sac-card-accent-deep-rgb: 20, 89, 197;
	--sac-card-title-color: #1450af;
	--sac-card-badge-color: #1354b9;
	--sac-card-badge-bg: #f2f6fd;
	--sac-card-line: #b6cbea;
	--sac-icon-bg: radial-gradient(circle, #e8effc 0%, #e6eefb 58%, #f8fbff 59%);
}

.sac-card--purple {
	--sac-card-accent: #6836d8;
	--sac-card-accent-rgb: 104, 54, 216;
	--sac-card-accent-deep: #5d2cc9;
	--sac-card-accent-deep-rgb: 93, 44, 201;
	--sac-card-title-color: #5b2bc8;
	--sac-card-badge-color: #5b32c5;
	--sac-card-badge-bg: #f7f3ff;
	--sac-card-line: #d0c2f0;
	--sac-icon-bg: radial-gradient(circle, #eee9ff 0%, #eeeaff 58%, #fbfaff 59%);
}

.sac-card--custom {
	--sac-card-title-color: var(--sac-card-accent);
	--sac-card-badge-color: var(--sac-card-accent);
	--sac-card-badge-bg: rgba(var(--sac-card-accent-rgb), 0.08);
	--sac-card-line: rgba(var(--sac-card-accent-rgb), 0.35);
	--sac-icon-bg: radial-gradient(circle, rgba(var(--sac-card-accent-rgb), 0.1) 0%, rgba(var(--sac-card-accent-rgb), 0.08) 58%, rgba(255, 255, 255, 0.6) 59%);
}

.sac-card__inner {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	min-height: inherit;
	padding: 35px 28px 39px;
	text-align: center;
}

/* Per-element offset helper (position system) */
.sac-card__icon,
.sac-card__badge,
.sac-card__title,
.sac-card__desc,
.sac-card__features,
.sac-card__button {
	--sac-el-x: 0px;
	--sac-el-y: 0px;
	transform: translate(var(--sac-el-x), var(--sac-el-y));
}

/* ------------------------------------------------------------------ */
/* Card content                                                        */
/* ------------------------------------------------------------------ */

.sac-card__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 145px;
	height: 145px;
	margin-bottom: 13px;
	border-radius: 50%;
	background: var(--sac-icon-bg);
	color: var(--sac-icon-color, var(--sac-card-accent));
	transition: transform 0.32s ease;
}

.sac-card__icon svg {
	width: 82px;
	height: 82px;
	color: inherit;
}

.sac-card__badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 14px 3px;
	border-radius: 999px;
	background: var(--sac-card-badge-bg);
	color: var(--sac-card-badge-color);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

.sac-card__title {
	margin: 0;
	color: var(--sac-card-title-color);
	font-size: 25px;
	font-weight: 800;
	line-height: 1.45;
}

.sac-card__line {
	width: 31px;
	height: 2px;
	margin: 11px 0 20px;
	border-radius: 2px;
	background: var(--sac-card-line);
}

.sac-card__desc {
	margin: 0 auto;
	max-width: 260px;
	color: #536681;
	font-size: 13px;
	line-height: 2;
	/* Centred block, but every line shares the same start edge (no staircase). */
	text-align: var(--sac-card-desc-align, right);
}

/* Feature list: the list itself is centred in the card, while every row
   starts from the same edge so the ticks line up perfectly.
   Selectors are prefixed with `.sac` on purpose: WordPress themes routinely
   ship rules like `.entry-content ul { padding-right: 2em }` which are one
   element more specific than a bare single class and would otherwise push the
   whole list sideways. */
.sac ul.sac-card__features {
	display: flex;
	flex-direction: column;
	gap: var(--sac-feature-gap, 0px);
	width: -moz-fit-content;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	border: 0;
	list-style: none;
	color: #526581;
	font-size: 13px;
	line-height: 2.25;
	direction: rtl;
	text-align: right;
	text-indent: 0;
}

/* NOTE: the widget is RTL, so in flexbox `flex-start` is the RIGHT edge.
   Rows must start from flex-start so the ticks stack under each other on
   the right-hand side, the way Persian text reads. */
.sac ul.sac-card__features > li {
	display: flex;
	align-items: center;
	justify-content: var(--sac-feature-align, flex-start);
	gap: 7px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
	text-indent: 0;
}

.sac ul.sac-card__features > li::marker {
	content: "";
}

.sac ul.sac-card__features > li::before {
	content: none;
}

.sac-check {
	display: grid;
	place-items: center;
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var(--sac-check-bg, var(--sac-card-accent));
	color: var(--sac-check-color, #fff);
}

.sac-check svg {
	width: 9px;
	height: 9px;
}

.sac-card__spacer {
	flex: 1 1 auto;
	min-height: 14px;
}

/* ------------------------------------------------------------------ */
/* Glass button                                                        */
/* ------------------------------------------------------------------ */

.sac-card__button {
	--sac-btn-hover-y: -2px;
	--sac-btn-tint: 0.86;
	--sac-btn-gloss: 0.34;

	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	flex: 0 0 auto;
	width: 183px;
	min-height: 46px;
	padding: 12px 18px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 12px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, var(--sac-btn-gloss)) 0%, rgba(255, 255, 255, calc(var(--sac-btn-gloss) * 0.24)) 46%, rgba(255, 255, 255, 0) 47%),
		linear-gradient(180deg, rgba(var(--sac-card-accent-rgb), var(--sac-btn-tint)), rgba(var(--sac-card-accent-deep-rgb), calc(var(--sac-btn-tint) + 0.09)));
	-webkit-backdrop-filter: blur(12px) saturate(160%);
	backdrop-filter: blur(12px) saturate(160%);
	box-shadow:
		0 8px 18px rgba(var(--sac-card-accent-rgb), 0.26),
		inset 0 1px 0 rgba(255, 255, 255, 0.55),
		inset 0 -1px 0 rgba(0, 0, 0, 0.08);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}

/* Moving sheen */
.sac-card__button::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: -60%;
	width: 45%;
	background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.38) 50%, rgba(255, 255, 255, 0) 100%);
	transform: skewX(-18deg);
	transition: right 0.55s ease;
	pointer-events: none;
}

.sac-card__button.sac-no-sheen::before {
	display: none;
}

.sac-card__button > * {
	position: relative;
	z-index: 2;
}

.sac-card__button-icon {
	display: inline-flex;
	width: 15px;
	height: 15px;
}

.sac-card__button-icon svg {
	width: 100%;
	height: 100%;
	transition: transform 0.25s ease;
}

/* ------------------------------------------------------------------ */
/* Decorative layers                                                   */
/* ------------------------------------------------------------------ */

.sac-card__bg {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
}

/* Manual per-card background image + overlay */
.sac-card__photo {
	position: absolute;
	inset: 0;
	background-image: none;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.sac-card__overlay {
	position: absolute;
	inset: 0;
	background: var(--sac-card-overlay, transparent);
	opacity: var(--sac-card-overlay-opacity, 1);
}

/* When a photo is uploaded the glass panel gets lighter so the image reads. */
.sac-card.sac-has-photo {
	--sac-card-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.62), rgba(249, 251, 255, 0.48));
}

.sac-card__glow,
.sac-card__wave,
.sac-card__scenery {
	position: absolute;
	display: none;
}

/* Corner glow */
.sac-has-glow .sac-card__glow {
	display: block;
	top: -70px;
	inset-inline-start: -70px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--sac-card-accent-rgb), 0.32) 0%, rgba(255, 255, 255, 0) 70%);
	opacity: var(--sac-glow-opacity);
}

/* Wave rings (card 1 in the reference) */
.sac-has-wave .sac-card__wave {
	display: block;
	width: 430px;
	height: 180px;
	right: -105px;
	bottom: -53px;
	border-radius: 50%;
	border-top: 1px solid rgba(var(--sac-card-accent-rgb), 0.24);
	transform: rotate(11deg);
	opacity: var(--sac-wave-opacity);
	box-shadow:
		0 -9px 0 -8px rgba(var(--sac-card-accent-rgb), 0.18),
		0 -18px 0 -17px rgba(var(--sac-card-accent-rgb), 0.14),
		0 -28px 0 -27px rgba(var(--sac-card-accent-rgb), 0.11);
}

.sac-has-wave .sac-card__wave::after {
	content: "";
	position: absolute;
	inset: 13px -5px auto 0;
	height: 130px;
	border-radius: 50%;
	border-top: 1px solid rgba(var(--sac-card-accent-rgb), 0.15);
}

/* Scenery - building (blue) */
.sac-has-scenery .sac-card__scenery {
	display: block;
	opacity: var(--sac-scenery-opacity);
}

.sac-card--blue .sac-card__scenery {
	width: 190px;
	height: 255px;
	left: 12px;
	bottom: -20px;
	opacity: calc(var(--sac-scenery-opacity) * 0.14);
	transform: skewY(-2deg);
}

.sac-card--blue .sac-deco-1 {
	position: absolute;
	bottom: 0;
	left: 25px;
	width: 105px;
	height: 210px;
	background: linear-gradient(90deg, #a6bddd, #d9e5f6);
	clip-path: polygon(0 10%, 63% 0, 100% 10%, 100% 100%, 0 100%);
}

.sac-card--blue .sac-deco-2 {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 48px;
	height: 174px;
	background: #b4c7e1;
	clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 100%);
}

.sac-card--blue .sac-deco-3 {
	position: absolute;
	bottom: 22px;
	left: 44px;
	width: 72px;
	height: 155px;
	opacity: 0.65;
	background:
		repeating-linear-gradient(90deg, transparent 0 11px, rgba(85, 125, 180, 0.8) 11px 17px),
		repeating-linear-gradient(0deg, transparent 0 17px, rgba(85, 125, 180, 0.8) 17px 23px);
}

/* Scenery - plant (purple) */
.sac-card--purple .sac-card__scenery {
	width: 85px;
	height: 130px;
	left: 5px;
	bottom: -9px;
	opacity: calc(var(--sac-scenery-opacity) * 0.34);
}

.sac-card--purple .sac-card__scenery::before,
.sac-card--purple .sac-card__scenery::after {
	content: "";
	position: absolute;
	bottom: 17px;
	width: 55px;
	height: 92px;
	border-radius: 100% 0 100% 0;
	background: #9eafab;
	transform: rotate(-28deg);
}

.sac-card--purple .sac-card__scenery::after {
	left: 28px;
	background: #a9b8b3;
	transform: rotate(30deg);
}

.sac-card--purple .sac-deco-1 {
	position: absolute;
	bottom: 0;
	left: 31px;
	width: 25px;
	height: 36px;
	border-radius: 4px 4px 12px 12px;
	background: #a8b3ae;
}

.sac-card--purple .sac-deco-2,
.sac-card--purple .sac-deco-3,
.sac-card--teal .sac-deco-1,
.sac-card--teal .sac-deco-2,
.sac-card--teal .sac-deco-3 {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Hover                                                               */
/* ------------------------------------------------------------------ */

.sac-card:hover {
	transform: translateY(-7px);
	border-color: rgba(135, 171, 224, 0.65);
	box-shadow: 0 13px 30px var(--sac-card-hover-glow), inset 0 1px 0 #fff;
}

.sac-card:hover .sac-card__icon {
	transform: scale(1.04);
}

.sac-card__button:hover,
.sac-card__button:focus-visible {
	transform: translate(var(--sac-el-x), calc(var(--sac-el-y) + var(--sac-btn-hover-y)));
	border-color: rgba(255, 255, 255, 0.72);
	box-shadow:
		0 12px 26px rgba(var(--sac-card-accent-rgb), 0.38),
		inset 0 1px 0 rgba(255, 255, 255, 0.75),
		inset 0 -1px 0 rgba(0, 0, 0, 0.08);
	filter: brightness(1.05);
	outline: none;
}

.sac-card__button:hover::before,
.sac-card__button:focus-visible::before {
	right: 115%;
}

.sac-card__button:hover .sac-card__button-icon svg {
	transform: translateX(-3px);
}

/* ------------------------------------------------------------------ */
/* Footer notice                                                       */
/* ------------------------------------------------------------------ */

.sac-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: min(525px, 100%);
	min-height: 51px;
	margin: 21px auto 0;
	padding: 8px 16px;
	border: 1px solid #bfd5fb;
	border-radius: 13px;
	background: rgba(249, 252, 255, 0.72);
	box-shadow: inset 0 1px 0 #fff;
	color: #5274a8;
	font-size: 12px;
	font-weight: 500;
}

.sac-footer__icon {
	display: inline-flex;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: #438df0;
}

.sac-footer__icon svg {
	width: 100%;
	height: 100%;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1100px) {
	.sac {
		padding-left: 38px;
		padding-right: 38px;
	}
	.sac-cards {
		gap: 20px;
	}
	.sac-card {
		min-height: 470px;
	}
	.sac-card__inner {
		padding-left: 20px;
		padding-right: 20px;
	}
	.sac-title {
		font-size: 32px;
	}
}

@media (max-width: 850px) {
	.sac {
		border-radius: 28px;
		padding: 28px 22px 22px;
	}
	.sac-cards {
		grid-template-columns: 1fr;
		max-width: 510px;
		margin: auto;
		gap: 18px;
	}
	.sac-card {
		min-height: 450px;
	}
	.sac-card__inner {
		padding-top: 28px;
	}
	.sac-title {
		font-size: 29px;
	}
	.sac-header {
		margin-bottom: 18px;
	}
	.sac-footer {
		margin-top: 18px;
	}
}

@media (max-width: 520px) {
	.sac {
		border-radius: 22px;
		padding: 24px 14px 18px;
	}
	.sac-badge {
		padding: 8px 14px;
		font-size: 12px;
	}
	/* `.sac` prefixed to out-weigh the theme-proofing block above. */
	.sac .sac-title {
		margin-top: 12px;
		font-size: 24px;
		letter-spacing: -0.5px;
	}
	.sac-desc {
		font-size: 12px;
	}
	.sac-divider {
		margin-top: 15px;
	}
	.sac-cards {
		gap: 14px;
	}
	.sac-card {
		min-height: 425px;
		border-radius: 22px;
	}
	.sac-card__inner {
		padding: 24px 18px 28px;
	}
	.sac-card__icon {
		width: 120px;
		height: 120px;
		margin-bottom: 10px;
	}
	.sac-card__icon svg {
		width: 70px;
		height: 70px;
	}
	.sac-card__title {
		font-size: 22px;
	}
	/* `.sac` prefixed to out-weigh the theme-proofing block above. */
	.sac .sac-card__desc,
	.sac ul.sac-card__features {
		font-size: 12px;
	}
	.sac-card__button {
		width: 176px;
		min-height: 44px;
		font-size: 12px;
	}
	.sac-footer {
		padding: 8px 12px;
		font-size: 10px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sac-card,
	.sac-card__icon,
	.sac-card__button,
	.sac-card__button::before,
	.sac-card__button-icon svg {
		transition: none;
	}
}
