/*
Theme Name: Flatsome Child APK
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.5
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

/* Entry Header Styles */
.entry-header {
	margin-bottom: 30px;
}

.post-header {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 30px;
}

.post-header-top {
	display: flex;
	gap: 15px;
	align-items: flex-start;
}

.post-thumbnail {
	flex-shrink: 0;
}

.post-thumbnail img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.post-info {
	flex: 1;
}

.post-title {
	margin: 0 0 10px 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}

.post-title a {
	color: #333;
	text-decoration: none;
}

.post-title a:hover {
	color: #0073aa;
}

.post-meta-top {
	margin-bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.post-date {
	color: #666;
	font-size: 14px;
}

.apk-cat {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.apk-cat a {
	display: inline-block;
	padding: 4px 12px;
	background-color: #e0e0e0;
	color: #666;
	font-size: 13px;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.apk-cat a:hover {
	background-color: #d0d0d0;
}

.post-meta-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.custom-chip-text {
	display: inline-block;
	color: #666;
	font-size: 14px;
}

.app-slide-wrap {
	margin: 20px 0;
	width: 100%;
}

.app-slider-container {
	position: relative;
	width: 100%;
	height: 350px;
	border-radius: 8px;
	overflow: hidden;
	background-color: #f5f5f5;
}

.app-slider-wrapper {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.app-slide-item {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

.app-slide-item.active {
	display: block;
	opacity: 1;
}

.app-slide-image {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	object-fit: contain;
	object-position: center;
	display: block;
}

.app-slider-prev,
.app-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(0, 0, 0, 0.5);
	color: white;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 24px;
	cursor: pointer;
	z-index: 10;
	transition: background-color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.app-slider-prev:hover,
.app-slider-next:hover {
	background-color: rgba(0, 0, 0, 0.7);
}

.app-slider-prev {
	left: 15px;
}

.app-slider-next {
	right: 15px;
}

.app-slider-dots {
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 10;
}

.app-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.app-slider-dot.active,
.app-slider-dot:hover {
	background-color: rgba(255, 255, 255, 1);
}

/* Game Details Table Style */
.post-details-table {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
	border-radius: 8px;
}

.detail-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	border: 1px solid #eee;
	padding: 10px 0px;
	text-align: center;
	box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.detail-label {
	font-size: 13px;
	color: #333;
	margin-bottom: 4px;
}

.detail-label i{
	font-size: 13px;
	color: #1681fc;
	margin-right: 8px;
}



.detail-label strong {
	font-weight: 600;
}

.detail-value {
	font-size: 14px;
	color: #666;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

	.post-header {
		gap: 15px;
	}

	
	.post-thumbnail img {
		width: 80px;
		height: 80px;
	}

	.post-title {
		font-size: 20px;
	}

	.post-details-table {
		grid-template-columns: 1fr 1fr;
		padding: 0px;
	}

	.app-slider-container {
		height: 200px;
	}

	.app-slide-image {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	.app-slider-prev,
	.app-slider-next {
		width: 35px;
		height: 35px;
		font-size: 20px;
	}

	.app-slider-prev {
		left: 10px;
	}

	.app-slider-next {
		right: 10px;
	}

	.app-slider-dots {
		bottom: 10px;
	}

}

.custom-chip-text::before {
    margin-right: 5px;
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 4px;
    background: var(--primary-color);
    display: block;
}

.custom-chip-text {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* App Posts Slider Styles */
.app-posts-slider-container {
	position: relative;
	width: 100%;
	padding: 0;
}

.app-posts-slider-wrapper {
	display: flex;
	gap: 15px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE and Edge */
	padding: 10px 0;
}

.app-posts-slider-wrapper::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

.app-post-item {
	flex: 0 0 auto;
	width: 150px;
}

.app-post-link {
	display: block;
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease;
}

.app-post-link:hover {
	transform: translateY(-5px);
}

.app-post-icon {
	width: 150px;
	height: 150px;
	border-radius: 12px;
	overflow: hidden;
	background-color: #f5f5f5;
	margin-bottom: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-post-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.app-post-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #e0e0e0;
	color: #999;
	font-size: 12px;
}

.app-post-title {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 6px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.app-post-meta {
	font-size: 12px;
	color: #666;
	margin-bottom: 6px;
	line-height: 1.4;
}

.app-post-rating {
	display: flex;
	gap: 2px;
	align-items: center;
}

.app-post-rating .star {
	font-size: 16px;
	line-height: 1;
}

.app-post-rating .star.star-filled {
	color: #ff9800;
}

.app-post-rating .star.star-half {
	color: #ff9800;
	opacity: 0.7;
}

.app-post-rating .star.star-empty {
	color: #ccc;
}


/* App Posts Grid Styles (5 columns) */
.app-posts-grid-container {
	width: 100%;
	margin: 30px 0;
    overflow: auto;
}

.app-posts-grid-wrapper {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 15px;
	width: 100%;
}

.app-posts-grid-wrapper .app-post-item {
	width: 100%;
}

.app-posts-grid-wrapper .app-post-icon {
	width: 100%;
	aspect-ratio: 1;
}

.title-section {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #333;
}

@media only screen and (max-width: 48em) {
	.app-posts-slider-wrapper .app-post-item {
		width: 120px;
	}

	.app-posts-slider-wrapper .app-post-icon {
		width: 120px;
		height: 120px;
	}

	.app-posts-slider-wrapper .app-post-title {
		font-size: 13px;
	}

	/* Grid layout cho mobile - giữ nguyên 6 cột như desktop */
	.app-posts-grid-wrapper {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		gap: 10px;
	}

	.app-posts-grid-wrapper .app-post-item {
		width: 100%;
	}

	.app-posts-grid-wrapper .app-post-icon {
		width: 100%;
		aspect-ratio: 1;
	}

	.app-posts-grid-wrapper .app-post-title {
		font-size: 12px;
	}

	.app-posts-grid-wrapper .app-post-meta {
		font-size: 11px;
	}

	.title-section {
		font-size: 20px;
	}
}

.modradar-download-button {
    display: inline-flex;
    align-items: center;
    padding: 4px 16px;
    font-size: 16px;
    border-radius: 15px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.modradar-download-button:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.02);
    border: 1px solid var(--primary-color);
}

.download_layout {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.download_layout_header{
    display: flex;
    padding: 10px;
    justify-content: space-between;
    align-items: center;
}

.download_layout_header p{
    margin-bottom: 0px;
}

.btn_download{
    background: #0073aa;
    font-size: 12px;
    margin: 0px;
    margin-left: 10px;
    color: #ffff;
}

/* Category Page Styles */
.category-tabs {
	display: flex;
	gap: 0;
	margin-bottom: 20px;
	border-bottom: 2px solid #ddd;
}

.category-tab {
	padding: 12px 24px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	font-size: 16px;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	transition: all 0.3s ease;
}

.category-tab:hover {
	color: #333;
}

.category-tab.active {
	color: #333;
	border-bottom-color: #0073aa;
	font-weight: 600;
}

.category-tab-content {
	display: none;
}

.category-tab-content.active {
	display: block;
}

.category-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 20px;
}

.category-post-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-post-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-post-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.category-post-thumbnail {
	width: 100%;
	aspect-ratio: 16/9;
	overflow: hidden;
	background: #f5f5f5;
}

.category-post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.category-post-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e0e0e0;
	color: #999;
	font-size: 14px;
}

.category-post-content {
	padding: 15px;
}

.category-post-title {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px 0;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.category-post-meta {
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
}

.category-post-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.category-post-btn {
	display: inline-block;
	padding: 6px 12px;
	font-size: 12px;
	border-radius: 4px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s ease;
}

.category-post-btn-game {
	background: #0073aa;
	color: #fff;
}

.category-post-btn-game:hover {
	background: #005a87;
}

.category-post-btn-category {
	background: #f0f0f0;
	color: #333;
}

.category-post-btn-category:hover {
	background: #e0e0e0;
}

@media only screen and (max-width: 48em) {
	.category-posts-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 15px;
	}

	.category-post-title {
		font-size: 14px;
	}

	.category-post-meta {
		font-size: 12px;
	}

	.category-post-btn {
		font-size: 11px;
		padding: 5px 10px;
	}
}

.title-section{
    text-align: center;
    color: #004aad;
}

.app-custom .app-posts-grid-wrapper{
    grid-template-columns: repeat(3, 1fr);
}

.app-custom .app-posts-grid-wrapper .app-post-icon{
    height: auto;
}

.app-custom .app-post-content-wrapper{
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 10px;
}

@media only screen and (max-width: 48em) {
	/* Mobile: Giữ kích thước desktop và cho phép scroll ngang */
	.app-custom .app-posts-grid-container {
		overflow-x: auto;
		scroll-behavior: smooth;
		scrollbar-width: none; /* Firefox */
		-ms-overflow-style: none; /* IE and Edge */
		-webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
	}

	.app-custom .app-posts-grid-container::-webkit-scrollbar {
		display: none; /* Chrome, Safari, Opera */
	}

	.app-custom .app-posts-grid-wrapper {
		display: grid;
		grid-template-columns: repeat(3, 280px);
		gap: 15px;
		min-width: max-content;
		width: max-content;
	}

	.app-custom .app-posts-grid-wrapper .app-post-icon {
		width: 100%;
		height: auto;
		aspect-ratio: 1;
	}
}

/* Category Sidebar Styles */
.category-sidebar {
	/* background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.category-sidebar-title {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid #f0f0f0;
}

.category-tags-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.category-tag-item {
	display: inline-block;
	padding: 8px 12px;
	background: #f5f5f5;
	border-radius: 6px;
	text-align: center;
	font-size: 13px;
	color: #333;
	text-decoration: none;
	transition: all 0.3s ease;
	border: 1px solid #e0e0e0;
}

.category-tag-item:hover {
	background: #004aad;
	color: #fff;
	border-color: #004aad;
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0, 74, 173, 0.3);
}

/* Sidebar Latest Posts Styles */
.sidebar-latest-posts {
	margin-top: 30px;
}

.sidebar-posts-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.sidebar-post-item {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.sidebar-post-item:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.sidebar-post-link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	text-decoration: none;
	color: inherit;
}

.sidebar-post-icon {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
}

.sidebar-post-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sidebar-post-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	color: #999;
	background: #f0f0f0;
}

.sidebar-post-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sidebar-post-title {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	line-height: 1.4;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sidebar-post-meta {
	font-size: 12px;
	color: #666;
	line-height: 1.3;
}

.sidebar-post-rating {
	display: flex;
	align-items: center;
	gap: 2px;
}

.sidebar-post-rating .star {
	font-size: 14px;
	line-height: 1;
	color: #ffc107;
}

.sidebar-post-rating .star.star-empty {
	color: #ddd;
}

@media only screen and (max-width: 48em) {
	.category-sidebar {
		margin-top: 30px;
	}
	
	.category-tags-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.sidebar-post-icon {
		width: 50px;
		height: 50px;
	}
	
	.sidebar-post-title {
		font-size: 13px;
	}
}

/* News Section Styles */
.news-post-item {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-post-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.news-post-img {
	position: relative;
}

.news-post-img img {
	transition: transform 0.3s ease;
}

.news-post-item:hover .news-post-img img {
	transform: scale(1.05);
}

/* Multi-line truncate support */
.news-post-title,
.news-post-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-wrap: break-word;
}

.news-post-title {
	-webkit-line-clamp: 2;
	line-height: 1.3;
	min-height: 2.6em;
}

.news-post-excerpt {
	-webkit-line-clamp: 2;
	line-height: 1.4;
	min-height: 2.8em;
}

/* Fallback for browsers that don't support -webkit-line-clamp */
@supports not (-webkit-line-clamp: 2) {
	.news-post-title,
	.news-post-excerpt {
		max-height: 2.8em;
		overflow: hidden;
		position: relative;
	}
	
	.news-post-title::after,
	.news-post-excerpt::after {
		content: '...';
		position: absolute;
		right: 0;
		bottom: 0;
		background: white;
		padding-left: 5px;
	}
}