.exposure-gallery {
  display: grid;
  gap: 1rem
}

.exposure-gallery.layout-grid {
  grid-template-columns: repeat(var(--cols, 3), 1fr)
}

.exposure-gallery.layout-grid.cols-1 {
  --cols: 1
}

.exposure-gallery.layout-grid.cols-2 {
  --cols: 2
}

.exposure-gallery.layout-grid.cols-3 {
  --cols: 3
}

.exposure-gallery.layout-grid.cols-4 {
  --cols: 4
}

.exposure-gallery.layout-grid.cols-5 {
  --cols: 5
}

.exposure-gallery.layout-grid.cols-6 {
  --cols: 6
}

.exposure-gallery .exposure-item {
  margin: 0
}

.exposure-gallery .exposure-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px
}

/* Masonry uses absolute positioning; JS will handle columns */
.exposure-gallery.layout-masonry {
  column-gap: 1rem
}

.exposure-gallery.layout-masonry .exposure-item {
  break-inside: avoid;
  margin: 0 0 1rem
}

/* Gallery templates: remove sidebar and style headings */
.template-gallery .site-content,
.template-gallery .wrap {
  max-width: none;
  width: 100%
}

.template-gallery .content-area {
  width: 100%;
  max-width: none;
  flex: 0 0 100%
}

.template-gallery .main-content {
  width: 100%;
  max-width: none
}

.template-gallery .widget-area {
  display: none !important
}

.template-gallery aside.widget-area {
  display: none !important
}

.template-gallery .content-area {
  display: block
}

.template-gallery .content-area+aside.widget-area {
  display: none !important
}

.template-gallery .content-area~.widget-area {
  display: none !important
}

.template-gallery .content-area,
.template-gallery .main-content {
  float: none;
  clear: both
}

.template-gallery .content-area,
.template-gallery .main-content,
.template-gallery .site-main {
  width: 100%
}

.template-gallery .site-content .wrap,
.template-gallery .site-main {
  margin: 0;
  padding: 0
}

.template-gallery #primary {
  width: 100%
}

.template-gallery .entry-header .entry-title {
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0
}

.template-gallery .main-content,
.template-gallery .content-area,
.template-gallery .site-main {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.template-gallery .main-content {
  float: none;
  clear: both;
  display: block;
}

.template-gallery .wrap {
  max-width: 100vw;
  width: 100vw;
  padding: 0;
  margin: 0;
}

body.template-gallery {
  overflow-x: hidden;
}

.template-gallery .site-main,
.template-gallery .content-area,
.template-gallery .wrap,
.template-gallery .main-content,
.template-gallery article.page-content,
.template-gallery .entry-content,
.template-gallery .exposure-gallery {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  float: none;
  clear: both;
}

.template-gallery * {
  box-sizing: border-box !important;
}

.template-gallery .site,
.template-gallery #page,
.template-gallery #content,
.template-gallery .site-content,
.template-gallery #primary,
.template-gallery .content-area,
.template-gallery .wrap,
.template-gallery .main-content,
.template-gallery article,
.template-gallery section,
.template-gallery .entry-content,
.template-gallery .exposure-gallery {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  display: block !important;
  box-sizing: border-box !important;
  clear: both !important;
}

body.template-gallery {
  overflow-x: hidden !important;
}

.template-gallery .main,
.template-gallery .content,
.template-gallery .content-area,
.template-gallery .main-content,
.template-gallery .site-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  background: ;
}

html.template-gallery,
body.template-gallery,
body.template-gallery #page,
body.template-gallery #content.site-content,
body.template-gallery .site-main.template-gallery {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  float: none !important;
  display: block !important;
}

.template-gallery .entry-content {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  left: 50%;
  right: 50%;
  transform: translateX(-50%);
  box-sizing: border-box !important;
}

.template-gallery .entry-header {
  max-width: 900px;
  margin: 2rem auto 1.5rem 2vw;
  width: auto;
  padding: 0;
  background: none;
  text-align: left;
  border: none;
}

.template-gallery .page-thumbnail {
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 2rem 0;
  overflow: hidden;
  display: block;
}

.template-gallery .page-thumbnail::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.0) 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.template-gallery .page-thumbnail img {
  width: 100vw !important;
  max-width: 100vw;
  min-height: 220px;
  max-height: 45vh;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
}

.template-gallery .entry-header--overlay {
  position: absolute;
  left: 2vw;
  right: 2vw;
  bottom: 6%;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.template-gallery .entry-header--overlay .entry-title {
  color: #fff;
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.template-gallery .entry-content .wp-block-post-title,
.template-gallery .entry-content h1.wp-block-heading,
.template-gallery .entry-content h1,
.template-gallery .entry-content .post-title {
  display: none !important;
}

.homepage-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.homepage-gallery-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #00000020;
  background: #fff;
  transition: box-shadow 0.18s, transform 0.18s;
}

.homepage-gallery-link:hover,
.homepage-gallery-link:focus {
  box-shadow: none;
  transform: translateY(-4px) scale(1.025);
}

.homepage-gallery-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: #faf6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.homepage-gallery-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

.homepage-gallery-thumb.is-placeholder {
  background: linear-gradient(135deg, #f2f2f2, #e9e9e9);
}

.homepage-gallery-title {
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: #222;
  letter-spacing: 0;
  padding: 1rem 0.7rem 0.7rem 0.7rem;
  text-align: left;
  background: none;
  min-height: 2.2em;
}

.homepage-title {
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2.1rem;
  margin: 2rem 0 1.5rem 0;
  text-align: left;
  color: #222;
  letter-spacing: 0;
}