/*---------------------------------------
	MEDIA ENTRY
-----------------------------------------*/
.media_entry_grid {
	display: grid;
	gap: 18px;
}

.media_entry_home {
	grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
	grid-template-rows: repeat(2, minmax(0, 1fr));
}

.media_entry_grid_large {
	grid-template-columns: repeat(3, 1fr);
	margin-top: 12px;
	gap: 24px;
}

.media_entry_card {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
	min-height: 230px;
	color: #ffffff;
	background: var(--card-bg);
	transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
}

.media_entry_card_large {
	grid-row: span 2;
	min-height: 478px;
}

.media_entry_card_small {
	min-height: 230px;
}

.media_entry_card:hover {
	filter: brightness(1.08);
	box-shadow: 0 26px 48px rgba(0, 0, 0, 0.34);
}

.media_entry_card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s ease;
}

.media_entry_card:hover img {
	transform: scale(1.08);
}

.media_entry_card::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, transparent 28%, rgba(5, 18, 28, 0.9) 100%),
		linear-gradient(90deg, rgba(5, 18, 28, 0.35), transparent 58%);
	pointer-events: none;
}

.media_entry_card::before {
	content: "";
	position: absolute;
	z-index: 2;
	inset: 10px;
	border: 1px solid rgba(255, 255, 255, 0.32);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.28s ease;
}

.media_entry_card:hover::before {
	opacity: 1;
}

.media_entry_content {
	position: relative;
	z-index: 3;
	padding: 26px;
}

.media_entry_content span {
	display: block;
	margin-bottom: 8px;
	color: var(--highlight);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.media_entry_content h3 {
	font-family: var(--font-title);
	font-size: clamp(26px, 3vw, 42px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.media_entry_card_small .media_entry_content h3 {
	font-size: clamp(22px, 2vw, 30px);
}

.media_entry_card_small .media_entry_content p {
	display: none;
}

.media_layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.media_side_panel {
	position: sticky;
	top: calc(var(--header-height) + 24px);
	display: grid;
	gap: 12px;
}

.media_side_tab {
	width: 100%;
	padding: 22px 18px;
	text-align: left;
	color: var(--color-text);
	border: 1px solid var(--color-border);
	background: rgba(255, 255, 255, 0.04);
	transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.media_side_tab span {
	display: block;
	margin-bottom: 6px;
	color: var(--color-primary-light);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.media_side_tab strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
}

.media_side_tab:hover,
.media_side_tab.active {
	color: var(--btn-primary-color);
	border-color: var(--color-primary);
	background: var(--btn-primary-bg);
}

.media_side_tab:hover span,
.media_side_tab.active span {
	color: inherit;
}

.media_content_area {
	min-width: 0;
	padding: 36px;
	border: 1px solid var(--card-border);
	background:
		radial-gradient(circle at 80% 12%, rgba(216, 184, 106, 0.16), transparent 30%),
		var(--card-bg);
}
.media_content_area {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.media_content_area.is_ready {
	opacity: 1;
	transform: translateY(0);
}

.media_content_head {
	margin-bottom: 28px;
}

.media_content_head p {
	margin-bottom: 8px;
	color: var(--color-primary-light);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.media_content_head h2 {
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1.15;
	font-weight: 900;
}

.media_content_head span {
	display: block;
	max-width: 680px;
	margin-top: 14px;
	color: var(--color-muted);
	font-size: 16px;
	line-height: 1.8;
}

.media_thumbnail_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.media_thumb_card {
	width: 100%;
	overflow: hidden;
	text-align: left;
	color: var(--color-text);
	border: 1px solid var(--color-border);
	background: rgba(255, 255, 255, 0.04);
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.media_thumb_card:hover {
	transform: translateY(-5px);
	border-color: var(--color-primary);
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.media_thumb_card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.media_thumb_card:hover img {
	transform: scale(1.06);
}

.media_video_card {
	position: relative;
}

.media_video_card::after {
	content: "▶";
	position: absolute;
	top: 50%;
	left: 50%;
	/* width: 54px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center; */
	color: #ffffff;
	font-size: 22px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.music_list {
	display: grid;
	gap: 18px;
}

.music_item {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 22px;
	align-items: center;
	padding: 20px;
	border: 1px solid var(--color-border);
	background: rgba(255, 255, 255, 0.045);
}

.music_cover {
	position: relative;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	overflow: hidden;
	border: 1px solid var(--card-border);
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
}

.music_cover::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #080b12;
	border: 1px solid rgba(255, 255, 255, 0.18);
	transform: translate(-50%, -50%);
}

.music_cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.music_info span {
	display: block;
	margin-bottom: 8px;
	color: var(--color-primary-light);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.music_info h3 {
	margin-bottom: 16px;
	font-size: 24px;
	line-height: 1.3;
}

.music_info audio {
	width: 100%;
}

.media_lightbox {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.media_lightbox.active {
	display: flex;
}

.media_lightbox_backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
	backdrop-filter: blur(8px);
}

.media_lightbox_panel {
	position: relative;
	z-index: 1;
	/* width: min(100%, 960px); */
	width: 100%;
	height: 100%;
	max-height: 90vh;
	overflow: auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.media_lightbox_close {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	width: 40px;
	height: 40px;
	color: #ffffff;
	font-size: 32px;
	line-height: 1;
}

.media_lightbox_title {
	display: none;
	padding-right: 48px;
	margin-bottom: 20px;
	font-size: 24px;
}

.media_lightbox_content img,
.media_lightbox_content video {
	width: 100%;
	max-height: 70vh;
	object-fit: contain;
}

.media_lightbox_content video {
	background: #000000;
}

body.lightbox_open {
	overflow: hidden;
}

@media (max-width: 1024px) {
  .media_entry_home,
	.media_entry_grid_large {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: auto;
	}
  .media_entry_content h3, .media_entry_card_small .media_entry_content h3 {
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.15;
  }

	.media_entry_card_large,
	.media_entry_card_small {
		grid-row: auto;
		min-height: 320px;
	}
	.media_layout {
		grid-template-columns: 1fr;
	}
  

	.media_side_panel {
    position: static;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }
  
  .media_side_panel::-webkit-scrollbar {
    display: none;
  }

  .media_side_panel.is_dragging,
  .media_side_panel.is_momentum {
    cursor: grabbing;
  }
	.media_side_tab {
		flex: 0 0 160px;
	}

	.media_side_tab:hover,
	.media_side_tab.active {
		transform: translateY(-2px);
	}

	.media_thumbnail_grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.media_page_section .container{
		width: min(100%, var(--container-width));
	}

	.media_side_panel{
		padding: 15px;
	}

  .media_entry_home,
	.media_entry_grid_large {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
	}

	.media_entry_card_large,
	.media_entry_card_small,
	.media_entry_card {
    min-height: 150px;
	}

	.media_entry_content {
		padding: 20px;
	}

	.media_entry_content p {
		display: none;
	}

	.media_content_area {
		width: 100%;
		max-width: 90vw;
		padding: 24px 18px;
		margin: 0 auto;
	}

	.media_thumbnail_grid {
		grid-template-columns: 1fr;
	}

	.music_item {
		grid-template-columns: 1fr;
	}

	.music_cover {
		margin: 0 auto;
	}

	.media_lightbox_panel {
		padding: 18px;
	}

	.media_lightbox_title {
		font-size: 20px;
	}
}

/*---------------------------------------
    VIDEO EMBED
-----------------------------------------*/
.media_video_embed {
	position: relative;
	width: min(100vw, 1280px);
	aspect-ratio: 16 / 9;
}

.media_video_embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/*---------------------------------------
    MUSIC PLAYER
-----------------------------------------*/
@keyframes media_music_spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.music_cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform-origin: center;
}

.music_cover.is_playing img {
	animation:
		media_music_spin
		6s
		linear
		infinite;
}