.dr1064gallery {
	padding: 90px 16px;
	position: relative;
	overflow: hidden;
	background: radial-gradient(circle at top right, rgba(14, 165, 164, .14),
		transparent 42%),
		radial-gradient(circle at bottom left, rgba(37, 99, 235, .12),
		transparent 45%),
		linear-gradient(135deg, #061321 0%, #081a2d 45%, #04111d 100%);
	color: #fff;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.dr1064gallery::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(255, 255, 255, .02) 1px, transparent
		1px), linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent
		1px);
	background-size: 60px 60px;
	opacity: .35;
	pointer-events: none;
}

/* =========================================
   HEADER
========================================= */
.dr1064gallery-header {
	text-align: center;
	margin-bottom: 30px;
}

.dr1064gallery-header h2 {
	font-size: clamp(1.9rem, 4vw, 2.8rem);
	font-weight: 800;
	background: linear-gradient(90deg, #ffffff, #14b8a6, #3b82f6);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.dr1064gallery-header p {
	font-size: 15px;
	color: rgba(255, 255, 255, .75);
	max-width: 850px;
	margin: 14px auto 0;
	line-height: 1.8;
}

/* =========================================
   TOGGLE
========================================= */
.dr1064gallery-toggle {
	margin-top: 16px;
	display: inline-flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 40px;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .10);
	backdrop-filter: blur(12px);
}

.dr1064gallery-toggle label {
	font-size: 13px;
	cursor: pointer;
	color: #dbeafe;
}

.dr1064gallery-toggle input {
	margin-right: 5px;
}

.dr1064gallery-toggle:hover {
	border-color: rgba(20, 184, 166, .35);
}

/* =========================================
   GRID (NO OVERFLOW SAFE)
========================================= */
.dr1064gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

/* =========================================
   CARD (SAFE – NO SCALE BREAK)
========================================= */
.dr1064gallery-card {
	border-radius: 18px;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .10);
	backdrop-filter: blur(16px);
	box-shadow: 0 15px 40px rgba(0, 0, 0, .28);
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s
		ease;
}

/* reveal */
.dr1064gallery-card.show {
	opacity: 1;
	transform: translateY(0);
}

/* hover (SAFE – NO horizontal overflow) */
.dr1064gallery-card:hover {
	transform: translateY(-8px);
	border-color: rgba(20, 184, 166, .35);
	box-shadow: 0 20px 55px rgba(14, 165, 164, .18);
}

/* =========================================
   MEDIA BOX (CRITICAL FIX)
========================================= */
.media-box {
	width: 100%;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* =========================================
   MEDIA (NO OVERFLOW EVER)
========================================= */
.dr1064gallery-card img, .dr1064gallery-card video, .dr1064gallery-card iframe
	{
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: 300px;
	object-fit: contain;
	display: block;
	border-radius: 12px;
}

/* =========================================
   SOCIAL CARD (FIXED WIDTH SAFE)
========================================= */
.dr1064-social-card {
	display: flex;
	gap: 10px;
	width: 100%;
	padding: 14px;
	border-radius: 14px;
	text-decoration: none;
	color: #fff;
	background: rgba(255, 255, 255, .05);
	border: 1px solid rgba(255, 255, 255, .10);
	backdrop-filter: blur(12px);
	transition: 0.3s ease;
}

.dr1064-social-card:hover {
	transform: translateY(-4px);
	background: rgba(20, 184, 166, .10);
	border-color: rgba(20, 184, 166, .30);
}

.dr1064-social-icon {
	font-size: 20px;
}

.dr1064-social-content {
	flex: 1;
}

.dr1064-social-content h3 {
	font-size: 13px;
	margin: 0;
}

.dr1064-social-content h4 {
	font-size: 11px;
	margin: 2px 0;
	color: #a5b4fc;
}

.dr1064-social-content p {
	font-size: 12px;
	color: #cbd5f5;
	margin-top: 6px;
}

.dr1064-view-btn {
	font-size: 12px;
	color: #14b8a6;
	font-weight: 700;
	margin-top: 6px;
	display: inline-block;
	font-weight: 700;
}

/* =========================================
   CAPTION
========================================= */
.dr1064gallery-caption {
	padding: 10px;
	font-size: 12px;
	color: rgba(255, 255, 255, .78);
	text-align: center;
}

/* =========================================
   LOADING
========================================= */
.dr1064gallery-loading {
	text-align: center;
	color: #b8d9ff;
	padding: 30px;
}

/* =========================================
   MOBILE FIXES (IMPORTANT)
========================================= */
@media ( max-width : 768px) {
	.dr1064gallery {
		padding: 70px 12px;
	}
	.dr1064gallery-grid {
		gap: 14px;
	}
	.dr1064gallery-card img, .dr1064gallery-card video, .dr1064gallery-card iframe
		{
		max-height: 220px;
	}
	.dr1064gallery-toggle {
		width: 100%;
	}
}