/**
 * Oyolloo Elements — card component.
 *
 * Figma reference: node 471:1128 (How It Works step card).
 *   background #fff · border 1px #d3d3d3 · radius 16px · padding 32px · gap 24px
 *   icon tile  #f3f3f3 · border 1px #e0e0e0 · radius 8px · padding 16px · icon 60px
 *   badge      #ffc700 pill · padding 8px 12px · offset top -15px / left 33px
 *
 * @package Oyolloo\Elements
 * @since   1.0.0
 */

.oe-card {
	--oe-card-bg: var(--oe-color-white);
	--oe-card-border: var(--oe-color-neutral-300);
	--oe-card-radius: var(--oe-radius-xl);
	--oe-card-pad: var(--oe-space-lg);

	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--oe-space-md);
	padding: var(--oe-card-pad);
	border: 1px solid var(--oe-card-border);
	border-radius: var(--oe-card-radius);
	background-color: var(--oe-card-bg);
}

.oe-card--stack {
	flex-direction: column;
	align-items: stretch;
}

.oe-card--dark {
	--oe-card-bg: var(--oe-color-neutral-900);
	--oe-card-border: var(--oe-color-border-soft);

	color: var(--oe-color-white);
}

/* Lifts on hover — used by the blog and service decks, not the step cards. */
.oe-card--interactive {
	transition:
		transform 300ms var(--oe-ease, ease),
		box-shadow 300ms var(--oe-ease, ease),
		border-color 300ms var(--oe-ease, ease);
}

.oe-card--interactive:hover {
	transform: translateY(-4px);
	border-color: var(--oe-color-brand);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

/* -- Icon tile ----------------------------------------------------------- */

.oe-card__tile {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 94px;
	height: 94px;
	padding: var(--oe-space-sm);
	border: 1px solid var(--oe-color-tile-border);
	border-radius: var(--oe-radius-md);
	background-color: var(--oe-color-tile);
}

.oe-card__tile .oe-icon,
.oe-card__tile svg,
.oe-card__tile img {
	width: 60px;
	height: 60px;
}

.oe-card__tile .oe-icon svg {
	width: 100%;
	height: 100%;
	color: var(--oe-color-ink-strong);
}

/* -- Body ---------------------------------------------------------------- */

.oe-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--oe-space-sm);
	flex: 1 0 0;
	min-width: 0;
}

.oe-card__title {
	color: var(--oe-color-ink-strong);
}

.oe-card--dark .oe-card__title {
	color: var(--oe-color-white);
}

.oe-card__text {
	color: var(--oe-color-ink-soft);
}

.oe-card--dark .oe-card__text {
	color: var(--oe-color-neutral-300);
}

/* -- Badge --------------------------------------------------------------- */

.oe-card__badge {
	position: absolute;
	top: -15px;
	left: 33px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--oe-space-2xs) var(--oe-space-xs);
	border-radius: var(--oe-radius-pill);
	background-color: var(--oe-color-brand);
	color: var(--oe-color-black);
	font-family: var(--oe-font-title);
	font-size: var(--oe-label-size);
	font-weight: var(--oe-label-weight);
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

/* -- Media card (image on top, text below) ------------------------------- */

.oe-card--media {
	--oe-card-pad: 0px;

	flex-direction: column;
	gap: 0;
	overflow: hidden;
}

.oe-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 520 / 300;
}

.oe-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--oe-ease, ease);
}

.oe-card--interactive:hover .oe-card__media img {
	transform: scale(1.04);
}

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

@media (max-width: 1024px) {
	.oe-card {
		--oe-card-pad: var(--oe-space-md);
	}
}

@media (max-width: 767px) {
	.oe-card {
		--oe-card-pad: 17px;

		flex-direction: column;
	}

	.oe-card__tile {
		width: 54px;
		height: 54px;
		padding: 11px;
	}

	.oe-card__tile .oe-icon,
	.oe-card__tile svg,
	.oe-card__tile img {
		width: 32px;
		height: 32px;
	}
}
