/*
 * iw-info — Global Info Card (expandable + optional related-news sidebar).
 * Source: Figma 4420:144234 (file Fpt.vn 2.0 Copy).
 *
 * Layout: 2 cột trong 1 max-width container.
 *   .iw-info__main    — left card (border + bg + padding, expandable body)
 *   .iw-info__sidebar — right list (5 tag-filtered row cards)
 * Mobile: stack vertically (sidebar dưới content).
 */

.iw-info {
	padding: 80px 0 40px;
	position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.iw-info .iw-info__inner {
	max-width: var(--iw-container-max);
	margin: 0 auto;
	box-sizing: border-box;
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

/* `@media (max-width: 1535px)` — moved to bottom Responsive section. */

/* ===================== LEFT — content card ===================== */
.iw-info__main {
	flex: 1 1 0;
	min-width: 0;
	border: 1px solid #e7e7e7;
	border-radius: 12px;
	padding: 24px;
	background: #fff;
	box-sizing: border-box;
	position: relative;
}

.iw-info__heading {
	margin: 0 0 16px;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	color: #3d3d3d;
}

.iw-info__divider {
	border: 0;
	height: 1px;
	background: #e7e7e7;
	margin: 0 0 20px;
	opacity: 1;
}

.iw-info__body {
	position: relative;
	overflow: hidden;
	transition: max-height 0.4s ease;
	color: #3d3d3d;
	font-size: 16px;
	line-height: 24px;
}

.iw-info__body-inner > :first-child { margin-top: 0; }
.iw-info__body-inner > :last-child  { margin-bottom: 0; }

.iw-info__body-inner img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Fade gradient overlay khi collapsed */
.iw-info__main.iw-info--collapsible .iw-info__body::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 120px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 60%, #fff 100%);
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.iw-info__main.iw-info--collapsible.iw-info--expanded .iw-info__body {
	max-height: none !important;
}

.iw-info__main.iw-info--collapsible.iw-info--expanded .iw-info__body::after {
	opacity: 0;
}

/* Toggle button — Figma 407:44043. Reset Flatsome `.button` defaults. */
.iw-info__main .iw-info__toggle {
	position: absolute;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 13px 24px;
	background: #fff;
	color: #3d3d3d;
	font-family: inherit;
	font-size: 16px;
	line-height: 22px;
	font-weight: 510;
	letter-spacing: 0;
	text-transform: none;
	border: 1px solid #d1d1d1;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
	min-height: 0;
	min-width: 0;
	z-index: 2;
}

.iw-info__main .iw-info__toggle:hover,
.iw-info__main .iw-info__toggle:focus,
.iw-info__main .iw-info__toggle:focus-visible,
.iw-info__main .iw-info__toggle:active {
	background: #fff;
	color: #3d3d3d;
	border-color: #d1d1d1;
	box-shadow: none;
}

/* ===================== RIGHT — related news sidebar ===================== */
.iw-info__sidebar {
	flex: 0 0 336px;
	max-width: 336px;
	min-width: 280px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.iw-info__sidebar-title {
	margin: 0;
	font-family: inherit;
	font-weight: 700;
	font-size: 20px;
	line-height: 28px;
	color: #3d3d3d;
}

.iw-info__sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Reset Flatsome `.col-inner ul li { margin-left: 1.3em }` + `li { margin-bottom: .6em }`.
   Specificity bump (0,2,1) bằng cách chain class để win với Flatsome rule. */
.iw-info .iw-info__sidebar-list > li {
	margin: 0;
	padding: 0;
}

.iw-info__sidebar-empty {
	margin: 0;
	padding: 16px 0;
	color: #777;
	font-size: 14px;
	font-style: italic;
}

.iw-info__sidebar-list .iw-news-card--row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 12px;
}

.iw-info__sidebar-list .iw-news-card--row .iw-news-card__media {
	flex: 0 0 161px;
	width: 161px;
	height: 96px;
	border-radius: 8px;
	overflow: hidden;
}

.iw-info__sidebar-list .iw-news-card--row .iw-news-card__body {
	flex: 1 1 0;
	min-width: 0;
	gap: 8px;
}

.iw-info__sidebar-list .iw-news-card--row .iw-news-card__title {
	font-weight: 590;
	font-size: 14px;
	line-height: 20px;
}

/* ===================== Responsive overrides ===================== */
/* Cascade order: rộng → hẹp. */

/* ≤1535: inner thắt margin theo container pad-x (1488 max + lề). */
@media (max-width: 1535px) {
	.iw-info .iw-info__inner {
		margin-left: var(--iw-container-pad-x);
		margin-right: var(--iw-container-pad-x);
	}
}

/* ≤991: MOBILE — stack columns. */
@media (max-width: 991px) {
	.iw-info {
		padding-top: 40px;
	}
	.iw-info .iw-info__inner {
		flex-direction: column;
		gap: 32px;
	}
	.iw-info__main {
		padding: 20px;
		border-radius: 10px;
	}
	.iw-info__heading {
		font-size: 16px;
		line-height: 22px;
		margin-bottom: 12px;
	}
	.iw-info__divider {
		margin-bottom: 16px;
	}
	.iw-info__body {
		font-size: 14px;
		line-height: 22px;
	}
	.iw-info__main .iw-info__toggle {
		bottom: 20px;
		padding: 11px 20px;
		font-size: 14px;
		line-height: 20px;
	}
	.iw-info__sidebar {
		flex: 1 1 auto;
		max-width: none;
		min-width: 0;
	}
	.iw-info__sidebar-title {
		font-size: 18px;
		line-height: 24px;
	}
}
