/* Grundläggande stilar */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background-color: #111; color: #fff; overflow-x: hidden; }

/* Behållare */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigationsmeny */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.3); /* 🔧 Transparent start */
  transition: background-color 0.6s ease-in-out;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}
.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.7); /* 🔄 När man skrollar */
}

/* Justera för fast navbar */
body {
  padding-top: 80px;
}

/* Hamburgarmeny-knapp */
.burger-menu {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Navigationslänkar */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-links li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links li a:hover {
  color: #f2c94c;
  text-shadow: 0 0 10px #f2c94c;
}

/* Dölj hamburgarmenyn på desktop */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    list-style: none;
    position: static;
    background: none;
    padding: 0;
    width: auto;
    justify-content: flex-end; /* 🔧 Flytta menyn till höger */
    flex-grow: 1; /* 🛠 Se till att den fyller ut ytan */
  }
}

/* Hero */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  isolation: isolate;
  overflow: hidden;
}

/* 12 bakgrundsbilder som skiftar */
.hero .image1, .hero .image2, 
.hero .image3, .hero .image4, 
.hero .image5, .hero .image6, 
.hero .image7, .hero .image8, 
.hero .image9, .hero .image10, 
.hero .image11, .hero .image12 {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 0;
  animation: fadeHero 78s infinite ease-in-out;
}

/* Ordning på bilderna */
.hero .image1 { background-image: url('images/uteservering1-large.jpg'); animation-delay: 0s; }
.hero .image2 { background-image: url('images/uteservering2-large.jpg'); animation-delay: 6s; }

.hero .image3 { background-image: url('images/inredning1-large.jpg'); animation-delay: 12s; }
.hero .image4 { background-image: url('images/inredning2-large.jpg'); animation-delay: 18s; }
.hero .image5 { background-image: url('images/inredning3-large.jpg'); animation-delay: 24s; }
.hero .image6 { background-image: url('images/inredning4-large.jpg'); animation-delay: 30s; }

.hero .image7 { background-image: url('images/uteservering1-small.jpg'); animation-delay: 36s; }
.hero .image8 { background-image: url('images/uteservering2-small.jpg'); animation-delay: 42s; }

.hero .image9 { background-image: url('images/inredning1-small.jpg'); animation-delay: 48s; }
.hero .image10 { background-image: url('images/inredning2-small.jpg'); animation-delay: 54s; }
.hero .image11 { background-image: url('images/inredning3-small.jpg'); animation-delay: 60s; }
.hero .image12 { background-image: url('images/inredning4-small.jpg'); animation-delay: 66s; }

@keyframes fadeHero {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  45%  { opacity: 1; }
  55%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Se till att hero-texten ligger ovanpå bilden */
.hero-content {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  z-index: 10;
}

/* Menysektion */
.menu-category {
  margin-top: 4rem;
  padding: 2rem;
  background: #222;
  border-radius: 8px;
  position: relative;
}

/* Centrering av kategorinamn */
.menu-category h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #f2c94c;
  text-align: center;
}

/* Underkategoriknappar för Pizza */
.menu-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 2rem;
}

.menu-subcategories button {
  background: #f2c94c;
  color: #111;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}

.menu-subcategories button:hover {
  background: #e1b62b;
}

/* Matkategorier */
.menu-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px; /* 🛠 Fixad spacing mellan maträtter */
  max-width: 1000px;
  margin: 0 auto;
}

/* Enskilda maträtter */
.menu-item {
  background: #333;
  padding: 1.5rem;
  border-radius: 8px;
  width: 280px;
  transition: transform 0.3s ease-in-out;
  text-align: center;
}

/* 🛠 Återställd hover-effekt */
.menu-item:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
}

/* 🛠 Fixad textplacering */
.menu-item p {
  text-align: center;
}

/* 🛠 Återställd styling för "Om Chaplin", "Kontakta oss" och "Öppettider" */
.about, .contact, .opening-hours {
  text-align: center;
  margin-bottom: 60px;
}

/* 🛠 Fixad separation mellan kategorier som tidigare hade filter */
#kott, #fisk, #kebab, #spett, #sallad, #pasta {
  margin-bottom: 50px;
}

.menu-info {
  margin-top: 8rem; /* ↑ eller t.ex. 8rem om du vill ha mer luft neråt */
  text-align: center;
  color: #ccc;
  font-style: italic;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.menu h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: #f2c94c;
}

/* Redundant fix för säkerhets skull */
.menu-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.menu-nav a {
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  background: #f2c94c;
  color: #111;
  transition: background 0.3s ease;
}

.menu-nav a:hover {
  background: #e1b62b;
  text-shadow: 0 0 5px #f2c94c;
}

.lunch-banner {
  background: #f2c94c;
  color: #111;
  text-align: center;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.lunch-banner h4 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.lunch-banner p {
  font-size: 1.1rem;
  margin: 0.2rem 0;
}

.lunch-button {
  display: inline-block;
  background: #f2c94c;
  color: #111;
  padding: 0.8rem 1.5rem;
  font-weight: bold;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease-in-out;
}
.lunch-button:hover {
  background: #e1b62b;
}

body {
  background-color: #1a1a1a; /* Snygg, mörk bakgrund */
  color: #fff;
}
.menu-category {
  background: #222; /* En djupare färg för sektioner */
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5); /* Lägger lite djup */
}

.menu-item:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.menu h2, .menu h3 {
  font-family: 'Playfair Display', serif; /* Premium-look */
  text-align: center;
  color: #f2c94c; /* Guldton */
}

#dagens {
  background: url('images/lunch-bg.jpg') center/cover no-repeat;
  padding: 2rem;
}

.menu-category, .menu-items {
  position: relative;
  z-index: 10;
}

.about, .contact, .opening-hours {
  margin-bottom: 100px; /* 🛠 Minska avståndet, men behåll lite luft */
  display: block; /* Säkerställer att sektionerna inte försvinner */
}

html {
  scroll-behavior: smooth;
}

section {
  display: block !important;
}

#about, #contact, #hours {
  margin-top: 300px; /* 🛠 Ökar mellanrummet mellan sektionerna */
  padding-top: 40px; /* För att se till att rubrikerna inte fastnar vid scroll */
}

#about, #contact, #hours {
  background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  margin-bottom: 80px; /* 🛠 Extra luft mellan sektionerna */
}

#hours ul {
  list-style: none; /* Tar bort prickarna */
  padding: 0; /* Ser till att det inte finns extra utrymme */
}
#hours ul li {
  padding-left: 0; /* Justerar textens placering */
}

section {
  scroll-margin-top: 150px; /* 🛠 Justerar var skrollen stannar */
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.visible {
  opacity: 1 !important;
  transform: translateY(0);
}

.nav-links {
  display: flex;
  gap: 20px;
}

/* Dölj vanlig meny på små skärmar */
@media (max-width: 768px) {
  .nav-links {
    display: none; /* 🔄 Dölj menyn från start */
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    z-index: 99;
  }

  .nav-links.active {
    display: flex; /* 🚀 Visa bara när hamburgaren öppnas */
  }

  .burger-menu {
    display: block; /* 🟢 Se till att hamburgaren syns */
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    animation: glow 1.5s infinite alternate ease-in-out;
  }
}

.burger-menu {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
}

/* Visa hamburgarmenyn på små skärmar */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
    font-size: 1.8rem;
    position: absolute;
    right: 20px;
    top: 40%; /* 🔧 Sätter den mitt i navbaren */
    transform: translateY(-50%); /* 🚀 Förhindrar att den hamnar för långt ner */
    animation: pulse-glow 1.5s infinite alternate ease-in-out;
  }
}

/* Glow-effekten */
@keyframes pulse-glow {
  0% { text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7); }
  50% { text-shadow: 0px 0px 18px rgba(255, 255, 255, 1); }
  100% { text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.7); }
}

.nav-links.active {
  display: flex;
}

.pizza-info {
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  color: #f2c94c; /* Guldton för en premium-look */
  margin-bottom: 10px; /* Skapar lite luft innan pizzakategorierna börjar */
}

.maps-btn {
  display: inline-block;
  margin-top: 10px;
  background: #f2c94c;
  color: #000;
  padding: 10px 18px;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: 0.3s ease-in-out;
}

.maps-btn:hover {
  background: #ffc107;
  transform: scale(1.05);
}

.pizza-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pizza-card.active,
.pizza-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.hero-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  margin-bottom: 10px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3); /* 🔧 Starta lätt transparent */
  transition: background-color 0.6s ease-in-out;
  z-index: 999;
}

/* 🔧 När du scrollar får navbaren sin mörkare färg */
.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.7);
}

.logo-img {
  height: 48px;
}

.burger-menu {
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  align-self: center;        /* Säkerställ vertikal centrering */
}

@media (max-width: 600px) {
  .logo-img {
    height: 36px;
  }

  .burger-menu {
    font-size: 1.4rem;
    padding: 4px;
  }

  .navbar {
    padding: 8px 16px;
  }
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* 🔧 Undvik sidscroll */
}

.logo-img {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Skapa en pizza-loader */
.pizza-loader {
  z-index: 9999;
  width: 80px;
  height: 80px;
  background: url('images/pizza.png') no-repeat center/cover;
  border-radius: 50%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

body.loaded .pizza-loader {
  opacity: 0; /* 🔥 Gör den osynlig istället för display: none */
  pointer-events: none; /* 🚀 Förhindrar att den blockerar klick */
  transition: opacity 0.5s ease-out; /* 🛠 Mjuk fade-out */
}

/* 🔥 ljus bakgrund vid sidladdning */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #DDD; /* 🔥 Din mörka bakgrund */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* 🔝 Högst upp */
  transition: opacity 0.8s ease-out;
}

/* 🔥 Fade-out effekten */
body.loaded .loading-screen {
  opacity: 0;
  pointer-events: none;
  transition: opacity 2.5s ease-out; /* 🛠 Mjukare fade */
}

/* === MOBILFIX: Pizzakategorier === */
@media (max-width: 500px) {
  .menu-subcategories {
    justify-content: center;
    gap: 0.6rem;
  }

  .menu-subcategories button {
    flex: 1 1 100%;
    max-width: 300px;
    margin: 0 auto;
    white-space: nowrap;
    text-align: center;
  }
}

@media (max-width: 500px) {
  .menu-nav {
    flex-direction: column;
    align-items: center;
  }

  .menu-nav a {
    width: 90%;
    max-width: 300px;
    text-align: center;
    white-space: nowrap;
  }
}

.video-bg {
  position: relative;
  height: 50vh;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  animation: fadeLoop 24.30s infinite ease-in-out;
  animation-fill-mode: forwards;
}

@keyframes fadeLoop {
  0%, 96%  { opacity: 1; }  /* 🍕 Full synlighet längre tid */
  97%, 100% { opacity: 0; }  /* 🍕 Fade-out börjar tidigare och blir mjukare */
}

.about-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  padding: 3rem 2rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.with-gallery-background {
  background: #222; /* Samma mörkgrå som hamburgarmenyn */
  color: #fff; /* Vit text för bästa kontrast */
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.gallery-bg {
  display: none;

}

.gallery-image {
  display: none;

}

/* Förstorar overlay så det täcker allt */
.gallery-bg::before,
.menu-content {
  background-color: transparent;
  color: inherit;
}

.menu-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
  width: 100%; /* Ser till att textdelen täcker hela sektionen */
  height: 100%;
  background-color: transparent;
}

/* Kopplar rätt bilder till rotationen */
.image1 { background-image: url('images/kottpommes-large.jpg'); animation-delay: 0s; }
.image2 { background-image: url('images/planka1-large.jpg'); animation-delay: 4s; }
.image3 { background-image: url('images/kottpommes-small.jpg'); animation-delay: 8s; }
.image4 { background-image: url('images/planka1-small.jpg'); animation-delay: 12s; }

/* Kopplar alla bilder till animationen */
.image1 { animation: fadeGallery 16s infinite ease-in-out 0s; }
.image2 { animation: fadeGallery 16s infinite ease-in-out 4s; }
.image3 { animation: fadeGallery 16s infinite ease-in-out 8s; }
.image4 { animation: fadeGallery 16s infinite ease-in-out 12s; }

/* Animation */
@keyframes fadeGallery {
  0%, 10%   { opacity: 0; }
  20%, 45%  { opacity: 1; }
  55%, 100% { opacity: 0; }
}

.gallery-wrapper {
  display: none;
}

.placera-långt-ner {
  margin-top: 2rem;
  background-color: rgba(0, 0, 0, 0.8);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  color: #fff;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}



