/* ============================================================
   madushka.com — guides styles (/guides listing + article pages)
   Builds on the design tokens defined in css/style.css
   ============================================================ */

/* ---------- Listing filters (reuse gallery chip look) ---------- */
.guides-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.guides-filters .filter-chip {
  font-family: var(--font-ui);
  cursor: pointer;
  color: var(--text-soft);
}
.guides-filters .filter-chip:hover { color: var(--text); }
.guides-filters .filter-chip.active {
  color: #fff;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(96, 111, 248, .35);
}

/* ---------- Guides grid ---------- */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  transition: opacity .2s ease;
}
.guides-grid.grid-fading { opacity: 0; }
@media (max-width: 720px) {
  .guides-grid { grid-template-columns: 1fr; }
}

.guide-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-hover);
}
.guide-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.guide-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: var(--glass-fill-soft);
}
.guide-card-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guide-card-cover-grad {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(10, 132, 255, .55), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(191, 90, 242, .5), transparent 50%),
    linear-gradient(135deg, #1a2744, #2a1a3a);
}
html.dark .guide-card-cover-grad {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(10, 132, 255, .4), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(191, 90, 242, .35), transparent 50%),
    linear-gradient(135deg, #0d1220, #1a0f24);
}

.guide-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 4px 14px rgba(96, 111, 248, .4);
}

.guide-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px 12px;
}
.guide-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.guide-tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-grad-soft);
  border: 1px solid var(--glass-border);
}
.guide-card-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.3;
}
.guide-card-desc {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guide-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}
.guide-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-soft);
  opacity: .7;
}

.guides-empty {
  text-align: center;
  padding: 48px 28px;
  border-radius: var(--radius-xl);
  color: var(--text-soft);
  font-weight: 600;
}
.guides-empty svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  display: block;
  opacity: .55;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-in { animation: card-in .45s ease both; }

/* ---------- Article page ---------- */
.guide-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 650;
  font-size: 14px;
  transition: color .2s, background .2s;
}
.guide-back:hover {
  color: var(--text);
  background: var(--glass-fill-soft);
}
.guide-back svg { width: 16px; height: 16px; }

.guide-article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-xl);
}

.guide-article-header { margin-bottom: 28px; }
.guide-article-header .guide-card-tags { margin-bottom: 14px; }
.guide-article-header h1 {
  font-size: clamp(28px, 4.8vw, 42px);
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.18;
  margin-bottom: 12px;
}
.guide-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

/* YouTube embed */
.guide-video {
  margin: 0 0 32px;
}
.guide-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.guide-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Prose */
.guide-prose {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
}
.guide-prose > * + * { margin-top: 1.15em; }
.guide-prose h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  letter-spacing: -.3px;
  margin-top: 2em;
  margin-bottom: .5em;
  line-height: 1.25;
}
.guide-prose h3 {
  font-size: 18.5px;
  font-weight: 750;
  margin-top: 1.6em;
  margin-bottom: .4em;
}
.guide-prose p { color: var(--text); }
.guide-prose a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-prose ul, .guide-prose ol {
  padding-left: 1.35em;
  color: var(--text);
}
.guide-prose li + li { margin-top: .4em; }
.guide-prose strong { font-weight: 700; }
.guide-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .88em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--glass-fill-soft);
  border: 1px solid var(--glass-border);
}

/* Images inside articles */
.guide-prose img {
  max-width: 100%;
  height: auto;
}
.guide-figure {
  margin: 1.6em 0;
}
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  background: var(--glass-fill-soft);
}
.guide-figure figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
}

.guide-pre {
  position: relative;
  margin: 1.4em 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--glass-fill-soft);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  overflow-x: auto;
}
.guide-pre pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.guide-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill-strong);
  color: var(--text-soft);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.guide-copy-btn:hover { color: var(--text); }
.guide-copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.guide-tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 1.5em 0;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-grad-soft);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.guide-tip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #fff;
}
.guide-tip-icon svg { width: 15px; height: 15px; }
.guide-tip-body { flex: 1; min-width: 0; }
.guide-tip-body strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 4px;
}
.guide-tip-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
}

.guide-example {
  margin: 1.5em 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--glass-fill-soft);
  border: 1px solid var(--glass-border);
}
.guide-example h3 { margin-top: 0 !important; }
.guide-example .label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* More / prev-next */
#guide-more { margin-top: 40px; }
.guide-more-cta {
  text-align: center;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-xl);
}
.guide-more-cta p {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 18px;
  color: var(--text-soft);
}
.guide-nav-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .guide-nav-row { grid-template-columns: 1fr; }
}
.guide-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.guide-nav-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}
.guide-nav-next { text-align: right; }
.guide-nav-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.guide-nav-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
}
.guide-nav-spacer { display: block; }

/* ---------- Home teaser ---------- */
.guides-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(24px, 4vw, 32px) clamp(24px, 4vw, 36px);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.guides-teaser:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}
.guides-teaser-copy { flex: 1; min-width: 200px; }
.guides-teaser-copy .eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-grad-soft);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  margin-bottom: 10px;
}
.guides-teaser-copy h3 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  margin-bottom: 6px;
}
.guides-teaser-copy p {
  color: var(--text-soft);
  font-size: 15px;
  max-width: 480px;
}
.guides-teaser .btn { flex-shrink: 0; }
