/*!
 * Event Gallery – front end. Mobile first.
 * Built by Design Room – https://wearedesignroom.com/
 * Uses the theme's tokens (base_layout.css) and patterns: grey .section_page_header header,
 * purple h1/h2 .core, yellow h3.core, white .shadow_box cards, basic .btn_1 buttons.
 */

/* Tokens live on the gallery sections (the theme's <body> has no body classes). */
.dr-eg-header, .dr-eg-body, .pswp {
	--dr-eg-primary: var(--colour-primary, #703183);
	--dr-eg-primary-dark: var(--colour-primarydark, #3D1F4A);
	--dr-eg-secondary: var(--colour-secondary, #F2BA00);
	--dr-eg-dark: var(--colour-dark, #2B2B2B);
	--dr-eg-line: var(--colour-line, #C6C6C6);
	--dr-eg-grey: var(--colour-light, #F2F2F2);
	--dr-eg-muted: #6f6f76;
	--dr-eg-radius: 10px;
	--dr-eg-shadow: 0 0 25px 0 rgba(0, 0, 0, .07);
	--dr-eg-glow: 0 0 30px -5px rgba(156, 76, 180, .5);
}

.dr-eg-header *, .dr-eg-body *, .dr-eg-header *::before, .dr-eg-body *::before { box-sizing: border-box; }

/* ---------- Header (grey band, purple title, yellow sub) ---------- */
.dr-eg-header { padding-bottom: 56px; }
.dr-eg-header--cards { padding-bottom: 150px; } /* cards overlap the grey band, like testimonials */
.dr-eg-header .dr-eg-h1 {
	font-size: clamp(36px, 5vw, var(--font-size-xlarge, 50px));
	line-height: 1.1;
	margin: 0 0 12px;
	max-width: 900px;
}
.dr-eg-header h3.core { margin-bottom: 0; }

.dr-eg-back {
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 44px; margin-bottom: 8px;
	color: var(--dr-eg-primary); text-decoration: none;
	font-family: var(--font-primary-bold, inherit);
	transition: color .2s ease;
}
.dr-eg-back:hover { color: var(--dr-eg-secondary); }

/* Date · location · photos */
.dr-eg-meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 0; }
.dr-eg-meta-item { display: inline-flex; align-items: center; gap: 8px; color: var(--dr-eg-dark); font-size: var(--font-size-gen, 16px); line-height: 1.3; }
.dr-eg-meta-item .dr-eg-ico { flex: none; color: var(--dr-eg-primary); }
.dr-eg-header .dr-eg-meta-item { font-size: 18px; }

/* Share bar (same divider style as .section_page_header .soc_con_con) */
.dr-eg-share {
	position: relative;
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
	margin-top: 28px; padding-top: 20px;
	border-top: 1px solid var(--dr-eg-line);
}
.dr-eg-share-label { font-family: var(--font-primary-bold, inherit); color: var(--dr-eg-primary); }
.dr-eg-share-links { display: flex; flex-wrap: wrap; gap: 10px; }
.dr-eg-share-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: #fff; color: var(--dr-eg-primary); cursor: pointer;
	box-shadow: var(--dr-eg-shadow);
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.dr-eg-share-btn:hover, .dr-eg-share-btn:focus-visible { background: var(--dr-eg-primary); color: #fff; transform: translateY(-2px); }
.dr-eg-share-btn:focus-visible { outline: 3px solid var(--dr-eg-secondary); outline-offset: 2px; }
.dr-eg-share-toast {
	font-size: 14px; color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit);
	opacity: 0; transition: opacity .2s ease;
}
.dr-eg-share-toast.is-on { opacity: 1; }

/* ---------- White body ---------- */
.dr-eg-body { background: #fff; padding-top: 48px; }
.dr-eg-body--cards { padding-top: 0; }
.dr-eg-body--cards .dr-eg-cards, .dr-eg-body--cards .dr-eg-empty { position: relative; margin-top: -100px; }

/* ---------- Landing cards: 1 / 2 / 3 ---------- */
.dr-eg-cards { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px)  { .dr-eg-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dr-eg-cards { grid-template-columns: repeat(3, 1fr); gap: 30px; } }

.dr-eg-card {
	display: flex; flex-direction: column;
	padding: 6px;
	background: #fff; color: var(--dr-eg-dark); text-decoration: none;
	border: 1px solid #ececec; border-radius: var(--dr-eg-radius);
	box-shadow: var(--dr-eg-shadow);
	transition: box-shadow .3s ease, transform .3s ease;
}
.dr-eg-card:hover, .dr-eg-card:focus-visible { box-shadow: var(--dr-eg-glow); transform: translateY(-3px); }
.dr-eg-card:focus-visible { outline: 3px solid var(--dr-eg-secondary); outline-offset: 2px; }

.dr-eg-card-img {
	position: relative; display: block; aspect-ratio: 1 / 1;
	border-radius: 7px; overflow: hidden; background: var(--dr-eg-grey);
}
.dr-eg-card-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; }
.dr-eg-card:hover .dr-eg-card-img img { transform: scale(1.04); }

.dr-eg-pill {
	position: absolute; left: 12px; bottom: 12px;
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; border-radius: 25px;
	background: var(--dr-eg-primary-dark); color: #fff;
	font-size: var(--font-size-small, 12px); font-family: var(--font-primary-bold, inherit);
}

.dr-eg-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 14px 14px; }
.dr-eg-card-title {
	font-family: var(--font-primary-bold, inherit); font-size: var(--font-size-med, 20px); line-height: 1.25;
	color: var(--dr-eg-primary); transition: color .3s ease;
}
.dr-eg-card:hover .dr-eg-card-title { color: var(--dr-eg-secondary); }
.dr-eg-card .dr-eg-meta-row { flex-direction: column; gap: 6px; margin: 0; }
.dr-eg-card .dr-eg-meta-item { font-size: 14px; color: var(--dr-eg-muted); }
.dr-eg-card .dr-eg-meta-item .dr-eg-ico { width: 16px; height: 16px; }
.dr-eg-card-cta {
	display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px;
	color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit); font-size: 14px;
}
.dr-eg-card-cta .dr-eg-ico { transform: rotate(180deg); transition: transform .3s ease; }
.dr-eg-card:hover .dr-eg-card-cta .dr-eg-ico { transform: rotate(180deg) translateX(-4px); }

/* Pagination */
.dr-eg-pagination { margin: 40px 0 0; }
.dr-eg-pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.dr-eg-pagination a, .dr-eg-pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: var(--dr-eg-radius);
	background: #fff; color: var(--dr-eg-primary); text-decoration: none; box-shadow: var(--dr-eg-shadow);
	font-family: var(--font-primary-bold, inherit);
}
.dr-eg-pagination .current { background: var(--dr-eg-primary); color: #fff; }

.dr-eg-empty { text-align: center; color: var(--dr-eg-muted); font-size: 18px; padding: 48px 20px; }

/* ---------- Album: intro + notice ---------- */
.dr-eg-intro { max-width: none; margin: 0 0 28px; color: var(--dr-eg-dark); font-size: 18px; line-height: 1.6; }
.dr-eg-intro > :last-child { margin-bottom: 0; }

.dr-eg-notice {
	display: flex; align-items: flex-start; gap: 16px;
	margin: 0 0 32px; padding: 18px 20px;
	background: #FFF8E1; border: 1px solid rgba(242, 186, 0, .5);
	border-radius: var(--dr-eg-radius);
}
.dr-eg-notice-icon {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; border-radius: 50%;
	background: var(--dr-eg-primary); color: #fff;
}
.dr-eg-notice-title { display: block; margin: 2px 0 4px; color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit); font-size: 18px; }
.dr-eg-notice p { margin: 0; color: var(--dr-eg-dark); line-height: 1.5; }
.dr-eg-notice p strong { font-family: var(--font-primary-bold, inherit); font-weight: normal; }

/* ---------- Album grid: 2 / 3 / 4 / 5 rounded squares ---------- */
.dr-eg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
@media (min-width: 420px)  { .dr-eg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .dr-eg-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 1200px) { .dr-eg-grid { grid-template-columns: repeat(5, 1fr); } }

.dr-eg-cell { position: relative; margin: 0; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: var(--dr-eg-grey); }
.dr-eg-tile { position: absolute; inset: 0; display: block; -webkit-tap-highlight-color: transparent; }
.dr-eg-tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .4s ease; }
.dr-eg-tile:focus-visible { outline: 3px solid var(--dr-eg-secondary); outline-offset: -3px; }

.dr-eg-dl {
	position: absolute; right: 6px; bottom: 6px;
	display: flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	background: rgba(61, 31, 74, .55); color: #fff;
	transition: opacity .2s ease, background-color .2s ease;
}
.dr-eg-dl svg { width: 16px; height: 16px; }
.dr-eg-dl::before { content: ""; position: absolute; inset: -6px; } /* 44px tap area */
.dr-eg-dl:hover, .dr-eg-dl:focus-visible { background: var(--dr-eg-primary); }
@media (min-width: 768px) { .dr-eg-dl { width: 36px; height: 36px; } .dr-eg-dl svg { width: 18px; height: 18px; } }
@media (hover: hover) and (pointer: fine) {
	.dr-eg-dl { opacity: 0; }
	.dr-eg-cell:hover .dr-eg-dl, .dr-eg-dl:focus-visible { opacity: 1; }
	.dr-eg-cell:hover .dr-eg-tile img { transform: scale(1.04); }
}

/* ---------- Select mode ---------- */
.dr-eg-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; }
.dr-eg-toolbar-hint { color: var(--dr-eg-muted); font-size: 14px; transition: color .2s ease; }
.dr-eg-toolbar-hint.is-done { color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit); }
.dr-eg-select-toggle {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
	border: 1px solid var(--dr-eg-primary); border-radius: var(--dr-eg-radius);
	background: #fff; color: var(--dr-eg-primary); cursor: pointer;
	font-family: var(--font-primary-bold, inherit); font-size: 14px; text-transform: uppercase;
	transition: background-color .2s ease, color .2s ease;
}
.dr-eg-select-toggle:hover, .dr-eg-select-toggle[aria-pressed="true"] { background: var(--dr-eg-primary); color: #fff; }

.dr-eg-check {
	position: absolute; top: 8px; right: 8px; z-index: 2;
	display: none; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	border: 2px solid #fff; background: rgba(0, 0, 0, .2); color: transparent;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: background-color .15s ease, border-color .15s ease;
}
.dr-eg-check svg { width: 14px; height: 14px; }
.dr-eg-grid.is-selecting .dr-eg-check { display: flex; }
.dr-eg-grid.is-selecting .dr-eg-dl { display: none; }
.dr-eg-grid.is-selecting .dr-eg-tile img { transform: none !important; }

/* Selected: thin purple frame + yellow tick */
.dr-eg-tile::after {
	content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 8px;
	box-shadow: inset 0 0 0 3px var(--dr-eg-primary);
	opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.dr-eg-tile.is-selected::after { opacity: 1; }
.dr-eg-tile.is-selected .dr-eg-check { background: var(--dr-eg-secondary); border-color: var(--dr-eg-secondary); color: var(--dr-eg-primary); }

/* Bottom bar while selecting */
.dr-eg-selbar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000; /* above the site's WhatsApp chat bubble */
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: #fff; box-shadow: 0 -6px 24px rgba(0, 0, 0, .12);
	--dr-eg-primary: var(--colour-primary, #703183);
}
.dr-eg-selbar[hidden] { display: none; }
.dr-eg-selbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1360px; margin: 0 auto; }
.dr-eg-selbar-count { color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit); font-size: 15px; transition: color .2s ease; }
.dr-eg-selbar-count.is-warn { color: #b42318; }
.dr-eg-selbar-actions { display: flex; align-items: center; gap: 8px; }
.dr-eg-sel-cancel {
	min-height: 44px; padding: 0 12px; border: 0; background: none; cursor: pointer;
	color: var(--dr-eg-muted, #6f6f76); font-family: var(--font-primary-bold, inherit); font-size: 14px;
}
.dr-eg-selbar .btn_1 { margin: 0; border: 0; cursor: pointer; white-space: nowrap; min-height: 44px; }
.dr-eg-selbar .btn_1[disabled] { opacity: .45; cursor: default; box-shadow: none; }
body.dr-eg-selbar-open { padding-bottom: 84px; }
@media (max-width: 479px) {
	.dr-eg-selbar-inner { flex-wrap: wrap; }
	.dr-eg-selbar-count { flex: 1 0 100%; text-align: center; font-size: 14px; }
	.dr-eg-selbar-actions { flex: 1; justify-content: space-between; }
	body.dr-eg-selbar-open { padding-bottom: 120px; }
}

.dr-eg-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 36px 0 0; }
.dr-eg-more { cursor: pointer; border: 0; margin: 0; }
.dr-eg-more[disabled] { opacity: .7; cursor: progress; }
.dr-eg-more-count { color: var(--dr-eg-muted); font-size: 14px; }

/* ---------- Password screen ---------- */
.dr-eg-lock { display: grid; grid-template-columns: 1fr; max-width: 900px; padding: 6px !important; overflow: hidden; }
.dr-eg-lock-img img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 7px; }
.dr-eg-lock-body { padding: 22px 18px 24px; }
.dr-eg-lock-title { display: block; margin: 0 0 8px; color: var(--dr-eg-primary); font-family: var(--font-primary-bold, inherit); font-size: 26px; }
.dr-eg-lock-body p { color: var(--dr-eg-dark); }
.dr-eg-lock-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.dr-eg-lock-form input[type="password"] {
	width: 100%; min-height: 50px; padding: 0 16px; font-size: 16px; /* 16px stops iOS zoom */
	font-family: var(--font-primary, inherit); color: var(--dr-eg-dark);
	border: 1px solid var(--dr-eg-line); border-radius: var(--dr-eg-radius); background: #fff;
}
.dr-eg-lock-form input[type="password"]:focus { outline: none; border-color: var(--dr-eg-primary); box-shadow: 0 0 0 3px rgba(112, 49, 131, .15); }
.dr-eg-lock-form .btn_1 { cursor: pointer; border: 0; align-self: flex-start; margin: 4px 0 0; }
.dr-eg-lock-error { color: #b42318 !important; background: #fef3f2; border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; }
@media (min-width: 768px) {
	.dr-eg-lock { grid-template-columns: 1fr 1fr; }
	.dr-eg-lock-body { padding: 36px; align-self: center; }
}

/* ---------- Lightbox extras ---------- */
.pswp { --pswp-bg: #140a19; }
.pswp__counter { font-size: 14px; }
.pswp .dr-eg-pswp-download.pswp__button,
.pswp .dr-eg-pswp-download.pswp__button:hover,
.pswp .dr-eg-pswp-download.pswp__button:active,
.pswp .dr-eg-pswp-download.pswp__button:focus {
	/* PhotoSwipe resets padding on hover/focus, which made the button shrink and jump. Lock it in every state. */
	display: flex; align-items: center; justify-content: center; gap: 6px;
	width: auto; min-width: 50px; padding: 0 12px; margin: 0;
	color: #fff; text-decoration: none; font-size: 14px; transform: none;
	transition: color .2s ease, opacity .2s ease;
}
.pswp .dr-eg-pswp-download.pswp__button { opacity: .9; }
.pswp .dr-eg-pswp-download.pswp__button:hover,
.pswp .dr-eg-pswp-download.pswp__button:focus-visible { opacity: 1; color: var(--dr-eg-secondary); }
.dr-eg-pswp-download svg { flex: none; }
.dr-eg-pswp-label { display: none; }
@media (min-width: 768px) { .dr-eg-pswp-label { display: inline; } }

/* ---------- Small screens ---------- */
@media (max-width: 639px) {
	.dr-eg-header { padding-bottom: 40px; }
	.dr-eg-header--cards { padding-bottom: 110px; }
	.dr-eg-body--cards .dr-eg-cards, .dr-eg-body--cards .dr-eg-empty { margin-top: -70px; }
	.dr-eg-header .dr-eg-meta-row { flex-direction: column; gap: 8px; }
	.dr-eg-header .dr-eg-meta-item { font-size: 16px; }
	.dr-eg-notice { padding: 14px 16px; gap: 12px; }
	.dr-eg-notice-icon { width: 36px; height: 36px; }
	.dr-eg-intro { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.dr-eg-card, .dr-eg-card-img img, .dr-eg-tile img, .dr-eg-dl, .dr-eg-share-btn, .dr-eg-card-cta .dr-eg-ico, .dr-eg-select-toggle, .dr-eg-check, .dr-eg-tile::after { transition: none; }
}
