/*--------------------------------------------------
  Digital Gallery – Dark theme (default), optional light theme, masonry, captions, lazy blur
---------------------------------------------------*/

/* Dark theme (default): background #0A0A0A, dark footer, white hero text */
.digital-gallery-page main,
.digital-gallery-page .cd-index,
.digital-gallery-page #content-scroll {
	background-color: #0A0A0A;
}
.digital-gallery-page footer {
	background-color: #0A0A0A;
}
.digital-gallery-page footer .copyright,
.digital-gallery-page footer .copyright a,
.digital-gallery-page footer .socials-wrap,
.digital-gallery-page footer .socials-text,
.digital-gallery-page footer .socials a,
.digital-gallery-page footer .button-text span,
.digital-gallery-page footer .button-icon {
	color: #fff !important;
}
.digital-gallery-page footer .socials li a {
	color: #fff !important;
}
.digital-gallery-page footer .socials li a:hover {
	color: #fff !important;
	opacity: 1;
}
.digital-gallery-page footer .button-icon,
.digital-gallery-page footer .button-icon i {
	color: #fff !important;
}

/* Light theme: only when id="light-theme" on body or class="gallery-light-theme" on #page-content */
#light-theme .cd-index,
#light-theme #content-scroll,
main:has(#page-content.gallery-light-theme),
.cd-index:has(#page-content.gallery-light-theme),
#page-content.gallery-light-theme {
	background-color: #FAFAFA !important;
}
#light-theme main {
	background-color: #FAFAFA;
}
#light-theme #hero,
#light-theme #main-content,
#light-theme #main-page-content,
.gallery-light-theme #hero,
.gallery-light-theme #main-content,
.gallery-light-theme #main-page-content {
	background-color: #FAFAFA;
}
#light-theme .hero-move-title span,
#light-theme #hero h1,
#light-theme .hero-move-title,
.gallery-light-theme .hero-move-title span,
.gallery-light-theme #hero h1,
.gallery-light-theme .hero-move-title {
	color: #1a1a1a !important;
}

/* Digital Gallery hero: fluid type scales with viewport width and height */
.hero-gallery-intro-wrap .hero-gallery-intro {
	font-family: 'Poppins', sans-serif;
	font-size: clamp(40px, min(6.25vw, 5.5vh), 90px);
	line-height: 1.22;
	font-weight: 500;
	color: #fff;
	margin: 0;
	letter-spacing: -0.056em;
	max-width: 100%;
}
.hero-gallery-intro-wrap .hero-title-dim {
	opacity: 0.5;
	color: #fff;
}
.hero-gallery-intro-wrap .hero-title-strong {
	opacity: 1;
	color: #fff;
	font-weight: 500;
}
.hero-gallery-intro-wrap .hero-title-same-line {
	white-space: nowrap;
}
/* Light theme hero override */
#light-theme .hero-gallery-intro-wrap .hero-gallery-intro,
.gallery-light-theme .hero-gallery-intro-wrap .hero-gallery-intro { color: #1a1a1a; }
#light-theme .hero-gallery-intro-wrap .hero-title-dim,
#light-theme .hero-gallery-intro-wrap .hero-title-strong,
.gallery-light-theme .hero-gallery-intro-wrap .hero-title-dim,
.gallery-light-theme .hero-gallery-intro-wrap .hero-title-strong { color: #1a1a1a; }

/* Hero caption: scale padding with viewport height so title fits on short screens */
#hero-caption.hero-gallery-intro-wrap {
	padding-top: clamp(80px, 22vh, 260px);
	padding-bottom: clamp(60px, 14vh, 160px);
}
@media only screen and (max-height: 700px) {
	#hero-caption.hero-gallery-intro-wrap {
		padding-top: 12vh;
		padding-bottom: 10vh;
	}
}
@media only screen and (max-height: 500px) {
	#hero-caption.hero-gallery-intro-wrap {
		padding-top: 10vh;
		padding-bottom: 8vh;
	}
}

/* Hero word "scribble": handwritten scribble line over word only (not emoji), blue 90% opacity */
.hero-word-scribble {
	display: inline-block;
}
.hero-word-scribble .scribble-word-wrap {
	position: relative;
	display: inline-block;
}
.hero-word-scribble .hero-scribble-svg {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
	height: 1.2em;
	pointer-events: none;
	overflow: visible;
}
.hero-word-scribble .hero-scribble-path {
	stroke: rgba(59, 130, 246, 0.9);
	stroke-width: 3px;
	stroke-dasharray: none;
	stroke-dashoffset: 0;
}
/* Hero word "pixel": pixel font always shown (no hover) */
.hero-word-pixel {
	display: inline-block;
	font-family: 'Press Start 2P', cursive;
	letter-spacing: 0.02em;
	image-rendering: pixelated;
	image-rendering: -moz-crisp-edges;
	image-rendering: crisp-edges;
}

/* Hero text uses clamp() above – no breakpoint overrides so it scales smoothly at all sizes */
#light-theme #show-filters,
#light-theme #show-filters .open-filters,
.gallery-light-theme #show-filters,
.gallery-light-theme #show-filters .open-filters {
	color: #1a1a1a !important;
}
#light-theme .button-text span,
#light-theme .button-text a,
.gallery-light-theme .button-text span,
.gallery-light-theme .button-text a {
	color: #1a1a1a !important;
}
#light-theme #filters-overlay,
#light-theme #filters-overlay .inner,
.gallery-light-theme #filters-overlay,
.gallery-light-theme #filters-overlay .inner {
	background-color: #FAFAFA;
}
#light-theme #filters a,
#light-theme .filters-timeline a,
.gallery-light-theme #filters a,
.gallery-light-theme .filters-timeline a {
	color: #1a1a1a !important;
}
#light-theme #menu-burger span,
.gallery-light-theme #menu-burger span {
	background-color: #1a1a1a;
}
#light-theme .copyright,
#light-theme .copyright a,
#light-theme .button-text span,
#light-theme .socials-text,
#light-theme .socials a,
#light-theme .page-title .hero-move-title span,
.gallery-light-theme .copyright,
.gallery-light-theme .copyright a,
.gallery-light-theme .socials-text,
.gallery-light-theme .socials a,
.gallery-light-theme .page-title .hero-move-title span {
	color: #1a1a1a !important;
}
#light-theme .next-ajax-link-page .hero-move-title span,
.gallery-light-theme .next-ajax-link-page .hero-move-title span {
	color: #1a1a1a !important;
}
#light-theme #ball,
.gallery-light-theme #ball {
	border-color: #333 !important;
}
#light-theme #ball.with-icon i,
.gallery-light-theme #ball.with-icon i {
	color: #333;
}

/* Light theme only: single dark logo image (no black/white toggle) */
#light-theme #logo img {
	display: block !important;
}

/* Masonry grid: gap = edge margin (tight to screen), columns, corner radius */
.portfolio-wrap--masonry {
	width: 100%;
	padding-left: 12px;
	padding-right: 12px;
	box-sizing: border-box;
}
.portfolio-wrap--masonry .portfolio.masonry-grid {
	column-count: 4;
	column-gap: 12px;
	width: 100% !important;
	padding: 0;
	box-sizing: border-box;
}
.portfolio-wrap--masonry .portfolio.masonry-grid .item {
	width: 100% !important;
	margin: 0 0 12px 0 !important;
	break-inside: avoid;
	page-break-inside: avoid;
	height: auto !important;
}
.portfolio-wrap--masonry .portfolio.masonry-grid .item-parallax {
	height: auto !important;
}
.portfolio-wrap--masonry .portfolio.masonry-grid .item-appear {
	height: auto !important;
	border-radius: 10px;
	overflow: hidden;
}
.portfolio-wrap--masonry .portfolio.masonry-grid .item-content {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
}
.portfolio-wrap--masonry .portfolio.masonry-grid .item-wrap-image {
	display: block;
	line-height: 0;
	border-radius: 10px;
	overflow: hidden;
}
/* Single image per item: natural aspect ratio (no fixed height) */
.portfolio-wrap--masonry .portfolio.masonry-grid .item-wrap-image img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: top;
}

/* Caption overlay: bottom left title only (editable in HTML) */
.portfolio-wrap--masonry .item-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px 14px;
	background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 500;
	pointer-events: none;
}
.portfolio-wrap--masonry .item-caption-title {
	display: block;
}

/* Filter: hide non-matching items */
.portfolio-wrap--masonry .item.filter-hidden {
	display: none !important;
}

/* Lazy load blur-in animation */
.portfolio-wrap--masonry .masonry-item .item-appear,
.portfolio-wrap--masonry .item .item-appear {
	opacity: 0;
	filter: blur(12px);
	-webkit-filter: blur(12px);
	transition: opacity 0.5s ease-out, filter 0.5s ease-out, -webkit-filter 0.5s ease-out;
}
.portfolio-wrap--masonry .masonry-item.visible .item-appear,
.portfolio-wrap--masonry .item.visible .item-appear {
	opacity: 1;
	filter: blur(0);
	-webkit-filter: blur(0);
}

@media (max-width: 1200px) {
	.portfolio-wrap--masonry .portfolio.masonry-grid {
		column-count: 3;
	}
}
@media (max-width: 768px) {
	.portfolio-wrap--masonry {
		padding-left: 10px;
		padding-right: 10px;
	}
	.portfolio-wrap--masonry .portfolio.masonry-grid {
		column-count: 2;
		column-gap: 10px;
	}
	.portfolio-wrap--masonry .portfolio.masonry-grid .item {
		margin-bottom: 10px !important;
	}
	.portfolio-wrap--masonry .item-caption {
		padding: 10px 12px;
		font-size: 11px;
	}
}
@media (max-width: 480px) {
	.portfolio-wrap--masonry {
		padding-left: 10px;
		padding-right: 10px;
	}
	.portfolio-wrap--masonry .portfolio.masonry-grid {
		column-count: 1;
		column-gap: 10px;
	}
}
