/* Location page: country filter over the photo gallery + the Work tiles of that country below it. */
.ef-l { --gap: 10px; }
.ef-l-anchor { display: block; height: 0; scroll-margin-top: 150px; } /* #slovenia … from the map: land on the filter, under the header */

/* filter: the Work chips (work.css), dark; no negative margin of the Work page */
.ef-w.ef-l-filter-wrap { margin-top: 0; max-width: none; }
.ef-l-filter { margin-bottom: 30px; }

/* gallery: masonry like the Oshin module (4 / 3 / 2 / 1 columns, 10 px gaps). locations.js deals the
   photos into columns in their order; until then (and without JS) the plain grid below is used. */
.ef-l-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.ef-l-grid.is-masonry { display: flex; align-items: flex-start; }
.ef-l-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.ef-l-photo { margin: 0; padding: 0; }
.ef-l-photo::before { display: none; }
.ef-l-photo[hidden] { display: none; }
.ef-l-photo a { position: relative; display: block; overflow: hidden; background: #1a1a1a; padding-bottom: calc(var(--r) * 100%); cursor: zoom-in; }
.ef-l-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.ef-l-photo a::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); opacity: 0; transition: opacity .3s ease; }
.ef-l-photo a:hover img, .ef-l-photo a:focus-visible img { transform: scale(1.04); }
.ef-l-photo a:hover::after, .ef-l-photo a:focus-visible::after { opacity: 1; }
.ef-l-photo a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

/* projects of the selected country */
.ef-l-work { padding: 90px 16px 40px; max-width: 1500px; margin: 0 auto; }
.ef-l-work[hidden] { display: none; }
.ef-l-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 auto 36px; }
.ef-l-head h2 { margin: 0; color: #fff; font: 600 clamp(26px, 3vw, 40px)/1.15 Jost, sans-serif; letter-spacing: -.005em; }
.ef-l-head a { font: 600 13px/1 Jost, sans-serif; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #a8aaad; white-space: nowrap; }
.ef-l-head a:hover { color: #fff; }
.ef-l-work .ef-w { margin-top: 0; max-width: none; padding: 0; }
.ef-l-work .ef-w-filter { display: none; }

/* lightbox */
.ef-l-box { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .94); }
.ef-l-box[hidden] { display: none; }
.ef-l-box img { max-width: calc(100vw - 140px); max-height: calc(100vh - 80px); object-fit: contain; }
.ef-l-box button { all: unset; position: absolute; cursor: pointer; color: #fff; font: 300 40px/1 Jost, sans-serif; padding: 14px 18px; opacity: .75; }
.ef-l-box button:hover, .ef-l-box button:focus-visible { opacity: 1; }
.ef-l-box button:focus-visible { outline: 2px solid #fff; }
.ef-l-close { top: 8px; right: 10px; }
.ef-l-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.ef-l-next { right: 10px; top: 50%; transform: translateY(-50%); }
.ef-l-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #a8aaad; font: 500 13px/1 Jost, sans-serif; letter-spacing: .12em; }

@media (max-width: 1024px) { .ef-l-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
	.ef-l-grid { grid-template-columns: repeat(2, 1fr); }
	.ef-l-work { padding-top: 60px; }
	.ef-l-head { flex-direction: column; gap: 12px; margin-bottom: 28px; }
	.ef-l-box img { max-width: 100vw; max-height: calc(100vh - 120px); }
	.ef-l-prev, .ef-l-next { top: auto; bottom: 4px; transform: none; }
}
@media (max-width: 480px) { .ef-l-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ef-l-photo img { transition: none; } }
