@import url("https://fonts.googleapis.com/css2?family=Chewy&family=Nunito:wght@400;600&display=swap");

body {
  font-family: "Nunito", sans-serif;
  margin: 0;
  padding: 0;
  background: rgb(146, 163, 151);
  color: #333;
}

/* ===== HERO HEADER ===== */
header {
  position: relative;
  background: url("https://images.pexels.com/photos/12538680/pexels-photo-12538680.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=512&w=512")
    no-repeat center center;
  background-size: cover;
  color: white;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

header h1,
header p,
.cta-btn {
  position: relative;
  z-index: 2;
}
header h1 {
  margin: 0;
  margin-top: 20rem;
  font-size: 7rem;
  color: #fff;
  font-family: "Chewy", cursive;
  letter-spacing: 1px;
}
header p {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 700;
  max-width: 800px;
  color: #eee;
  letter-spacing: 1px;
}

/* Smidig scroll till sektionen */
html {
  scroll-behavior: smooth;
}

/* CTA-knapp i hero */
.cta-btn {
  margin-top: 1.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 9999px;
  background: rgb(168, 121, 166);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

/* ===== FILTERS ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
}
select,
input {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #bbb;
  min-width: 160px;
  font-size: 0.95rem;
}

/* ===== GRID & CARDS ===== */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1300px;
  margin: auto;
}
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-content {
  padding: 1rem;
  flex: 1;
  text-align: center;
}
.card-content h3 {
  margin: 0 0 0.5rem;
  color: #000;
}

/* Favorite */
.favorite-btn {
  display: block;
  margin: 0.5rem auto 0;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #bbb;
  transition: color 0.2s;
}
.favorite-btn.active {
  color: #e63946;
}

/* ===== FAVORITES ===== */
#favorites {
  background: #f9f9f9;
  padding: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #ddd;
}
#favorites h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #2c2c2c;
}
#favorites .favorite-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
#favorites .fav-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  width: 200px;
  text-align: center;
}
#favorites .fav-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

/* ===== <details>/<summary> för kort ===== */
.card-details {
  margin-top: 0.5rem;
  text-align: left;
}
.card-details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem auto 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid #bbb;
  border-radius: 9999px;
  background: #fff;
  font-weight: 600;
  color: #333;
}
.card-details summary::marker {
  content: "";
} /* ta bort standardmarkör */
.card-details summary::after {
  /* egen pil */
  content: "▼";
  font-size: 0.9em;
  transition: transform 0.2s ease;
}
.card-details[open] summary::after {
  transform: rotate(-180deg);
}

.card-info {
  margin-top: 0.5rem;
}
.card-info p {
  margin: 0.35rem 0;
  color: #555;
}
#newsletter {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 2em 1em;
  max-width: 400px;
  margin: 2em auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
}

#newsletter h2 {
  margin-bottom: 1em;
  font-size: 1.3em;
  color: #333;
}

#newsletterForm {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  align-items: center;
}

#newsletterForm label {
  font-weight: 500;
  color: #444;
}
#newsletterForm input[type="email"] {
  padding: 0.5em 1em;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1em;
  width: 100%;
  max-width: 250px;
  box-sizing: border-box;
}

#newsletterForm button {
  background: #4e8cff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6em 1.5em;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

#newsletterForm button:hover {
  background: #2563eb;
}
#newsletterMessage {
  min-height: 1.5em;
  color: #2563eb;
  font-size: 1em;
  margin-top: 0.5em;
}
