/* --- 1. GRUNDSTIL & ITALIENSKT TEMA --- */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  background-color: #f7f2eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23e8dec8' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H2V1z'%3E%3C/path%3E%3C/svg%3E");
  color: #333;
  line-height: 1.6;
}

/* --- 2. NAVBAR --- */
.navbar {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: #1a1a1a;
  color: white;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-logo {
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ff4757;
}

/* Hamburger ikon - dold på desktop */
.hamburger-ikon {
  display: none;
}

/* --- 3. HERO SEKTION (Blandning av bild + lokal trovärdighet) --- */
.hero-sektion {
  text-align: center;
  padding: 40px 20px 20px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.hero-pizza-img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  border: 4px solid #d32f2f;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-sektion h1 {
  font-size: 2.8rem;
  color: #d32f2f;
  margin: 0 0 10px 0;
}

.hero-check {
  display: block;
  font-size: 0.95rem;
  color: #2e7d32;
  margin-bottom: 10px;
  font-weight: 600;
}

/* Desktop: Lås upp texten helt och göm "Läs mer" */
.hero-text-content {
  max-height: none;
  overflow: visible;
}

.hero-text-content::after {
  display: none;
}

.las-mer-knapp {
  display: none;
}

.disclaimer {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
}

/* --- 4. SÖK & TRÄFFAR --- */
#huvud-sok-sektion {
  padding: 20px;
  text-align: center;
}

input#sokruta {
  width: 90%;
  max-width: 600px;
  padding: 15px 25px;
  border: 2px solid #ddd;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

input#sokruta:focus {
  outline: none;
  border-color: #008c45;
  box-shadow: 0 0 12px rgba(0, 140, 69, 0.15);
}

#antal-traffar-container {
  font-weight: bold;
  color: #2e7d32;
  margin-top: 10px;
  min-height: 1.2em;
}

/* --- 5. SORTERING --- */
#sorterings-sektion {
  margin: 10px 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#pris-sortering {
  padding: 10px 15px;
  border-radius: 25px;
  border: 2px solid #008c45;
  background: white
    url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23008c45' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  background-size: 20px;
  padding-right: 40px;
  cursor: pointer;
  appearance: none;
}

/* --- 6. FILTER & MOBIL-TOGGLE --- */
#mobil-filter-toggle {
  display: none; /* Dold på desktop */
  width: 90%;
  margin: 0 auto 20px auto;
  background-color: #1a1a1a;
  color: white;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.filter-grupp h3 {
  font-size: 1rem;
  color: #2d5a27;
  border-left: 4px solid #cd212a;
  padding-left: 10px;
}

/* --- 7. DROPDOWNS & KNAPPAR --- */
.dropdown-container {
    position: relative;
}

.dropdown-knapp {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.dropdown-innehall {
    display: none; /* Denna är gömd som standard */
    position: absolute;
    background-color: #ffffff;
    min-width: 320px;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.2);
    z-index: 2000;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #eee;
    margin-top: 8px;
    
    /* Inställningar för layouten när den väl visas */
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
}

.dropdown-innehall.visa {
    display: grid; 
}

button.pizzeria-btn {
  background-color: white;
  border: 2px solid #eee;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

button.pizzeria-btn:hover {
  border-color: #008c45;
  transform: translateY(-1px);
}

button.vald-knapp {
  background-color: #008c45 !important;
  color: white !important;
}

#rensa-filter-btn {
  border-color: #d32f2f;
  color: #d32f2f;
}

#rensa-filter-btn:hover {
  border-color: #b71c1c;
  background-color: #ffebee;
}

#rensa-filter-btn-mobile {
  display: none;
}

/* --- 8. PIZZAKORTEN (Levande känsla) --- */
#resultat-lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.pizza-kort {
  background: white;
  border-radius: 15px;
  padding: 25px;
  width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  text-align: center;
  border-top: 6px solid #cd212a;
  cursor: pointer;
}

.pizza-kort:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.pizza-kort h3 {
  color: #cd212a;
  margin: 0 0 10px 0;
}

/* --- 9. OM OSS & ÖVRIGT --- */
.dold-sektion {
  display: none;
  padding: 40px 20px;
  background: white;
  border-top: 3px solid #1a1a1a;
}
.dold-sektion.visa {
  display: block;
}

#topp-knapp {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #cd212a;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- 10. MOBILANPASSNING --- */
@media (max-width: 768px) {
  /* Body och grundlayout */
  body {
    padding: 0 10px;
  }

  /* Navbar - Kompakt och inte sticky */
  .navbar {
    position: static; /* Ta bort sticky på mobil */
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .navbar {
    position: static;
  }

  .nav-container {
    position: relative;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 15px;
    gap: 0;
  }

  .nav-logo {
    font-size: 1rem;
  }

  /* Hamburger meny */
  .nav-links {
    display: none; /* Göm som standard */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 12px 12px;
    z-index: 1001;
  }

  .navbar.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 15px 20px;
    display: block;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Hamburger ikon */
  .hamburger-ikon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 20px;
    cursor: pointer;
    padding: 5px;
  }

  .hamburger-ikon span {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 1px;
  }

  .hamburger-ikon.mobil-meny-aktiv span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger-ikon.mobil-meny-aktiv span:nth-child(2) {
    opacity: 0;
  }

  .hamburger-ikon.mobil-meny-aktiv span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Hero sektion */
  .hero-sektion h1 {
    font-size: 2.1rem;
  }

  .hero-pizza-img {
    width: 100px;
    height: 100px;
  }

  .hero-sektion {
    padding: 30px 15px 20px 15px;
  }

  .hero-text {
    max-width: 100%;
  }

  /* Sökfält - Full width */
  #huvud-sok-sektion {
    padding: 20px 0;
  }

  input#sokruta {
    width: 100%;
    max-width: none;
    padding: 18px 25px;
    font-size: 16px; /* Förhindrar zoom på iOS */
  }

  /* Sortering - Centrera */
  #sorterings-sektion {
    justify-content: center;
    margin: 15px 0 20px 0;
  }

  #pris-sortering {
    width: 100%;
    max-width: 300px;
  }

  /* Mobil filter toggle */
  #mobil-filter-toggle {
    display: block;
    padding: 15px;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  #rensa-filter-btn-mobile {
    display: none;
  }

  #rensa-filter-btn-mobile:hover,
  #rensa-filter-btn-mobile:focus {
    background-color: rgba(211, 47, 47, 0.08);
  }

  #rensa-filter-btn {
    display: block;
    width: 100%;
    margin: 15px 0 0 0;
    border: 2px solid #d32f2f;
    color: #d32f2f;
    background: transparent;
    box-shadow: none;
  }

  #rensa-filter-btn:hover,
  #rensa-filter-btn:focus {
    background-color: rgba(211, 47, 47, 0.08);
  }

  .filter-hidden-mobile {
    display: none;
  }

  .filter-hidden-mobile.visa {
    display: block;
  }

  /* Filter grid - Vertikal layout */
  .filter-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px 0;
  }

  .filter-grupp h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  /* Dropdowns - Full width */
  .dropdown-knapp {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .dropdown-innehall {
    min-width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 300px;
  }

  /* Knappar - Full width och större */
  button.pizzeria-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    min-height: 48px; /* 44px minimum för tillgänglighet */
    margin-bottom: 10px;
  }

  #rensa-filter-btn {
    margin-top: 15px;
  }

  /* Pizzakort - En kolumn, full width */
  #resultat-lista {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
  }

  .pizza-kort {
    width: 100%;
    max-width: none;
    padding: 20px 15px;
    margin: 0;
  }

  .pizza-kort h3 {
    font-size: 1.1rem;
  }

  /* Ladda fler knapp */
  #ladda-fler-sektion {
    padding: 20px 0;
  }

  #ladda-fler-btn {
    width: 100%;
    max-width: 300px;
  }

  /* Footer */
  .sajtfot {
    padding: 20px 10px;
    margin-top: 30px;
  }

  /* Policy modal */
  .policy-box {
    width: 95%;
    padding: 25px 20px;
  }

  /* Topp-knapp */
  #topp-knapp {
    bottom: 20px;
    right: 20px;
    padding: 12px;
  }

  /* Läs mer - Collapsible text */
  .hero-text-content.collapsed {
    max-height: 150px;
    overflow: hidden;
    position: relative;
  }

  .hero-text-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
  }

  .hero-text-content.expanded {
    max-height: none;
    overflow: visible;
  }

  .hero-text-content.expanded::after {
    display: none;
  }

  /* Läs mer knapp */
  .las-mer-knapp {
    display: block;
    margin: 15px auto 0;
    padding: 12px 24px;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .las-mer-knapp:hover {
    background-color: #b71c1c;
  }

  /* Center container för rensa-knapp */
  .center-container {
    display: flex;
    justify-content: center;
    padding: 15px 0;
  }
}

/* --- SIDFOT --- */
.sajtfot {
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  border-top: 1px solid #ddd;
}

.sajtfot p {
  font-size: 0.85rem;
  color: #777;
}

.sajtfot a {
  color: #777;
  text-decoration: underline;
  margin-left: 10px;
}

/* --- POLICY MODAL (PREMIUM VERSION) --- */

.policy-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  backdrop-filter: blur(8px); /* Lite mer suddigt för lyxigare känsla */
}

.policy-box {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 420px;
  background: white;
  border-radius: 24px;
  padding: 35px 25px;
  text-align: center;
  z-index: 10000;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.policy-box.visa,
.policy-overlay.visa {
  display: block;
}

.policy-ikon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.policy-innehall h3 {
  margin-top: 0;
  color: #cd212a;
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.policy-innehall p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 25px;
}

/* Knapp-kontainer */
.policy-knappar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Huvudknapp (Röd) */
.stang-btn {
  background-color: #cd212a;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition:
    transform 0.2s,
    background 0.2s;
}

.stang-btn:hover {
  background-color: #a01a21;
  transform: translateY(-2px);
}

/* Sekundär knapp (Grå/Neka) */
.sekundar-btn {
  background-color: #f0f0f0;
  color: #666;
  border: none;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.sekundar-btn:hover {
  background-color: #e5e5e5;
}

/* Layout för större skärmar */
@media (min-width: 480px) {
  .policy-knappar {
    flex-direction: row;
    justify-content: center;
  }
  .stang-btn,
  .sekundar-btn {
    flex: 1;
  }
}

.hero-check {
    color: #28a745;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Grön */
.green {
    color: #28a745;
}

/* Röd */
.red {
    color: #d62828;
}
