/* ==========================================================================
   STYLISHMART.SHOP — Client-Side PDF ⇄ Image Converter Design System
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-active: #3730a3;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-contrast: #ffffff;

  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-light: #ecfeff;

  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #3b82f6;
  --info-light: #eff6ff;

  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-hover: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  --container-max: 1200px;
  --content-max: 820px;
}

[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f2937;
  --bg-muted: #1e293b;
  --bg-hover: #374151;

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --text-inverse: #0f172a;

  --border-color: #374151;
  --border-strong: #4b5563;

  --primary: #6366f1;
  --primary-hover: #818cf8;
  --primary-active: #a5b4fc;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-border: rgba(99, 102, 241, 0.3);

  --accent-light: rgba(6, 182, 212, 0.15);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger-light: rgba(239, 68, 68, 0.15);
  --info-light: rgba(59, 130, 246, 0.15);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-ui);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem); margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.25rem, 1.5vw + 0.25rem, 1.6rem); margin-top: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.2rem; margin-top: 1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
}

.text-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.content-container {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

main {
  flex: 1 0 auto;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo:hover {
  text-decoration: none;
  color: var(--primary);
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  text-decoration: none;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.btn-icon {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.hamburger-btn {
  display: none;
}

/* Mobile Navigation Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 999;
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav-link {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 1rem 0;
  font-size: 0.875rem;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.breadcrumb-separator {
  color: var(--text-subtle);
  font-size: 0.75rem;
}
.breadcrumb-item.active {
  color: var(--text-main);
  font-weight: 600;
}

/* Privacy Badge */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--success-light);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .privacy-badge {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}
.privacy-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background-color: var(--primary-active);
}

.btn-secondary {
  background-color: var(--bg-muted);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1.1rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-lg);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero-title {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}
.hero-subtitle {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Cards & Surfaces */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Interactive Converter Tool Container */
.converter-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-lg);
  margin-bottom: 3.5rem; /* Guarantees >= 40px spacing before subsequent ad slot */
  position: relative;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background-color: var(--bg-body);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  outline: none;
}
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}
.drop-zone.dragover {
  transform: scale(1.01);
}
.drop-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  color: var(--primary);
  background-color: var(--bg-surface);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.drop-zone-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.drop-zone-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.drop-zone-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.badge-tag {
  background-color: var(--bg-muted);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* File Info Bar */
.file-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}
.file-info-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  word-break: break-all;
}

/* Controls Grid */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.control-input, .control-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  color: var(--text-main);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color var(--transition-fast);
}
.control-input:focus, .control-select:focus {
  border-color: var(--primary);
  outline: none;
}
.control-help {
  font-size: 0.75rem;
  color: var(--text-subtle);
}

/* Range Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.control-slider {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}
.slider-value {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* Progress Bar */
.progress-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-muted);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.progress-bar-bg {
  width: 100%;
  height: 10px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
  transition: width 200ms ease;
}

/* Action Toolbar */
.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}
.action-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Live Thumbnail Grid */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.thumb-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.thumb-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.thumb-preview-wrap {
  aspect-ratio: 1 / 1.35;
  background-color: var(--bg-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.thumb-preview-wrap canvas, .thumb-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}
.thumb-badge {
  font-weight: 700;
  color: var(--text-muted);
}
.thumb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Image to PDF Reorder List */
.image-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.image-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  cursor: grab;
  user-select: none;
  transition: all var(--transition-fast);
}
.image-item:active {
  cursor: grabbing;
}
.image-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}
.image-item.drag-target-above {
  border-top: 2px solid var(--primary);
}
.image-item.drag-target-below {
  border-bottom: 2px solid var(--primary);
}
.image-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-muted);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-item-info {
  flex: 1;
  min-width: 0;
}
.image-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.image-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.image-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Google AdSense Component (.ad-slot) */
.ad-slot {
  width: 100%;
  margin: 2.5rem auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Min heights prevent Layout Shift (CLS) */
  min-height: 100px;
}
@media (min-width: 768px) {
  .ad-slot {
    min-height: 280px;
  }
}
.ad-slot.ad-slot-sidebar {
  min-height: 600px;
  margin: 1.5rem 0;
}
.ad-slot.ad-slot-horizontal {
  min-height: 100px;
}
@media (min-width: 768px) {
  .ad-slot.ad-slot-horizontal {
    min-height: 100px;
  }
}

.ad-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

/* Local testing / disabled ads override */
body[data-ads-disabled] .ad-slot {
  display: none !important;
}

/* 404 page never has ads */
body.page-404 .ad-slot {
  display: none !important;
}

/* Layout with Sidebar for Tool / Blog pages */
.page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .page-with-sidebar {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}
.sidebar-sticky {
  position: sticky;
  top: 90px;
}

/* Article / Long-form Typography (.prose) */
.prose {
  color: var(--text-main);
  line-height: 1.8;
  font-size: 1.05rem;
}
.prose p {
  margin-bottom: 1.5rem;
}
.prose h2 {
  font-size: 1.85rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.prose h3 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose strong {
  color: var(--text-main);
  font-weight: 700;
}
.prose blockquote {
  border-left: 4px solid var(--primary);
  background-color: var(--bg-muted);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td {
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  text-align: left;
}
.prose th {
  background-color: var(--bg-muted);
  font-weight: 700;
}

/* FAQ Accordion Component */
.faq-section {
  margin: 3.5rem 0;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}
.faq-item[open] {
  border-color: var(--primary-border);
}
.faq-question {
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  color: var(--primary);
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Feature Grid (Homepage & Guides) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin: 3rem 0;
}
.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.feature-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* Blog Cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}
.blog-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}
.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  margin-bottom: 0.75rem;
}
.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
  color: var(--text-main);
}
.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.blog-card-footer {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-fast);
}
.modal-backdrop.is-open .modal-card {
  transform: scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: calc(100vw - 3rem);
  pointer-events: none;
}
.toast {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  animation: toastSlideIn 250ms cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.925rem;
}
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-danger { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info { border-left: 4px solid var(--info); }
@keyframes toastSlideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Site Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-col-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.footer-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .hamburger-btn {
    display: inline-flex;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .action-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .action-toolbar-group {
    justify-content: stretch;
  }
  .action-toolbar-group .btn {
    flex: 1;
  }
}

/* Accessibility & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
