/* =======================
   TJÄNSTEHJUL (uppdaterad)
======================= */

/* Hjulets grundläggande container */
.services-wheel {
    text-align: center;
    padding: 6rem 0;
    position: relative; /* Behåll om du behöver det här */
  }
  
  .services-wheel h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
  }
  
  .services-wheel .subtitle {
    font-size: 1.1rem;
    color: var(--neutral-gray);
    margin-bottom: 3rem;
  }
  
  /* Huvudcontainer för hjulet */
  .wheel-center {
    position: relative;  /* Viktigt: så att .service-description (absolute) placeras rätt */
    overflow: visible;   /* Se till att rutan inte klipps */
    width: 450px;
    height: 450px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Knappen i mitten */
  .wheel-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, #2a9fff, #1564c0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(30, 144, 255, 0.6),
                0 0 50px rgba(30, 144, 255, 0.3);
    z-index: 30;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease,
                box-shadow 0.4s ease;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Pulse-effekt för knappen */
  .wheel-button.pulse-effect {
    animation: buttonPulse 1s infinite alternate;
  }
  
  @keyframes buttonPulse {
    0% {
      box-shadow: 0 0 15px rgba(30, 144, 255, 0.6),
                  0 0 30px rgba(30, 144, 255, 0.3);
    }
    100% {
      box-shadow: 0 0 30px rgba(30, 144, 255, 0.8),
                  0 0 60px rgba(30, 144, 255, 0.5);
    }
  }
  
  .wheel-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 35px rgba(30, 144, 255, 0.8),
                0 0 70px rgba(30, 144, 255, 0.4);
  }
  
  .wheel-button-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  }
  
  /* Knapp med vald tjänst */
  .wheel-button.has-selection {
    background: radial-gradient(circle at center, #2ecb71, #1564c0);
    box-shadow: 0 0 30px rgba(46, 203, 113, 0.7),
                0 0 60px rgba(46, 203, 113, 0.4);
  }
  
  /* "Gå vidare"-knappen */
  .go-forward-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 80px);
    padding: 0.9rem 1.6rem;
    background: linear-gradient(135deg, #2ecb71, #27a55e);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 166, 81, 0.6);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 29;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  
  .go-forward-button.visible {
    opacity: 1;
    pointer-events: auto;
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  @keyframes bounceIn {
    0% {
      transform: translate(-50%, 60px) scale(0.5);
      opacity: 0;
    }
    50% {
      transform: translate(-50%, 85px) scale(1.1);
      opacity: 1;
    }
    100% {
      transform: translate(-50%, 80px) scale(1);
      opacity: 1;
    }
  }
  
  .go-forward-button:hover {
    transform: translate(-50%, 78px) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 166, 81, 0.8);
  }
  
  .go-forward-button:active {
    transform: translate(-50%, 81px) scale(0.98);
  }
  
  /* Pilanimering */
  .proceed-arrow {
    display: inline-block;
    margin-left: 5px;
    animation: arrowPulse 1.5s infinite;
  }
  
  @keyframes arrowPulse {
    0%, 100% { transform: translateX(0); opacity: 0.8; }
    50% { transform: translateX(6px); opacity: 1; }
  }
  
  /* Yttre hjulcontainern */
  .wheel-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 10;
    overflow: visible;
  }
  
  /* När hjulet är öppet */
  .wheel-outer.open {
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    animation: wheelOpen 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  @keyframes wheelOpen {
    0% {
      transform: translate(-50%, -50%) scale(0);
      opacity: 0;
    }
    50% {
      transform: translate(-50%, -50%) scale(1.1);
      opacity: 0.8;
    }
    100% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  }
  
  /* Bakgrundsplattan */
  .wheel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center,
                #1e2f5c 0%,
                #182338 70%,
                transparent 100%);
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.3);
    z-index: 5;
    border: 1px solid rgba(30, 144, 255, 0.2);
    transition: box-shadow 0.8s ease;
  }
  
  /* Glödeffekt för bakgrunden */
  .wheel-bg.glow-effect {
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.5),
                0 0 60px rgba(30, 144, 255, 0.2),
                inset 0 0 40px rgba(30, 144, 255, 0.1);
    animation: bgPulse 3s infinite alternate;
  }
  
  @keyframes bgPulse {
    0% {
      box-shadow: 0 0 30px rgba(30, 144, 255, 0.4),
                  0 0 60px rgba(30, 144, 255, 0.2),
                  inset 0 0 40px rgba(30, 144, 255, 0.1);
    }
    100% {
      box-shadow: 0 0 40px rgba(30, 144, 255, 0.6),
                  0 0 80px rgba(30, 144, 255, 0.3),
                  inset 0 0 50px rgba(30, 144, 255, 0.2);
    }
  }
  
  /* Inre hjulcontainer */
  .wheel-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 15;
    transform-origin: center;
    transform: rotate(0deg);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  
  /* Hjulets tjänst-"slice" */
  .wheel-slice {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(30, 40, 56, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: background-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.3s ease,
                opacity 0.5s ease;
    z-index: 20;
    transform: translate(-50%, -50%);
  }
  
  .wheel-slice.visible {
    opacity: 1;
  }
  
  /* Innehållsbehållaren i slice */
  .slice-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(0deg);
    transition: transform 0.8s cubic-bezier(0.34, 1.12, 0.64, 1);
    z-index: 2;
  }
  
  /* För att förbättra hover-feedback när hela slice roterar */
  .wheel-slice:hover {
    background-color: rgba(30, 144, 255, 0.9);
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.7),
                inset 0 0 15px rgba(255, 255, 255, 0.2);
    z-index: 25;
  }
  
  /* Klick-feedback anpassad för nya strukturen */
  .wheel-slice.click-feedback {
    animation: sliceClickScale 0.3s forwards;
  }
  
  @keyframes sliceClickScale {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
    50% {
      transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  /* Glödeffekt för tjänsterna */
  .slice-glow-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle at center,
                rgba(30, 144, 255, 0.3) 0%,
                rgba(30, 144, 255, 0) 70%);
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
  }
  
  /* Tjänst med highlight-effekt */
  .wheel-slice.highlight {
    animation: sliceHighlight 0.5s forwards;
    background-color: var(--primary-blue);
  }
  
  @keyframes sliceHighlight {
    0%, 50%, 100% {
      box-shadow: 0 0 15px rgba(30, 144, 255, 0.5),
                  0 0 30px rgba(30, 144, 255, 0.3),
                  inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
    25%, 75% {
      box-shadow: 0 0 25px rgba(30, 144, 255, 0.8),
                  0 0 50px rgba(30, 144, 255, 0.5),
                  inset 0 0 25px rgba(255, 255, 255, 0.5);
    }
  }
  
  /* Pulseffekt för vald tjänst */
  .wheel-slice.pulse {
    animation: slicePulse 2s infinite;
  }
  
  @keyframes slicePulse {
    0% {
      box-shadow: 0 0 15px rgba(46, 203, 113, 0.5),
                  0 0 30px rgba(46, 203, 113, 0.3),
                  inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
    50% {
      box-shadow: 0 0 25px rgba(46, 203, 113, 0.8),
                  0 0 50px rgba(46, 203, 113, 0.5),
                  inset 0 0 25px rgba(255, 255, 255, 0.5);
    }
    100% {
      box-shadow: 0 0 15px rgba(46, 203, 113, 0.5),
                  0 0 30px rgba(46, 203, 113, 0.3),
                  inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
  }
  
  /* Vald tjänst */
  .wheel-slice.selected {
    background: radial-gradient(circle at center, #2ecb71, #27a55e);
    box-shadow: 0 0 25px rgba(46, 203, 113, 0.7),
                0 0 50px rgba(46, 203, 113, 0.4),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
    z-index: 25;
    border: 2px solid rgba(255, 255, 255, 0.4);
  }
  
  /* Beskrivningsruta för vald tjänst – nu uppdaterad att använda top i stället för bottom */
  .service-description {
    position: absolute;
    top: 110%; /* Placerar rutan under hjulet. Justera efter behov. */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 40, 56, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 80%;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 999; /* Över hjulet, knappen m.m. */
  }
  
  .service-description.visible {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  
  .service-banner-description {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .service-short-description {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.5rem;
  }
  
  .service-banner {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
  }
  
  .image-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.5);
    opacity: 0;
    animation: imageGlow 3s infinite alternate;
    pointer-events: none;
  }
  
  @keyframes imageGlow {
    0% {
      box-shadow: 0 0 15px rgba(30, 144, 255, 0.4);
      opacity: 0.6;
    }
    100% {
      box-shadow: 0 0 30px rgba(30, 144, 255, 0.7);
      opacity: 1;
    }
  }
  
  /* Innehåll i beskrivningen */
  .service-description-content {
    flex: 1;
  }
  
  .service-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-blue);
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.5s ease 0.2s;
  }
  
  .service-title.animate-in {
    opacity: 1;
    transform: translateY(0);
  }
  
  .service-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--light-text);
    text-align: left;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease 0.4s;
  }
  
  .service-text.animate-in {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Stil för service-ikoner */
  .service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin-bottom: 0;
    position: relative;
  }
  
  .service-icon img {
    height: 80%;
    width: 80%;
    object-fit: contain;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
  }
  
  /* Stilar för slice-content när den innehåller en ikon */
  .wheel-slice .slice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
  }
  
  /* Justera positionering av text under ikonen */
  .wheel-slice .slice-content p {
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    margin: 0;
  }
  
  /* Bibehåll emojistorlek */
  .service-emoji {
    font-size: 1.8rem;
    line-height: 1;
    display: block;
    margin-bottom: 3px;
    transform: translateY(-5px);
  }
  
  /* Stil för ikonen i knappen */
  .button-icon {
    height: 60px;
    width: 60px;
    margin-right: 4px;
    vertical-align: middle;
  }
  
  /* Responsivitet för hjulet */
  @media (max-width: 992px) {
    .wheel-center {
      width: 400px;
      height: 400px;
    }
  }
  
  @media (max-width: 768px) {
    .wheel-center {
      width: 350px;
      height: 350px;
    }
    
    .wheel-outer {
      width: 280px;
      height: 280px;
    }
    
    .wheel-slice {
      width: 60px;
      height: 60px;
    }
    
    .wheel-slice .slice-content span {
      font-size: 1.5rem;
    }
    
    .wheel-slice .slice-content p {
      font-size: 0.65rem;
    }
    
    .service-description {
      flex-direction: column;
      padding: 1.5rem;
    }
    
    .service-image-container {
      margin-right: 0;
      margin-bottom: 1.5rem;
    }
    
    .service-description-content h3 {
      text-align: center;
    }
    
    .service-icon img {
      height: 100%;
      width: 100%;
    }
    
    .wheel-slice .slice-content p {
      font-size: 0.65rem;
      bottom: 6px;
    }
    
    .service-emoji {
      font-size: 1.5rem;
    }
  }
  
  @media (max-width: 576px) {
    .wheel-center {
      width: 300px;
      height: 300px;
    }
    
    .wheel-outer {
      width: 240px;
      height: 240px;
    }
    
    .wheel-slice {
      width: 50px;
      height: 50px;
    }
    
    .wheel-slice .slice-content span {
      font-size: 1.3rem;
    }
    
    .wheel-slice .slice-content p {
      font-size: 0.6rem;
      bottom: 5px;
    }
    
    .service-image {
      width: 100px;
      height: 100px;
    }
    
    .service-icon img {
      height: 100%;
      width: 100%;
      z-index;: 1; /* Se till att bilden är överst */
    }
    
    .service-emoji {
      font-size: 1.3rem;
    }
  }
  
  /* Döljer texten i knappen och visar enbart ikonen när hjulet är stängt med vald tjänst */
  .wheel-button.has-selection .wheel-button-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* Dölj texten */
  }
  
  /* Sätt samma storlek på ikonen som i hjulet (70px x 70px, justera om nödvändigt) */
  .wheel-button.has-selection .wheel-button-text .service-icon {
    width: 100px;
    height: 100px;
  }
  
  /* Gör så att bilden i ikonen fyller sin container korrekt */
  .wheel-button.has-selection .wheel-button-text .service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: static;
    transform: none;
  }
  
  .particle {
  border-radius: 50%;
  z-index: 9999;
  position: absolute;
  pointer-events: none;
}
