/* =============================================================
   AMYTEA — Ghid de Preparare (Master Editorial v3)
   Preserves the beloved teapot background image in the hero,
   eliminates all awkward spacing, floating stickers, and broken alignments.
   Tokens: tokens.css  |  Components: components.css
   ============================================================= */

/* ── Page Base ──────────────────────────────────────────────── */
.brewing-guide {
  position: relative;
  min-height: 100vh;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

.brewing-guide .reveal {
  opacity: 1;
  transform: none;
}

/* ── Shared Kicker Tagline ───────────────────────────────────── */
.guide-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.guide-kicker::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 1px;
  background-color: var(--color-primary);
  opacity: 0.6;
}


/* ══════════════════════════════════════════════════════════════
   1. HERO SECTION — Preserving the atmospheric teapot background
   (USER LOVES THIS HERO BACKGROUND IMAGE!)
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: calc(72px + var(--space-8));
  padding-bottom: var(--space-12);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 240, 228, 0.65) 0%, transparent 55%),
    linear-gradient(180deg, var(--color-surface) 0%, #FFF5EB 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-light);
}

/* Teapot Background Image Layer — right blended placement */
.hero-bg-image {
  position: absolute;
  top: 0;
  right: -2%;
  width: 58%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%);
}

/* Hero Content Layer */
.brewing-guide__hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

.brewing-guide__hero-copy {
  max-width: 580px;
}

/* Clean, un-indented Hero Headline */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: var(--weight-bold);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--color-primary-dark);
  margin: 0 0 var(--space-6);
}

.hero-title em {
  font-style: italic;
  font-weight: var(--weight-light);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 520px;
}

/* Hero Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.hero-actions .btn {
  text-transform: none;
  padding: 16px var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-spring);
}

.hero-actions .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(100, 38, 111, 0.22);
}

.hero-actions .btn--ghost {
  border-color: var(--color-primary-15);
  color: var(--color-primary);
}

.hero-actions .btn--ghost:hover {
  background-color: rgba(100, 38, 111, 0.04);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* Sleek Temperature Scale Card inside Hero Copy */
.hero-temp-scale {
  max-width: 480px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(26, 18, 9, 0.06);
}

.hero-temp-scale__bar {
  position: relative;
  height: 6px;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  overflow: visible;
}

.hero-temp-scale__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #2D6A3F 0%, #C4A882 45%, #D95F2B 100%);
}

.hero-temp-scale__markers {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
}

.hero-temp-scale__marker {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-surface-raised);
  border: 2px solid var(--color-primary);
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.hero-temp-scale__labels {
  display: flex;
  justify-content: space-between;
}

.hero-temp-scale__label {
  text-align: center;
}

.hero-temp-scale__label strong {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: 1.2;
}

.hero-temp-scale__label span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}


/* ══════════════════════════════════════════════════════════════
   2. STICKY TABLE OF CONTENTS (Nav Pills Bar)
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__toc {
  position: sticky;
  top: 72px;
  z-index: var(--z-sticky);
  background: rgba(255, 249, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.brewing-guide__toc .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
}

.brewing-guide__toc .container::-webkit-scrollbar {
  display: none;
}

.brewing-guide__toc a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px var(--space-5);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.brewing-guide__toc a:hover,
.brewing-guide__toc a.is-active {
  color: var(--color-primary);
  background-color: var(--color-primary-tint);
  font-weight: var(--weight-semibold);
}


/* ══════════════════════════════════════════════════════════════
   3. SECTION 1: QUICK GUIDE (Ghid pe sortimente)
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__quick {
  padding-block: var(--space-20);
  background-color: var(--color-surface);
}

.brewing-guide__header {
  max-width: 680px;
  margin-bottom: var(--space-12);
}

.brewing-guide__header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.8vw, 3rem);
  font-weight: var(--weight-bold);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}

.brewing-guide__header p {
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0;
}

/* 4 Uniform Cards Grid */
.brew-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: var(--max-width);
  margin-inline: auto;
  align-items: stretch;
  position: relative;
}

/* Connecting line between cards */
.brew-guide-grid::before {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(var(--space-6) + 18px);
  right: calc(var(--space-6) + 18px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-tint), var(--color-primary-15), var(--color-primary-tint));
  z-index: 0;
}

.brew-guide-card {
  background-color: var(--color-surface-raised);
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.brew-guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.brew-guide-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.brew-guide-card__index {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  color: var(--color-accent);
}

.brew-guide-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-tint), var(--color-accent-tint));
  font-size: 1.5rem;
  line-height: 1;
}

.brew-guide-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  line-height: 1.2;
}

.brew-guide-card p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-6);
  flex: 1;
}

/* Specs Inner Grid */
.brew-guide-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  background-color: var(--color-surface-sunken);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.brew-guide-card__spec {
  display: flex;
  flex-direction: column;
}

.brew-guide-card__spec strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-primary-dark);
}

.brew-guide-card__spec span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.brew-guide-card__temp-bar {
  height: 4px;
  background-color: rgba(0,0,0,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.brew-guide-card__temp-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

/* Category Accent Lines */
.brew-guide-card--green  .brew-guide-card__temp-fill { background-color: #2D6A3F; width: 35%; }
.brew-guide-card--black  .brew-guide-card__temp-fill { background-color: #3D2010; width: 90%; }
.brew-guide-card--herbal .brew-guide-card__temp-fill { background-color: #8B5E83; width: 95%; }
.brew-guide-card--white  .brew-guide-card__temp-fill { background-color: #C4A882; width: 45%; }


/* ══════════════════════════════════════════════════════════════
   4. SECTION 2: WATER & TEMPERATURE (Editorial Split)
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__water {
  padding-block: var(--space-20);
  background-color: var(--color-surface-raised);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.brewing-guide__split {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: center;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

.brewing-guide__detail-media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(26, 18, 9, 0.12);
  aspect-ratio: 4 / 5;
}

.brewing-guide__detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brewing-guide__detail-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: var(--weight-bold);
  line-height: 1.12;
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

.brewing-guide__detail-copy > p {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

/* Feature List (Clean Blocks, NOT bulky rounded beige boxes!) */
.brewing-guide__checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-4);
}

.brewing-guide__checklist li {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background-color: var(--color-surface-sunken);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  align-items: flex-start;
}

.brewing-guide__checklist-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--color-surface-raised);
  color: var(--color-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brewing-guide__checklist li strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.brewing-guide__checklist li span {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}


/* ══════════════════════════════════════════════════════════════
   5. SECTION 3: RITUAL STEPS (4 Progressive Cards Grid)
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__steps {
  padding-block: var(--space-20);
  background-color: var(--color-surface);
}

.brew-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: var(--max-width);
  margin-inline: auto;
  align-items: stretch;
  position: relative;
}

/* Connecting line between steps */
.brew-steps-grid::before {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(var(--space-6) + 18px);
  right: calc(var(--space-6) + 18px);
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-tint), var(--color-primary-15), var(--color-primary-tint));
  z-index: 0;
}

.brew-step-card {
  position: relative;
  background-color: var(--color-surface-raised);
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  z-index: 1;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.brew-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.brew-step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 16px var(--color-primary-22);
}

.brew-step-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin: 0 0 var(--space-3);
  line-height: 1.25;
}

.brew-step-card p {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}


/* ══════════════════════════════════════════════════════════════
   6. SECTION 4: DIAGNOSTIC & REMEDIES
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__mistakes {
  padding-block: var(--space-20);
  background-color: var(--color-surface-sunken);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.brewing-guide__mistakes-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--section-pad-x);
}

.brewing-guide__mistakes-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  color: var(--color-text);
  margin: var(--space-3) 0 0;
}

.brewing-guide__mistakes-list {
  display: grid;
  gap: var(--space-4);
}

.mistake-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-surface-raised);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.mistake-card--bitter { border-left-color: var(--color-accent); }
.mistake-card--weak   { border-left-color: var(--color-green); }
.mistake-card--flat   { border-left-color: var(--color-herbal); }

.mistake-card__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.mistake-card__label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 2px;
}

.mistake-card__solution {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}


/* ══════════════════════════════════════════════════════════════
   7. SIGNATURE CLOSING CTA
   ══════════════════════════════════════════════════════════════ */
.brewing-guide__cta {
  padding-block: var(--space-20);
  background-color: var(--color-surface);
}

.brewing-guide__cta-inner {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-14) var(--space-10);
  box-shadow: 0 12px 40px var(--color-shadow);
}

.brewing-guide__cta-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: var(--weight-bold);
  line-height: 1.15;
  color: var(--color-primary-dark);
  margin: var(--space-3) 0 var(--space-4);
}

.brewing-guide__cta-copy p {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.brewing-guide__cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.brewing-guide__cta-actions .btn {
  text-transform: none;
  padding: 16px var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-spring);
}

.brewing-guide__cta-actions .btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 95, 43, 0.3);
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE LAYOUT
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .brew-guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brew-guide-grid::before {
    display: none;
  }

  .brew-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brew-steps-grid::before {
    display: none;
  }

  .hero-bg-image {
    width: 50%;
    right: -10%;
  }

  .brewing-guide__split {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .brewing-guide__detail-media {
    max-width: 480px;
    margin-inline: auto;
  }

  .brewing-guide__mistakes-panel {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 768px) {
  .brewing-guide__hero {
    min-height: auto;
    padding-top: calc(72px + var(--space-8));
    padding-bottom: var(--space-12);
  }

  .hero-bg-image {
    position: absolute;
    width: 100%;
    right: 0;
    height: 45%;
    top: 0;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);
  }

  .brewing-guide__hero-copy {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .brew-guide-grid {
    grid-template-columns: 1fr;
  }

  .brew-steps-grid {
    grid-template-columns: 1fr;
  }

  .brewing-guide__cta-inner {
    padding: var(--space-8) var(--space-5);
  }

  .brewing-guide__cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .brewing-guide__cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
