/* Reset CSS */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
/* Body Styling */
body {
	font-family: 'Arial', sans-serif;
	background-color: #121212;
	color: #e0e0e0;
	margin: 0;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
/* Header Styling */
header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	background-color: #222;
	color: white;
	padding: 10px 20px;
}
header a {
	color: #f1c40f;
	font-weight: bold;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 1.2rem;
}
header a:hover {
	color: #ffe064;
}
.logo img {
	height: 30px;
	max-width: 100%;
}
.nav {
	flex: 1;
	text-align: right;
}
#header-title {
	font-size: 1.2rem;
	font-weight: bold;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
@media (max-width: 600px) {
	header {
		flex-direction: column;
		align-items: flex-start;
	}
	.nav {
		text-align: left;
		width: 100%;
		margin-top: 5px;
	}
	#header-title {
		font-size: 0.8rem;
	}
}
/* Main Content Styling */
main {
	flex: 1;
	padding: 20px;
}
@media screen and (max-width: 600px) {
	main {
	padding: 0;
	}
}
/* Video List Container */
.list-video {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}
/* Video Thumbnail Styling */
.thumb-video {
	background-color: #2c2c2c;
	padding: 10px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	text-align: center;
	transition: transform 0.2s;
}
.thumb-video:hover {
	transform: translateY(-10px);
}
.thumb-video img {
	width: 100%;
	height: auto;
	border-radius: 5px;
	display: block;
	margin-bottom: 10px;
}
.thumb-video {
  position: relative; /* Agar video bisa di-position absolute */
}
.image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Agar gambar memenuhi container */
}

.preview-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Agar video memenuhi container */
  opacity: 0; /* Video awalnya tidak terlihat */
  transition: opacity 0.3s ease; /* Efek transisi saat opacity berubah */
}

.thumb-video:hover .preview-video {
  opacity: 1; /* Video terlihat saat dihover */
}
.titles {
	font-size: 1rem;
	color: #f1c40f;
	margin-top: 5px;
	font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ribbon {
	position: absolute;
	top: 10px;
	right: 20px;
}
@media (max-width: 600px) { .titles { font-size: 12px; } }
/* Pagination Styling */
.pagination {
	text-align: center;
	margin-top: 20px;
}
.pagination a {
	display: inline-block;
	padding: 10px 15px;
	margin: 5px;
	border-radius: 5px;
	background-color: #f1c40f;
	color: #121212;
	text-decoration: none;
	transition: background-color 0.3s;
}
.pagination a:hover {
	background-color: #e67e22;
}
.pagination a.active {
	pointer-events: none;
	background-color: #2c2c2c;
	color: white;
}

/* Footer Styling */
footer {
	background-color: #1f1f1f;
	padding: 10px;
	text-align: center;
	color: #7f8c8d;
	font-size: 0.9rem;
	position: relative;
}

footer p {
  margin-bottom: 10px;
}
.iframe-container {
    position: relative;
    width: 100%;
    max-width: 800px;
	margin: auto;
    padding-bottom: 40.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.iframe-container iframe, .iframe-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.iframe-video {
	width: 1000px; /*media web*/
	max-width: 100%; /* Lebar maksimal tetap mengikuti kontainer induk */
	margin: 0 auto; /* Memusatkan elemen */
	padding: 20px;
	box-sizing: border-box;
	text-align: center;
}
.iframe-video video {
	width: 100%; /* Video akan menyesuaikan lebar kontainer */
	max-height: 500px; /* Membatasi tinggi maksimal video untuk tampilan potret */
	height: auto; /* Mempertahankan rasio aspek */
	border-radius: 8px; /* Membuat sudut video lebih halus */
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Efek bayangan */
	object-fit: contain; /* Memastikan seluruh video tetap terlihat tanpa terpotong */
}
.iframe-video a, .download a {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 20px;
	background-color: #4CAF50;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}
.iframe-video a:hover {
	background-color: #45a049;
}
/* Responsif untuk perangkat mobile */
@media (max-width: 600px) {
	.iframe-container {
		padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	}
	.iframe-video {
		padding: 10px;
	}
	.iframe-video video, .iframe-video iframe {
		max-height: 300px; /* Membatasi tinggi maksimal lebih kecil untuk perangkat kecil */
	}
	.iframe-video a {
		width: 100%;
		text-align: center;
	}
	.iframe-video h3 {
		font-size: 16px;
	}
	.iframe-video span {
		font-size: 12px;
	}
}
#categoryList {
	text-align: center;
	padding: 20px 10px;
	background-color: #2d2d2d;
}
#categoryList a {
	color: white;
	text-decoration: none;
}
#categoryList a:hover {
	color: #f1c40f;
}
#scrollUpBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: #222;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

#scrollUpBtn.show {
  opacity: 0.8;
  pointer-events: auto;
}

#scrollUpBtn:hover {
  opacity: 1;
  background-color: #ff4081; /* warna hover pink bold */
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}