/* --- 1. Grundinställningar & Variabler --- */
:root {
  --color-brand-green: #95C11E;
  --color-brand-green-hover: #7ea319;
  --color-text-main: #111827;
  --color-text-muted: #6B7280;
  --color-bg-white: #FFFFFF;
  --color-bg-light-gray: #F9FAFB;
  --font-main: 'Helvetica Neue', Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

body {
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Klickbara element med app-känsla */
.btn-primary, .service-card, .horizontal-card, .menu-toggle {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* --- 2. Navigering & Header --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
  background-color: var(--color-bg-white);
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--color-brand-green);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 50px;
  width: auto;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 30px;
  text-decoration: none;
  color: var(--color-text-main);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--color-brand-green);
}

/* --- 3. Generella Typografi- & Sektionsregler --- */
section {
  padding: 80px 50px;
}

.bg-gray {
  background-color: var(--color-bg-light-gray);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  font-size: 48px;
  margin-bottom: 20px;
  line-height: 1.2;
}

h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

p {
  font-size: 18px;
  max-width: 800px;
  margin-bottom: 20px;
  color: var(--color-text-muted);
}

/* Knappar */
.btn-primary {
  background-color: var(--color-brand-green);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  display: inline-block;
  margin-top: 20px;
}

.btn-primary:hover {
  background-color: var(--color-brand-green-hover);
}

/* --- 4. Hero & Parallax --- */
.hero {
  text-align: center;
  padding: 120px 50px;
  background-color: var(--color-bg-light-gray);
  border-bottom: 1px solid #eaeaea;
}

.parallax-container {
  position: relative;
  padding: 150px 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  background-color: #E2E8F0;
  background-image: url('../images/hero-bg.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.05);
}

.parallax-container.sm {
  min-height: 40vh;
  padding: 100px 50px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.hero-content h1 {
  font-size: 56px;
  color: var(--color-text-main);
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.hero-content .btn-primary {
  font-size: 18px;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(149, 193, 30, 0.2);
}

/* --- 5. Tjänster & Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.service-card {
  background-color: var(--color-bg-white);
  padding: 40px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--color-text-main);
}

.service-card p {
  font-size: 16px;
  margin-bottom: 0;
}

.service-icon {
  max-height: 60px;
  width: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.route-map-icon {
  width: 100px;
  height: 60px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}

.route-map-icon .dot {
  width: 14px;
  height: 14px;
  background-color: var(--color-brand-green);
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(149, 193, 30, 0.2);
}

.route-map-icon .pin-b {
  background-color: var(--color-text-main);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.1);
  animation: pulse 2s infinite;
}

.route-map-icon .line {
  flex-grow: 1;
  height: 2px;
  border-bottom: 2px dashed var(--color-brand-green);
  position: relative;
  top: 0px;
  z-index: 1;
  margin: 0 -2px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(149, 193, 30, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(149, 193, 30, 0); }
  100% { box-shadow: 0 0 0 0 rgba(149, 193, 30, 0); }
}

.service-card:hover .route-map-icon .dot {
  transform: scale(1.1);
}

/* --- 6. Kinetisk Reveal --- */
.kinetic-section {
  background-color: var(--color-bg-white);
}

.kinetic-wrapper {
  position: relative;
  max-width: 600px;
  height: 400px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

.kinetic-inside {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.kinetic-inside-content h3 {
  color: var(--color-brand-green);
  font-size: 28px;
  margin-bottom: 10px;
}

.kinetic-door {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: var(--color-bg-white);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.door-top {
  top: 0;
  border-bottom: 1px solid rgba(149, 193, 30, 0.2);
}

.door-bottom {
  bottom: 0;
  border-top: none;
}

.kinetic-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.door-top h3 {
  margin: 0;
  color: var(--color-text-main);
}

.door-bottom p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.kinetic-wrapper.is-open .door-top {
  transform: translateY(-100%);
}

.kinetic-wrapper.is-open .door-bottom {
  transform: translateY(100%);
}

/* --- 7. Dynamisk Ruttspårning --- */
.dynamic-route-section {
  background-color: var(--color-bg-light-gray);
}

.route-map-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-bg-white);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.route-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

#route-path-active {
  transition: stroke-dashoffset 0.1s ease-out;
}

.van-icon {
  position: absolute;
  font-size: 32px;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
  z-index: 10;
  pointer-events: none;
}

.van-icon.visible {
  opacity: 1;
}

/* --- 8. Horisontell Scroll --- */
.horizontal-section {
  height: 300vh;
  position: relative;
  background-color: var(--color-bg-white);
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centrerar innehåll vertikalt */
  align-items: center;     /* Centrerar innehåll horisontellt oavsett skärm */
  overflow: hidden;
  padding-top: 50px;
}

.horizontal-title {
  text-align: center;
  margin: 0 auto 60px auto; /* Håller rubriken balanserad och centrerad */
  padding: 0 20px;
  color: var(--color-text-main);
  width: 100%;
  max-width: 1200px;        /* Begränsar bredden på superstora skärmar */
}

.horizontal-track {
  display: flex;
  gap: 40px;
  padding: 0 50px;
  width: max-content;
  will-change: transform;
}

.horizontal-card {
  width: 350px;
  height: 400px;
  background: var(--color-bg-light-gray);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--color-brand-green);
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.horizontal-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(149, 193, 30, 0.15);
}

.horizontal-card .card-number {
  font-size: 60px;
  font-weight: bold;
  color: rgba(149, 193, 30, 0.2);
  margin-bottom: 20px;
  line-height: 1;
}

.horizontal-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--color-text-main);
}

.horizontal-card p {
  font-size: 16px;
  color: var(--color-text-muted);
  margin: 0;
}

/* --- 9. CTA & Kontakt --- */
.cta-section {
  text-align: center;
  padding: 100px 50px;
  background-color: var(--color-bg-white);
}

.cta-section h2 {
  color: var(--color-text-main);
  margin-bottom: 20px;
}

.cta-section p {
  margin: 0 auto 40px auto;
}

.contact-box {
  background-color: var(--color-bg-light-gray);
  padding: 40px;
  border-radius: 12px;
  display: inline-block;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  border: 1px solid #eaeaea;
}

.phone-link {
  font-size: 32px;
  font-weight: bold;
  color: var(--color-brand-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.phone-link:hover {
  color: var(--color-brand-green-hover);
  transform: scale(1.02);
}

.phone-icon {
  font-size: 28px;
}

.opening-hours {
  font-size: 15px !important;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 15px !important;
}

.email-text {
  font-size: 14px !important;
  margin-bottom: 0 !important;
}

/* --- 10. Footer & Statiska Element --- */
footer {
  background-color: var(--color-text-main);
  color: #9CA3AF;
  padding: 30px 50px;
  text-align: center;
  font-size: 14px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.feature-item {
  background-color: var(--color-bg-white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  border-left: 5px solid var(--color-brand-green);
}

.feature-text h2 {
  font-size: 26px;
  margin-bottom: 15px;
  color: var(--color-text-main);
}

.feature-text p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 100%;
}

.about-layout {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-box {
  background-color: var(--color-bg-white);
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  border: 1px solid #eaeaea;
}

.stat-number {
  display: block;
  font-size: 42px;
  font-weight: bold;
  color: var(--color-brand-green);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

/* --- 11. Core Animationer (Fade-in & Hero) --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-animate {
  animation: heroFadeIn 1s ease-out forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- 12. Media Queries (Mobil- & Responsiv Logik) --- */
@media (max-width: 768px) {
  section {
    padding: 60px 20px;
  }

  header {
    padding: 15px 20px;
  }

  /* Hamburgarknapp layout */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    z-index: 110;
  }

  .menu-toggle span.bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-brand-green);
    transition: all 0.3s ease-in-out;
  }

  /* Hamburgar-animation till ett X */
  .menu-toggle.open .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  /* Navigationsmeny på mobilen */
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-white);
    flex-direction: column;
    display: none;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 100;
    padding: 10px 0;
  }

  nav.active {
    display: flex !important;
  }

  nav a {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid #f9f9f9;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  /* Responsiv rubrik-anpassning */
  h1 {
    font-size: 32px !important;
    line-height: 1.1;
    margin-bottom: 15px;
    padding: 0 10px;
  }

  .mobile-break {
    display: block;
  }

  .hero-content {
    padding: 30px 20px;
  }

  .kinetic-wrapper {
    height: 300px;
  }

  .kinetic-inside-content h3 {
    font-size: 20px;
  }

  .about-main-text {
    flex: 1;
  }

  .stats-grid {
    flex: 1;
    grid-template-columns: 1fr;
  }
}

/* Standarddölj för radbrytning på stora skärmar */
.mobile-break {
  display: none;
}