@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════════════════════
   CSS RESET
══════════════════════════════════════════════════════════ */
.aafe-lc-wrapper,
.aafe-lc-wrapper *,
.aafe-lc-wrapper *::before,
.aafe-lc-wrapper *::after,
.aafe-lc-modal,
.aafe-lc-modal *,
.aafe-lc-modal *::before,
.aafe-lc-modal *::after {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.aafe-lc-wrapper h1, .aafe-lc-wrapper h2, .aafe-lc-wrapper h3,
.aafe-lc-wrapper h4, .aafe-lc-wrapper h5, .aafe-lc-wrapper h6,
.aafe-lc-modal h1, .aafe-lc-modal h2, .aafe-lc-modal h3,
.aafe-lc-modal h4, .aafe-lc-modal h5, .aafe-lc-modal h6 {
	font-family: 'Sora', sans-serif !important;
	font-style: normal !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	border: none !important;
	background: none !important;
	margin: 0;
	padding: 0;
}

.aafe-lc-wrapper p, .aafe-lc-wrapper span, .aafe-lc-wrapper li, .aafe-lc-wrapper a, .aafe-lc-wrapper button,
.aafe-lc-modal p, .aafe-lc-modal span, .aafe-lc-modal li, .aafe-lc-modal a, .aafe-lc-modal button {
	font-family: 'Inter', sans-serif !important;
}

.aafe-lc-wrapper button,
.aafe-lc-modal button {
	appearance: none !important;
	-webkit-appearance: none !important;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
}

.aafe-lc-wrapper img,
.aafe-lc-modal img {
	max-width: 100%;
	vertical-align: top;
}

/* ══════════════════════════════════════════════════════════
   HOVER EFFECTS (WRAPPER)
══════════════════════════════════════════════════════════ */
.aafe-lc-wrapper {
	display: block;
	width: 100%;
}
.aafe-lc__card[data-hover] {
	transition: all var(--aafe-transition, 300ms) ease, background-color 0.3s ease, border-color 0.3s ease;
}
.aafe-lc__card[data-hover="lift"]:hover     { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.15); z-index: 2; }
.aafe-lc__card[data-hover="scale"]:hover    { transform: scale(var(--aafe-hover-scale, 1.03)); z-index: 2; }
.aafe-lc__card[data-hover="glow"]:hover     { box-shadow: 0 0 0 3px #4F46E5, 0 8px 30px rgba(79,70,229,0.25); z-index: 2; }
.aafe-lc__card[data-hover="border-pop"]:hover { border-color: #4F46E5; transform: scale(1.01); z-index: 2; }
.aafe-lc__card[data-hover="shine"]          { overflow: hidden; position: relative; }
.aafe-lc__card[data-hover="shine"]::after   {
	content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
	background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
	transform: skewX(-25deg); pointer-events: none; z-index: 9;
}
.aafe-lc__card[data-hover="shine"]:hover::after { left: 125%; transition: left 0.6s ease; }

/* ══════════════════════════════════════════════════════════
   GRID & CARDS
══════════════════════════════════════════════════════════ */
.aafe-lc__grid {
	display: grid;
	gap: 16px;
	width: 100%;
	/* Default responsive cols, overridden by inline Elementor CSS */
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
	.aafe-lc__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
	.aafe-lc__grid { grid-template-columns: 1fr; }
}

.aafe-lc__card {
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	background-color: #e5e7eb; /* Fallback light bg */
	border: 1px solid #d1d5db;
	cursor: pointer;
	position: relative;
	transition: background-color 0.3s ease, border-color 0.3s ease, transform var(--aafe-transition, 300ms) ease, box-shadow var(--aafe-transition, 300ms) ease;
}

/* Card Image */
.aafe-lc__card-image-wrap {
	width: 100%;
	height: 256px; /* h-64 equivalent */
	overflow: hidden;
}
.aafe-lc__card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

/* Card Content Area */
.aafe-lc__card-content {
	display: flex;
	flex-grow: 1;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	position: relative;
	gap: 16px;
}

.aafe-lc__card-title {
	font-size: 20px;
	color: #09090b;
	line-height: 1.2;
	margin: 0 !important;
	padding: 0 !important;
	transition: color 0.3s ease;
}
.aafe-lc__card-text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.aafe-lc__card-desc {
	font-size: 14px;
	color: #71717a;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.4;
}

.aafe-lc__plus-icon {
	position: relative;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px; /* Default circle size */
	height: 40px;
	border-radius: 50%;
	background-color: #9ca3af;
	color: #ffffff;
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
	margin: 0 !important;
	box-sizing: border-box !important;
}
.aafe-lc__plus-icon.has-text {
	width: auto !important; /* Allow button to expand for text */
	border-radius: 40px; /* Pill shape */
	padding: 0 16px;
	gap: 8px;
}
.aafe-lc__btn-text {
	white-space: nowrap;
	font-weight: 500;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
	display: flex;
	align-items: center;
}
.aafe-lc__btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
}
.aafe-lc__btn-icon svg,
.aafe-lc__btn-icon i {
	width: 24px;
	height: 24px;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1 !important;
}

/* ══════════════════════════════════════════════════════════
   MODAL POPUP
══════════════════════════════════════════════════════════ */
.aafe-lc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5vh 20px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}
.aafe-lc-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Backdrop */
.aafe-lc-modal__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(255, 255, 255, 0.4);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	width: 100%;
	height: 100%;
}

/* Modal Content Container */
.aafe-lc-modal__container {
	position: relative;
	width: 100%;
	max-width: 900px;
	max-height: 90vh;
	background-color: #e5e7eb;
	border: 1px solid #d1d5db;
	border-radius: 24px;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
	
	/* Animation: Start slightly smaller and lower */
	transform: scale(0.95) translateY(20px);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}
.aafe-lc-modal.is-open .aafe-lc-modal__container {
	transform: scale(1) translateY(0);
	opacity: 1;
}

/* Scrollbar styles for modal */
.aafe-lc-modal__container::-webkit-scrollbar {
	width: 8px;
}
.aafe-lc-modal__container::-webkit-scrollbar-track {
	background: transparent;
}
.aafe-lc-modal__container::-webkit-scrollbar-thumb {
	background-color: rgba(156, 163, 175, 0.5);
	border-radius: 10px;
}

/* Modal Image */
.aafe-lc-modal__image-wrap {
	width: 100%;
	padding: 0; /* padding controlled via elementor if needed, but defaults to none here */
}
.aafe-lc-modal__image {
	width: 60%; /* default, overridden by elementor */
	margin: 0 auto;
	height: auto;
	max-height: 50vh;
	object-fit: contain;
	display: block;
}

/* Modal Text Area */
.aafe-lc-modal__text {
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 !important;
}
.aafe-lc-modal__title {
	font-size: 48px;
	color: #09090b;
	line-height: 1.1;
}
.aafe-lc-modal__desc {
	font-size: 16px;
	color: #71717a;
	line-height: 1.6;
}

/* Modal Close Button */
.aafe-lc-modal__close {
	position: absolute;
	top: 24px;
	right: 24px;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: #9ca3af;
	color: #ffffff;
	z-index: 10;
	transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
	border: none;
	padding: 0;
	cursor: pointer;
	outline: none;
}
.aafe-lc-modal__close:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 0 0 5px rgba(0, 0, 0, 0.1);
}
.aafe-lc-modal__close svg,
.aafe-lc-modal__close i {
	width: 24px;
	height: 24px;
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Helper class applied to body when modal is open */
body.aafe-lc-modal-open {
	overflow: hidden !important;
}

@media (max-width: 767px) {
	.aafe-lc-modal__image {
		width: 100%;
	}
	.aafe-lc-modal__title {
		font-size: 32px !important;
	}
	.aafe-lc-modal__close {
		top: 16px;
		right: 16px;
		width: 40px;
		height: 40px;
	}
}

/* ══════════════════════════════════════════════════════════
   PORTAL WRAPPER (Prevents Stacking Context Issues)
══════════════════════════════════════════════════════════ */
.aafe-lc-portal-wrapper {
	position: static !important;
	transform: none !important;
	animation: none !important;
	transition: none !important;
	opacity: 1 !important;
	filter: none !important;
	perspective: none !important;
	z-index: auto !important;
	pointer-events: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.aafe-lc-portal-wrapper .aafe-lc-modal {
	pointer-events: auto;
}
