/* ==========================
  Root / Variabler
========================== */
:root {
    --nav-bg: #ffffff;
    --nav-text: #1A1A1A;
    --nav-accent: #f7610a;
    --nav-overlay-bg: rgba(255, 240, 230, 0.95);
  }
  
  /* ==========================
    Desktop Navigation
  ========================== */
  nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
  }
  
  /* Arrow */
  .dropdown-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
    transform-origin: center;
  }
  
  /* Öppnad dropdown via JS */
  .dropdown-menu.open .dropdown-arrow {
    transform: rotate(180deg);
  }
  
  /* ==========================
    Logo
  ========================== */
  .logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  
  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    margin-right: 1rem;
    line-height: 1;
  }
  
  .logo img {
    max-height: 60px;
    width: auto;
    display: block;
    margin: 0 0 0 40px;
    transition: transform 0.15s ease-in-out;
  }
  
  .logo:hover {
    animation: wobble 0.6s ease-in-out infinite;
    transform: scale(1.05);
  }
  
  @keyframes wobble {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(6deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-6deg); }
    100% { transform: rotate(0deg); }
  }
  
  /* ==========================
    Hamburger Button
  ========================== */
  .hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--nav-accent);
    cursor: pointer;
    z-index: 20;
    position: relative;
    transition: transform 0.2s ease;
  }
  
  .hamburger:hover {
    transform: scale(1.1);
  }
  
  .hamburger.open::before {
    content: "✕";
    font-size: 2.5rem;
    color: var(--nav-accent);
  }

  /* ==========================
    Desktop Dropdown (min-width: 948px)
  ========================== */
  @media (min-width: 948px) {
    .dropdown-content {
      position: absolute;
      background-color: var(--nav-bg);
      min-width: 160px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      border-radius: 6px;
      z-index: 10;
      opacity: 0;
      transform: translateY(10px);
      pointer-events: none;
      transition: opacity 0.25s ease, transform 0.25s ease;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }
    
    .dropdown-menu.open .dropdown-content {
      opacity: 1;
      transform: translateY(0);
      pointer-events: auto;
    }
  }
  
  /* ==========================
    Mobile Navigation
  ========================== */
  @media (max-width: 947px) {
    /* ===== Body när nav är öppet ===== */
    body.nav-open {
      overflow: hidden;
      height: 100vh;
      touch-action: none;
    }
  
    /* ===== Header ===== */
    .site-header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: var(--nav-bg);
      z-index: 10;
      padding: 6px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: padding 0.3s ease;
    }
  
    /* ===== Main / innehåll ===== */
    main,
    section,
    .content {
      margin-top: 80px;
    }
  
    /* ===== Hamburger ===== */
    .hamburger {
      display: flex;
      position: fixed;
      top: 20px;
      right: 50px;
    }
  
    /* ===== Mobilnav ===== */
    .mobile-nav {
      position: fixed;
      inset: 0;
      background: var(--nav-overlay-bg);
      backdrop-filter: blur(10px);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      opacity: 0;
      visibility: hidden;
      z-index: 15;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }
  
    .mobile-nav.open {
      opacity: 1;
      visibility: visible;
    }
  
    .mobile-nav ul {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      margin: 0;
      padding: 40px 0;
      gap: 25px;
      overflow-y: auto;
      max-height: 100%;
      width: 100%;
    }
  
    .mobile-nav ul li {
      width: 100%;
      text-align: center;
    }
  
    /* ===== Dropdown ===== */
    .dropdown-menu {
      position: relative;
      width: 100%;
    }
  
    .dropdown-toggle {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      width: 100%;
      cursor: pointer;
      padding: 10px 0;
    }
  
    .dropdown-arrow {
      font-size: 0.8em;
    }
  
    /* ===== Mobile Dropdown content - layout only ===== */
    .dropdown-content {
      position: static;
      width: 100%;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
      overflow: hidden;
      max-height: 0;
      opacity: 0;
      background: transparent;
      box-shadow: none;
      transform: none;
      transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
      margin-top: 0;
    }

    .dropdown-menu.open .dropdown-content {
      max-height: 600px;
      opacity: 1;
      margin-top: 12px;
    }
  
    .logo-container {
      display: flex;
      justify-content: center;
      z-index: 20;
    }
  
    .logo-container img {
      max-width: 60px;
      height: auto;
      z-index: 20;
    }
  }
  
  /* ==========================
    Scroll-shrink - Desktop only
  ========================== */
  @media (min-width: 948px) {
    .site-header {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 2rem;
      min-height: 65px;
      background-color: var(--nav-bg);
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      width: 100%;
      z-index: 50;
      transition: all 0.4s ease;
    }
  
    .site-header.sticky {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      transform: translateY(-100%);
      opacity: 0;
      pointer-events: none;
      transition: transform 0.4s ease, opacity 0.4s ease, padding 0.3s ease;
      padding: 5px 1.5rem;
      min-height: 55px;
      background-color: var(--nav-bg);
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
      z-index: 999;
    }
  
    .site-header.sticky.visible {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }
  
    /* === Fadar ut alla länkar utom start vid scroll === */
    body.scrolled nav ul li:not(#nav-start) {
      opacity: 0;
      pointer-events: none;
      visibility: hidden;
      transform: translateY(-10px);
      transition: all 0.3s ease;
    }
  
    body.scrolled nav ul li#nav-start {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: none;
      transition: all 0.3s ease;
    }
  
    .site-header.sticky .logo img {
      max-height: 55px;
      transition: max-height 0.3s ease;
    }
  
    .site-header.sticky .logo-container {
      transform: scale(0.9);
      transition: transform 0.3s ease;
    }
  
    .site-header.sticky nav ul {
      gap: 20px;
      transition: gap 0.3s ease;
    }
  
    #nav-start {
      position: relative;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }
  
    .site-header.sticky #nav-start {
      transform: scale(0.95);
      opacity: 0.95;
    }
  }