/*
Theme Name: flatsome-child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

/* === Megameny + WP Grid Builder (GRID #2) — stabil, uten overlapp === */

/* Dropdown må kunne vokse */
.nav-dropdown,
.sub-menu.nav-dropdown,
.ux-mega-menu,
.ux-mega-menu .sub-menu {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* 1) Slå av Metro sin høydestyring */
.wpgb-grid-2 .wpgb-viewport {
  height: auto !important;
}

/* 2) Null ALT av absolutt posisjon som kan lage overlapp */
.wpgb-grid-2 article.wpgb-card,
.wpgb-grid-2 .wpgb-card,
.wpgb-grid-2 .wpgb-card-wrapper,
.wpgb-grid-2 .wpgb-card-inner,
.wpgb-grid-2 .wpgb-card-media,
.wpgb-grid-2 .wpgb-card-media-content,
.wpgb-grid-2 .wpgb-card-media-content-top,
.wpgb-grid-2 .wpgb-card-media-content-bottom {
  position: static !important;
  transform: none !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
  display: block !important;
  z-index: auto !important;
}

/* 3) Gjør containeren til ekte CSS-grid med god spacing */
.wpgb-grid-2 .wpgb-metro,
.wpgb-grid-2 .wpgb-cards,
.wpgb-grid-2 .wpgb-grid,
.wpgb-grid-2 .wpgb-content {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  grid-auto-flow: row dense !important;
  gap: 28px 40px !important;  /* vertikal, horisontal */
  align-items: start;
}

/* 4) Litt luft på selve dropdownen og minimumsbredde */
.nav-dropdown { min-width: 1100px; padding: 16px 0px; }

/* 5) Responsivt */
@media (max-width: 1024px) {
  .wpgb-grid-2 .wpgb-metro,
  .wpgb-grid-2 .wpgb-cards,
  .wpgb-grid-2 .wpgb-grid,
  .wpgb-grid-2 .wpgb-content {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 32px !important;
	  
  }
}
@media (max-width: 640px) {
  .wpgb-grid-2 .wpgb-metro,
  .wpgb-grid-2 .wpgb-cards,
  .wpgb-grid-2 .wpgb-grid,
  .wpgb-grid-2 .wpgb-content {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
}

/* Fjern hvit/grå bakgrunn i kortene */
.wpgb-grid-2 .wpgb-card,
.wpgb-grid-2 .wpgb-card-inner,
.wpgb-grid-2 .wpgb-card-media,
.wpgb-grid-2 .wpgb-card-media-content,
.wpgb-grid-2 .wpgb-card-media-content-top,
.wpgb-grid-2 .wpgb-card-media-content-bottom {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* La hvert grid-element styre sin egen høyde */
.wpgb-grid-2 .wpgb-metro,
.wpgb-grid-2 .wpgb-cards,
.wpgb-grid-2 .wpgb-grid,
.wpgb-grid-2 .wpgb-content {
  align-items: start !important;
}

.wpgb-grid-2 .wpgb-card {
  height: auto !important;
  align-self: start !important;
}
