/* ==========================================================================
   LAYOUT & GRID SYSTEM
   ========================================================================= */

/* ==========================================================================
   GRID SYSTEM (custom, non-conflicting with Bootstrap)
   ========================================================================= */

/* Ensure consistent 16px edge padding on mobile for Bootstrap containers */
@media (max-width: 719px) {
  .container,
  .container-fluid { padding-left: var(--grid-mobile-margin); padding-right: var(--grid-mobile-margin); }
}

/* CSS Grid reflecting tokens */
.vb-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-desktop-columns), minmax(0, 1fr));
  gap: var(--grid-desktop-gutter);
}
@media (min-width: 720px) and (max-width: 1023px) {
  .vb-grid { grid-template-columns: repeat(var(--grid-tablet-columns), minmax(0, 1fr)); gap: var(--grid-tablet-gutter); }
}

/* Bootstrap gutter utilities (helpers to set custom vertical spacing) */
.vb-gy-40 { --bs-gutter-y: 40px; }
.vb-gx-24 { --bs-gutter-x: 24px; }
@media (max-width: 719px) {
  .vb-grid { grid-template-columns: repeat(var(--grid-mobile-columns), minmax(0, 1fr)); gap: var(--grid-mobile-gutter); }
}

/* Column span helpers */
[class^="vb-col-"], [class*=" vb-col-"] { min-width: 0; }
.vb-col-1  { grid-column: span 1; }
.vb-col-2  { grid-column: span 2; }
.vb-col-3  { grid-column: span 3; }
.vb-col-4  { grid-column: span 4; }
.vb-col-5  { grid-column: span 5; }
.vb-col-6  { grid-column: span 6; }
.vb-col-7  { grid-column: span 7; }
.vb-col-8  { grid-column: span 8; }
.vb-col-9  { grid-column: span 9; }
.vb-col-10 { grid-column: span 10; }
.vb-col-11 { grid-column: span 11; }
.vb-col-12 { grid-column: span 12; }
@media (min-width: 720px) and (max-width: 1023px) {
  .vb-t-col-1  { grid-column: span 1; }
  .vb-t-col-2  { grid-column: span 2; }
  .vb-t-col-3  { grid-column: span 3; }
  .vb-t-col-4  { grid-column: span 4; }
  .vb-t-col-5  { grid-column: span 5; }
  .vb-t-col-6  { grid-column: span 6; }
}
@media (max-width: 719px) {
  .vb-m-col-1  { grid-column: span 1; }
  .vb-m-col-2  { grid-column: span 2; }
  .vb-m-col-3  { grid-column: span 3; }
  .vb-m-col-4  { grid-column: span 4; }
}

/* ==========================================================================
   CONTAINERS & SECTIONS
   ========================================================================= */

.vb-container {
  margin-left: auto;
  margin-right: auto;
}

.vb-section { padding-top: var(--space-64); padding-bottom: var(--space-64); }
.vb-section--alt { background: var(--grey-tint); }

/* Event section padding */
.vb-section--event {
  padding: 80px 0;
}

/* Mobile responsive */
@media (max-width: 1023px) {
  /* Event section padding on mobile */
  .vb-section--event {
    padding-top: 48px !important;
    padding-bottom: 0 !important;
  }
}

/* ==========================================================================
   FULL-BLEED UTILITIES
   ========================================================================= */

/* Full-bleed utility: span full viewport width even inside a container */
.vb-fullbleed {  width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
/* Keep inner containers aligned to global 16px on mobile */
@media (max-width: 719px) {
  /* Hard override: keep 16px inside Bootstrap .container.row combo */
  .vb-fullbleed .vb-filterbar .container { padding: 0 24px; }
  .vb-fullbleed .vb-filterbar .container.row { margin-left: 0 !important; margin-right: 0 !important; }
}

/* ==========================================================================
   WIDTH UTILITIES
   ========================================================================= */

/* Width utility: 100% mobile, 50% desktop */
.vb-w-50-desktop {
  width: 100%;
}
@media (min-width: 992px) {
  .vb-w-50-desktop { width: 50%; }
}

/* Max width utility ~538px with mobile full width */
.vb-max-538 { max-width: 100%; }
@media (min-width: 720px) {
  .vb-max-538 { max-width: 538px; }
}

/* ==========================================================================
   HEADER LAYOUT
   ========================================================================= */

.vb-header { background: var(--comp-1); z-index: 1100; }
/* Offset for WordPress admin bar when logged in */
.admin-bar .vb-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .vb-header { top: 46px; } }

.header-search { max-width: 560px; width: 100%; }

/* Smooth swap of right header content without layout jump */
.header-right { display: inline-grid; align-items: center; justify-items: end; }
.header-right .header-actions,
.header-right .header-close {
  grid-area: 1 / 1;
  transition: opacity .3s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.header-right .is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* JS toggles this after transition to fully remove from flow */
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .header-actions, .header-close, .header-right {
    transition: none !important;
  }
}

/* ==========================================================================
   FOOTER LAYOUT
   ========================================================================= */

.vb-footer { background: var(--comp-1); color:#fff; position: relative; }
.vb-footer .container { position: relative; z-index: 2; padding-top: 16px; padding-bottom: 28px; }
.vb-footer a { color:#fff; text-decoration:none; opacity:.85; }
.vb-footer a:hover { opacity:1; text-decoration:underline; }
.vb-footer .vb-footer-list { margin: 0; padding: 0; list-style: none; }
.vb-footer .vb-footer-list li { margin: 0 0 6px; line-height: 1.6; }
.vb-footer h6 { margin: 0 0 12px; font-weight: var(--w-semibold); letter-spacing: .02em; }

/* Footer section title: non-heading element styled like H4 */
.vb-footer-heading {
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
}

.vb-footer-link-item {
  color:#E0E0E0; 
  margin:0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .vb-footer .container { padding-top: 12px; padding-bottom: 24px; }
}
@media (max-width: 767px) {
  .vb-footer .container { padding-top: 8px; padding-bottom: 20px; }
  .vb-footer h6 { margin-top: 4px; margin-bottom: 8px; }
  .vb-footer .vb-footer-list li { margin-bottom:4px; }
}

/* Footer link accessibility */
.vb-footer .vb-footer-list a {
  display: inline-block;
  color: #E0E0E0;
  font-family: var(--font-sans-2);
  font-weight: var(--w-semibold);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  letter-spacing: 0;
}
.vb-footer .vb-footer-list a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Decorative wave image section */
.vb-footer-wave { background: var(--bg); margin-bottom: -5px; pointer-events: none; }
.vb-footer-wave img { display: block; width: 100%; height: auto; }
/* Dark Theme */
@media (prefers-color-scheme: dark) {
  .vb-footer-wave img {
    filter: brightness(0) saturate(100%);
  }
}

/* Footer wave with grey background on event single page */
.vb-footer-wave--event { 
  background: var(--grey-tint) !important; 
}

/* Footer wave with grey background on news single page */
.vb-footer-wave--nyheter { 
  background: var(--grey-tint) !important; 
}

.vb-suggest {
  position: absolute;
  display: none;
  z-index: 1200;
  min-width: 200px;
  max-width: 420px;
  background: #FFF;
  color: #111
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow:0 10px 20px rgba(0,0,0,.12);
}

