/* ─── Guides Page ────────────────────────────────────────────
   Blog-style card grid. 3 cols desktop · 2 cols tablet · 1 col mobile.
   Paginated at 6 cards per page.
   ─────────────────────────────────────────────────────────── */

:root {
  --g-teal:        #065f46;
  --g-teal-mid:    #047857;
  --g-teal-light:  #d1fae5;
  --g-teal-pale:   #ecfdf5;
  --g-teal-border: #a7f3d0;
  --g-ink:         #1e293b;
  --g-muted:       #475569;
  --g-faint:       #94a3b8;
  --g-border:      #e2e8f0;
  --g-warm-bg:     #f8fafc;
  --g-ease:        cubic-bezier(0.23, 1, 0.32, 1);
}

body.guides-v2 {
  background: var(--g-warm-bg);
  color: var(--g-ink);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes gFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.g-hero {
  background: #fff;
  border-bottom: 1px solid var(--g-border);
  padding: clamp(40px, 6vw, 64px) clamp(20px, 4vw, 32px) clamp(36px, 5vw, 52px);
  position: relative;
  overflow: hidden;
}
.g-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 380px 280px at 98% -10%, #c6f0e0 0%, transparent 65%);
  pointer-events: none;
}
.g-hero-geo {
  position: absolute;
  top: 50%;
  right: clamp(-20px, -2vw, 0px);
  transform: translateY(-50%);
  opacity: 0.055;
  width: clamp(140px, 22vw, 200px);
  height: clamp(140px, 22vw, 200px);
  pointer-events: none;
}
.g-hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  animation: gFadeUp 0.38s var(--g-ease) both;
}
.g-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--g-muted);
  margin-bottom: 18px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}
.g-breadcrumb a { color: var(--g-teal-mid); text-decoration: none; transition: opacity 150ms; }
.g-breadcrumb a:hover { opacity: 0.7; }
.g-breadcrumb-sep { color: var(--g-border); }

.g-hero-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--g-ink);
  margin-bottom: 14px;
}
.g-hero-sub {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: var(--g-muted);
  line-height: 1.65;
  max-width: 500px;
}
.g-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.g-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--g-teal-light);
  color: var(--g-teal);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 100px;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* ── Page wrap ─────────────────────────────────────────────── */
.gb-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 52px) clamp(20px, 4vw, 40px) clamp(64px, 8vw, 96px);
  animation: gFadeUp 0.38s var(--g-ease) 0.08s both;
}

/* Section label */
.g-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--g-teal-mid);
  margin-bottom: 24px;
}
.g-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--g-border);
}

/* ── Card grid ─────────────────────────────────────────────── */
.gb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ── Individual card ───────────────────────────────────────── */
.gb-card {
  background: #fff;
  border: 1px solid var(--g-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 220ms var(--g-ease), transform 220ms var(--g-ease);
  cursor: pointer;
}
.gb-card:hover {
  box-shadow: 0 8px 32px rgba(6, 95, 70, 0.1);
  transform: translateY(-3px);
}
.gb-card--soon {
  cursor: default;
  pointer-events: none;
  opacity: 0.72;
}
.gb-card--soon:hover {
  box-shadow: none;
  transform: none;
}

.gb-inner {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.gb-inner--soon {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card cover image area */
.gb-cover {
  position: relative;
  height: 172px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gb-cover--1 {
  background: linear-gradient(145deg, #ecfdf5 0%, #a7f3d0 100%);
  color: #065f46;
}
.gb-cover--2 {
  background: linear-gradient(145deg, #d1fae5 0%, #6ee7b7 100%);
  color: #047857;
}
.gb-cover--3 {
  background: linear-gradient(145deg, #f0fdf4 0%, #86efac 100%);
  color: #166534;
}
.gb-cover--4 {
  background: linear-gradient(145deg, #dcfce7 0%, #4ade80 100%);
  color: #14532d;
}
.gb-cover--5 {
  background: linear-gradient(145deg, #d1fae5 0%, #6ee7b7 100%);
  color: #065f46;
}
.gb-cover--6 {
  background: linear-gradient(145deg, #ecfdf5 0%, #34d399 100%);
  color: #065f46;
}
.gb-cover--7 {
  background: linear-gradient(145deg, #dcfce7 0%, #4ade80 100%);
  color: #14532d;
}
.gb-cover--8 {
  background: linear-gradient(145deg, #f0fdf4 0%, #86efac 100%);
  color: #166534;
}
.gb-cover--soon {
  background: #f1f5f9;
  color: var(--g-faint);
}

/* Geometric motif behind icon */
.gb-cover-geo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
  pointer-events: none;
}
.gb-cover-icon {
  position: relative;
  z-index: 1;
  opacity: 0.8;
}

/* Category tag on cover */
.gb-cover-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.85);
  color: var(--g-teal);
  padding: 3px 10px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.gb-cover-tag--soon {
  color: var(--g-faint);
}

/* Hover: icon lift */
.gb-card:hover .gb-cover-icon {
  transform: translateY(-4px);
  transition: transform 250ms var(--g-ease);
}

/* Card body */
.gb-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.25rem 1rem;
}

.gb-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--g-ink);
  margin-bottom: 0.55rem;
  letter-spacing: -0.012em;
  transition: color 150ms ease-out;
}
.gb-card:hover .gb-title { color: var(--g-teal); }
.gb-title--soon { color: var(--g-faint); }

.gb-excerpt {
  font-size: 0.875rem;
  color: var(--g-muted);
  line-height: 1.65;
  margin-bottom: 1.1rem;
  flex: 1;
}
.gb-excerpt--muted { color: var(--g-faint); }

/* Card footer */
.gb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--g-border);
}
.gb-meta {
  font-size: 0.72rem;
  color: var(--g-faint);
  white-space: nowrap;
}

/* "Read More" button */
.gb-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--g-teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 150ms ease-out;
  flex-shrink: 0;
}
.gb-card:hover .gb-read-btn { background: var(--g-teal-mid); }

/* ── Pagination ─────────────────────────────────────────────── */
.gb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.5rem 0 2.5rem;
  padding: 1rem 0;
}
.gb-pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--g-border);
  color: var(--g-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms, color 150ms, background 150ms;
}
.gb-pg-btn:hover:not(:disabled) {
  border-color: var(--g-teal-mid);
  color: var(--g-teal-mid);
  background: var(--g-teal-pale);
}
.gb-pg-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.gb-pg-nums {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gb-pg-num {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--g-border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--g-muted);
  cursor: pointer;
  transition: all 150ms ease-out;
}
.gb-pg-num:hover:not(.gb-pg-num--active) {
  border-color: var(--g-teal-mid);
  color: var(--g-teal-mid);
}
.gb-pg-num--active {
  background: var(--g-teal);
  border-color: var(--g-teal);
  color: #fff;
  cursor: default;
}

/* ── CTA strip ─────────────────────────────────────────────── */
.g-cta-strip {
  padding: clamp(18px, 3vw, 24px) clamp(20px, 3vw, 28px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--g-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.g-cta-text {
  font-size: 0.9rem;
  color: var(--g-muted);
  line-height: 1.6;
  flex: 1;
  min-width: 0;
}
.g-cta-text strong { font-weight: 600; color: var(--g-ink); }
.g-cta-text a { color: var(--g-teal-mid); text-decoration: none; font-weight: 500; }
.g-cta-text a:hover { text-decoration: underline; }
.g-cta-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.g-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--g-teal);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease-out, transform 160ms ease-out;
}
.g-btn-primary:hover  { background: var(--g-teal-mid); }
.g-btn-primary:active { transform: scale(0.97); }
.g-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--g-teal-mid);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 0;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease-out;
}
.g-btn-ghost:hover { color: var(--g-teal); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gb-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .g-hero-geo { opacity: 0.04; width: 160px; height: 160px; }
  .g-cta-strip { flex-direction: column; align-items: flex-start; gap: 14px; }
  .g-cta-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .gb-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .gb-cover { height: 140px; }
  .gb-title { font-size: 0.95rem; }
  .gb-excerpt { font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .gb-grid { grid-template-columns: 1fr; gap: 1rem; }
  .gb-cover { height: 180px; }
  .g-cta-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .g-btn-primary, .g-btn-ghost {
    justify-content: center;
    padding: 12px 18px;
    border-radius: 8px;
  }
  .g-btn-ghost { border: 1px solid var(--g-border); }
}

@media (max-width: 380px) {
  .g-hero { padding: 32px 16px 28px; }
  .g-hero-heading { font-size: 1.6rem; }
  .gb-wrap { padding: 28px 16px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .g-hero-inner, .gb-wrap, .gb-card, .gb-cover-icon {
    animation: none !important;
    transition: none !important;
  }
}
