/* ==========================================================================
   MODULES PART 2
   ========================================================================= */

/* ==========================================================================
   YOU MIGHT LIKE SECTION
   ========================================================================= */

.vb-you-might-like {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding: 64px 80px;
  background-color: var(--grey-tint);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

.vb-you-might-like__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
  padding: 0;
}

.vb-you-might-like__title {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h2);
  line-height: 42px;
  color: var(--grey-dark);
  margin: 0;
}

.vb-you-might-like__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
}

.vb-you-might-like__card {
  /*display: flex;*/
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 0;
}

.vb-you-might-like__card a:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

.vb-you-might-like__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  height: 280.77px;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.vb-you-might-like__date {
  font-family: var(--font-sans-1);
  font-weight: var(--w-regular);
  font-size: var(--fs-body1);
  line-height: 24px;
  color: var(--grey-dark);
  margin: 20px 0;
  display: block;
  text-transform: uppercase;
}

.vb-you-might-like__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 0;
}

.vb-you-might-like__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
}

.vb-you-might-like__card-title {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h3);
  line-height: 30px;
  color: var(--grey-dark);
  margin: 0;
}

.vb-you-might-like__excerpt {
  font-family: var(--font-sans-1);
  font-weight: var(--w-regular);
  font-size: var(--fs-body2);
  line-height: 28px;
  color: var(--grey-medium);
  margin: 0;
}

/* Mobile responsive */
@media (max-width: 1023px) {
  .vb-you-might-like {
    padding: 48px 16px;
  }
  
  .vb-you-might-like__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  /* You might like title typography on mobile */
  .vb-you-might-like__title {
    font-family: var(--font-sans-2); /* Archivo */
    font-weight: 600; /* SemiBold */
    font-size: 1.5rem;
    line-height: 30px;
    letter-spacing: 0%;
  }
}

/* ==========================================================================
   SEARCH TIPS OVERLAY
   ========================================================================= */

.vb-search-tips { 
  display: none; 
  position: relative;
  padding: 40px 0; 
  background: var(--bg); 
  min-height: 593px; 
  z-index: 1300;
}
/* Show when header search is active (desktop) or mobile panel open */
body.search-overlay-open .vb-search-tips { display: block; }

/* Search tips backdrop overlay */
.vb-search-tips-backdrop { 
  position: fixed; 
  top: 200px; /* Start under header */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.45); 
  opacity: 0; 
  transition: opacity .25s ease; 
  z-index: 1299;
  pointer-events: none;
}
body.search-overlay-open .vb-search-tips-backdrop { 
  opacity: 1; 
  pointer-events: auto;
}

.vb-tips-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 719px) {
  .vb-tips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .vb-search-tips { min-height: 402px; }
  /* Show only two items on mobile */
  .vb-tips-grid .vb-tip-card:nth-child(n+3) { display: none; }
}

/* Title typography per spec */
.vb-search-tips .vb-heading-h2 {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-body1);
  line-height: 24px;
  letter-spacing: 0;
  margin-bottom: 20px !important;
  color: var(--grey-medium);
  margin: 0 0 20px;
}

.vb-tip-card { background: var(--bg); border-radius: 16px; }
.vb-tip-cover { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%); background-size: 24px 24px; background-position: 0 0, 0 12px, 12px -12px, -12px 0; }
@media (max-width: 719px) {
  .vb-tip-cover { height: 236.8625946044922px; aspect-ratio: auto; opacity: 1; border-radius: 8px; }
}
.vb-tip-title { font-family: var(--font-sans-2); font-weight: var(--w-semibold); font-size: var(--fs-body1); line-height: 24px; color: var(--grey-dark); margin: 12px 0 4px; }
.vb-tip-meta { font-family: var(--font-sans-1); font-size: 0.875rem; line-height: 20px; color: var(--grey-dark) !important; margin: 0; }

/* ==========================================================================
   EVENT META SECTION (Evenemang single page)
   ========================================================================= */

.vb-event-meta-container {
  background: var(--bg);
  border: 1px solid #E8E6DD;
  border-radius: 4px;
  padding: 20px 24px;
  margin-top: 40px;
  margin-bottom: 80px;
}

.vb-event-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-around;
}

.vb-event-meta-divider {
  width: 1px;
  height: 26px;
  background-color: #E8E6DD;
  flex-shrink: 0;
}

.vb-event-meta-location {
  color: var(--brand-purple);
  text-decoration: underline;
  font-family: var(--font-sans-1);
  font-size: var(--fs-body1);
  line-height: 24px;
}

.vb-event-meta-location:hover {
  color: var(--brand-purple);
  text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .vb-event-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  
  .vb-event-meta-item {
    padding: 16px 0;
    border-bottom: 1px solid #E8E6DD;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .vb-event-meta-item:last-child {
    border-bottom: none;
  }
  
  .vb-event-meta-divider {
    display: none;
  }
  
  .vb-event-meta-container {
    padding: 0 16px;
    margin-top: 20px;
    margin-bottom: 48px;
  }
}

/* Ensure all meta items are properly aligned */
.vb-event-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans-1);
  font-size: var(--fs-body1);
  line-height: 24px;
  color: var(--grey-medium);
  min-height: 24px; /* Ensure consistent height */
}

.vb-event-meta-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Style links in event meta */
.vb-event-meta-item a {
  color: #707070 !important;
  text-decoration: underline !important;
}

.vb-event-meta-item a:hover {
  color: #707070 !important;
  text-decoration: underline !important;
}

.vb-event-meta-item a:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

.vb-event-status {
  border-left: 4px solid var(--brand-purple);
  padding-left: 16px;
  margin-top: -32px;
  margin-bottom: 32px;
  font-family: var(--font-sans-1);
  font-weight: var(--w-regular);
  font-size: var(--fs-body1);
  line-height: 24px;
  color: var(--grey-dark);
}

/* Ensure all news card links are focusable */
.vb-news-card a {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.vb-news-card a:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

/* Remove any focus-blocking attributes */
.vb-news-card a[inert] {
  pointer-events: auto !important;
}

 

/* ==========================================================================
   EVENT LAYOUT (Evenemang single page)
   ========================================================================= */

.vb-evenemang-content {
  max-width: 713px;
}

.vb-event-layout {
  display: flex;
  gap: 64px;
  margin-top: 40px;
}

.vb-event-sidebar {
  width: 302px;
  flex-shrink: 0;
}

.vb-event-main {
  width: 697px;
  flex-shrink: 0;
}

/* Single column layout (628px width, centered) */
.vb-event-layout--single-column {
  justify-content: center;
}

.vb-event-layout--single-column .vb-event-main {
  width: 628px;
  max-width: 100%;
}

/* Center hero and meta sections for single column layout */
.vb-evenemang-content--single-column {
  max-width: 628px;
  margin: 0 auto;
}

.vb-event-meta-container--single-column {
  max-width: 628px;
  margin-left: auto;
  margin-right: auto;
}

/* Remove gap for single column layout */
.vb-event-meta-container--single-column .vb-event-meta {
  gap: 0;
}

/* Fix heading margin for single column layout */
.vb-evenemang-content--single-column .vb-heading-h2 {
  padding-bottom: 16px !important;
  margin-bottom: 0 !important;
}

/* Mobile responsive */
@media (max-width: 1023px) {
  .vb-event-layout {
    flex-direction: column;
    gap: 0px;
  }
  
  .vb-event-sidebar,
  .vb-event-main {
    width: 100%;
  }
  
  /* Single column layout on mobile */
  .vb-event-layout--single-column .vb-event-main {
    width: 100%;
  }
  
  /* Single column meta layout on mobile */
  .vb-event-meta-container--single-column .vb-event-meta {
    gap: 0;
  }
  
  /* H1 heading spacing on mobile */
  h1.vb-heading-h2 {
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
  }
  
  /* Reorder sidebar to last position on mobile */
  .vb-event-sidebar {
    order: 2;
    margin-bottom: 48px;
  }  
  .vb-event-main {
    order: 1;
  }
  /* But don't do it for libraries */
  .vb-library-layout .vb-event-sidebar {
    order: 1;
    margin-bottom: 48px;
  }  
  .vb-library-layout .vb-event-main {
    order: 2;
  }

  .vb-event-sidebar.vb-library-sidebar {
    
  }

}

/* ==========================================================================
   RELATED CONTENT SECTION (Evenemang single page)
   ========================================================================= */

.vb-related-content {
  display: flex;
  flex-direction: column;
}

/* Related content section in main content area */
.vb-related-content-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #E8E6DD;
}

.vb-related-content-section .vb-heading-h4 {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: 1.5rem;
  line-height: 32px;
  color: var(--grey-dark);
  margin-bottom: 24px;
}

/* Only apply to frontend, not admin */
body:not(.wp-admin) .vb-sticky .vb-heading-h6 {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-body1);
  line-height: 24px;
  letter-spacing: 0%;
  vertical-align: middle;
  color: var(--grey-dark);
}

.vb-related-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #E0E0E0;
  padding: 16px 0;
}

.vb-related-item:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

.vb-related-item:first-child {
  border-top: 1px solid #E0E0E0;
}

.vb-related-item:last-child {
  border-bottom: 1px solid #E0E0E0;
}

.vb-related-content-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.vb-related-text {
  flex: 1;
  font-family: var(--font-sans-1);
  font-size: var(--fs-body1);
  line-height: 24px;
  color: var(--grey-dark);
  font-weight: var(--w-regular);
}

.vb-related-chevron {
  flex-shrink: 0;
  margin-left: auto;
}

.vb-related-item:hover .vb-related-text {
  color: var(--brand-blue);
}

.vb-related-item:hover .vb-related-chevron path {
  stroke: var(--brand-blue);
}

/* ==========================================================================
   LATEST NEWS MODULE
   ========================================================================= */

.vb-latest-news {
  background-color: var(--grey-tint);
  padding: 80px 0;
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50dvw);
  width: 100vw;
}

.vb-latest-news__title {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h2);
  line-height: 40px;
  color: var(--grey-dark);
  margin-bottom: 40px;
}

.vb-latest-news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.vb-latest-news__button-wrapper {
  text-align: center;
}

.vb-latest-news__button {
  background-color: var(--grey-dark);
  border-color: var(--grey-dark);
  color: var(--bg);
  padding: 10px 32px;
  width: 100%;
  border-radius: 4px;
  font-family: var(--font-sans-1);
  font-weight: var(--w-medium);
  font-size: var(--fs-body1);
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.vb-latest-news__button:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
}

.vb-latest-news__button:hover {
  text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .vb-latest-news {
    padding: 48px 0;
  }
  
  .vb-latest-news__title {
    font-size: 1.5rem;
    line-height: 30px;
    margin-bottom: 24px;
  }
  
  .vb-latest-news__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }
  
  .vb-news-card__title {
    font-size: var(--fs-h3);
    line-height: 30px;
  }
  
  .vb-news-card__excerpt {
    font-size: var(--fs-body2);
    line-height: 28px;
    font-weight: var(--w-regular);
  }
}

/* ==========================================================================
   RESPONSIVE IMAGE MODULE
   ========================================================================= */

/* Base responsive image styles with 4:3 aspect ratio */
.responsive-image {
  width: 100%;
  max-width: 697px;
  height: auto;
  margin-bottom: 48px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

/* Mobile styles - 402x300px */
@media (max-width: 768px) {
  .responsive-image {
    width: 100%;    height: 300px;
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  .responsive-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* ==========================================================================
   NEWS LISTING MODULE - NO POSTS PLACEHOLDER
   ========================================================================= */

.vb-latest-news__no-posts {
  text-align: center;
  padding: 2rem 0;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  margin: 1rem 0;
}

.vb-latest-news__placeholder {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.vb-latest-news__admin-hint {
  color: #868e96;
  margin-bottom: 0;
}

/* =========================================================================
   Latest Events Module
   ========================================================================= */

.vb-latest-events {
  background-color: var(--grey-tint);
  padding: 80px 0;
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50dvw);
  width: 100vw;
}

.vb-latest-events__title {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h2);
  line-height: 40px;
  color: var(--grey-dark);
  margin-bottom: 40px;
}

.vb-latest-events__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.vb-latest-events__button-wrapper {
  text-align: center;
}

.vb-latest-events__button {
  background-color: var(--grey-dark);
  border-color: var(--grey-dark);
  color: var(--bg);
  padding: 10px 32px;
  width: 100%;
  border-radius: 4px;
  font-family: var(--font-sans-1);
  font-weight: var(--w-medium);
  font-size: var(--fs-body1);
  line-height: 24px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.vb-latest-events__button:hover {
  text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .vb-latest-events {
    padding: 48px 0;
  }
  
  .vb-latest-events__title {
    font-size: 1.5rem;
    line-height: 30px;
    margin-bottom: 24px;
  }
  
  .vb-latest-events__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }
  
  .vb-latest-events__button {
    max-width: 100%;
  }
}


#next:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

#prev:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

.week-frame button:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}

.vb-meroppet-toggle:focus-visible, .vb-utrustning-toggle:focus-visible {
  outline: 2px solid var(--brand-blue) !important;
  outline-offset: 2px !important;
}