/* (C)2025 Badger Commerce Limited, a subsidiary of Kedos Consulting Limited */

/* Blog Masthead Header */
header.masthead {
  margin-bottom: var(--space-12);
  background: no-repeat center center;
  background-color: var(--color-gray-100);
  background-attachment: scroll;
  position: relative;
  background-size: cover;
}

header.masthead .overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: var(--color-gray-900);
  opacity: 0.5;
}

header.masthead .post-heading .white-text {
  color: white;
}

header.masthead .post-heading .black-text {
  color: var(--color-gray-900);
}

header.masthead .page-heading,
header.masthead .post-heading,
header.masthead .site-heading {
  padding: var(--space-20) 0 var(--space-16);
  color: white;
}

@media only screen and (min-width: 768px) {
  header.masthead .page-heading,
  header.masthead .post-heading,
  header.masthead .site-heading {
    padding: var(--space-20) 0;
  }
}

header.masthead .page-heading,
header.masthead .site-heading {
  text-align: center;
}

header.masthead .page-heading h1,
header.masthead .site-heading h1 {
  font-size: var(--font-size-4xl);
  margin-top: 0;
  font-weight: var(--font-weight-bold);
}

header.masthead .page-heading .subheading,
header.masthead .site-heading .subheading {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  display: block;
  margin: var(--space-4) 0 0;
}

@media only screen and (min-width: 768px) {
  header.masthead .page-heading h1,
  header.masthead .site-heading h1 {
    font-size: var(--font-size-5xl);
  }
}

header.masthead .post-heading h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

header.masthead .post-heading .meta,
header.masthead .post-heading .subheading {
  line-height: var(--line-height-relaxed);
  display: block;
}

header.masthead .post-heading .subheading {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  margin: var(--space-4) 0 var(--space-6);
}

header.masthead .post-heading .meta {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  font-style: italic;
}

header.masthead .post-heading .meta a {
  color: #fff;
}

@media only screen and (min-width: 768px) {
  header.masthead .post-heading h1 {
    font-size: var(--font-size-4xl);
  }
  header.masthead .post-heading .subheading {
    font-size: var(--font-size-2xl);
  }
}

/* Blog Post Preview Cards */
.post-preview {
  position: relative;
  z-index: 1;
}

.post-preview > a {
  color: var(--color-gray-900);
  text-decoration: none;
  display: block;
  position: relative;
  z-index: 2;
}

.post-preview > a:focus,
.post-preview > a:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.post-preview > a > .post-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  transition: color var(--transition-fast);
}

.post-preview > a:hover > .post-title {
  color: var(--color-primary);
}

.post-preview > a > .post-subtitle {
  font-weight: var(--font-weight-normal);
  margin: 0 0 var(--space-3);
  color: var(--color-gray-700);
  line-height: var(--line-height-relaxed);
}

.post-preview > .post-meta {
  font-size: var(--font-size-base);
  font-style: italic;
  margin-top: 0;
  color: var(--color-gray-600);
}

.post-preview > .post-meta > a {
  text-decoration: none;
  color: var(--color-gray-900);
  position: relative;
  z-index: 2;
}

.post-preview > .post-meta > a:focus,
.post-preview > .post-meta > a:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

@media only screen and (min-width: 768px) {
  .post-preview > a > .post-title {
    font-size: var(--font-size-3xl);
  }
}

/* Photo wall (blogList pageTemplateOverride extensions/blogList/photoWall, js/blog-photowall.js): each
   post's photo at its own shape in a masonry of columns, the date, title and description underneath,
   and a full-screen viewer. Columns fill top to bottom, so the newest posts head each column. */
.nova-photowall {
  padding: var(--space-8) 0;
}

.nova-photowall__years {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.nova-photowall__years[hidden] {
  display: none;
}

.nova-photowall__year {
  min-height: 44px;
  padding: 0 var(--space-5);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-gray-700);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.nova-photowall__year:hover {
  border-color: var(--color-gray-900);
  color: var(--color-gray-900);
}

.nova-photowall__year[aria-pressed="true"] {
  border-color: var(--color-gray-900);
  background: var(--color-gray-900);
  color: var(--color-surface, #fff);
}

.nova-photowall__grid {
  columns: 3 300px;
  column-gap: var(--space-8);
}

.nova-photowall__tile {
  break-inside: avoid;
  margin: 0 0 var(--space-10);
}

.nova-photowall__tile[hidden] {
  display: none;
}

.nova-photowall__photo {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-gray-100);
}

.nova-photowall__photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.nova-photowall__photo:hover img {
  transform: scale(1.035);
}

.nova-photowall__photo:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.nova-photowall__caption {
  padding-top: var(--space-3);
}

.nova-photowall__date {
  display: block;
  color: var(--color-gray-500);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.nova-photowall__title {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
}

.nova-photowall__title a {
  color: var(--color-gray-900);
  text-decoration: none;
}

.nova-photowall__title a:hover {
  color: var(--color-primary);
}

.nova-photowall__desc {
  margin: var(--space-2) 0 0;
  color: var(--color-gray-600);
  line-height: var(--line-height-relaxed);
}

/* The viewer: the whole screen, the photo as large as fits, its words underneath */
.nova-photowall__viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: var(--space-4);
  border: 0;
  background: rgba(10, 11, 13, 0.96);
  color: #fff;
}

.nova-photowall__viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-4);
}

.nova-photowall__viewer::backdrop {
  background: rgba(10, 11, 13, 0.8);
}

.nova-photowall__viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}

/* The row is held to the space the viewer leaves it, so a tall photo shrinks instead of pushing the
   words off screen */
.nova-photowall__viewer-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  min-height: 0;
}

.nova-photowall__viewer-img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nova-photowall__viewer-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nova-photowall__viewer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.nova-photowall__viewer-btn:focus-visible,
.nova-photowall__viewer-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.nova-photowall__viewer-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.nova-photowall__viewer-title {
  margin: 0;
  color: #fff;
  font-size: var(--font-size-2xl);
}

.nova-photowall__viewer-desc {
  margin: var(--space-2) 0 0;
  color: rgba(255, 255, 255, 0.75);
}

.nova-photowall__viewer-desc:empty {
  display: none;
}

.nova-photowall__viewer-link {
  display: inline-block;
  margin-top: var(--space-3);
  padding: var(--space-2) 0;
  color: #fff;
  font-weight: var(--font-weight-semibold);
}

/* Phones: one column; the viewer's arrows sit under the photo, which takes the full width */
@media (max-width: 639px) {
  .nova-photowall__viewer-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .nova-photowall__viewer-img {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .nova-photowall__viewer-prev {
    grid-row: 2;
    justify-self: start;
  }

  .nova-photowall__viewer-next {
    grid-row: 2;
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nova-photowall__photo img {
    transition: none;
  }

  .nova-photowall__photo:hover img {
    transform: none;
  }
}
