/* ==========================================================================
   NATURE OT — LEGALITAS SECTION (COMPACT UI/UX PRO MAX)
   Minimalist design: horizontal topbar, dense grid, 60% less vertical space
   ========================================================================== */

.section-legality--compact {
	background: linear-gradient(180deg, #0f1210 0%, #0a0c09 50%, #080908 100%);
	padding: 48px 0;
	color: #ffffff;
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.legality-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
}

/* --------------------------------------------------------------------------
   COMPACT TOPBAR (Horizontal Split)
   -------------------------------------------------------------------------- */

.legality-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.legality-topbar__left {
	flex: 1;
	min-width: 200px;
}

.legality-eyebrow {
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	color: #4ade80;
	text-transform: uppercase;
	margin: 0 0 6px;
	display: inline-block;
}

.legality-title {
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: clamp(1.4rem, 2.2vw, 1.8rem);
	font-weight: 700;
	line-height: 1.1;
	color: #ffffff;
	margin: 0;
	letter-spacing: -0.01em;
}

.legality-topbar__right {
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   TAB FILTER (Compact Pill)
   -------------------------------------------------------------------------- */

.legality-tabs {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 8px;
	background: rgba(16, 18, 14, 0.9);
	padding: 5px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.07);
	flex-wrap: wrap;
}

.legality-tab {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 7px 16px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.legality-tab:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.04);
}

.legality-tab.active {
	background: #2D7A46;
	color: #ffffff;
	box-shadow: 0 3px 10px rgba(45, 122, 70, 0.3);
}

.tab-count {
	font-size: 0.65rem;
	font-weight: 700;
	background: rgba(0, 0, 0, 0.25);
	padding: 2px 6px;
	border-radius: 999px;
	line-height: 1.1;
}

.legality-tab.active .tab-count {
	background: rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   COMPACT GRID (Dense & Responsive)
   -------------------------------------------------------------------------- */

.legality-grid--compact {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin: 0;
	align-items: start;
}

@media (min-width: 640px) {
	.legality-grid--compact {
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
	}
}

@media (min-width: 1024px) {
	.legality-grid--compact {
		grid-template-columns: repeat(6, 1fr);
		gap: 10px;
	}
}

@media (min-width: 1280px) {
	.legality-grid--compact {
		grid-template-columns: repeat(8, 1fr);
		gap: 10px;
	}
}

/* --------------------------------------------------------------------------
   CARD COMPACT (Slim & Mini Pro Max)
   -------------------------------------------------------------------------- */

.legality-card {
	background: rgba(18, 21, 16, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 6px;
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	transition: all 0.25s ease;
	cursor: pointer;
}

.legality-card:hover {
	border-color: rgba(45, 122, 70, 0.6);
	background: rgba(24, 28, 22, 0.85);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4), 0 0 10px rgba(45, 122, 70, 0.15);
	transform: translateY(-2px);
}

.legality-card.is-hidden {
	display: none;
}

.legality-card__link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

/* Thumb Slim/Compact - height terkontrol, tidak tinggi */
.legality-card__thumb {
	display: block;
	height: 85px;
	width: 100%;
	overflow: hidden;
	background: #0d100c;
	position: relative;
	flex-shrink: 0;
}

.legality-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
	filter: brightness(0.92) contrast(1.04);
}

.legality-card:hover .legality-card__thumb img {
	transform: scale(1.05);
	filter: brightness(1) contrast(1.06);
}

/* Zoom Icon */
.legality-card__zoom {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 9, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	opacity: 0;
	transition: opacity 0.2s ease;
	backdrop-filter: blur(1px);
}

.legality-card__zoom svg {
	width: 15px;
	height: 15px;
	stroke: #4ade80;
}

.legality-card:hover .legality-card__zoom {
	opacity: 1;
}

/* Card Meta Minimalis */
.legality-card__meta {
	display: flex;
	flex-direction: column;
	padding: 6px 8px;
	background: rgba(16, 19, 14, 0.95);
	border-top: 1px solid rgba(255, 255, 255, 0.04);
	min-height: 40px;
	justify-content: center;
	gap: 2px;
}

.legality-card__badge {
	font-size: 0.55rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 2px 5px;
	border-radius: 3px;
	text-transform: uppercase;
	line-height: 1;
	pointer-events: none;
	backdrop-filter: blur(6px);
	display: inline-block;
	width: fit-content;
}

.badge--company {
	background: rgba(16, 22, 18, 0.85);
	color: #9cd4a7;
	border: 1px solid rgba(45, 122, 70, 0.3);
}

.badge--team {
	background: rgba(28, 24, 15, 0.85);
	color: #fbbf24;
	border: 1px solid rgba(251, 191, 36, 0.25);
}

.legality-card__title {
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	color: #e5e5e5;
	margin: 0;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Placeholder */
.legality-placeholder {
	width: 100%;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	background: #0d100c;
	color: rgba(255, 255, 255, 0.15);
	gap: 6px;
	padding: 8px;
	text-align: center;
}

.legality-placeholder svg {
	width: 20px;
	height: 20px;
}

.legality-placeholder .legality-card__title {
	font-size: 0.65rem;
	color: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   LIGHTBOX MODAL (Compact & Fast)
   -------------------------------------------------------------------------- */

.legality-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(5, 7, 5, 0.92);
	backdrop-filter: blur(12px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.legality-lightbox[hidden] {
	display: none;
}

.legality-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.lightbox-inner {
	position: relative;
	max-width: 90vw;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lightbox-inner img {
	max-width: 85vw;
	max-height: 75vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: #000;
}

.lightbox-caption {
	margin-top: 12px;
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	color: #ffffff;
	text-align: center;
	background: rgba(0, 0, 0, 0.5);
	padding: 6px 16px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	max-width: 70vw;
}

.lightbox-close,
.lightbox-nav {
	background: rgba(20, 23, 18, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #ffffff;
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
	background: #2D7A46;
	border-color: #2D7A46;
	transform: scale(1.05);
}

.lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
}

.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.lightbox-prev {
	left: 16px;
}

.lightbox-next {
	right: 16px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE OPTIMIZATIONS
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
	.section-legality--compact {
		padding: 36px 0;
	}

	.legality-topbar {
		flex-direction: column;
		gap: 14px;
		margin-bottom: 20px;
		align-items: stretch;
	}

	.legality-topbar__left {
		min-width: unset;
	}

	.legality-title {
		font-size: clamp(1.2rem, 2vw, 1.5rem);
	}

	.legality-tabs {
		width: 100%;
		justify-content: center;
	}

	.legality-grid--compact {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}

	.lightbox-prev,
	.lightbox-next {
		bottom: 16px;
		top: auto;
		left: auto;
		right: auto;
	}

	.lightbox-prev {
		transform: translateX(-60px);
	}

	.lightbox-next {
		transform: translateX(60px);
	}
}

/* ==========================================================================
   NATURE OT — GALLERY & ARTICLES (MINIMALIST EDITORIAL UI)
   Warm monochrome, clean typography, editorial bento — no slop
   ========================================================================== */

/* Shared section head refinement (matches legalitas compact rhythm) */
.gallery-section .section-head,
.articles-section .section-head {
	max-width: 640px;
	margin-bottom: 40px;
}

.gallery-section .section-head .eyebrow,
.articles-section .section-head .eyebrow {
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #4ade80;
	margin: 0 0 10px;
}

.gallery-section .section-head h2,
.articles-section .section-head h2 {
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
	color: #1a1d1a !important;
	margin: 0 0 12px;
}

.gallery-section .section-note,
.articles-section .section-note {
	font-size: 0.9rem;
	line-height: 1.6;
	color: #5a605a !important;
	margin: 0;
}

/* --------------------------------------------------------------------------
   GALLERY — Editorial bento grid (6 images)
   -------------------------------------------------------------------------- */

.gallery-section .gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 190px;
	gap: 10px;
	margin: 0;
}

.gallery-section .gallery-item {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #141714;
	isolation: isolate;
}

.gallery-section .gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), filter 400ms ease;
	filter: saturate(0.92);
}

.gallery-section .gallery-item:hover img {
	transform: scale(1.04);
	filter: saturate(1.05);
}

/* Bento composition: 1st wide, 2nd tall, rest normal */
.gallery-section .gallery-item:nth-child(1) {
	grid-column: span 2;
	grid-row: span 2;
}

.gallery-section .gallery-item:nth-child(2) {
	grid-column: span 1;
	grid-row: span 2;
}

.gallery-section .gallery-item:nth-child(3) {
	grid-column: span 1;
	grid-row: span 1;
}

.gallery-section .gallery-item:nth-child(4) {
	grid-column: span 1;
	grid-row: span 1;
}

.gallery-section .gallery-item:nth-child(5) {
	grid-column: span 2;
	grid-row: span 1;
}

.gallery-section .gallery-item:nth-child(6) {
	grid-column: span 2;
	grid-row: span 1;
}

.gallery-section .gallery-cta {
	text-align: center;
	margin-top: 28px;
}

/* --------------------------------------------------------------------------
   ARTICLES — Editorial 3-card layout (featured + 2 stacked)
   Adapted for LIGHT theme (paper background)
   -------------------------------------------------------------------------- */

.articles-section .articles-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	grid-template-rows: auto auto;
	gap: 24px;
	margin: 0;
	align-items: start;
}

/* Perbesar judul "Artikel" */
.articles-section .articles-main-heading {
	font-size: 32px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	margin: 0 0 8px 0 !important;
}

.articles-section .article-card {
	margin: 0;
	border: none;
	background: transparent;
}

.articles-section .article-card.featured {
	grid-row: span 2;
}

.articles-section .article-link {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-decoration: none;
	color: inherit;
	height: auto;
}

.articles-section .article-image {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 10px;
	background: #e5e3dd;
	aspect-ratio: 16 / 10;
	margin: 0;
	height: auto;
}

.articles-section .article-card.featured .article-image {
	aspect-ratio: 16 / 11;
}

.articles-section .article-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
	filter: saturate(0.94);
}

.articles-section .article-link:hover .article-image img {
	transform: scale(1.035);
	filter: saturate(1.05);
}

.articles-section .article-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.articles-section .article-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b7369;
	margin: 0;
}

.articles-section .article-category {
	color: #2d7a46;
	font-weight: 600;
}

.articles-section .article-read-time::before {
	content: '·';
	margin-right: 12px;
	color: #c5c3bd;
}

.articles-section .article-title {
	font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.32;
	letter-spacing: -0.01em;
	color: #1a1d1a !important;
	margin: 0;
	transition: color 200ms ease;
}

.articles-section .article-card.featured .article-title {
	font-size: 1.55rem;
	line-height: 1.22;
}

.articles-section .article-link:hover .article-title {
	color: #2d7a46 !important;
}

.articles-section .article-excerpt {
	font-size: 0.85rem;
	line-height: 1.6;
	color: #5a605a;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.articles-section .article-card:not(.featured) .article-excerpt {
	display: none;
}

.articles-section .articles-cta {
	text-align: center;
	margin-top: 36px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.gallery-section .gallery-grid {
		grid-template-columns: repeat(3, 1fr);
		grid-auto-rows: 170px;
	}

	.gallery-section .gallery-item:nth-child(1) {
		grid-column: span 2;
		grid-row: span 2;
	}

	.gallery-section .gallery-item:nth-child(2) {
		grid-column: span 1;
		grid-row: span 1;
	}

	.gallery-section .gallery-item:nth-child(5),
	.gallery-section .gallery-item:nth-child(6) {
		grid-column: span 1;
	}

	.articles-section .articles-grid {
		grid-template-columns: 1fr 1fr;
	}

	.articles-section .article-card.featured {
		grid-column: span 2;
		grid-row: span 1;
	}
}

@media (max-width: 640px) {
	.gallery-section .gallery-grid {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 140px;
		gap: 8px;
	}

	.gallery-section .gallery-item:nth-child(1) {
		grid-column: span 2;
		grid-row: span 2;
	}

	.gallery-section .gallery-item:nth-child(n+3) {
		grid-column: span 1;
		grid-row: span 1;
	}

	.articles-section .articles-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.articles-section .article-card.featured {
		grid-column: span 1;
	}

	.articles-section .article-card.featured .article-title {
		font-size: 1.3rem;
	}

	.articles-section .article-card:not(.featured) .article-excerpt {
		display: -webkit-box;
	}
}
