/* IKP Galleries — sections numbered for easy tweaking */

/* 1. Section wrapper ---------------------------------------------- */
.ikp-gallery {
	max-width: 1300px;
	margin: 0 auto;
	padding: 60px 30px;
}

/* 2. Heading (eyebrow + title) ------------------------------------ */
.ikp-gallery-head {
	text-align: center;
	margin-bottom: 36px;
}

.ikp-gallery .ikp-eyebrow {
	font-size: 12px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #b8876a;
	font-weight: 600;
	margin: 0 0 10px;
}

.ikp-gallery .ikp-section-title {
	font-family: 'Antic Didone', Georgia, serif;
	font-size: 42px;
	line-height: 1.2;
	color: #222;
	margin: 0;
	font-weight: 400;
}

/* 2b. Filter tabs (only present when tabs="true") ----------------- */
.ikp-gallery-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0 0 36px;
	padding: 0;
	list-style: none;
}

.ikp-tab {
	appearance: none;
	background: transparent;
	border: 1px solid #e5d7cf;
	color: #5a5a5a;
	padding: 10px 22px;
	font-size: 11px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all .25s ease;
	border-radius: 999px;
	font-family: inherit;
	font-weight: 600;
	line-height: 1;
}

.ikp-tab:hover {
	border-color: #b8876a;
	color: #b8876a;
}

.ikp-tab--active,
.ikp-tab--active:hover {
	background: #b8876a;
	border-color: #b8876a;
	color: #ffffff;
}

/* Filtering: items hidden by JS when their data-folder doesn't match
   the grid's active filter. JS toggles a class so the lightbox can
   skip hidden ones. */
.ikp-gallery-item.ikp-item--hidden {
	display: none;
}

/* Tabbed galleries use a single uniform aspect so filtering doesn't
   reshuffle the alternating row pattern. */
.ikp-gallery--tabbed .ikp-gallery-item {
	aspect-ratio: 4 / 5;
}

/* 3. Grid container ----------------------------------------------- */
.ikp-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--ikp-columns, 3), 1fr);
	gap: 12px;
}

/* 4. Item base + alternating-aspect pattern ----------------------- */
/* Default: portrait. Specific :nth-child rules below flip every other
   row of items to landscape so we get tall row → short row → tall row.
   The pattern's modulus depends on column count, so each breakpoint
   re-defines it. */
.ikp-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	transition: box-shadow .35s ease;
	cursor: zoom-in;
	margin: 0;
	aspect-ratio: 3 / 4;
}

.ikp-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .55s ease;
}

/* Desktop: 3-col → 6-item cycle (3 portrait, 3 landscape) */
@media (min-width: 1025px) {
	.ikp-gallery-item:nth-child(6n+4),
	.ikp-gallery-item:nth-child(6n+5),
	.ikp-gallery-item:nth-child(6n+6) {
		aspect-ratio: 4 / 3;
	}
}

.ikp-gallery-item:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.ikp-gallery-item:hover img {
	transform: scale(1.06);
}

/* 5. Lightbox accent (caption + counters in brand color) ---------- */
.glightbox-clean .gnext.gbtn,
.glightbox-clean .gprev.gbtn,
.glightbox-clean .gclose.gbtn {
	background-color: rgba(184, 135, 106, 0.85);
}

/* 6. Tablet: 2-col → 4-item cycle (2 portrait, 2 landscape) ------- */
@media (min-width: 601px) and (max-width: 1024px) {
	.ikp-gallery-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.ikp-gallery-item {
		aspect-ratio: 3 / 4;
	}
	.ikp-gallery-item:nth-child(4n+3),
	.ikp-gallery-item:nth-child(4n+4) {
		aspect-ratio: 4 / 3;
	}
	.ikp-gallery .ikp-section-title {
		font-size: 36px;
	}
}

/* 7. Mobile: 1-col → 2-item cycle (1 portrait, 1 landscape) ------- */
@media (max-width: 600px) {
	.ikp-gallery-grid {
		grid-template-columns: 1fr !important;
		gap: 8px;
	}
	.ikp-gallery-item {
		aspect-ratio: 3 / 4;
	}
	.ikp-gallery-item:nth-child(even) {
		aspect-ratio: 4 / 3;
	}
	.ikp-gallery .ikp-section-title {
		font-size: 28px;
	}
	.ikp-gallery {
		padding: 40px 16px;
	}
	.ikp-gallery-tabs {
		gap: 4px;
		margin-bottom: 24px;
	}
	.ikp-tab {
		padding: 7px 14px;
		font-size: 10px;
		letter-spacing: 1.5px;
	}
}
