/* ============================================================
   TAMI - Câu chuyện của TAMI (Elementor widget)
   Bố cục 2 cột: ảnh tràn chiều cao | tiêu đề đỏ in hoa + nội dung căn đều.
   Toàn bộ selector scope trong .tami-story để không đụng CSS theme.
   ============================================================ */
.tami-story {
	--tami-story-red: #c1231a;
	--tami-story-navy: #1b2a6b;
	--tami-story-ink: #14204a;
	/* mặc định 50%, widget ghi đè bằng inline style theo control "Bề ngang cột ảnh" */
	--tami-story-img-w: 50%;

	padding: 40px 0;
}

.tami-story__inner {
	max-width: 1230px;
	margin: 0 auto;
	padding: 0 15px;
	display: grid;
	grid-template-columns: var(--tami-story-img-w) 1fr;
	align-items: center;
	gap: 50px;
}

.tami-story__inner--align-start {
	align-items: start;
}

.tami-story__inner--no-image {
	grid-template-columns: 1fr;
}

/* Ảnh bên phải: đảo thứ tự bằng order để HTML vẫn giữ ảnh trước chữ,
   nhờ vậy mobile (1 cột) luôn hiện ảnh trên - chữ dưới ở cả 2 kiểu bố cục. */
.tami-story__inner--img-right {
	grid-template-columns: 1fr var(--tami-story-img-w);
}

.tami-story__inner--img-right .tami-story__media {
	order: 2;
}

.tami-story__inner--img-right .tami-story__text {
	order: 1;
}

/* ---------- Ảnh ---------- */
.tami-story__media {
	position: relative;
	align-self: stretch;
	overflow: hidden;
	min-height: 260px;
}

.tami-story__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* "Cao bằng cột chữ": ảnh phủ kín ô lưới, chiều cao do cột chữ quyết định. */
.tami-story__media--auto img {
	position: absolute;
	inset: 0;
}

/* Tỉ lệ mặc định, khớp kích thước ảnh gốc của thiết kế. */
.tami-story__media--1063-1163 {
	aspect-ratio: 1063 / 1163;
}

.tami-story__media--1-1 {
	aspect-ratio: 1 / 1;
}

.tami-story__media--4-3 {
	aspect-ratio: 4 / 3;
}

.tami-story__media--3-4 {
	aspect-ratio: 3 / 4;
}

.tami-story__media--16-9 {
	aspect-ratio: 16 / 9;
}

/* ---------- Chữ ---------- */
.tami-story__title {
	font-size: 30px !important;
	font-weight: 800;
	line-height: 1.5 !important;
	text-transform: uppercase;
	color: var(--tami-story-red) !important;
	margin: 0 0 26px !important;
}

/* Cho phép đổi một cụm từ trong tiêu đề sang navy bằng <span class="text-navy"> */
.tami-story__title .text-navy {
	color: var(--tami-story-navy);
}

.tami-story__body {
	font-size: 20px;
	line-height: 1.65;
	color: var(--tami-story-ink);
}

.tami-story__body p {
	font-size: 18px !important;
	line-height: 1.5 !important;
	font-weight: 400;
	color: var(--tami-story-ink) !important;
	margin: 0 0 22px !important;
}

.tami-story__body p:last-child {
	margin-bottom: 0 !important;
}

.tami-story__body strong,
.tami-story__body b {
	font-weight: 800;
	color: var(--tami-story-navy);
}

.tami-story__body a {
	color: var(--tami-story-red);
	text-decoration: underline;
}

.tami-story__body ul,
.tami-story__body ol {
	margin: 0 0 22px 20px;
	padding: 0;
}

.tami-story__body li {
	font-size: 20px;
	line-height: 1.65;
	font-weight: 600;
	color: var(--tami-story-ink);
	margin-bottom: 8px;
}

.tami-story__text--justify .tami-story__body {
	text-align: justify;
}

.tami-story__text--left .tami-story__body {
	text-align: left;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {

}

@media (max-width: 991px) {
	.tami-story__inner,
	.tami-story__inner--img-right {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	/* 1 cột thì bỏ đảo thứ tự, ảnh luôn nằm trên khối chữ */
	.tami-story__inner--img-right .tami-story__media,
	.tami-story__inner--img-right .tami-story__text {
		order: initial;
	}

	/* Hết cột chữ để bám chiều cao -> ảnh tự lấy tỉ lệ 4:3 */
	.tami-story__media--auto {
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 767px) {
	.tami-story__inner{
		padding: 0;
	}
	.tami-story {
		padding: 24px 0;
	}

	.tami-story__title {
		font-size: 22px !important;
		margin-bottom: 14px !important;
	}

	.tami-story__body p,
	.tami-story__body li {
		font-size: 14px !important;
		line-height: 1.5 !important;
		margin-bottom: 16px !important;
	}

	.tami-story__media {
		min-height: 0;
	}

	/* Căn đều 2 bên trên màn hẹp tạo khoảng trắng rất xấu -> ép về căn trái */
	.tami-story__text--justify .tami-story__body {
		text-align: left;
	}
}
