/* How It's Made Page */
.how-made-page {
  margin-top: 100px;
  padding: 3rem 0 5rem;
  min-height: 80vh;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.page-header .page-title {
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--dark);
  margin-bottom: 1rem;
  font-family: Georgia, serif;
}

.page-header .page-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.play-btn {
  position: absolute;
  top: 0;
  right: 2rem;
  padding: 1rem 2rem;
  background: #bfa27a;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.play-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Step Navigation */
.step-nav {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  color: var(--dark);
  text-align: center;
}

.step-tab:hover {
  border-color: var(--primary);
  background: #f9f9f9;
}

.step-tab.active {
  background: #bfa27a;
  border-color: #bfa27a;
  color: white;
}

.step-icon {
  font-size: 1.75rem;
}

.step-label {
  font-weight: 500;
  line-height: 1.2;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-bottom: 3rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #bfa27a, var(--primary));
  width: 12.5%;
  transition: width 0.5s ease;
}

/* Step Content Area */
.step-content-area {
  position: relative;
  min-height: 500px;
}

.step-content {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  animation: fadeInUp 0.5s ease;
}

.step-content.active {
  display: grid;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visual Panel */
.visual-panel {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.visual-panel h3 {
  margin-top: 2rem;
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--dark);
  font-family: Georgia, serif;
  padding-top: 1rem;
  border-top: 3px solid #bfa27a;
  width: 80%;
}

.illustration {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Illustration Styles */
.brew-pot {
  position: relative;
  width: 200px;
  height: 200px;
}

.pot-body {
  width: 180px;
  height: 120px;
  background: linear-gradient(135deg, #2c5f2d 0%, #4a8f4d 100%);
  border-radius: 20px;
  position: absolute;
  bottom: 20px;
  left: 10px;
}

.steam {
  width: 40px;
  height: 60px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 70px;
  animation: steamRise 2s infinite;
}

@keyframes steamRise {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-20px); }
}

.tea-bag {
  width: 30px;
  height: 40px;
  background: #8B4513;
  border-radius: 5px;
  position: absolute;
  top: 60px;
  left: 85px;
}

.cooling-tea .tea-container {
  width: 160px;
  height: 140px;
  background: linear-gradient(180deg, #d4a574 0%, #c99456 100%);
  border-radius: 10px;
  position: relative;
}

.temperature-indicator {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scoby-add .jar {
  width: 140px;
  height: 180px;
  background: rgba(211, 165, 116, 0.3);
  border: 4px solid #999;
  border-radius: 10px;
  position: relative;
}

.scoby {
  width: 120px;
  height: 20px;
  background: rgba(255, 245, 220, 0.8);
  border-radius: 50%;
  position: absolute;
  top: 40px;
  left: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.covered-jar .jar-body {
  width: 140px;
  height: 160px;
  background: rgba(211, 165, 116, 0.4);
  border: 4px solid #999;
  border-radius: 10px;
}

.cloth-cover {
  width: 160px;
  height: 8px;
  background: #f5deb3;
  border-radius: 5px;
  margin-top: 5px;
}

.rubber-band {
  width: 150px;
  height: 6px;
  background: #8B4513;
  border-radius: 3px;
  margin-top: 2px;
}

.fermenting .jar-ferment {
  width: 140px;
  height: 180px;
  background: linear-gradient(180deg, rgba(211, 165, 116, 0.2) 0%, rgba(211, 165, 116, 0.5) 100%);
  border: 4px solid #999;
  border-radius: 10px;
  position: relative;
}

.bubbles {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: bubble 3s infinite;
}

@keyframes bubble {
  0% { transform: translate(-50%, 0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-50%, -100px); opacity: 0; }
}

.calendar {
  position: absolute;
  top: -50px;
  background: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: bold;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flavoring .kombucha-base {
  width: 150px;
  height: 100px;
  background: linear-gradient(180deg, #d4a574 0%, #c99456 100%);
  border-radius: 10px;
}

.fruit-pieces {
  font-size: 3rem;
  margin-top: 1rem;
}

.bottling .bottles {
  display: flex;
  gap: 1rem;
}

.bottling .bottles::before,
.bottling .bottles::after {
  content: '';
  width: 40px;
  height: 140px;
  background: linear-gradient(180deg, rgba(139, 69, 19, 0.3), rgba(139, 69, 19, 0.7));
  border-radius: 10px 10px 5px 5px;
}

.carbonation-bubbles {
  position: absolute;
  font-size: 2rem;
  animation: float 2s infinite;
}

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

.final-product .moming-bottle {
  width: 60px;
  height: 160px;
  background: linear-gradient(180deg, rgba(139, 69, 19, 0.4), rgba(139, 69, 19, 0.8));
  border-radius: 15px 15px 5px 5px;
  position: relative;
}

.final-product .moming-bottle::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 25px;
  background: rgba(100, 50, 20, 0.8);
  border-radius: 5px 5px 0 0;
}

.sparkles {
  font-size: 2rem;
  position: absolute;
  animation: sparkle 1.5s infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Text Panel */
.text-panel {
  background: #fafafa;
  border-radius: 20px;
  padding: 3rem;
}

.text-panel h2 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--dark);
  margin-bottom: 1.5rem;
  font-family: Georgia, serif;
}

.text-panel p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .step-nav {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }

  .play-btn {
    position: static;
    margin-top: 1rem;
  }
  
  .step-tab {
    padding: 1rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 900px) {
  .step-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .step-nav {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .visual-panel {
    padding: 2rem;
  }
  
  .text-panel {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .how-made-page {
    margin-top: 80px;
    padding: 2rem 0 4rem;
  }
  
  .page-header .page-title {
    font-size: 2.25rem;
  }
  
  .page-header .page-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .play-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }
  
  .step-nav {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .step-tab {
    padding: 0.875rem 0.5rem;
  }
  
  .step-icon {
    font-size: 1.5rem;
  }
  
  .progress-bar {
    margin-bottom: 2rem;
  }
  
  .visual-panel h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .text-panel h2 {
    font-size: 1.75rem;
  }
  
  .text-panel p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .illustration {
    height: 250px;
  }
}

@media (max-width: 600px) {
  .page-header .page-title {
    font-size: 2rem;
  }

  .step-nav {
    grid-template-columns: 1fr;
  }

  .step-label {
    font-size: 0.9rem;
  }
  
  .step-tab {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }
  
  .step-icon {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .page-header .page-title {
    font-size: 1.75rem;
  }
  
  .page-header .page-subtitle {
    font-size: 0.95rem;
  }
  
  .play-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .visual-panel,
  .text-panel {
    padding: 1.5rem;
  }
  
  .text-panel h2 {
    font-size: 1.5rem;
  }
  
  .text-panel p {
    font-size: 0.95rem;
  }
  
  .illustration {
    height: 220px;
  }
}
