

/* Underscores text on hover */
/* Center-out underline — single underline */
.cov-text{
  text-decoration:none;
  color:inherit;
  background-image:linear-gradient(#ffffff,#ffffff);
  background-repeat:no-repeat;
  background-position:50% calc(85%);
  background-size:0% 1.5px;
  background-origin:content-box;
  transition:background-size 300ms ease-in-out;
  padding-bottom:0.02em;
}
.cov-text:hover,
.cov-text:focus-visible{
  background-size:100% 1.5px;
}

/* If the class is on a container, move the effect to its direct child link */
.cov-text:not(a){
  background-image:none;
}
.cov-text:not(a) > a{
  display:inline;
  text-decoration:none;
  color:inherit;
  background-image:linear-gradient(#ffffff,#ffffff);
  background-repeat:no-repeat;
  background-position:50% calc(85%);
  background-size:0% 1.5px;
  background-origin:content-box;
  transition:background-size 300ms ease-in-out;
  padding-bottom:0.02em;
}
.cov-text:not(a) > a:hover,
.cov-text:not(a) > a:focus-visible{
  background-size:100% 1.5px;
}

/* Keep underline for current menu item */
.current-menu-item > .cov-text,
.current-menu-item > a.cov-text,
.current-menu-item > .cov-text > a{
  background-size:100% 2px;
}

@media (prefers-reduced-motion: reduce){
  .cov-text,
  .cov-text:not(a) > a{ transition:none; }
}

/* Disable .cov-text underline on devices up to 768px */
@media (max-width: 768px) {
  .cov-text,
  .cov-text:not(a) > a,
  .cov-text:hover,
  .cov-text:focus-visible,
  .cov-text:not(a) > a:hover,
  .cov-text:not(a) > a:focus-visible,
  .current-menu-item > .cov-text,
  .current-menu-item > a.cov-text,
  .current-menu-item > .cov-text > a {
    background-image: none !important;
    background-size: 0 0 !important;
    transition: none !important;
  }
}








/*Underscores text on hover */
/* Center-out underline — single underline */
.hover-menu-item{
  text-decoration:none;
  color:inherit;
  background-image:linear-gradient(#003b0f,#003b0f);
  background-repeat:no-repeat;
  background-position:50% calc(100%);
  background-size:0% 1.5px;
  background-origin:content-box;
  transition:background-size 300ms ease-in-out;
  padding-bottom:0.02em;
}
.hover-menu-item:hover,
.hover-menu-item:focus-visible{
  background-size:100% 1.5px;
}

/* If the class is on a container, move the effect to its direct child link */
.hover-menu-item:not(a){
  background-image:none;
}
.hover-menu-item:not(a) > a{
  display:inline;
  text-decoration:none;
  color:inherit;
  background-image:linear-gradient(#003b0f,#003b0f);
  background-repeat:no-repeat;
  background-position:50% calc(100%);
  background-size:0% 1.5px;
  background-origin:content-box;
  transition:background-size 300ms ease-in-out;
  padding-bottom:0.02em;
}
.hover-menu-item:not(a) > a:hover,
.hover-menu-item:not(a) > a:focus-visible{
  background-size:100% 1.5px;
}

/* Keep underline for current menu item */
.current-menu-item > .hover-menu-item,
.current-menu-item > a.hover-menu-item,
.current-menu-item > .hover-menu-item > a{
  background-size:100% 2px;
}


@media (prefers-reduced-motion: reduce){
  .hover-menu-item,
  .hover-menu-item:not(a) > a{ transition:none; }
}



/* Disable .hover-menu-item underline on devices up to 768px */
@media (max-width: 768px) {
  .hover-menu-item,
  .hover-menu-item:not(a) > a,
  .hover-menu-item:hover,
  .hover-menu-item:focus-visible,
  .hover-menu-item:not(a) > a:hover,
  .hover-menu-item:not(a) > a:focus-visible,
  .current-menu-item > .hover-menu-item,
  .current-menu-item > a.hover-menu-item,
  .current-menu-item > .hover-menu-item > a {
    background-image: none !important;
    background-size: 0 0 !important;
    transition: none !important;
  }
}












/* Denna kod körs ENDAST på skärmar bredare än 768px */
@media only screen and (min-width: 769px) {

    /* 1. Submenu Container */
    .my-custom-menu ul, 
    .my-custom-menu .sub-menu, 
    .my-custom-menu div.dropdown {
        background-color: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        
        border: 0.5px solid rgba(0, 59, 15, 0.3) !important;
        border-radius: 10px !important;
        
        overflow: hidden !important; 
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        
        display: block;
    }

    /* 2. Grundläge för länkarna */
    .my-custom-menu .sub-menu li a {
        color: #002808 !important; 
        display: block;
        padding: 12px 20px;
        text-decoration: none;
        transition: all 0.3s ease-in !important; 
    }

    /* 3. Hover-läge */
    .my-custom-menu li:hover > a, 
    .my-custom-menu .sub-menu li a:hover {
        background-color: rgba(0, 59, 15, 0.9) !important;
        color: #FFFFFF !important;
        backdrop-filter: blur(12px) !important;
    }

} /* Slut på media query */






/* 1. Default State (At the top of the page) */
header, .site-header, #masthead {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: transparent !important; /* Start transparent */
    transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Smooth fade */
    box-shadow: none;
}

/* 2. Scrolled State (Triggered by the JavaScript above) */
header.scrolled, .site-header.scrolled, #masthead.scrolled {
    background-color: #ffffff !important; /* Turn white */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Add a subtle shadow so it stands out */
}

/* 3. Handle Link Colors (Optional) */
/* If your menu links are white at the top, they will disappear on a white background. 
   This changes them to dark gray when scrolling. */
header.scrolled .nav-menu a, 
header.scrolled .main-navigation a {
    color: #333333 !important;
}








/* Tar bort fokus-rutan på alla länkar och knappar */
a:focus, 
button:focus, 
.menu-item a:focus {
    outline: none !important;
    box-shadow: none !important;
}











/* Ren fade-in utan rörelse */
.faq-text {
    animation: pureFade 0.4s ease-in forwards;
    opacity: 0;
}

@keyframes pureFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}












.homepage-button.is-style-outline .wp-block-button__link {
  color: #FFFFFF !important;
  border-color: #003B0F !important;
  background-color: #003B0F !important;
  transition: all 0.3s ease;
}

.homepage-button.is-style-outline .wp-block-button__link:hover {
  background-color: transparent !important;
  color: #003B0F !important;
  border-color: #003B0F !important;
}













.read-button.is-style-outline .wp-block-button__link {
  color: #003B0F !important;
  border-color: #003B0F !important;
  background-color: transparent !important;
  transition: all 0.3s ease;
}

.read-button.is-style-outline .wp-block-button__link:hover {
  background-color: #003B0F !important;
  color: #FFFFFF !important;
  border-color: #003B0F !important;
}








.cover-button.is-style-outline .wp-block-button__link {
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
  background-color: transparent !important;
  transition: all 0.3s ease;
}

.cover-button.is-style-outline .wp-block-button__link:hover {
  background-color: #003B0F !important;
  color: #FFFFFF !important;
  border-color: #003B0F !important;
}










.cbhov{
  transition: transform 400ms ease;
  transform-origin: center;
}

.cbhov:hover,
.cbhov:focus-visible{
  transform: scale(1.05);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cbhov{ transition: none; }
}








@media (max-width: 768px) {
    .stortxt {
        font-size: 1.7rem !important;
    }
}