/* ═══════════════════════════════════════════════════════
   DOBRZETATO — Guide Page Styles
   Extends base style.css tokens
   ═══════════════════════════════════════════════════════ */

/* ── GUIDE HERO ────────────────────────────────────── */
.guide-hero {
  position: relative;
  min-height: 72vh;
  max-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.guide-hero-img {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  filter: brightness(0.42);
  transition: transform 0.7s var(--ease);
}
.guide-hero:hover .guide-hero-img { transform: scale(1.02); }
.guide-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 60%, transparent 100%),
    linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  pointer-events: none;
}
.guide-hero-content {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: 3rem 1.75rem 3.5rem;
  width: 100%;
  color: #f0f0f5;
}
.guide-hero-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.guide-hero-kicker-line {
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}
.guide-hero-kicker-txt { color: rgba(255,255,255,0.45); }
.guide-hero-kicker-em  { color: var(--accent); }

.guide-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: #f5f5f0;
  margin: 0 0 1.2rem;
  max-width: 700px;
}
.guide-hero h1 em {
  color: var(--accent);
  font-style: normal;
}
.guide-hero-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,0.58);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 0 2rem;
}

.guide-hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.guide-hero-stat { display: flex; flex-direction: column; gap: 0.1rem; }
.guide-hero-stat-num {
  font-family: var(--font-sans);
  font-size: 1.3rem; font-weight: 700;
  color: #f5f5f0; letter-spacing: -0.02em;
}
.guide-hero-stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.56rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.guide-hero-stat-sep {
  width: 1px; height: 1.8rem;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── FILTER BAR ───────────────────────────────────── */
.guide-filter-bar {
  position: sticky;
  top: 60px;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border-solid);
  padding: 0;
  transition: background 0.3s ease;
}
.guide-filter-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 52px;
}
.guide-filter-inner::-webkit-scrollbar { display: none; }

.guide-filter-btn {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
  position: relative;
}
.guide-filter-btn:hover { color: var(--text); background: var(--surface); }
.guide-filter-btn.active {
  color: var(--accent);
  background: var(--accent-light);
}
.guide-filter-btn .filter-count {
  font-size: 0.6rem;
  margin-left: 0.2rem;
  opacity: 0.5;
}

.guide-filter-sep {
  width: 1px; height: 24px;
  background: var(--border-solid);
  flex-shrink: 0;
  margin: 0 0.35rem;
}

/* Age filter pills */
.guide-age-pills {
  display: flex; gap: 0.25rem; margin-left: auto; flex-shrink: 0;
}
.guide-age-pill {
  border: 1px solid var(--border-solid);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.3rem 0.65rem;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.guide-age-pill:hover { color: var(--accent); border-color: var(--accent); }
.guide-age-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── GUIDE MAIN ───────────────────────────────────── */
.guide-main {
  max-width: 1180px; margin: 0 auto;
  padding: 2.5rem 1.75rem 5rem;
}

/* Section dividers */
.guide-section {
  margin-bottom: 3.5rem;
}
.guide-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-solid);
}
.guide-section-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.guide-section-icon--chem { background: rgba(45,125,154,0.1); }
.guide-section-icon--phys { background: rgba(139,92,246,0.1); }
.guide-section-icon--sens { background: rgba(217,119,6,0.1); }
.guide-section-icon--bio  { background: rgba(22,163,74,0.1); }

[data-theme="dark"] .guide-section-icon--chem { background: rgba(45,125,154,0.18); }
[data-theme="dark"] .guide-section-icon--phys { background: rgba(139,92,246,0.18); }
[data-theme="dark"] .guide-section-icon--sens { background: rgba(217,119,6,0.18); }
[data-theme="dark"] .guide-section-icon--bio  { background: rgba(22,163,74,0.18); }

.guide-section-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
  margin: 0;
}
.guide-section-count {
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-left: auto;
  text-transform: uppercase;
}

/* ── EXPERIMENT GRID ──────────────────────────────── */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* ── EXPERIMENT CARD ──────────────────────────────── */
.exp-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  cursor: default;
}
.exp-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* Card image */
.exp-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}
.exp-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease);
}
.exp-card:hover .exp-card-image img { transform: scale(1.05); }

.exp-card-badges {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  display: flex; gap: 0.35rem;
  z-index: 2;
}
.exp-badge {
  font-size: 0.55rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.exp-badge--cat {
  background: var(--accent);
  color: #fff;
}
.exp-badge--age {
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.9);
}
.exp-badge--diff {
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.9);
}

.exp-card-img-source {
  position: absolute;
  bottom: 0.5rem; right: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.4);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Card body */
.exp-card-body {
  padding: 1.25rem 1.35rem 1.35rem;
}
.exp-card-meta {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.65rem; font-weight: 500;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}
.exp-card-meta-sep { opacity: 0.4; }

.exp-card-title {
  font-family: var(--font-sans);
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--heading);
  margin-bottom: 0.6rem;
}

.exp-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* Ingredients */
.exp-ingredients {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  margin-bottom: 1rem;
  list-style: none;
}
.exp-ingredients li {
  font-size: 0.7rem; font-weight: 500;
  padding: 0.22rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: 100px;
  color: var(--muted);
  white-space: nowrap;
}

/* Expandable steps */
.exp-toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.78rem; font-weight: 600;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.exp-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.exp-toggle-arrow {
  transition: transform 0.25s var(--ease);
  color: var(--muted);
  flex-shrink: 0;
}
.exp-card.open .exp-toggle-arrow { transform: rotate(180deg); }
.exp-card.open .exp-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--accent);
  color: var(--accent);
}

.exp-detail {
  display: none;
  border: 1px solid var(--border-solid);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 1.15rem;
  background: var(--surface);
  margin-top: -1px;
}
.exp-card.open .exp-detail {
  display: block;
  animation: slideDown 0.3s var(--ease);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.exp-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 1rem;
}
.exp-steps li {
  counter-increment: step;
  display: flex; gap: 0.8rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
}
.exp-steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.65rem; font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.exp-science {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
}
.exp-science strong {
  color: var(--accent);
  font-weight: 700;
}

/* ── FEATURED CARD (spans full width) ─────────────── */
.exp-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 50% 50%;
}
.exp-card--featured .exp-card-image {
  aspect-ratio: unset;
  height: 100%;
  min-height: 340px;
}
.exp-card--featured .exp-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border-solid);
}
.exp-card--featured .exp-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.exp-card--featured .exp-card-desc {
  font-size: 0.9rem;
}

/* ── IMAGE SOURCE LABELS ──────────────────────────── */
.img-src-label {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.img-src-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.img-src-dot--ai      { background: #e05a2b; }
.img-src-dot--unsplash { background: #2d7d9a; }
.img-src-dot--picsum   { background: #8b5cf6; }

/* ── RESOURCES SECTION ────────────────────────────── */
.guide-resources {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-solid);
}
.guide-resources-title {
  font-family: var(--font-sans);
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--heading);
  margin-bottom: 1.25rem;
}
.guide-resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.guide-resource-card {
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.guide-resource-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.guide-resource-card h4 {
  font-size: 0.88rem; font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.3rem;
}
.guide-resource-card h4 a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.guide-resource-card h4 a:hover { opacity: 0.75; }
.guide-resource-card p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── SAFETY TIP BOX ───────────────────────────────── */
.guide-safety {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.guide-safety-title {
  font-family: var(--font-sans);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.guide-safety ul {
  list-style: none; padding: 0; margin: 0;
}
.guide-safety li {
  font-size: 0.85rem;
  color: var(--text);
  padding: 0.2rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.6;
}
.guide-safety li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ── DIFFICULTY DOTS ──────────────────────────────── */
.difficulty-dots {
  display: inline-flex; gap: 3px; align-items: center;
}
.difficulty-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-solid);
}
.difficulty-dot.filled { background: var(--accent); }

/* ── NO RESULTS ───────────────────────────────────── */
.guide-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  grid-column: 1 / -1;
}
.guide-empty p { font-size: 0.95rem; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
  .exp-grid { grid-template-columns: 1fr; }
  .exp-card--featured { grid-template-columns: 1fr; }
  .exp-card--featured .exp-card-image {
    height: 220px; min-height: unset;
  }
  .exp-card--featured .exp-card-body {
    border-left: none; border-top: 1px solid var(--border-solid);
    padding: 1.35rem;
  }
  .guide-resources-grid { grid-template-columns: 1fr 1fr; }
  .guide-hero { min-height: 56vh; }
}
@media (max-width: 600px) {
  .guide-filter-inner { padding: 0 1.2rem; }
  .guide-age-pills { display: none; }
  .guide-hero-stats { display: none; }
  .guide-hero h1 { font-size: 2.2rem; }
  .guide-resources-grid { grid-template-columns: 1fr; }
  .guide-hero-content { padding: 2rem 1.2rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .exp-card, .exp-card-image img,
  .guide-hero-img, .guide-resource-card { transition: none !important; }
  .exp-card:hover { transform: none; }
  .exp-card:hover .exp-card-image img { transform: none; }
}
