/* =========================================================
   Språkmarkering (latin m.fl.)
   ========================================================= */

/* Främmande ord markerade med lang-attribut */
span[lang] {
  font-style: italic;
}

/* =========================================================
   Topplänkar
   ========================================================= */

.navbar .nav-link {
  position: relative;
  padding: 0.75rem 0.9rem;
  transition: color .2s ease, background-color .2s ease;
}

/* Tydligare hover */
.navbar .nav-item:hover > .nav-link {
  background-color: var(--brand-hover-bg);
  color: var(--brand-primary);
}

/* =========================================================
   Underline – hover + aktiv sida
   ========================================================= */

.nav-link-text {
  position: relative;
  display: inline-block;
}

/* Strecket */
.nav-link-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--brand-primary);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease, opacity .25s ease;
}

/* Hover */
.nav-item:hover > .nav-link .nav-link-text::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Aktiv sida (MYCKET TYDLIGARE) */
.nav-item.active > .nav-link {
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-item.active > .nav-link .nav-link-text::after {
  opacity: 1;
  transform: scaleX(1);
}

/* =========================================================
   Footer links
   ========================================================= */

.footer-link {
    color: #000;
    text-decoration: none;
}

.footer-link:hover,
.footer-link:focus {
    text-decoration: underline;
}

footer li {
    line-height: 1.4;
}

/* =========================================================
   Footer layout
   ========================================================= */

/* Grid */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

/* Tablet */
@media (max-width: 991px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobil */
@media (max-width: 575px) {
    .footer-columns {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Footer typography & spacing
   ========================================================= */

/* Global reset (behåll denna) */
footer ul {
    margin-bottom: 0;
    padding-left: 0;
}

/* Parent + första child ska sitta tight */
.footer-block ul {
    margin-top: 0.25rem;
}

/* Luft EFTER sista child i en sektion (inte efter första) */
.footer-child-only {
    margin-bottom: 1.5rem;
}

/* Parent + första child ska vara tight */
.footer-child-first {
    margin-bottom: 0;
}

/* Sektioner UTAN children */
.footer-block.no-children {
    margin-bottom: 1.5rem;
}

/* När ny sektion kommer direkt efter en child-rad */
.footer-child-only + .footer-block {
    margin-top: 1.2rem;
}

/* Child-rader (som fortsätter utan rubrik) */
.footer-child-only {
    margin-bottom: 0;
}

/* Illustrationer */
figure.illustration {
  margin: 2rem auto;
  text-align: center;
}

figure.illustration img {
  display: block;
  width: clamp(280px, 70vw, 420px);
  height: auto;
  margin-left: auto;
  margin-right: auto;
}


@media (max-width: 576px) {
  figure.illustration img {
    max-width: 360px;
  }
}




/* =========================================================
   Dropdown (hover-baserad, klick navigerar)
   ========================================================= */

/* Grundläggande dropdown-layout (VIKTIG) */
.navbar .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  min-width: 220px;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-soft);
  background-color: #fff;
  z-index: 1000;
}

/* Hover öppnar dropdown – desktop */
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
  }
}

/* Dropdown-länkar */
.navbar .dropdown-menu .dropdown-item {
  display: block;
  padding: 0.4rem 0;
  color: #2e2e2e;
  background: none;
  line-height: 1.4;
  white-space: normal;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
  color: var(--brand-primary);
  background: none;
  text-decoration: none;
}

/* =========================================================
   Dropdown i COLLAPSE-läge (hamburgare)
   ========================================================= */

.navbar-collapse.show .dropdown-menu {
  position: static;
  display: none;
  border: none;
  padding-left: 1rem;
  box-shadow: none;
}

.navbar-collapse.show .nav-item.open > .dropdown-menu {
  display: block !important;
}


/* =========================================================
   Submenu toggle icon
   ========================================================= */

.submenu-toggle {
  transition: transform 0.2s ease;
}

/* I collapse-läge */
.navbar-collapse.show .submenu-toggle {
  transform: rotate(0deg); /* ▸ */
}

/* När sektionen är öppen */
.navbar-collapse.show .nav-item.open > .nav-link-row .submenu-toggle {
  transform: rotate(90deg); /* ▼ */
}

/* =========================================================
   FAQ
   ========================================================= */


.faq-intro {
  max-width: 650px;
  margin-bottom: 2rem;
}

.faq-section {
  margin-bottom: 3rem;
}

.faq-section-title {
  margin-bottom: 1rem;
}

.faq-item {
  border-bottom: 1px solid #ddd;
  padding: 1rem;
}

.faq-item summary {
  background-color: #dcdec9;
  padding: 1rem;
  border-radius: 4px;
  font-weight: 600;
}

.faq-item p {
  margin: 0.75rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid #e0e0e0;
  color: #444;
}

.faq-item summary::after {
  content: "▸";
  position: absolute;
  right: 0;
  top: 0.1em;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
	color: #666;
}

.faq-item[open] summary {
  background-color: #ececec;
}

.faq-item[open] summary::after {
  transform: rotate(90deg);
}

.faq-item summary:hover,
.faq-item summary:focus {
  text-decoration: underline;
}

.faq-hint {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

/*
  FAQ mobil
*/
@media (max-width: 768px) {
  .faq-item summary {
    font-size: 1.05rem;
	  line-height: 1.4;
  }

  .faq-item p {
    font-size: 0.95rem;
  }
}


