@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Montserrat:wght@400;600;700&display=swap');
:root {
    --gradient-green: #0f2e5d 0%,   #0d9488 45%,   #14b8a6 85%,   #2dd4bf 100% ;
    --headline1-text: #fff;

    --hamburger-bar-width: 32px;
    --hamburger-bar-height: 4px;
    --hamburger-bar-gap: 5px;
    --hamburger-marging: 8px;

    --hamburger-height: calc(var(--hamburger-bar-height)*3 + var(--hamburger-bar-gap) *2);
    --hamburger-x-width: calc(var(--hamburger-height) * 99 / 70);
    --hamburger-animation-timing: 200ms ease-in-out;

}


* , *::before, *after {
	box-sizing: border-box; 
}




body {


       padding: clamp(0rem, 4vw, 1rem);
	margin: 0 auto; 
	background-color: var(--color_background); /* #F5F1E8; */
}

body, td, input[type=text], textarea {
	font-family: 'Lora','Intro', sans-serif;    
	font-size: 105%; 
	line-height: 1.3em;
	color: var(--color_text); 
}


h1 {
        font-family: 'Fira Sans','Montserrat', sans-serif;
        color: var(--color_primary);
	line-height: 1.3;
	margin-top: 0;
}
h2, h3, h4, h5, h6 {
        font-family: 'Fira Sans','Montserrat', sans-serif;
        color: var(--color_secondary);
	line-height: 1.3;
}


ul li,
ol li {
    line-height: 1.2;
    margin-bottom: 0.2em; /* valfritt, men gör listan kompakt */
}


 
a {
	color: var(--color_primary);
	text-decoration: none;
	border-bottom: 1px none var(--color_primary); 
}

a:hover,
.nav a:hover {
		color: var(--color_secondary);
		border-color: var(--color_secondary); 

}


.masthead {
    position: sticky;
  top: 0px;
  left: 10px;
  right: 20px;

  min-height: 26px; /* bandet kan växa vid behov */
  background: linear-gradient(90deg, var(--gradient-green));
  border-radius: 8px;

  display: flex;
  flex-wrap: wrap;        /* menyn får bryta rad */
  align-items: flex-start;
  align-content: flex-start;
  padding: 0.2em 0.2em;
  gap: 0.5em;
  z-index: 1000;
}



.topnav {
  display: inline-flex;
  flex-wrap: wrap;        /* radbrytning */
  gap: 1em;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;         /* menyn får breda ut sig */
  font-size: 0.8rem;
  gap: 0;
}
.topnav {
  align-items: flex-end;     /* bottom-align allt */
  min-height: 3rem;          /* ger plats för större logotyp */
}


.masthead-tools {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex: 0 0 auto;         /* får inte tryckas undan */
  margin-left: auto;      /* trycker gruppen till höger */
}


/* Grundutseende för länkar i nav */
.topnav a {
  color: rgba(255,255,255,0.9); /* Nästan helvit – snygg mot gradienten */
  text-decoration: none;        /* Ingen understrykning som standard */
  background: none;             /* Ingen bakgrund – ren text */
  padding: 0.25em 0.5em;        /* Lite klickyta */
  font-weight: 400;             /* Något kraftigare text för bättre läsbarhet */
  transition: color .15s ease, text-shadow .15s ease; /* Mjuk hover-känsla */
}

/* Hover – subtil effekt utan understrykning */
.topnav a:hover,
.topnav a:focus {
  color: #ff5;                                      /* Lite ljusare vid hover */
  text-shadow: 0 0 4px rgba(255,255,255,0.35);      /* Diskret glow istället för underline */
}

/* CHANGED: add clean underline indicator for active item */

.topnav > li.current > a:not(:has(+ ul.topnav)) {
  box-shadow: inset 0 -2px 0 currentColor;
}




/* Admin-länk: .edit på <li>
 * - Blekare text + streckad kant = “särskild” utan att ropa
 * - Behåller ren textkänsla
 */
.topnav li.edit a {
  color: rgba(255,255,255,0.55);             /* Blekare – låg vikt visuellt */
  border: 1px dashed rgba(255,255,255,0.35); /* Streckad kant som subtil markör */
  border-radius: 4px;                        /* Matcha övrig form */
  padding: 0.25em 0.75em;                    /* Samma klickyta som current */
  background: none;
}

/* Admin-länk: tydligare vid hover men fortfarande återhållsam */
.topnav li.edit a:hover,
.topnav li.edit a:focus {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.6);
}

.edit-btn, .login-btn {
    font-size: 0.8rem;
    text-decoration: none;
}
/* Nivå 2 – horisontell meny */
.nav {
    /*    position: fixed;*/
    margin: 0;
    display: flex; 
    gap: 1em;
    list-style: none;
    
    padding: 0em 0.6em;


}

.subnav ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    flex-wrap: wrap;
    gap: 1.2em;
}


.subnav li {
    margin: 0;
    padding: 0;
}





.topnav > li > a:has(+ ul.topnav) {  /* BMÅSLOGO */
  font-size: 1.8em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em; /* valfritt, ger logotypkänsla */
  margin-right: 1.5em;
}

.subnav a {
    color: white;
    text-decoration: none;
    font-size: 0.75em;
    line-height: 1.2;
    padding: 0.2em 0;
}

.subnav li.current a {
    border-bottom: 2px solid #fff; /* markera aktiv */
}

.topnav a,
.topnav a:hover,
.topnav a:focus,
.topnav a:active,
.topnav a:visited {
    text-decoration: none;
    border-bottom: none;
}

.topnav a:hover {
    text-shadow: 0 0 4px rgba(255,255,255,0.35);
}
	


form.search {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

form.search input {
		margin: 0.15em 6px 0.15em 0;
		padding: 0.15em 0.5em;
		border-radius: 6px;
		border: 1px solid #ccc;
		font-size: 0.7em;
		height: auto;
}

.breadcrumbs {
	    
	clear: both; 
	padding-top: 1em; 
		font-size: 0.7em;

}
.breadcrumbs span:after {
		content: ">";
		color: #999;  
		padding-left: 0.5em;
		padding-right: 0.25em; 
}

#main {
	border-top: 1px solid #eee; 
	padding-top: 0em; 
	margin-top: 8px; 
	clear: both; 
}

#content {

    width: 95%;
    max-width: 720px;
    min-width: 100px;
}

#content, #sidebar {
	padding-bottom: 2em; 
}

body.has-sidebar #content {
	width: 65%; 
	float: left;
}

body.has-sidebar #sidebar {
	width: 35%;
	padding-left: 5%; 
	float: left; 
}


.align_left {
	/* for images placed in rich text editor */ 
	float: left;
	margin: 0 1em 0.5em 0; 
	position: relative;
	top: 0.5em;
	max-width: 50%; 
}

.align_right {
	/* for images placed in rich text editor */ 
	float: right;
	margin: 0 0 0.5em 1em;
	max-width: 50%; 
}

.align_center {
	/* for images placed in rich text editor */ 
	display: block;
	margin: 1em auto; 
	position: relative;
	top: 0.5em;
}


/*********************************************************************
 * x. FOTO-relaterad
 *
 */




.photo-album {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* fotoalbumeffekt - rundade hörn */
/* Grundlayout: bild flyter i höger hörn */
.photo-album .album-image img {
  float: right;
  max-width: 300px;
  margin: 0 0 1rem 1rem; /* luft mellan bild och text */
  border-radius: 8px; /* rundade hörn */
}


/* ... men inga rundade hörn i zoomläge */
#overlay-img {
  border-radius: 0;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 997;
}

.popup-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.popup-overlay.active {
    display: flex;
}




/* linje mellan varje bildkort */
.album-item {
    margin-top: 0;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 3px solid transparent;
  background-image: linear-gradient(
        90deg, #0f2e5d 0%, #0d9488 45%, #14b8a6 85%, #2dd4bf 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: bottom left;
}
.album-item:last-child {
  background-image: none;
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.intro-divider {
  height: 4px; /* lite kraftigare än 3px */
  width: 96%;
/*  max-width: 800px; /* eller vad din body-textbredd är */
  margin: 2rem auto 3rem auto;
  background: linear-gradient(
        90deg, #0f2e5d 0%, #0d9488 45%, #14b8a6 85%, #2dd4bf 100%
  );
  border-radius: 2px;
}









/* ============================
   Grundlayout: bild flyter höger
   ============================ */
.album-item.auto-right .album-image img {
  float: right;
  max-width: 300px;
  margin: 0 0 1rem 1rem;
  border-radius: 8px;
}

/* ============================
   Automatisk flip: bild flyter vänster
   ============================ */
.album-item.auto-left .album-image img {
  float: left;
  max-width: 300px;
  margin: 0 1rem 1rem 0;
  border-radius: 8px;
}

/* ============================
   Reverse flip: gör tvärtom
   ============================ */
.album-item.reverse-flip.auto-right .album-image img {
  float: left;
  margin: 0 1rem 1rem 0;
}

.album-item.reverse-flip.auto-left .album-image img {
  float: right;
  margin: 0 0 1rem 1rem;
}


/* Overlay */
#image-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 997;
}

#image-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

#image-overlay img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  cursor: zoom-out;
}

/* Cursor hint */
.zoomable {
  cursor: zoom-in;
}

/*********************************************************************
 * 4. Footer
 *
 */

#footer {
	clear: both; 
	border-top: 1px solid var(--color_text_muted);
	color: var(--color_text_muted);
	font-size: 80%; 
}



/* Hide visually, but remain approachable for screenreader */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	white-space: nowrap;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	border: 0;
}





@media (max-width: 68px) { /* 768 */

  /* Visa mobilmenyn */
  .masthead-mobile {
    display: block;
  }

  /* Dölj hela desktopmenyn */
  .masthead-desktop {
    display: none;
  }
/* endast outer */
.masthead-desktop > .topnav {
  gap: 0;
}


  /* Dölj ALLA subnav som inte är i mobilens sidomeny */
  .subnav {
    display: none;
  }

  /* Visa ENDAST subnav i mobilmenyn */
  .mobile-side-menu .subnav {
     
      display: block;
  }


  /* När checkboxen är CHECKED – skjut in menyn */
    .hamburger-menu input[type="checkbox"]:checked ~ .mobile-side-menu {
        transform: translateX(0);
    }


  }


}


