/* --- Layout --- */
.acn-cg-group { margin-bottom: 2.5rem; }

.acn-cg-heading{
	margin: .2em 0 1em;
	font-size: 1.25rem;
	font-weight: 600;
}

.acn-cg-grid{
	/* number of columns is still controlled by --cg-cols inline style */
	column-count: var(--cg-cols, 3);
	column-gap: 16px;
}

.acn-country-gallery-wrapper{
	--cg-cols: 1;
	display: grid;
	grid-template-columns: repeat( var(--cg-cols), 1fr );
	gap: 16px;
    position: relative;
    min-height: 400px;
}
@media (max-width: 768px){
	.acn-country-gallery-wrapper{ grid-template-columns: repeat(2, 1fr); }
    .acn-cg-grid{ column-count: 2; }
}
@media (max-width: 480px){
	.acn-country-gallery-wrapper{ grid-template-columns: 1fr; }
    .acn-cg-grid{ column-count: 1; }
}

/* --- Items --- */
.acn-country-gallery-wrapper figure{
	margin: 0;
	position: relative;
	overflow: hidden;
	border-radius: var(--cg-radius, 0px);
}
.acn-country-gallery-wrapper figure img{
	width: 100%;
	display: block;
	transition: all .3s;
    border-radius: 12px;
}
.acn-country-gallery-wrapper figure:hover img{
	filter: var(--cg-hover-filter, none);
}
.acn-country-gallery-wrapper figcaption{
	text-align: center;
	padding: 0.4em 0.25em;
	font-size: 0.9em;
}

/* --- Editor helper styles (not loaded on frontend) --- */
.acn-cg-editor .acn-cg-edit-list { margin-top: 1em; }
.acn-cg-edit-row{
	display: flex;
	align-items: center;
	margin-bottom: 8px;
}

/* --- Load more button --- */
.acn-cg-load-more{
	margin: 24px auto;
    display: block;
    border: none;
    background: #ffffff;
    color: #303030;
    padding: 8px 18px;
    border: 1px solid #303030;
    border-radius: 6px;
    cursor: pointer;
}
.acn-cg-item{
	/* avoid breaking a figure between columns */
	break-inside: avoid;
	margin: 0 0 16px;
	border-radius: var(--cg-radius, 0px);
	overflow: hidden;
	opacity: 1;
	transition: opacity .4s ease;
}
.acn-cg-item.is-hidden{
	opacity: 0;
}
.acn-cg-filters {
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    padding-bottom: 10px;
}
.acn-cg-filters select {
    margin: 0 5px;
    padding: 0 3px;
    border-radius: 6px;
}
.acn-cg-heading-continent, .acn-cg-heading-country, .acn-cg-heading-year{
    display: none;
}

/* --- loader overlay --- */
.acn-cg-loader{
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(255,255,255,0.8);
	z-index: 2;
}

.acn-cg-loader .spinner{
	width: 36px;
	height: 36px;
	border: 4px solid #ccc;
	border-top-color: #0073aa;
	border-radius: 50%;
	animation: acn-spin 0.8s linear infinite;
}

@keyframes acn-spin{ to{ transform: rotate(360deg); } }