/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', 'Segoe UI', sans-serif;
  line-height: 1.7;
  background: #fdf6f0;
  color: #444;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: #fffaf3;
  border-bottom: 2px solid #f0d9c5;
  position: relative;
  width: 100%;
  z-index: 1000;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: #b05b7f;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #b05b7f;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #b05b7f;
}

/* Hero */
.hero {
  height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(rgba(255,245,235,0.8), rgba(255,245,235,0.9)), url('images/hero-bg.jpg');
  background-size: cover;
  padding: 2rem;
}

.hero h1 {
  font-size: 2.8rem;
  color: #b05b7f;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Buttons */
.btn, .btn-small {
  background: #b05b7f;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn:hover, .btn-small:hover {
  background: #9a4a6a;
}

/* Grids */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pattern-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  text-align: center;
}

.pattern-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.pattern-card h3 {
  margin: 1rem 0 0.5rem;
  color: #b05b7f;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: white;
  margin-bottom: 0.5rem;
}

.beginner { background: #4a9b7f; }
.intermediate { background: #b05b7f; }

/* Main Layout */
main {
  margin-top: 80px;
  min-height: calc(100vh - 160px);
  padding: 2rem 0;
}

h1, h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #b05b7f;
}

/* Tutorial Layout */
.tutorial-list {
  max-width: 1000px;
  margin: 0 auto;
}

.tutorial-item {
  display: flex;
  gap: 1.5rem;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.tutorial-item img {
  width: 150px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

/* Yarn Guide */
table {
  width: 80%;
  margin: 1rem auto;
  border-collapse: collapse;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 10px;
  text-align: center;
}

/* Community */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.submit-form {
  max-width: 500px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.submit-form input {
  width: 100%;
  margin-bottom: 1rem;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/* Testimonial */
.testimonial {
  text-align: center;
  font-style: italic;
  padding: 2rem;
  background: #f0d9c5;
  color: #604030;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: #b05b7f;
  color: white;
}

footer .socials {
  margin-top: 1rem;
}

footer a {
  color: #fffaf3;
  margin: 0 10px;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #fffaf3;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 0;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}