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

.site-header{
  width:100%;
  margin-bottom: 35px;
}

.header-inner{
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

/* Zoner (desktop) */
.header-left,
.header-center,
.header-right{
  display:flex;
  align-items:center;
}
.header-left{
  flex-direction:column;
  align-items:flex-start;
  gap:.35rem;
}
.header-center{ justify-self:center; }
.header-right{ justify-self:end; gap:.5rem; }

/* Länkar & logo */
.back-link{
  font-size:.92rem;
  color:#666;
  text-decoration:none;
}
.back-link:hover{ color:#333; text-decoration:underline; }

.compare-link{
  display:inline-flex; align-items:center; gap:.375rem;
  font-weight:500; text-decoration:none;
  color:#007db1; padding:.25rem .4rem;
  border-radius:.5rem;
  transition:background-color .15s ease, color .15s ease;
}
.compare-link:hover{ background:#eef5ff; color:#007db1; }

.brand-logo{ height:46px; width:auto; }   /* större default */
@media (min-width:992px){ .brand-logo{ height:52px; } }

.lang-btn{ line-height:1; padding:.375rem .6rem; }

.compare-link:focus,
.back-link:focus,
.lang-btn:focus{
  outline:2px solid #86b7fe;
  outline-offset:2px;
}

/* ====== MOBIL (<768px) ====== */
@media (max-width:767.98px){
  .header-inner{
    grid-template-columns:1fr auto;
    grid-template-areas:
      "back   logo"
      "compare lang";
    gap:.8rem;                 /* lite mer avstånd mellan rader */
    padding:.9rem .9rem;       /* extra padding topp & botten */
  }

  .header-left{ display:contents; }

  .back-link{ grid-area:back; justify-self:start; }
  .compare-link{ grid-area:compare; justify-self:start; }
  .header-center{ grid-area:logo; justify-self:end; }
  .header-right{ grid-area:lang; justify-self:end; }

  .brand-logo{ height:48px; }   /* större logga på små skärmar */
  .compare-link{ font-size:.95rem; }

  .lang-btn{
    padding:.25rem .45rem;   /* mindre språkknapp */
    font-size:.85rem;
  }

  .site-header{
      margin-bottom: 15px;
  }
}
