.ucb-gallery {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

.ucb-gallery *,
.ucb-gallery *::before,
.ucb-gallery *::after {
	box-sizing: border-box;
}

.ucb-gallery .gallery-section {
	position: relative;
	z-index: 10;
}

.ucb-gallery .container {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 1.5rem 1rem;
	min-width: 0;
}

.ucb-gallery img,
.ucb-gallery video,
.ucb-gallery iframe {
	max-width: 100%;
}

.ucb-gallery-modal .album-main-media-container iframe,
.ucb-gallery-modal .album-main-media-container video {
	max-width: 100%;
	width: 100%;
}

.ucb-gallery-empty {
	text-align: center;
	padding: 2rem 1rem;
	color: #666;
}

.ucb-gallery .gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	gap: 1.5rem;
	margin: 2rem auto 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	justify-items: center;
	justify-content: center;
}

.ucb-gallery .gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: white;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	width: 100%;
	max-width: 100%;
}

.ucb-gallery .gallery-item:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.ucb-gallery .gallery-item img {
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	background: #f0f0f0;
}

.ucb-gallery .gallery-item:hover img {
	transform: scale(1.08);
}

.ucb-gallery .gallery-item-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
	padding: 1.25rem 1rem;
	color: white;
	opacity: 0;
	transition: opacity 0.4s ease;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	min-height: 80px;
}

.ucb-gallery .gallery-item:hover .gallery-item-overlay {
	opacity: 1;
}

.ucb-gallery .gallery-item-overlay p {
	font-size: 0.95rem;
	margin: 0;
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	max-width: 100%;
	font-weight: 500;
	line-height: 1.4;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ucb-gallery .videos-section,
.ucb-gallery .images-section,
.ucb-gallery .gallery-section {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.ucb-gallery .videos-section {
	margin-bottom: 3rem;
}

.ucb-gallery .videos-header,
.ucb-gallery .images-header {
	text-align: center;
	margin-bottom: 2rem;
	width: 100%;
}

.ucb-gallery .videos-title,
.ucb-gallery .images-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: #dc2626;
	margin-bottom: 1rem;
	font-family: Arial, sans-serif;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.ucb-gallery .videos-gallery,
.ucb-gallery .images-gallery {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ucb-gallery .videos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	gap: 1.5rem;
	margin: 2rem auto 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	justify-items: center;
	justify-content: center;
}

.ucb-gallery .video-item {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: white;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	width: 100%;
	max-width: 100%;
}

.ucb-gallery .video-item:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.ucb-gallery .video-item .video-thumbnail {
	width: 100%;
	height: 100%;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #f0f0f0;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ucb-gallery .video-play-button {
	width: 60px;
	height: 60px;
	background: rgba(220, 38, 38, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
}

.ucb-gallery .video-item:hover .video-play-button {
	background: rgba(220, 38, 38, 1);
}

.ucb-gallery .play-icon-large {
	color: white;
	font-size: 1.5rem;
	margin-left: 3px;
}

.ucb-gallery .video-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
	padding: 1.25rem 1rem;
	color: white;
	min-height: 70px;
	display: flex;
	align-items: flex-end;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ucb-gallery .video-item:hover .video-thumbnail {
	transform: scale(1.08);
}

.ucb-gallery .video-item:hover .video-overlay {
	opacity: 1;
}

.ucb-gallery .video-overlay h4 {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
	max-width: 100%;
}

.ucb-gallery .images-section {
	margin-top: 0;
	width: 100%;
}

.ucb-gallery .videos-section + .images-section {
	margin-top: 3rem;
}

.ucb-gallery .pagination {
	display: flex !important;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
	margin: 3rem auto 2rem;
	padding: 1.5rem 0;
	width: 100%;
	flex-wrap: wrap;
}

.ucb-gallery .pagination-btn {
	min-width: 45px;
	height: 45px;
	padding: 0 15px;
	background: white;
	border: 2px solid #dc2626;
	border-radius: 8px;
	color: #dc2626;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ucb-gallery .pagination-btn:hover:not(:disabled) {
	background: #dc2626;
	color: white;
	transform: translateY(-2px);
}

.ucb-gallery .pagination-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ucb-gallery .pagination-btn.active {
	background: #dc2626;
	color: white;
	border-color: #dc2626;
	box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
	transform: scale(1.05);
}

.ucb-gallery-modal {
	display: none;
	position: fixed;
	z-index: 100000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.95);
	animation: ucbGalleryFadeIn 0.3s ease;
}

@keyframes ucbGalleryFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.ucb-gallery-modal .modal-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: color 0.3s ease;
	z-index: 100001;
}

.ucb-gallery-modal .modal-close:hover,
.ucb-gallery-modal .modal-close:focus {
	color: #fff;
}

.ucb-gallery-modal .modal-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	max-width: 90vw;
	max-height: 90vh;
	margin: auto;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

@keyframes ucbGalleryZoomIn {
	from { transform: scale(0.8); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.ucb-gallery-modal .album-modal-content {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	max-width: 95vw;
	max-height: 95vh;
	position: relative;
}

.ucb-gallery-modal .album-modal-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	gap: 1.5rem;
}

.ucb-gallery-modal .album-modal-title-section {
	text-align: center;
	padding: 1rem 1.5rem;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 8px;
	flex-shrink: 0;
}

.ucb-gallery-modal .album-modal-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
	color: white;
	font-family: Arial, sans-serif;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ucb-gallery-modal .album-modal-description {
	font-size: 1rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 auto;
	max-width: 800px;
}

.ucb-gallery-modal .album-modal-thumbnail {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 0;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.8);
	border-radius: 8px;
	padding: 1rem;
}

.ucb-gallery-modal .album-main-media-container {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ucb-gallery-modal .album-main-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
	animation: ucbGalleryZoomIn 0.3s ease;
}

.ucb-gallery-modal .album-main-image-title {
	text-align: center;
	color: white;
	font-size: 1.1rem;
	font-weight: 600;
	margin-top: 1rem;
	padding: 0.5rem 1rem;
	font-family: Arial, sans-serif;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	word-wrap: break-word;
	max-width: 100%;
}

.ucb-gallery-modal .album-modal-carousel {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 8px;
	position: relative;
	min-height: 120px;
}

.ucb-gallery-modal .carousel-images {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	flex: 1;
	padding: 0.5rem 0;
	scrollbar-width: thin;
	scrollbar-color: rgba(220, 38, 38, 0.5) transparent;
}

.ucb-gallery-modal .carousel-images::-webkit-scrollbar {
	height: 8px;
}

.ucb-gallery-modal .carousel-images::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 4px;
}

.ucb-gallery-modal .carousel-images::-webkit-scrollbar-thumb {
	background: rgba(220, 38, 38, 0.5);
	border-radius: 4px;
}

.ucb-gallery-modal .carousel-item {
	flex-shrink: 0;
	width: 120px;
	height: 120px;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	border: 3px solid transparent;
	transition: all 0.3s ease;
	opacity: 0.7;
}

.ucb-gallery-modal .carousel-item:hover {
	opacity: 1;
	transform: scale(1.05);
	border-color: rgba(220, 38, 38, 0.5);
}

.ucb-gallery-modal .carousel-item.active {
	opacity: 1;
	border-color: #dc2626;
	box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3);
	transform: scale(1.1);
}

.ucb-gallery-modal .carousel-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ucb-gallery-modal .carousel-nav {
	background: rgba(220, 38, 38, 0.9);
	color: white;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
	z-index: 10;
}

.ucb-gallery-modal .carousel-nav:hover {
	background: rgba(220, 38, 38, 1);
	transform: scale(1.1);
	box-shadow: 0 4px 15px rgba(220, 38, 38, 0.5);
}

@media (max-width: 1200px) {
	.ucb-gallery .gallery-grid,
	.ucb-gallery .videos-grid {
		grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 240px));
		justify-content: center;
		justify-items: center;
		gap: 1.25rem;
	}

	.ucb-gallery .gallery-item,
	.ucb-gallery .video-item {
		width: 100%;
		max-width: 240px;
	}

	.ucb-gallery .videos-gallery,
	.ucb-gallery .images-gallery,
	.ucb-gallery .pagination {
		align-items: center;
		justify-content: center;
	}
}

@media (max-width: 1024px) {
	.ucb-gallery .gallery-grid,
	.ucb-gallery .videos-grid {
		grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 220px));
		justify-content: center;
		justify-items: center;
		gap: 1.2rem;
	}

	.ucb-gallery .gallery-item,
	.ucb-gallery .video-item {
		width: 100%;
		max-width: 220px;
	}
}

@media (max-width: 768px) {
	.ucb-gallery .container {
		padding: 0.75rem 0;
	}

	.ucb-gallery .gallery-grid,
	.ucb-gallery .videos-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.ucb-gallery .gallery-item,
	.ucb-gallery .video-item {
		min-height: 200px;
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}

	.ucb-gallery .gallery-item:hover,
	.ucb-gallery .video-item:hover {
		transform: none;
	}

	.ucb-gallery .gallery-item:hover img,
	.ucb-gallery .video-item:hover .video-thumbnail {
		transform: none;
	}

	.ucb-gallery .videos-title,
	.ucb-gallery .images-title {
		font-size: 1.75rem;
	}

	.ucb-gallery .pagination {
		margin: 2rem auto 1.5rem;
		padding: 1rem 0;
		gap: 0.5rem;
		max-width: 100%;
	}

	.ucb-gallery .pagination-btn {
		min-width: 40px;
		height: 40px;
		padding: 0 12px;
		font-size: 0.95rem;
	}

	.ucb-gallery-modal {
		overflow: hidden;
	}

	.ucb-gallery-modal .modal-content,
	.ucb-gallery-modal .album-modal-content {
		max-width: 100%;
		width: 100%;
		left: 0;
		transform: none;
		top: 0;
		position: relative;
		height: 100%;
		max-height: 100%;
		padding: 3rem 0.75rem 0.75rem;
		box-sizing: border-box;
	}

	.ucb-gallery-modal .modal-close {
		top: 10px;
		right: 12px;
		font-size: 30px;
	}

	.ucb-gallery-modal .album-modal-container {
		gap: 1rem;
		max-width: 100%;
	}

	.ucb-gallery-modal .album-modal-title-section {
		padding: 0.75rem 1rem;
	}

	.ucb-gallery-modal .album-modal-title {
		font-size: 1.25rem;
	}

	.ucb-gallery-modal .album-modal-carousel {
		padding: 0.5rem;
		min-height: 100px;
		max-width: 100%;
	}

	.ucb-gallery-modal .carousel-item {
		width: 80px;
		height: 80px;
	}

	.ucb-gallery-modal .carousel-nav {
		width: 35px;
		height: 35px;
		font-size: 20px;
	}

	.ucb-gallery-modal iframe,
	.ucb-gallery-modal video,
	.ucb-gallery-modal img {
		max-width: 100% !important;
		width: 100% !important;
		height: auto !important;
	}
}

@media (max-width: 480px) {
	.ucb-gallery .videos-title,
	.ucb-gallery .images-title {
		font-size: 1.75rem;
	}

	.ucb-gallery .video-play-button {
		width: 50px;
		height: 50px;
	}

	.ucb-gallery .play-icon-large {
		font-size: 1.2rem;
	}

	.ucb-gallery .pagination-btn {
		min-width: 38px;
		height: 38px;
		font-size: 0.9rem;
	}
}
