/**
 * Visit Nora customizations.
 *
 * This source file will be minified in a later step.
 */

.c-hero__content {
  border-radius: calc(var(--base, 8px) * 3);
  max-width: calc(var(--base, 8px) * 65) !important;
}

.c-card.c-card--has-image .c-card__image-container {
  aspect-ratio: 6 / 5;
}

/* Keep the first two emphasized Posts cards vertical at their wider size. */
.visitnora-emphasized-card .c-card__paint-container {
  flex-direction: column;
  flex-wrap: nowrap;
}

.visitnora-emphasized-card .c-card__paint-container .c-card__image-container,
.visitnora-emphasized-card
  .c-card__paint-container
  .c-card__image-container
  + .c-card__body {
  flex-basis: auto;
}

.visitnora-emphasized-card .c-card__paint-container .c-card__body {
  padding: calc(var(--base, 8px) * 3) calc(var(--base, 8px) * 2);
}

.modularity-mod-text .c-card .c-card__paint-container .c-card__header,
.modularity-mod-text .c-card .c-card__paint-container .c-card__body {
  padding: calc(var(--base, 8px) * 4);
}

.modularity-mod-text .c-card .c-card__paint-container .c-card__header {
  padding-bottom: 0;
}

.modularity-mod-text .c-card .c-card__paint-container .c-card__body {
  padding-top: calc(var(--base, 8px) * 2);
}

.visitnora-visit-info.c-box {
  --c-box-background-color: var(
    --visitnora-visit-info-background,
    #cde5ed
  );
  --c-box-color: var(--color-black, #1a1a1a);
  aspect-ratio: auto;
  display: block;
  padding: calc(var(--base, 8px) * 4);
  border-radius: calc(var(--base, 8px) * 2);
  filter: none;
  color: var(--c-box-color);
}

.visitnora-visit-info__grid {
  row-gap: calc(var(--base, 8px) * 3);
}

.visitnora-visit-info__heading {
  margin: 0 0 calc(var(--base, 8px) * 2) !important;
  padding-bottom: calc(var(--base, 8px) * 1.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.65);
  color: inherit;
}

.visitnora-visit-info__content > :first-child {
  margin-top: 0;
}

.visitnora-visit-info__content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 56rem) {
  .visitnora-visit-info.c-box {
    padding: calc(var(--base, 8px) * 3);
  }
}

.single-event-sidebar-right > .c-card {
  --c-card-color-background: #d3e9d8;
  --c-card-border-color: #d3e9d8;
}

body.page-template-template-evenemang-blade #main-content {
  background-color: var(--visitnora-event-page-background, #cde5ed);
}

body.page-template-template-evenemang-blade
  #main-content
  .u-margin__bottom--12 {
  margin-bottom: 0 !important;
}

.visitnora-event-card .c-card__paint-container {
  position: relative;
}

/* Municipio sets width:100% on paint-container children; keep the stamp circular. */
.visitnora-event-card.c-card
  .c-card__paint-container
  > .visitnora-event-item__date,
.visitnora-event-card .c-card__floating .visitnora-event-item__date {
  flex: none;
  aspect-ratio: 1;
}

.visitnora-event-card .c-card__floating {
  left: calc(var(--base, 8px) * 2);
  right: auto;
  top: calc(var(--base, 8px) * 2);
}

.modularity-event-index .c-card {
  position: relative;
}

.modularity-event-index .c-datebadge {
  width: calc(var(--base, 8px) * 8);
  height: calc(var(--base, 8px) * 8);
  max-width: calc(var(--base, 8px) * 8);
}

/* Same stamp on archive list, posts cards, and the Event module JS badge. */
.visitnora-event-item__date,
.modularity-event-index .c-datebadge__container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: calc(var(--base, 8px) * 8);
  max-width: calc(var(--base, 8px) * 8);
  height: calc(var(--base, 8px) * 8);
  box-sizing: border-box;
  padding: 0;
  border: 2px solid var(--c-button-primary-color);
  border-radius: 50%;
  background-color: var(--color-background, #fff);
  color: var(--c-button-primary-color);
  font-family: inherit;
}

.visitnora-event-item__date {
  flex-direction: column;
}

.modularity-event-index .c-datebadge__container {
  flex-direction: column-reverse;
}

.visitnora-event-item__day,
.visitnora-event-item__month,
.modularity-event-index .c-datebadge__date,
.modularity-event-index .c-datebadge__month {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: auto;
  height: auto;
}

.visitnora-event-item__day,
.modularity-event-index .c-datebadge__date {
  font-family: var(--font-family-heading, belwe-medium);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  text-transform: none;
}

.visitnora-event-item__month,
.modularity-event-index .c-datebadge__month {
  font-size: 0.625rem;
  font-weight: 400;
  line-height: 1.1;
  text-transform: lowercase;
  white-space: nowrap;
}

.visitnora-event-item {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--base, 8px) * 3);
  padding: calc(var(--base, 8px) * 3) calc(var(--base, 8px) * 4);
  border: 1px solid var(--color-border, #d0d0d0);
  border-radius: calc(var(--base, 8px));
  color: inherit;
  text-decoration: none;
  background-color: var(--color-background, #fff);
  box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.visitnora-event-item__body {
  min-width: 0;
  flex: 1;
}

.visitnora-event-item__title {
  font-weight: 700;
}

.visitnora-event-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--base, 8px) * 0.5) calc(var(--base, 8px) * 2);
  margin-top: calc(var(--base, 8px) * 0.5);
}

.visitnora-event-item__meta-item {
  display: flex;
  align-items: center;
  gap: calc(var(--base, 8px) * 0.5);
}

.visitnora-event-item__meta-item .c-icon {
  filter: drop-shadow(0.35px 0 0 currentColor)
    drop-shadow(-0.35px 0 0 currentColor)
    drop-shadow(0 0.35px 0 currentColor)
    drop-shadow(0 -0.35px 0 currentColor);
}

.visitnora-event-item__excerpt {
  color: inherit;
}

/* Posts "Visa mer" is centered by auto side margins. Keep the left auto margin so the button sits on the right. */
.modularity-mod-posts .t-read-more-section .u-margin__x--auto {
  margin-right: 0 !important;
}

/* Event index "Fler evenemang" is centered with justify-content on its own row. */
.modularity-event-index .o-grid-12.u-justify-content--center {
  justify-content: flex-end !important;
}

/*
  Landscape above the footer. The SVG sky is transparent, so the strip
  uses the same color as the section above it: neutral blue on the front
  page, white on every other page.
*/
.visitnora-footer-landscape {
  width: 100%;
  margin: 0 0 -1px;
  line-height: 0;
  background-color: var(--color-background, #fff);
  pointer-events: none;
}

body.home .visitnora-footer-landscape {
  background-color: var(--color-light, #b3d7e5);
}

.visitnora-footer-landscape + .site-footer {
  margin-top: 0;
}

.visitnora-footer-landscape img {
  display: block;
  width: 100%;
  height: auto;
}

/* The front page already has this image in the bottom sidebar. */
#sidebar-bottom-sidebar
  .modularity-module-group:has(img[src*="foorter-landscape"]),
#sidebar-bottom-sidebar
  .modularity-module-group:has(img[src*="footer-landscape"]) {
  display: none;
}

