/* Elegant Events Wedding Gallery — frontend styles.
   Colors, fonts, sizes, and columns are all driven by CSS variables that
   PHP writes based on Gallery Cards > Settings — this file only defines
   the structure, so the settings page controls the look. */

.eef-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--eef-columns, 3), 1fr);
	gap: var(--eef-gap, 24px);
	margin: 0 auto;
	max-width: 1400px;
}
@media (max-width: 900px) {
	.eef-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.eef-gallery-grid {
		grid-template-columns: 1fr;
	}
}

.eef-gallery-card {
	display: block;
	text-decoration: none;
}

.eef-gallery-media {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
}
.eef-gallery-media img {
	width: 100%;
	height: 100%;
	display: block;
	transition: transform 0.4s ease;
}
.eef-gallery-card:hover .eef-gallery-media img {
	transform: scale(1.04);
}

.eef-gallery-overlay-gradient {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 35%;
	background: linear-gradient(to top, rgba(0, 0, 0, var(--eef-overlay-opacity, 0.7)), rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}

.eef-gallery-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 22px 22px 20px;
	text-align: left;
}
.eef-gallery-title {
	display: block;
	margin: 0 0 8px;
	font-family: var(--eef-heading-font, 'Cormorant Garamond', serif);
	font-weight: var(--eef-heading-weight, 300);
	font-size: var(--eef-heading-size, 24px);
	letter-spacing: var(--eef-heading-spacing, -0.24px);
	color: var(--eef-heading-color, #f0eee9);
	line-height: 1.25;
}
.eef-gallery-view-link {
	display: inline-block;
	font-family: var(--eef-btn-font, 'Karla', sans-serif);
	font-weight: var(--eef-btn-weight, 400);
	font-size: var(--eef-btn-size, 10.88px);
	letter-spacing: var(--eef-btn-spacing, 2.61px);
	color: var(--eef-btn-color, #cbad6d);
	text-transform: var(--eef-btn-transform, uppercase);
}

/* ===== Popup (grid of a single card's images) ===== */
.eef-gallery-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.eef-gallery-overlay.is-active {
	display: flex;
}
.eef-gallery-box {
	background: var(--eef-popup-bg, #ffffff);
	border-radius: 8px;
	max-width: 1000px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 26px;
	position: relative;
}
.eef-gallery-popup-title {
	text-align: center;
	margin: 0 0 18px;
	font-family: var(--eef-popup-heading-font, 'Cormorant Garamond', serif);
	font-weight: var(--eef-popup-heading-weight, 400);
	font-size: var(--eef-popup-heading-size, 22px);
	letter-spacing: var(--eef-popup-heading-spacing, 0px);
	color: var(--eef-popup-heading-color, #a3cc4b);
}
.eef-gallery-popup-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}
.eef-gallery-popup-grid img {
	width: 100%;
	display: block;
	border-radius: 4px;
	cursor: zoom-in;
}

.eef-gallery-close-btn {
	position: absolute;
	top: 10px;
	right: 16px;
	background: none;
	border: none;
	cursor: pointer;
	line-height: 1;
	color: var(--eef-close-color, #999999);
	font-size: var(--eef-close-size, 30px);
}
.eef-gallery-close-btn:hover {
	opacity: 0.7;
}

/* ===== Full-size zoom (single image) ===== */
.eef-gallery-zoom {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.eef-gallery-zoom.is-active {
	display: flex;
}
.eef-gallery-zoom-inner {
	position: relative;
	max-width: 92vw;
	max-height: 92vh;
}
.eef-gallery-zoom-inner img {
	display: block;
	max-width: 92vw;
	max-height: 92vh;
}
/* Always white-on-dark and always visible, independent of the popup close
   button color setting above — this view has a black backdrop, so a
   custom color chosen for the white popup could end up invisible here. */
.eef-gallery-zoom-close {
	position: fixed;
	top: 20px;
	right: 24px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #ffffff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.eef-gallery-zoom-close:hover {
	background: rgba(0, 0, 0, 0.85);
}

@media (max-width: 480px) {
	.eef-gallery-caption {
		padding: 16px 16px 14px;
	}
}
