/* =====================
   Grundinställningar
===================== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: #00c853;
  background: #000;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

/* =====================
   Header & Navigation
===================== */
.site-header {
  background: #111;
  color: #00c853;
  position: relative;
}

.main-nav {
  background: #1a1a1a;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #00c853;
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  font-weight: bold;
  color: #00c853;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffeb3b;
}

/* Hamburgermeny */
.menu-toggle {
  display: none;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  margin: 5px 0;
  background: #00c853;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Responsiv meny */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-links {
    flex-direction: column;
    gap: 0;
    margin-top: 15px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    text-align: center;
  }

  .nav-links.open {
    max-height: 400px;
    opacity: 1;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.2em;
    border-top: 1px solid #00c853;
  }

  .nav-links a:first-child {
    border-top: none;
  }
}

/* Overlay bakom meny */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}
.menu-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* =====================
   Hero-sektion
===================== */
.hero {
  position: relative;
  background: #000 url("bilder/header-bild.jpg") no-repeat center center;
  background-size: cover;
}

.hero-overlay {
  background: rgba(0,0,0,0.7);
  padding: 60px 20px;
}

.hero .container {
  text-align: center;
  padding: 30px 20px;
}

/* Hero logga */
.hero-logo {
  max-width: 260px;
  width: 100%;
  height: auto;
  margin: 0 auto 10px;
  display: block;
}

/* Hero rubrik */
.hero h1 {
  color: #00c853;
  font-size: 2.4rem;
  margin-bottom: 20px;
  line-height: 1.4;
  transition: color 0.3s ease;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.4s;
}
.hero h1:hover { color: #ffeb3b; }

/* Hero text */
.hero p {
  color: #00c853;
  font-size: 1.2rem;
  margin-bottom: 50px;
  line-height: 1.6;
  transition: color 0.3s ease;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.6s;
}
.hero p:hover { color: #ffeb3b; }

/* Hero knapp */
.button {
  background: transparent;
  border: 2px solid #00c853;
  color: #00c853;
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 3px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 5px rgba(0, 200, 83, 0.6));
  opacity: 0;
  transform: translateY(20px);

  /* Viktigt: alltid båda animationerna */
  animation: fadeInUp 1s ease forwards, pulseGlow 3s infinite;
  animation-delay: 0.8s, 0s;
}

.button:hover,
.button:active {
  background: #ffeb3b;
  color: #000;
  border-color: #ffeb3b;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.8));

  /* Behåll båda animationerna även vid hover */
  animation: fadeInUp 1s ease forwards, pulseGlow 3s infinite;
}

/* Pulserande glöd */
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(0, 200, 83, 0.6)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 200, 83, 0.9)); }
}

/* Scroll-pil */
.scroll-wrapper { margin-top: 35px; text-align: center; }

.scroll-down svg {
  display: inline-block;
  color: #00c853; /* grön standard */
  width: 40px;
  height: 40px;
  animation: bounce 2s infinite, pulseGlow 3s infinite;
  transition: color 0.3s ease, opacity 0.4s ease, transform 0.2s ease;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards, bounce 2s infinite, pulseGlow 3s infinite;
  animation-delay: 1s, 0s, 0s;
}
.scroll-down:hover svg {
  color: #ffeb3b; /* gul vid hover */
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(255, 235, 59, 0.8));
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(10px); }
  60% { transform: translateY(5px); }
}

/* Fade-in uppifrån */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   Tjänster
===================== */
.tjanster {
  padding: 60px 0;
  background: #111;
  text-align: center;
  flex: 1;
}
.tjanster h2 {
  margin-bottom: 40px;
  color: #00c853;
  transition: color 0.3s ease;

  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.4s;
}
.tjanster h2:hover { color: #ffeb3b; }

/* Växelvis fade-in för tjänst-boxar */
.tjanst-item {
  opacity: 0;
  animation: fadeInSide 0.8s ease forwards;
}
.tjanst-item:nth-child(1) {
  transform: translateX(-40px);
  animation-delay: 0.6s;
}
.tjanst-item:nth-child(2) {
  transform: translateX(40px);
  animation-delay: 0.8s;
}
.tjanst-item:nth-child(3) {
  transform: translateX(-40px);
  animation-delay: 1s;
}
.tjanst-item:nth-child(4) {
  transform: translateX(40px);
  animation-delay: 1.2s;
}

@keyframes fadeInSide {
  from { opacity: 0; }
  to   { opacity: 1; transform: translateX(0); }
}

.tjanster-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.tjanst-item {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tjanst-item:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(0,0,0,0.6); }
.tjanst-item h3, .tjanst-item h3 a { color: #00c853; }
.tjanst-item h3:hover, .tjanst-item h3 a:hover { color: #ffeb3b; }
.tjanst-item p { margin: 10px 0 0; color: #ccc; }

/* =====================
   Cards (Om, Kontakt, Service)
===================== */
.page-content { flex: 1; padding-bottom: 60px; }

.service-card,
.about-card,
.contact-card {
  background: #1a1a1a;
  padding: 30px;
  border-radius: 6px;
  margin: 20px auto 0;
  max-width: 800px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  opacity: 0;
  transform: translateY(30px);
  animation: fadeInCard 0.8s ease forwards;
  animation-delay: 0.6s;
}
.service-card:hover,
.about-card:hover,
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.service-card p,
.about-card p,
.contact-card p {
  color: #ccc;
  margin-bottom: 15px;
}

@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   Footer
===================== */
footer {
  background: #111;
  color: #00c853;
  padding: 50px 20px;
  text-align: center;
  margin-top: auto;
}
footer a { color: #00c853; }
footer a:hover { color: #ffeb3b; }

/* =====================
   Responsiv design
===================== */
@media (max-width: 768px) {
  .hero .container { padding: 25px 15px; }
  .hero-logo { max-width: 180px; margin-bottom: 8px; }
  .hero h1 { font-size: 1.6rem; margin-bottom: 20px; }
  .hero p { font-size: 1rem; margin-bottom: 35px; }
  .scroll-down svg { width: 28px; height: 28px; }

  .service-card,
  .about-card,
  .contact-card {
    margin: 15px auto 0;
  }
}
@media (min-width: 1200px) {
  .hero-logo { max-width: 300px; }
  .scroll-down svg { width: 50px; height: 50px; }
}
@media (min-width: 769px) {
  .nav-links { 
    opacity: 1 !important; 
    transform: none !important; 
  }
  .nav-links a { 
    opacity: 1 !important; 
    transform: none !important; 
  }
}
/* Gör texten centrerad i Om oss-preview */
.om-oss-preview {
  text-align: center;
}

.om-oss-card {
  text-align: center;   /* centrerar texten i rutan */
}

.om-oss-card p {
  text-align: center;   /* centrerar även styckena */
}

/* =====================
   Navigation mellan tjänstesidor
===================== */
.nextprev {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 15px 0;
  font-size: 18px;
}

.nextprev a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #00c853;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nextprev a:hover {
  color: #ffeb3b;
}

.nextprev svg {
  width: 20px;
  height: 20px;
}

/* Specifikt för navigation i hero */
.hero .nextprev {
  margin: 15px 0 25px 0;
}
