/* =============================================================
   Hover Info Box  —  hover-info-box.css
   ============================================================= */

/* ---- Box wrapper ---- */
.hib-box {
	position: relative;
	overflow: hidden;
	transition: background-color 0.45s ease;
	cursor: pointer;
	box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
	box-sizing: border-box;
}

/* ---- Background watermark image ---- */
.hib-bg-image {
	position: absolute;
	pointer-events: none;
	user-select: none;
	z-index: 0;
	transition: opacity 0.45s ease;
	line-height: 0;
}

.hib-bg-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Icon wrapper ---- */
.hib-icon-wrap {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	overflow: visible;
	transition: opacity 0.38s ease, transform 0.38s ease;
	will-change: opacity, transform;
}

.hib-icon-img {
	display: block;
	object-fit: contain;
	max-width: 100%;
	flex-shrink: 0;
}

/* ---- Body (title + sep + desc + btn) ---- */
.hib-body {
	position: relative;
	z-index: 1;
	transition: transform 0.42s ease;
	will-change: transform;
}

/* ---- Title ---- */
.hib-title {
	margin: 0;
	line-height: 1.2;
	transition: color 0.38s ease;
}

/* ---- Separator ---- */
.hib-sep {
	display: block;
	border: none;
	outline: none;
	border-radius: 2px;
	transition: width 0.42s ease;
	will-change: width;
}

/* ---- Description wrapper (hidden by default) ---- */
.hib-desc-wrap {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transform: translateY(12px);
	transition:
		max-height  0.45s ease,
		opacity     0.35s ease 0.12s,
		transform   0.35s ease 0.12s;
	will-change: opacity, transform, max-height;
}

.hib-desc {
	margin: 0;
}

/* ---- Button wrapper ---- */
.hib-btn-wrap {
	display: inline-block;
	transition: transform 0.35s ease;
	will-change: transform;
}

/* ---- Button ---- */
.hib-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	line-height: 1;
	letter-spacing: 0.01em;
	transition:
		background-color 0.3s ease,
		box-shadow       0.3s ease,
		transform        0.3s ease;
}

.hib-btn:hover {
	text-decoration: none;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	transform: translateY(-2px);
}

/* ---- Arrow circle inside button ---- */
.hib-arrow-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background-color 0.3s ease;
}

/* =============================================================
   HOVER STATES
   ============================================================= */

/* Icon fades up */
.hib-box:hover .hib-icon-wrap {
	opacity: 0;
	transform: translateY(-18px);
}

/* Body shifts up to fill icon space — driven by --hib-icon-area CSS var */
.hib-box:hover .hib-body {
	transform: translateY( calc( -1 * var(--hib-icon-area, 90px) ) );
}

/* Description reveals */
.hib-box:hover .hib-desc-wrap {
	max-height: 500px;
	opacity: 1;
	transform: translateY(0);
}

/* Button nudges up slightly (relative to already-moved body) */
.hib-box:hover .hib-btn-wrap {
	transform: translateY(-5px);
}

/* =============================================================
   No-icon variant — body does not translate
   ============================================================= */
.hib-box.hib-no-icon:hover .hib-body {
	transform: none;
}

/* =============================================================
   Accessibility — respect reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
	.hib-icon-wrap,
	.hib-body,
	.hib-sep,
	.hib-desc-wrap,
	.hib-btn-wrap,
	.hib-btn,
	.hib-box {
		transition: none !important;
	}
}
