/* =====================================================
   AutoHelp Blog — Styles
   ===================================================== */

/* ── CSS Variables ─────────────────────────────────── */
:root {
  --button-outline: rgba(0,0,0,.10);
  --elevate-1: rgba(0,0,0,.03);
  --elevate-2: rgba(0,0,0,.08);
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(0, 0%, 9%);
  --border: hsl(0, 0%, 91%);
  --card: hsl(0, 0%, 98%);
  --card-foreground: hsl(0, 0%, 9%);
  --card-border: hsl(0, 0%, 94%);
  --primary: hsl(18, 98%, 60%);
  --primary-foreground: hsl(0, 0%, 100%);
  --muted: hsl(18, 5%, 92%);
  --muted-foreground: hsl(0, 0%, 45%);
  --accent: hsl(18, 12%, 93%);
  --accent-foreground: hsl(0, 0%, 9%);
  --input: hsl(0, 0%, 75%);
  --ring: hsl(18, 98%, 60%);
  --radius: 0.5rem;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0px 1px 3px 0px hsl(0 0% 0% / 0.07), 0px 1px 2px -1px hsl(0 0% 0% / 0.05);
  --shadow: 0px 2px 4px 0px hsl(0 0% 0% / 0.08), 0px 1px 2px -1px hsl(0 0% 0% / 0.06);
  --shadow-md: 0px 4px 6px -1px hsl(0 0% 0% / 0.09), 0px 2px 4px -2px hsl(0 0% 0% / 0.06);
  --shadow-lg: 0px 10px 15px -3px hsl(0 0% 0% / 0.09), 0px 4px 6px -4px hsl(0 0% 0% / 0.05);
  --shadow-xl: 0px 20px 25px -5px hsl(0 0% 0% / 0.08), 0px 8px 10px -6px hsl(0 0% 0% / 0.05);
}

[data-theme="dark"] {
  --button-outline: rgba(255,255,255,.10);
  --elevate-1: rgba(255,255,255,.04);
  --elevate-2: rgba(255,255,255,.09);
  --background: hsl(0, 0%, 7%);
  --foreground: hsl(0, 0%, 98%);
  --border: hsl(0, 0%, 15%);
  --card: hsl(0, 0%, 9%);
  --card-foreground: hsl(0, 0%, 98%);
  --card-border: hsl(0, 0%, 12%);
  --primary: hsl(18, 98%, 60%);
  --primary-foreground: hsl(0, 0%, 100%);
  --muted: hsl(18, 5%, 15%);
  --muted-foreground: hsl(0, 0%, 65%);
  --accent: hsl(18, 12%, 14%);
  --accent-foreground: hsl(0, 0%, 98%);
  --input: hsl(0, 0%, 30%);
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s, color 0.2s;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ── Layout ────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px)  { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem;   padding-right: 2rem;   } }

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-sm { padding: 5px 12px; font-size: 0.8125rem; }

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover { background-color: hsl(18, 98%, 53%); border-color: hsl(18, 98%, 53%); }

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border-color: transparent;
}
.btn-ghost:hover { background-color: var(--accent); color: var(--accent-foreground); }

/* ── Header ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsl(0 0% 100% / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s, border-color 0.2s;
}
[data-theme="dark"] .site-header { background-color: hsl(0 0% 7% / 0.95); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 56px;
}
@media (min-width: 640px) { .site-header .container { height: 64px; } }

.header-logo img { height: 32px; width: auto; }
@media (min-width: 640px) { .header-logo img { height: 40px; } }

.header-nav { display: none; align-items: center; gap: 4px; }
@media (min-width: 768px) { .header-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.header-phone {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--foreground);
  transition: color 0.15s;
}
.header-phone:hover { color: var(--primary); }
.header-phone svg { color: var(--primary); }
@media (min-width: 1024px) { .header-phone { display: flex; } }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background-color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.theme-toggle-desktop { display: none; }
@media (min-width: 1024px) { .theme-toggle-desktop { display: inline-flex; } }

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  background-color: hsl(18 5% 92% / 0.2);
}
[data-theme="dark"] .site-footer { background-color: hsl(18 5% 15% / 0.2); }
@media (min-width: 640px) { .site-footer { padding-top: 3.5rem; padding-bottom: 3.5rem; } }

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2.5rem; } }

.footer-grid a > img { max-height: 36px; width: auto; }

.footer-brand-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-top: 1rem;
}
.footer-legal {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  line-height: 1.5;
}
.footer-heading { font-weight: 600; font-size: 0.875rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.8125rem; color: var(--muted-foreground); transition: color 0.15s; }
.footer-links a:hover { color: var(--foreground); }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  transition: color 0.15s;
}
.footer-contact-item:hover { color: var(--foreground); }
.footer-contact-item svg { color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.footer-phone-link { font-weight: 600; color: var(--foreground); }
.footer-phone-link:hover { color: var(--primary); }
.footer-phone-hint { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 2px; margin-left: 24px; }

.footer-socials { display: flex; align-items: center; gap: 12px; margin-top: 1rem; }
.footer-social-link { color: var(--muted-foreground); transition: color 0.15s; }
.footer-social-link:hover { color: var(--primary); }
.footer-social-link svg { width: 20px; height: 20px; }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }

/* ── Section / Blog List ───────────────────────────── */
.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 640px) { .section { padding-top: 5rem; padding-bottom: 5rem; } }

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .section-header { margin-bottom: 3rem; } }

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }

.section-desc { color: var(--muted-foreground); max-width: 36rem; margin-left: auto; margin-right: auto; }

.blog-empty { text-align: center; color: var(--muted-foreground); padding: 3rem 0; }

/* ── Blog Grid & Cards ─────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
@media (max-width: 639px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 24px hsl(18 98% 60% / 0.10);
}
.blog-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--foreground);
  margin: 0;
}
.blog-card-desc {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 4px;
  transition: gap 0.2s;
}
.blog-card-link:hover { gap: 10px; }

/* ── Pagination ────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination-item,
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  border: 1px solid var(--border);
  background-color: var(--background);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.pagination-btn { padding: 0 14px; gap: 6px; }

.pagination-item:hover,
.pagination-btn:hover {
  background-color: var(--accent);
  border-color: var(--primary);
}
.pagination-item.is-active {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  font-weight: 600;
  pointer-events: none;
}
.pagination-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  user-select: none;
}

/* ── Article Layout ────────────────────────────────── */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 32px;
}
.breadcrumb a { color: var(--muted-foreground); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--primary); }

.article-header { margin-bottom: 32px; }
.article-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--foreground);
  margin: 0 0 16px;
}
.article-lead {
  font-size: 1.0625rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin: 0;
  border-left: 3px solid var(--primary);
  padding-left: 16px;
}

/* Article body rich text */
.article-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 40px 0 16px;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 28px 0 12px;
}
.article-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--foreground);
  margin: 0 0 18px;
}
.article-body ul,
.article-body ol {
  margin: 0 0 18px 24px;
  padding: 0;
  line-height: 1.8;
}
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body li { margin-bottom: 8px; font-size: 1rem; }
.article-body strong { font-weight: 600; color: var(--foreground); }
.article-body a { color: var(--primary); text-underline-offset: 2px; }
.article-body a:hover { text-decoration: underline; }

.article-body .info-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

/* Article CTA */
.article-cta-box {
  position: relative;
  overflow: hidden;
  background: hsl(20, 18%, 8%);
  border-radius: 24px;
  padding: 44px 48px;
  margin: 48px 0 32px;
  border: 1px solid rgba(255,255,255,0.07);
}

.article-cta-glow {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, hsla(18, 98%, 60%, 0.16) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.article-cta-glow--right {
  top: auto;
  left: auto;
  bottom: -140px;
  right: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, hsla(18, 98%, 60%, 0.07) 0%, transparent 65%);
}

.article-cta-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: hsla(18, 98%, 60%, 0.12);
  border: 1px solid hsla(18, 98%, 60%, 0.28);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  margin-bottom: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-cta-pulse {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.article-cta-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.28);
  animation: cta-pulse 2s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0; }
}

.article-cta-title {
  position: relative;
  z-index: 1;
  font-size: 2.25rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.article-cta-title span { color: var(--primary); }

.article-cta-text {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  color: rgba(255,255,255,0.58);
  margin: 0 0 28px;
  max-width: 540px;
  line-height: 1.65;
}

.article-cta-chips {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.article-cta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 5px 14px;
  white-space: nowrap;
}
.article-cta-chip svg { flex-shrink: 0; }

.article-cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.article-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 13px 22px;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  line-height: 1;
}
.article-cta-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 22px hsla(18, 98%, 60%, 0.38);
}
.article-cta-btn--primary:hover {
  background: hsl(18, 98%, 53%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px hsla(18, 98%, 60%, 0.50);
}
.article-cta-btn--outline {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(255,255,255,0.16);
}
.article-cta-btn--outline:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.32);
  transform: translateY(-2px);
}
.article-cta-btn-arrow { transition: transform 0.15s; }
.article-cta-btn--primary:hover .article-cta-btn-arrow { transform: translateX(4px); }

@media (max-width: 639px) {
  .article-cta-box { padding: 28px 22px; border-radius: 18px; }
  .article-cta-title { font-size: 1.625rem; }
  .article-cta-actions { flex-direction: column; }
  .article-cta-btn { width: 100%; justify-content: center; }
}

.article-back { margin-top: 8px; }

/* ── Animations ────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

.stagger-1 { transition-delay: 0.00s; }
.stagger-2 { transition-delay: 0.08s; }
.stagger-3 { transition-delay: 0.16s; }
.stagger-4 { transition-delay: 0.24s; }
.stagger-5 { transition-delay: 0.32s; }
.stagger-6 { transition-delay: 0.40s; }

/* ── Scroll-to-top ─────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s, background-color 0.15s;
  pointer-events: none;
}
.scroll-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background-color: hsl(18, 98%, 53%); }
.scroll-top svg { width: 18px; height: 18px; }

/* ── Utilities ─────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}
