/* ==========================================================================
   Blue Sky CMS Board List & Detail Styles (#cms-list, #cms-detail Scope)
   ========================================================================== */

/* ==========================================================================
   1. CMS Board List (#cms-list)
   ========================================================================== */
#cms-list {
	padding-top: 0.25rem;
	padding-bottom: 1.5rem;
}

#cms-detail > #cms-list {
	margin-top: 3rem !important;
	padding-top: 2.5rem;
	border-top: 0.125rem solid #8fd3ff;
}

#cms-list > header {
	padding: 1.5rem 1.875rem !important;
	background: linear-gradient(135deg, #e8fff8 0%, #ebf7ff 55%, #f7f2e8 100%);
	border: 0.0625rem solid #8fd3ff;
	border-left: 0.375rem solid #3a7ca5;
	border-radius: var(--bs-border-radius-xl);
	box-shadow: var(--theme-shadow-sm);
}

#cms-list #cms-title {
	font-family: var(--font-heading);
	color: var(--bs-heading-color);
	font-size: clamp(1.375rem, 2vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.32;
}

#cms-list #cms-title_sub {
	font-size: 0.9375rem;
	color: #3a7ca5;
	line-height: 1.5;
}

#cms-list #cms-title_sub:empty {
	display: none;
}

#cms-list > header .btn-primary {
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.55rem 1.35rem;
	border-radius: var(--bs-border-radius-pill);
	box-shadow: 0 0.25rem 0.75rem rgba(58, 124, 165, 0.22);
}

#cms-list #article_list {
	margin-top: 0.5rem;
}

#cms-list #article_list:not(.masonry-list):not([class*="row-cols-"]) {
	margin-right: 0;
	margin-left: 0;
}

/* Badges in CMS List & Detail */
#cms-list .badge,
#cms-detail #ct-title .cms-badge-new {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.28rem 0.6rem;
	border-radius: var(--bs-border-radius-pill);
}

#cms-list .cms-badge-new,
#cms-detail .cms-badge-new {
	background-color: #ebf7ff;
	color: #23597a;
	border: 0.0625rem solid #8fd3ff;
}

#cms-list .cms-badge-pick,
#cms-detail .cms-badge-pick {
	background-color: #e8fff8;
	color: #1b6352;
	border: 0.0625rem solid #bff5e6;
}

#cms-list .cms-badge-expired,
#cms-detail .cms-badge-expired {
	background-color: var(--bs-secondary-bg);
	color: var(--bs-secondary-color);
	border: 0.0625rem solid var(--bs-border-color);
}

#cms-list .cms-badge-expire-time,
#cms-detail .cms-badge-expire-time {
	border-radius: var(--bs-border-radius-pill);
	background-color: #f7f2e8;
	color: #6e5735;
	border: 0.0625rem solid #e6dac3;
}

#cms-list .cms-badge-role,
#cms-detail .cms-badge-role {
	border-radius: var(--bs-border-radius-pill);
	background-color: #e8fff8;
	color: #23597a;
	border: 0.0625rem solid #8fd3ff;
	font-weight: 600;
}

/* Card Type Lists (masonry, image_card, image_gallery) */
#cms-list #article_list .cms-card {
	border: 0.0625rem solid var(--bs-border-color);
	border-radius: 1.25rem;
	background-color: rgba(255, 255, 255, 0.95);
	box-shadow: var(--theme-shadow-sm);
	overflow: hidden;
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

#cms-list #article_list .cms-card:hover {
	box-shadow: var(--theme-shadow-md);
	border-color: #8fd3ff;
}

#cms-list #article_list .cms-card > a {
	overflow: hidden;
	background-color: #e8fff8;
}

#cms-list #article_list .cms-card > a img {
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

#cms-list #article_list .cms-card:hover > a img {
	transform: scale(1.04);
}

#cms-list #article_list .cms-card .card-body h3 {
	font-family: var(--font-heading);
	font-size: 1.03125rem;
	font-weight: 700;
	line-height: 1.45;
}

#cms-list #article_list .cms-card .card-body h3 a {
	color: var(--bs-heading-color);
	text-decoration: none;
	transition: color 0.15s ease;
}

#cms-list #article_list .cms-card .card-body h3 a:hover {
	color: var(--bs-primary);
}

#cms-list #article_list .cms-card .card-body > p {
	color: var(--bs-secondary-color);
	font-size: 0.875rem;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

#cms-list #article_list .cms-card footer img {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	object-fit: cover;
	border: 0.0625rem solid #8fd3ff;
}

#cms-list #article_list .cms-card footer strong {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bs-body-color);
}

#cms-list .cms-card-stats {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

/* Gallery Specific */
#cms-list #article_list .cms-gallery-card {
	border-radius: var(--bs-border-radius-xl);
	border: 0.0625rem solid #8fd3ff;
	background-color: #e8fff8;
}

#cms-list #article_list .cms-gallery-count {
	border-radius: var(--bs-border-radius-pill);
	background-color: rgba(18, 40, 56, 0.78);
	border: 0.0625rem solid rgba(143, 211, 255, 0.5);
	color: #ffffff;
	font-size: 0.75rem;
	backdrop-filter: blur(0.25rem);
}

/* Row Type Lists (title_list, image_list) */
#cms-list #article_list > article.cms-row-item {
	background-color: rgba(255, 255, 255, 0.94);
	border: 0.0625rem solid var(--bs-border-color);
	border-left: 0.25rem solid #8fd3ff;
	border-radius: 1rem;
	padding: 1.125rem 1.375rem !important;
	margin-top: 0.6875rem !important;
	box-shadow: var(--theme-shadow-sm);
	transition: var(--theme-transition);
}

#cms-list #article_list > article.cms-row-item:hover {
	border-color: #8fd3ff;
	border-left-color: #3a7ca5;
	background: linear-gradient(90deg, #e8fff8 0%, #ffffff 100%);
	box-shadow: var(--theme-shadow-md);
}

#cms-list #article_list > article.cms-row-item .cms-row-thumb {
	width: 5.5rem;
	border-radius: 0.625rem;
	overflow: hidden;
	background-color: #e8fff8;
	border: 0.0625rem solid rgba(143, 211, 255, 0.55);
}

#cms-list #article_list > article.cms-row-item .cms-row-thumb img {
	object-fit: cover;
	border-radius: 0.5rem;
}

#cms-list #article_list > article.cms-row-item h3 {
	font-family: var(--font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.45;
}

#cms-list #article_list > article.cms-row-item h3 a {
	color: var(--bs-heading-color);
	text-decoration: none;
}

#cms-list #article_list > article.cms-row-item h3 a:hover {
	color: var(--bs-primary);
}

#cms-list #article_list > article.cms-row-item p {
	color: var(--bs-secondary-color);
	font-size: 0.875rem;
	line-height: 1.6;
}

#cms-list #article_list > article.cms-row-item footer {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

#cms-list #article_list > article.cms-row-item footer strong {
	color: var(--bs-body-color);
	font-weight: 600;
}

/* ==========================================================================
   2. CMS Article Detail (#cms-detail) - Airy Sky Reading Surface
   ========================================================================== */
#cms-detail {
	padding-top: 0.25rem !important;
	padding-bottom: 1.5rem !important;
}

#cms-detail > article {
	max-width: 100%;
	background-color: rgba(255, 255, 255, 0.92);
	border: 0.0625rem solid var(--bs-border-color);
	border-radius: var(--bs-border-radius-2xl);
	padding: 2.25rem;
	box-shadow: var(--theme-shadow-sm);
}

#cms-detail > article > header {
	margin-bottom: 2rem !important;
}

#cms-detail > article > header #ct-c_title {
	font-size: 0.8125rem;
	font-weight: 700;
	padding: 0.4rem 0.95rem;
	border-radius: var(--bs-border-radius-pill);
	background-color: #e8fff8;
	color: #1b6352;
	border: 0.0625rem solid #bff5e6;
}

#cms-detail > article > header #ct-title {
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 2.5vw, 2.125rem);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: var(--bs-heading-color);
	word-break: keep-all;
}

#cms-detail > article > header > div:last-child {
	padding: 0.9375rem 1.25rem;
	background: linear-gradient(135deg, #e8fff8 0%, #ebf7ff 100%);
	border: 0.0625rem solid #8fd3ff;
	border-radius: 1rem;
	box-shadow: var(--theme-shadow-sm);
}

#cms-detail > article > header #ct-profile_src {
	width: 2.625rem;
	height: 2.625rem;
	border-radius: 50%;
	object-fit: cover;
	border: 0.125rem solid #ffffff;
	box-shadow: 0 0.125rem 0.375rem rgba(58, 124, 165, 0.15);
}

#cms-detail > article > header #ct-nickname {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--bs-heading-color);
}

#cms-detail > article > header #ct-role_name {
	font-size: 0.8125rem;
	color: #3a7ca5;
}

#cms-detail > article > header #ct-posted_at_deco,
#cms-detail > article > header #ct-modified_at_deco,
#cms-detail > article > header #ct-expire_at_deco,
#cms-detail > article > header #ct-view_cnt {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

#cms-detail .cms-detail-body {
	padding-top: 2rem !important;
	border-top: 0.0625rem solid var(--bs-border-color);
}

/* ==========================================================================
   3. CMS Article Body (#ct-content_html & EditorJS Blocks)
   ========================================================================== */
#cms-detail #ct-content_html {
	font-family: var(--font-article);
	font-size: 1.0625rem;
	line-height: 1.88;
	color: var(--bs-body-color);
	word-break: break-word;
}

#cms-detail #ct-content_html .article-paragraph {
	margin-bottom: 1.375rem;
	line-height: 1.88;
}

#cms-detail #ct-content_html .article-heading {
	font-family: var(--font-heading);
	margin-top: 2.25rem;
	margin-bottom: 1rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--bs-heading-color);
}

#cms-detail #ct-content_html h2.article-heading {
	font-size: 1.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 0.125rem solid #8fd3ff;
}

#cms-detail #ct-content_html h3.article-heading {
	font-size: 1.3rem;
}

#cms-detail #ct-content_html h4.article-heading {
	font-family: var(--font-sans);
	font-size: 1.15rem;
}

#cms-detail #ct-content_html a:not(.btn) {
	color: var(--bs-primary);
	text-decoration: underline;
	text-underline-offset: 0.1875rem;
}

#cms-detail #ct-content_html mark {
	background-color: #bff5e6;
	color: #122838;
	padding: 0.1rem 0.35rem;
	border-radius: 0.25rem;
}

#cms-detail #ct-content_html code {
	font-family: var(--font-sans);
	background-color: #ebf7ff;
	color: #23597a;
	padding: 0.15rem 0.4rem;
	border-radius: 0.25rem;
	font-size: 0.875em;
}

/* Media (Image & Embed) & Caption */
#cms-detail #ct-content_html .article-image {
	border-radius: var(--bs-border-radius-lg);
}

#cms-detail #ct-content_html .article-image img {
	border-radius: var(--bs-border-radius);
}

#cms-detail #ct-content_html .article-image.border {
	border-color: #8fd3ff !important;
	padding: 0.5rem;
	background-color: var(--bs-body-bg);
}

#cms-detail #ct-content_html .article-image.bg-body-secondary {
	background-color: #e8fff8 !important;
	padding: 1rem;
}

#cms-detail #ct-content_html .article-embed .ratio {
	border-radius: var(--bs-border-radius-lg);
	overflow: hidden;
	border: 0.0625rem solid #8fd3ff;
	box-shadow: var(--theme-shadow-sm);
}

#cms-detail #ct-content_html .cms-media-caption {
	font-family: var(--font-sans);
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.625rem;
	padding: 0.55rem 0.9375rem;
	background-color: #f7f2e8;
	border-left: 0.25rem solid #3a7ca5;
	border-radius: 0 0.5rem 0.5rem 0;
	font-size: 0.875rem;
	color: #594d3b;
	line-height: 1.5;
}

#cms-detail #ct-content_html .cms-media-caption-icon {
	color: #3a7ca5;
	flex-shrink: 0;
}

/* Link Tool Block */
#cms-detail #ct-content_html .article-link {
	font-family: var(--font-sans);
	border-color: var(--bs-border-color) !important;
	border-radius: var(--bs-border-radius-lg) !important;
	background-color: var(--bs-body-bg);
	box-shadow: var(--theme-shadow-sm);
	transition: var(--theme-transition);
}

#cms-detail #ct-content_html .article-link:hover {
	border-color: #8fd3ff !important;
	background-color: #e8fff8;
	box-shadow: var(--theme-shadow-md);
}

#cms-detail #ct-content_html .article-link > a {
	color: var(--bs-body-color);
	text-decoration: none !important;
}

#cms-detail #ct-content_html .article-link .ratio {
	width: 8.5rem;
	max-width: 35%;
}

#cms-detail #ct-content_html .article-link h5 {
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--bs-heading-color);
}

#cms-detail #ct-content_html .article-link p {
	color: var(--bs-secondary-color);
	line-height: 1.5;
}

/* Attachment Block */
#cms-detail #ct-content_html .article-attach {
	font-family: var(--font-sans);
	border-color: #8fd3ff !important;
	border-radius: var(--bs-border-radius-lg) !important;
	background: linear-gradient(135deg, #e8fff8 0%, #ebf7ff 100%);
}

#cms-detail #ct-content_html .article-attach > i {
	color: var(--bs-primary);
}

/* Delimiter Block */
#cms-detail #ct-content_html .article-delimiter {
	border-top: 0.0625rem solid #8fd3ff;
	opacity: 1;
}

#cms-detail #ct-content_html .article-delimiter.border-dashed {
	border-top-style: dashed !important;
}

/* Table Block */
#cms-detail #ct-content_html .article-table .table {
	font-family: var(--font-sans);
	border-color: var(--bs-border-color);
	font-size: 0.9375rem;
	margin-bottom: 0;
	background-color: var(--bs-body-bg);
}

#cms-detail #ct-content_html .article-table .table th {
	background-color: #ebf7ff;
	color: #23597a;
	font-weight: 700;
}

#cms-detail #ct-content_html .article-table .table td,
#cms-detail #ct-content_html .article-table .table th {
	padding: 0.65rem 0.875rem;
}

/* List & Checklist Block */
#cms-detail #ct-content_html .article-list ul,
#cms-detail #ct-content_html .article-list ol {
	padding-left: 1.375rem;
	margin-bottom: 0;
}

#cms-detail #ct-content_html .article-list li {
	margin-bottom: 0.375rem;
	line-height: 1.85;
}

#cms-detail #ct-content_html .article-list .bi-check-square {
	color: var(--bs-primary);
}

#cms-detail #ct-content_html .article-list .bi-square {
	color: var(--bs-secondary-color);
}

/* Quote Block */
#cms-detail #ct-content_html .article-quote figure {
	min-width: min(100%, 22rem);
	max-width: min(100%, 44rem);
	background: linear-gradient(135deg, #f7f2e8 0%, #e8fff8 100%);
	border: 0.0625rem solid #8fd3ff;
	border-left: 0.25rem solid var(--sky-deep);
	border-radius: var(--bs-border-radius-xl);
	box-shadow: var(--theme-shadow-sm);
}

#cms-detail #ct-content_html .article-quote figure > i {
	font-size: 2rem;
	line-height: 1;
	color: var(--sky-deep);
	opacity: 0.6;
}

#cms-detail #ct-content_html .article-quote blockquote p {
	margin: 0 !important;
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.85;
	color: var(--bs-heading-color);
}

#cms-detail #ct-content_html .article-quote figcaption.blockquote-footer {
	margin: 1rem 0 0;
	padding-top: 0.75rem;
	border-top: 0.0625rem solid rgba(58, 124, 165, 0.2);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sky-deep);
}

/* ==========================================================================
   4. CMS Comments Section (#ct-comments)
   ========================================================================== */
#cms-detail #ct-comments {
	border-top: 0.0625rem solid var(--bs-border-color);
}

#cms-detail #ct-comments > header h2 {
	font-family: var(--font-heading);
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--bs-heading-color);
}

#cms-detail #ct-comments > header #ct-comment_cnt {
	color: var(--bs-primary);
	margin-left: 0.25rem;
}

#cms-detail #ct-comments .cms-comment-item {
	border-color: var(--bs-border-color);
	border-top: 0.0625rem solid var(--bs-border-color);
	border-bottom: 0.0625rem solid var(--bs-border-color);
}

#cms-detail #ct-comments .cms-comment-item + .cms-comment-item {
	border-top: 0;
}

#cms-detail #ct-comments .cms-comment-item > img {
	border-radius: 50%;
	object-fit: cover;
	border: 0.0625rem solid #8fd3ff;
}

#cms-detail #ct-comments .cms-comment-item header strong {
	font-size: 0.90625rem;
	color: var(--bs-heading-color);
}

#cms-detail #ct-comments .cms-comment-item header time {
	font-size: 0.8125rem;
	color: var(--bs-secondary-color);
}

#cms-detail #ct-comments .cms-comment-item header .btn-link {
	color: var(--bs-secondary-color);
	text-decoration: none;
}

#cms-detail #ct-comments .cms-comment-item header .btn-link:hover {
	color: var(--bs-primary);
}

#cms-detail #ct-comments .cms-comment-item p[id^="ct-comment-"] {
	font-size: 0.96875rem;
	line-height: 1.7;
	color: var(--bs-body-color);
	word-break: break-word;
}

#cms-detail #ct-comments .cms-comment-deleted {
	color: var(--bs-secondary-color);
}

#cms-detail #ct-comments .cms-comment-btn {
	font-size: 0.78125rem;
	border-radius: var(--bs-border-radius-pill);
	border: 0.0625rem solid #8fd3ff;
	background-color: #e8fff8;
	color: #23597a;
}

#cms-detail #ct-comments .cms-comment-btn:hover {
	background-color: #bff5e6;
	border-color: #3a7ca5;
	color: #122838;
}

#cms-detail #ct-comments .cms-comment-btn .badge {
	border-radius: var(--bs-border-radius-pill);
	background-color: var(--bs-primary);
	color: #ffffff;
}

#cms-detail #ct-comments [id^="ct-comment-replies-"] {
	background-color: #f7f2e8;
	border: 0.0625rem solid #e6dac3;
	border-radius: var(--bs-border-radius-lg);
	padding: 0.25rem 1rem 0.5rem 1rem;
	margin-top: 0.5rem;
	margin-bottom: 0.75rem;
}

#cms-detail #ct-comments [id^="ct-comment-replies-"] .cms-comment-reply {
	border-top: 0;
}

#cms-detail #ct-comments [id^="ct-comment-replies-"] .cms-comment-reply:last-child {
	border-bottom: 0 !important;
}

#cc-profile_image_p img {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	object-fit: cover;
}

/* ==========================================================================
   5. Responsive Adjustments (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 767.98px) {
	#cms-list {
		padding-top: 0.25rem;
		padding-bottom: 1rem;
	}

	#cms-list > header {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.75rem !important;
		padding: 1.125rem 1.125rem !important;
	}

	#cms-list #article_list > article.cms-row-item {
		padding: 0.9375rem 1rem !important;
	}

	#cms-detail {
		padding-top: 0 !important;
		padding-right: 0 !important;
		padding-left: 0 !important;
	}

	#cms-detail > article {
		padding: 0;
		background-color: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	#cms-detail > article > header {
		margin-bottom: 1.25rem !important;
	}

	#cms-detail > article > header > div:last-child {
		padding: 0.75rem 0.875rem;
	}

	#cms-detail .cms-detail-body {
		padding-top: 1.25rem !important;
	}

	#cms-detail #ct-content_html {
		font-size: 1rem;
		line-height: 1.82;
	}

	/* Full-bleed edge-to-edge images on mobile */
	#cms-detail #ct-content_html .article-image,
	#cms-detail #ct-content_html .article-image.border,
	#cms-detail #ct-content_html .article-image.bg-body-secondary {
		width: calc(100% + (2 * var(--main-mobile-px, 1rem))) !important;
		max-width: none !important;
		margin-left: calc(-1 * var(--main-mobile-px, 1rem)) !important;
		margin-right: calc(-1 * var(--main-mobile-px, 1rem)) !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background-color: transparent !important;
	}

	#cms-detail #ct-content_html .article-image img {
		width: 100% !important;
		max-width: none !important;
		border-radius: 0 !important;
	}

	#cms-detail #ct-content_html .article-image .cms-media-caption {
		margin-left: var(--main-mobile-px, 1rem);
		margin-right: var(--main-mobile-px, 1rem);
	}

	#cms-detail #ct-content_html .article-link .ratio {
		width: 6.5rem;
	}

	#cms-detail #ct-content_html .article-quote figure {
		min-width: 100%;
	}
}
