/* ---------------------------------------------------------
   TOP / HERO
--------------------------------------------------------- */
#top-wrapper{
	width: 100%;
	height: 0;
	position: relative;
	background: #414141 url('../images/gallery/Background.png') no-repeat top right;
	background-size: cover;
}

/* Gradient overlay */
#top-section::after{
	background: linear-gradient(
		to top,
		#4a4a4a 0%,
		rgba(65,65,65,0.7) 19%,
		rgba(65,65,65,0.3) 37%,
		transparent 100%
	);
}

h1{
	padding-bottom: 1%;
}

.regmark{
	font-size: 0.35em
}

/* ---------------------------------------------------------
   GALLERY LAYOUT
--------------------------------------------------------- */
#gallery-section{
	padding: 0 0 7% 0;
}

.gallery-row{
	width: 90%;
	max-width: 1280px;
	margin: 0 auto 70px auto;
	display: flex;
	justify-content: center;
	gap: 60px;
}

.gallery-item{
	flex: 1 1 0;
	max-width: 360px;
}

.gallery-item > a.btn{
	display: block;
	text-decoration: none;
	color: inherit;
	padding: 0;
	border: none;
	background: transparent;
}


/* ---------------------------------------------------------
   EXPANSION ROW (UNDER EACH GALLERY ROW)
--------------------------------------------------------- */
.gallery-expansion-row{
	width: 90%;
	max-width: 1280px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.45s ease, opacity 0.25s ease;
	display: none;
}

.gallery-expansion-row.is-open{
	max-height: 3000px;
	opacity: 1;
	overflow: visible;
	margin: -30px auto 70px auto; /* pulls expansion up toward the cards */
	display: block;
}


/* ---------------------------------------------------------
   CARD (COLLAPSED)
--------------------------------------------------------- */
.creative{
	background: #ffffff;
	color: #2b2b2b;
	border-radius: 16px;
	box-shadow: 0 10px 22px rgba(0,0,0,0.35);
	padding: 22px 26px;
	min-height: 270px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-item > a.btn:hover .creative{
	transform: translateY(-4px);
	box-shadow: 0 14px 28px rgba(0,0,0,0.40);
}

.creative .row-1{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.creative .icon{
	width: 140px;
	margin-bottom: 6px;
}

.creative .icon img{
	width: 100%;
	height: auto;
	display: block;
}

.creative .creative-info h2{
	font-size: 16px;
	letter-spacing: 0.18em;
	line-height: 1.2;
	padding: 0;
	margin: 0 0 8px 0;
	text-align: center;
}

.creative .creative-info p{
	font-size: 11px;
	line-height: 1.6;
	color: #6a6a6a;
	max-width: 260px;
	margin: 0 auto;
	text-align: center;
}

.creative .row-2{
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-top: 18px;
}

.creative .row-2 > div{
	flex: 1 1 0;
	text-align: center;
}

.creative .row-2 h3{
	font-size: 18px;
	letter-spacing: 0.02em;
	line-height: 1.1;
	padding: 0;
	margin: 0 0 4px 0;
	color: #121212;
}

.creative .row-2 p{
	font-size: 10px;
	letter-spacing: 0.12em;
	line-height: 1.1;
	margin: 0;
	color: #6a6a6a;
	text-transform: uppercase;
}


/* ---------------------------------------------------------
   EXPANDED PANEL (CONTENT)
--------------------------------------------------------- */
.expand{
	position: relative;
	background: #ffffff;
	color: #2b2b2b;
	border-radius: 18px;
	box-shadow: 0 18px 38px rgba(0,0,0,0.45);
	padding: 34px 34px 30px 34px;
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

/* pointer triangle */
.triangle-up{
	position: absolute;
	top: -14px;

	/* JS sets --tri-x in px */
	left: var(--tri-x, 50%);
	transform: translateX(-50%);

	width: 0;
	height: 0;
	border-left: 14px solid transparent;
	border-right: 14px solid transparent;
	border-bottom: 14px solid #ffffff;
	filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.15));
	
	transition: left 0.25s ease;
}

/* left column */
.expand-info{
	flex: 1 1 auto;
	min-width: 0;
}

.expand-info h2{
	text-align: left;
	font-size: 22px;
	letter-spacing: 0.14em;
	padding: 0;
	margin: 0 0 14px 0;
	color: #1f1f1f;
}

.display-sequence{
	display: flex;
	gap: 18px;
	align-items: flex-start;
	margin-bottom: 14px;
}

.browser-image,
.mobile-image{
	background: #f4f4f4;
	border-radius: 14px;
	padding: 14px;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

/* browser gets most of the space */
.browser-image{
	flex: 4 1 0;      /* bigger */
}

/* mobile is intentionally smaller */
.mobile-image{
	flex: 1 1 0;      /* smaller */
	max-width: 220px; /* optional hard cap so it never gets huge */
}

.full-width{
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
}

.expand-info h3{
	text-align: left;
	font-size: 12px;
	letter-spacing: 0.14em;
	padding: 18px 0 8px 0;
	margin: 0;
	color: #1f1f1f;
}

.expand-info ol{
	margin: 0 0 10px 18px;
	padding: 0;
}

.expand-info li{
	font-size: 13px;
	line-height: 1.6;
	color: #4d4d4d;
	margin-bottom: 6px;
}

/* example buttons */
.expand-info a.button{
	display: inline-block;
	margin: 10px 10px 0 0;
	padding: 10px 16px;
	border-radius: 999px;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: #eec817;
	color: #1f1f1f;
	transition: transform 0.18s ease, background 0.18s ease;
}

.expand-info a.button:hover{
	background: #f2d45e;
	transform: translateY(-2px);
}

/* right stats column */
.expand-stats{
	flex: 0 0 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 6px;
}

.e-stat{
	background: #f4f4f4;
	border-radius: 14px;
	padding: 14px 16px;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.e-stat h3{
	padding: 0;
	margin: 0 0 4px 0;
	text-align: left;
	font-size: 20px;
	letter-spacing: 0.02em;
	color: #121212;
}

.e-stat p{
	margin: 0;
	text-align: left;
	font-size: 12px;
	color: #5a5a5a;
	line-height: 1.4;
}

/* close button */
.expand > a.btn{
	position: absolute;
	top: 14px;
	right: 16px;
	text-decoration: none;
	background: transparent;
	border: none;
	padding: 6px;
}

.expand > a.btn h3{
	padding: 0;
	margin: 0;
	font-size: 18px;
	color: #1f1f1f;
	letter-spacing: 0;
}


/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (min-width: 1381px){
	#top-wrapper{
		padding-bottom: 475px;
	}
}

@media (min-width: 1101px) and (max-width: 1380px){
	#top-wrapper{
		padding-bottom: 35%;
	}
}

@media (max-width: 1100px){
	#top-wrapper{
		padding-bottom: 35%;
	}
	
	.gallery-row{
		gap: 30px;
	}

	.gallery-item{
		max-width: 320px;
	}

	.expand{
		padding: 26px 24px 22px 24px;
		gap: 26px;
	}

	.expand-stats{
		flex-basis: 220px;
	}
}

@media (max-width: 900px){
	#top-wrapper{
		padding-bottom: 61%;
	}
	
	.gallery-row{
		flex-wrap: wrap;
		gap: 26px;
		margin-bottom: 26px;
	}

	.gallery-item{
		flex: 1 1 100%;
		max-width: 520px;
	}

	.expand{
		flex-direction: column;
	}

	.expand-stats{
		width: 100%;
		flex: 1 1 auto;
	}

	.display-sequence{
		flex-direction: column;
	}
	
	.mobile-image{
		margin: 0 auto;
	}
	
	.gallery-expansion-row.is-open{
		margin: -30px auto 0 auto; /* pulls expansion up toward the cards */
	}

}

@media (max-width: 600px){
	#top-wrapper{
		padding-bottom: 80.61%;
	}
	
	h1{
		padding-bottom: 5%;
	}
	
	.creative{
		padding: 18px;
		min-height: 100px;
	}

	.creative .icon{
		width: 130px;
	}

	.creative .creative-info h2{
		font-size: 15px;
	}

	.creative .row-2 h3{
		font-size: 16px;
	}
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce){
	.gallery-expansion-row{
		transition: none;
	}
}
