/**
 * Terms & Conditions page.
 */

.terms-page {
	background: #fff;
}

.terms-page__section {
	padding: 48px var(--bona-content-pad, 24px) 48px;
}

.terms-page__inner {
	max-width: var(--bona-content-max, 1080px);
	width: 100%;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) minmax(0, var(--bona-sidebar-width, 300px));
	gap: 48px;
	align-items: start;
}

/* Mobile TOC dropdown (hidden on desktop) */
.terms-page__toc-mobile {
	display: none;
	margin-bottom: 24px;
}

.terms-page__toc-mobile-toggle {
	width: 100%;
	background: #f5f5f5;
	border: none;
	border-left: 3px solid #c8e600;
	padding: 13px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	font-family: 'Barlow Condensed', 'Barlow', sans-serif;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #666;
	border-radius: 2px 2px 0 0;
}

.terms-page__toc-mobile-arrow {
	font-size: 10px;
	line-height: 1;
	transition: transform 0.25s ease;
	color: #c8e600;
}

.terms-page__toc-mobile-toggle.is-open {
	border-radius: 2px 2px 0 0;
}

.terms-page__toc-mobile-toggle.is-open .terms-page__toc-mobile-arrow {
	transform: rotate(180deg);
}

.terms-page__toc-mobile-list {
	background: #fafafa;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 2px 2px;
	padding: 4px 0;
}

.terms-page__toc-mobile-list[hidden] {
	display: none;
}

.terms-page__toc-mobile-list a {
	display: block;
	padding: 10px 16px;
	font-family: 'Barlow', sans-serif;
	font-weight: 600;
	font-size: 12px;
	line-height: 1.4;
	color: #666;
	text-decoration: none;
	border-bottom: 1px solid #e0e0e0;
}

.terms-page__toc-mobile-list a:last-child {
	border-bottom: none;
}

.terms-page__toc-mobile-list a:active,
.terms-page__toc-mobile-list a.is-active {
	color: #000;
}

.terms-page__toc {
	position: sticky;
	top: 88px;
	align-self: start;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 112px);
}

.terms-page__toc-title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 2px solid #c8e600;
	font-family: 'Barlow Condensed', 'Barlow', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #666;
}

.terms-page__toc-list {
	list-style: none;
	margin: 0;
	padding: 0 6px 0 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #c8e600 #f0f0f0;
}

.terms-page__toc-list::-webkit-scrollbar {
	width: 6px;
}

.terms-page__toc-list::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 3px;
}

.terms-page__toc-list::-webkit-scrollbar-thumb {
	background: #c8e600;
	border-radius: 3px;
}

.terms-page__toc-list a {
	display: block;
	padding: 6px 10px;
	border-radius: 2px;
	font-family: 'Barlow', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: #666;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.terms-page__toc-list a:hover {
	background: #f5f5f5;
	color: #000;
}

.terms-page__toc-list a.is-active {
	background: #f8fbe8;
	color: #000;
	box-shadow: inset 3px 0 0 #c8e600;
}

.terms-page__title {
	margin: 0 0 8px;
	font-family: 'Oswald', sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #000;
}

.terms-page__title::after {
	content: '';
	display: block;
	width: 48px;
	height: 3px;
	margin-top: 8px;
	margin-bottom: 28px;
	background: #c8e600;
}

.terms-page__block {
	margin-bottom: 48px;
	scroll-margin-top: 24px;
}

.terms-page__block-title {
	margin: 0 0 16px;
	padding: 14px 16px;
	background: #f5f5f5;
	border-left: 3px solid #c8e600;
	border-radius: 2px;
	font-family: 'Barlow Condensed', 'Barlow', sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #000;
}

.terms-page__block-content p {
	margin: 0 0 14px;
	font-family: 'Barlow', sans-serif;
	font-size: 14px;
	line-height: 1.7;
	color: #666;
}

.terms-page__block-content p:last-child {
	margin-bottom: 0;
}

.terms-page__block-content ul {
	margin: 10px 0 14px;
	padding-left: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.terms-page__block-content li {
	font-family: 'Barlow', sans-serif;
	font-size: 14px;
	line-height: 1.7;
	color: #666;
}

.terms-page__block-content a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.terms-page__block-content a:hover {
	color: #000;
}

.terms-page__note {
	margin-top: 16px;
	padding: 16px 20px;
	background: #f8fbe8;
	border: 1px solid #dceaa0;
	border-left: 3px solid #c8e600;
	border-radius: 2px;
}

.terms-page__note p {
	margin: 0;
	font-family: 'Barlow', sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
	color: #4a5a00 !important;
}

.terms-page__privacy-divider {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 56px 0 36px;
}

.terms-page__privacy-divider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #c8e600;
	flex-shrink: 0;
}

.terms-page__privacy-divider-title {
	margin: 0;
	font-family: 'Oswald', sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #000;
	white-space: nowrap;
}

.terms-page__privacy-divider-line {
	flex: 1;
	height: 2px;
	background: #e0e0e0;
}

.terms-page__ads {
	display: flex;
	flex-direction: column;
	gap: 4px;
	position: sticky;
	top: 88px;
	align-self: start;
}

.terms-page__ad {
	display: block;
	width: var(--bona-sidebar-ad-width, 300px);
	max-width: 100%;
	line-height: 0;
}

.terms-page__ad img {
	display: block;
	width: 100%;
	height: auto;
}

.terms-page__ad--mpu img {
	width: var(--bona-sidebar-ad-width, 300px);
	height: var(--bona-sidebar-ad-height, 250px);
	object-fit: cover;
}

.terms-page__ad--skyscraper {
	display: none;
}

@media (min-width: 901px) {
	.terms-page__ad--skyscraper {
		display: block;
	}

	.terms-page__ad--skyscraper img {
		width: var(--bona-sidebar-ad-width, 300px);
		height: var(--bona-sidebar-ad-skyscraper-height, 720px);
		object-fit: cover;
	}
}

@media (max-width: 900px) {
	.terms-page__section {
		padding: 24px var(--bona-content-pad, 16px) 48px;
	}

	.terms-page__inner {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.terms-page__toc-mobile {
		display: block;
	}

	.terms-page__toc {
		display: none;
	}

	.terms-page__title {
		font-size: 24px;
	}

	.terms-page__privacy-divider {
		margin: 40px 0 28px;
	}

	.terms-page__privacy-divider-title {
		font-size: 18px;
	}

	.terms-page__ads {
		position: static;
		flex-direction: column;
		width: 100%;
		margin-top: 40px;
		gap: 4px;
	}

	.terms-page__ad,
	.terms-page__ad--mpu {
		width: 100%;
	}

	.terms-page__ad:not(.article-feed-section__ad--skyscraper) img,
	.terms-page__ad--mpu img {
		width: 100%;
		height: 90px;
		object-fit: cover;
	}

	.terms-page__ads .article-feed-section__ad--skyscraper,
	.terms-page__ads .terms-page__ad--skyscraper {
		display: none !important;
	}
}

@media (max-width: 480px) {
	.terms-page__section {
		padding: 20px var(--bona-content-pad, 16px) 40px;
	}

	.terms-page__title {
		font-size: 20px;
	}

	.terms-page__block {
		margin-bottom: 32px;
		scroll-margin-top: 16px;
	}

	.terms-page__block-title {
		font-size: 10px;
		letter-spacing: 1.5px;
		padding: 11px 12px;
	}

	.terms-page__block-content p,
	.terms-page__block-content li {
		font-size: 13.5px;
	}

	.terms-page__note {
		padding: 12px 14px;
	}

	.terms-page__note p {
		font-size: 12px !important;
	}
}
