/* ===== Kodsnigel - stilar ===== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700&display=swap');

:root {
  --green: #3fae4a;
  --green-dark: #2d8a37;
  --green-light: #d7f3d2;
  --yellow: #ffcb3d;
  --orange: #ff8a3d;
  --pink: #ff6f9c;
  --blue: #3ec6e0;
  --purple: #9b6bf2;
  --bg: #fbfdf6;
  --text: #2b3a2f;
  --shadow: 0 6px 0 rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4, .logo {
  font-family: 'Baloo 2', cursive;
}

a {
  color: var(--green-dark);
}

img { max-width: 100%; }

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--green) 0%, var(--blue) 100%);
  color: #fff;
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.logo .snail {
  font-size: 2rem;
  display: inline-block;
  animation: wiggle 2.5s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 6px 4px;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s ease;
}

nav a:hover, nav a.active {
  border-color: var(--yellow);
}

/* Hero */
.hero {
  background: radial-gradient(circle at top right, var(--green-light), var(--bg) 60%);
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 10px;
  color: var(--green-dark);
}

.hero p.subtitle {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 28px;
}

.hero-snail {
  font-size: 5.5rem;
  margin-bottom: 10px;
  display: inline-block;
  animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  padding: 14px 30px;
  border-radius: 40px;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.btn.secondary {
  background: var(--blue);
}

.btn.purple {
  background: var(--purple);
}

/* Cards / sections */
section {
  padding: 50px 0;
}

section.alt {
  background: #fff;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.section-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
  color: #4a5a4d;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 3px solid var(--green-light);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

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

.card .emoji {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
  color: var(--green-dark);
}

/* Lesson list */
.lesson {
  background: #fff;
  border-radius: 20px;
  border: 3px solid var(--green-light);
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.lesson h2 {
  color: var(--green-dark);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lesson .badge {
  background: var(--yellow);
  color: #533b00;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: auto;
}

.code-box {
  background: #1e2a20;
  color: #b6f2b0;
  font-family: 'Courier New', monospace;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 0.95rem;
}

.tip {
  background: var(--green-light);
  border-left: 5px solid var(--green);
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 14px;
}

/* Timeline / steps */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.step {
  background: var(--green-light);
  border-radius: 16px;
  padding: 20px;
  flex: 1 1 200px;
  text-align: center;
}

.step .num {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

/* About page */
.mascot-box {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.mascot-box .emoji-huge {
  font-size: 7rem;
}

/* Resources list */
.resource-list {
  list-style: none;
  padding: 0;
}

.resource-list li {
  background: #fff;
  border: 2px solid var(--green-light);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

/* Footer */
footer {
  background: var(--green-dark);
  color: #eafbe8;
  text-align: center;
  padding: 30px 0;
  margin-top: 20px;
}

footer a {
  color: #ffe38a;
}

.footer-snail {
  font-size: 1.8rem;
}

@media (max-width: 640px) {
  nav ul { gap: 12px; flex-wrap: wrap; justify-content: center; }
  .navbar { flex-direction: column; gap: 14px; }
  .hero h1 { font-size: 2rem; }
}
