/* MapleKitchen - Warm Paper & Ink Theme */

:root {
  --parchment: #F7F3E9;
  --ink: #2D2D2B;
  --brick: #C07A53;
  --olive: #9E9B6D;
  --shadow: #6B6B66;
  --border: #E8E1D7;
  --white: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Parchment Texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.015) 2px, rgba(0,0,0,0.015) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.015) 2px, rgba(0,0,0,0.015) 4px);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--brick);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--ink);
}

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(158, 155, 109, 0.2);
}

/* Header */
header {
  background: linear-gradient(135deg, var(--parchment) 0%, rgba(247, 243, 233, 0.95) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 1.75rem;
  color: var(--brick);
  font-weight: 700;
}

.logo span {
  color: var(--olive);
  font-weight: 400;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav a {
  color: var(--ink);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.18s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brick);
  transition: width 0.2s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* Mobile Menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--ink);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(192, 122, 83, 0.15) 0%, rgba(158, 155, 109, 0.1) 100%),
              url('../imgs/fresh_kitchen_ingredients_preparation_cooking_wooden_table.jpg') center/cover;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(247, 243, 233, 0.6), rgba(247, 243, 233, 0.8));
}

.hero-content {
  position: relative;
  max-width: 700px;
  z-index: 1;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--brick);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(192, 122, 83, 0.3);
}

.btn:hover {
  background: #B06843;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 122, 83, 0.4);
  color: var(--white);
}

.btn:active {
  transform: translateY(0);
}

/* Sections */
section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.section-title p {
  color: var(--shadow);
  font-size: 1.15rem;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brick);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--shadow);
  font-size: 1rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-size: 1.35rem;
}

.card-content p {
  color: var(--shadow);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(192, 122, 83, 0.1);
  color: var(--brick);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Advantages Grid */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.advantage-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.18s ease;
  text-align: center;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.advantage-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  padding: 15px;
  background: rgba(192, 122, 83, 0.1);
  border-radius: 50%;
}

.advantage-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--brick);
  fill: none;
}

.advantage-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.advantage-card p {
  color: var(--shadow);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background: var(--white);
  padding: 2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 4rem;
  color: rgba(192, 122, 83, 0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  color: var(--shadow);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--brick);
}

.testimonial-location {
  font-size: 0.9rem;
  color: var(--shadow);
}

/* Categories Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.category-link {
  display: block;
  background: var(--white);
  padding: 1.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.18s ease;
}

.category-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--brick);
}

.category-link h3 {
  color: var(--ink);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.category-link p {
  color: var(--shadow);
  font-size: 0.9rem;
  margin: 0;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--brick) 0%, #A06543 100%);
  color: var(--white);
  padding: 4rem 2rem;
  border-radius: 14px;
  text-align: center;
  margin: 4rem auto;
  max-width: 1280px;
}

.newsletter h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.newsletter p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}

.newsletter-form input:focus {
  outline: 2px solid var(--olive);
}

.newsletter-form button {
  padding: 0.9rem 2rem;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.newsletter-form button:hover {
  background: var(--shadow);
  transform: translateY(-2px);
}

.newsletter-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  display: none;
}

.newsletter-message.success {
  background: rgba(255, 255, 255, 0.2);
  display: block;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--ink) 0%, var(--shadow) 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 4rem 2rem 2rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.18s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Category Page Header */
.category-hero {
  background: linear-gradient(135deg, var(--parchment) 0%, rgba(158, 155, 109, 0.2) 100%);
  padding: 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.category-hero h1 {
  font-size: 3rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.category-hero p {
  font-size: 1.2rem;
  color: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--brick);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.18s ease;
  z-index: 999;
}

.back-to-top:hover {
  background: #B06843;
  transform: translateY(-4px);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--parchment);
    padding: 5rem 2rem 2rem;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  nav.active {
    left: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  nav a {
    font-size: 1.2rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .newsletter-form input {
    min-width: 100%;
  }
  
  .category-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 1rem;
  }
  
  .hero {
    min-height: 400px;
    padding: 3rem 1rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
  }
}
