/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM — Modern, premium mobile-first UI
   ═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
  /* Neutral scale — warm zinc */
  --background: #f8f8fa;
  --foreground: #111118;
  --card: #ffffff;
  --card-foreground: #111118;
  --primary: #111118;
  --primary-foreground: #f8f8fa;
  --secondary: #f1f1f4;
  --secondary-foreground: #111118;
  --muted: #f1f1f4;
  --muted-foreground: #6b6b7b;
  --border: #e8e8ed;
  --border-subtle: #ebebef;
  --input: #e8e8ed;
  --ring: #111118;

  /* Radius */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows — layered for depth */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 0 1px rgba(225, 29, 72, 0.08), 0 4px 16px rgba(225, 29, 72, 0.1);

  /* Accent */
  --accent: #E11D48;
  --accent-light: #FFF1F3;
  --accent-hover: #BE123C;
  --accent-subtle: rgba(225, 29, 72, 0.06);

  /* Typography */
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-as: 'Noto Serif Bengali', 'Inter', sans-serif;

  /* Layout */
  --header-h: 3.5rem;
  --sidebar-w: 280px;
  --max-w: 1120px;
  --bottom-nav-h: 4rem;

  /* Timing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-en);
  background: var(--background);
  background-image: radial-gradient(circle, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--foreground);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ─── Base Typography ───────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p {
  line-height: 1.65;
}

/* ─── Utility ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
  min-height: 2.75rem;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:active::after {
  opacity: 0.08;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.2), 0 1px 2px rgba(225, 29, 72, 0.1);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--secondary);
  border-color: #d8d8dd;
}

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

.btn-ghost:hover {
  background: var(--secondary);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  min-height: 2.25rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  min-height: 3rem;
  border-radius: var(--radius-lg);
}

.btn i {
  font-size: 1.125rem;
}

/* ─── Header / Nav ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(248, 248, 250, 0.95);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
  border-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
}

.logo-img {
  height: 1.75rem;
  width: auto;
  display: block;
}

/* Desktop nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.125rem;
}

.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--foreground);
  background: rgba(0, 0, 0, 0.04);
}

.desktop-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.desktop-nav a i {
  font-size: 1.125rem;
}

/* Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  color: var(--foreground);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ─── Mobile Sidebar ────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sidebar-w);
  max-width: 85vw;
  background: var(--card);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-close {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  color: var(--muted-foreground);
  transition: all 0.15s;
}

.sidebar-close:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  color: var(--foreground);
  background: var(--secondary);
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.sidebar-nav a i {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
}

/* ─── Hero Section ──────────────────────────────────────── */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(102, 126, 234, 0.06) 0%,
    rgba(240, 147, 251, 0.04) 40%,
    transparent 100%
  );
}

/* Centered soft glow — seamless, no hard edges */
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 350px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(225, 29, 72, 0.045) 0%, transparent 70%);
  pointer-events: none;
}

/* Large decorative quote mark watermark */
.hero::after {
  content: '\201C';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: Georgia, serif;
  font-size: 14rem;
  line-height: 1;
  color: var(--foreground);
  opacity: 0.025;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.75rem;
  background: var(--accent-subtle);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(225, 29, 72, 0.08);
  position: relative;
}

.hero-badge i {
  font-size: 0.875rem;
}

.hero h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  background: linear-gradient(135deg, var(--foreground) 0%, #3f3f46 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-subtitle {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.65;
  position: relative;
}

.hero-cta {
  margin-top: 1.25rem;
  position: relative;
}

/* ─── Section & Category Grid ──────────────────────────── */
.section {
  padding: 2rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
}

.section-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease, opacity 0.2s;
}

.section-link:hover {
  gap: 0.5rem;
  opacity: 0.8;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.25s var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.category-card:active {
  transform: scale(0.98) translateY(0);
}

.category-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent);
}

/* Unique gradient tint per category */
.category-card:nth-child(1) .category-icon {
  background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12));
  color: #667eea;
}
.category-card:nth-child(2) .category-icon {
  background: linear-gradient(135deg, rgba(250,112,154,0.12), rgba(254,225,64,0.12));
  color: #f5576c;
}
.category-card:nth-child(3) .category-icon {
  background: linear-gradient(135deg, rgba(79,172,254,0.12), rgba(0,242,254,0.12));
  color: #4facfe;
}

.category-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.0625rem;
  letter-spacing: -0.01em;
}

.category-info p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.category-count {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--secondary);
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* ─── Language Tabs ─────────────────────────────────────── */
.lang-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  background: var(--secondary);
  border-radius: var(--radius);
  padding: 0.1875rem;
  width: fit-content;
}

.lang-tab {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.2s var(--ease-out);
}

.lang-tab:hover {
  color: var(--foreground);
}

.lang-tab.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

/* ─── Page Layout (Listing Pages) ───────────────────────── */
.page-header {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 4rem;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.page-header h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.1875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-header h1 i {
  color: var(--accent);
}

.page-header p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.page-layout {
  padding-bottom: 2rem;
}

.page-main {
  min-width: 0;
}

/* ─── Filter Toolbar (Horizontal Chips) ─────────────────── */
.filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.filter-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chip-scroll-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
}

.chip-scroll-wrapper.no-overflow {
  -webkit-mask-image: none;
  mask-image: none;
}

.chip-scroll {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.chip-scroll:active {
  cursor: grabbing;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-chip:hover {
  color: var(--foreground);
  border-color: #d8d8dd;
  background: var(--secondary);
}

.filter-chip.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
  font-weight: 600;
}

.filter-chip i {
  font-size: 1rem;
}

.filter-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background: var(--secondary);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Cards Grid ────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* ─── Scroll Sentinel (Infinite Scroll Trigger) ─────── */
.scroll-sentinel {
  grid-column: 1 / -1;
  height: 1px;
  visibility: hidden;
}

.scroll-sentinel.loading {
  visibility: visible;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}

.scroll-sentinel.loading::after {
  content: '';
  width: 1.75rem;
  height: 1.75rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Featured Section ──────────────────────────────────── */
.section--featured {
  background: var(--secondary);
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--foreground);
  color: var(--primary-foreground);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
  position: relative;
  text-align: center;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-logo {
  display: inline-block;
}

.footer-logo-img {
  height: 2rem;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.8125rem;
  color: #a1a1aa;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin-top: 0.25rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: #a1a1aa;
  padding: 0.25rem 0;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-badge {
  font-size: 0.6875rem;
  color: #71717a;
  margin-top: 0.25rem;
}

.footer-jobassam {
  color: #ffffff;
  font-weight: 600;
  transition: opacity 0.15s;
}

.footer-jobassam:hover {
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid #27272a;
  padding-top: 1rem;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: #52525b;
}

/* ─── Toast ─────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(17, 17, 24, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #ffffff;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  animation: toastIn 0.35s var(--ease-spring);
  white-space: nowrap;
}

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

.toast i {
  font-size: 1rem;
  color: #4ade80;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
}

/* ─── Greeting Card Generator ───────────────────────────── */
.generator-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.generator-preview {
  width: 100%;
  aspect-ratio: 1;
  max-width: 480px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.generator-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.generator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.control-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

.control-group input,
.control-group textarea,
.control-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--foreground);
  font-family: var(--font-en);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
}

.control-group textarea {
  font-family: var(--font-as);
  min-height: 80px;
  resize: vertical;
}

.control-group input:focus,
.control-group textarea:focus,
.control-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Language mode toggle */
.lang-mode-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--secondary);
  border-radius: var(--radius);
  padding: 0.1875rem;
}

.lang-mode-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.2s var(--ease-out);
}

.lang-mode-btn:hover {
  color: var(--foreground);
}

.lang-mode-btn.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}

.gradient-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

.gradient-swatch {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.2s var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.gradient-swatch:hover {
  transform: scale(1.08);
}

.gradient-swatch.active {
  border-color: var(--foreground);
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--foreground);
}

.font-size-slider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.font-size-slider input[type="range"] {
  flex: 1;
  height: 4px;
  border: none;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
}

.font-size-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--foreground);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.font-size-slider span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-foreground);
  min-width: 2.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ─── Static Pages ──────────────────────────────────────── */
.static-page {
  padding: 2rem 0;
}

.static-page h1 {
  margin-bottom: 1.5rem;
}

.static-page h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.static-page p {
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

.static-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.static-page ul li {
  margin-bottom: 0.375rem;
  color: var(--muted-foreground);
}

/* ─── Bottom Navigation ────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(248, 248, 250, 0.95);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem 0;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.bottom-nav-item i {
  font-size: 1.375rem;
  transition: transform 0.2s var(--ease-spring);
}

.bottom-nav-item.active {
  color: var(--accent);
}

.bottom-nav-item.active i {
  transform: scale(1.05);
}

/* ─── Keyframes ────────────────────────────────────────── */
@keyframes pageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iconBounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ─── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 1rem 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.breadcrumb a {
  color: var(--muted-foreground);
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb-sep {
  color: var(--border);
  font-size: 0.875rem;
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 500;
}

/* ─── Festival Hero ────────────────────────────────────── */
.festival-hero {
  text-align: center;
  padding: 2rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-subtle) 0%, rgba(102, 126, 234, 0.04) 100%);
  border: 1px solid rgba(225, 29, 72, 0.08);
  border-radius: var(--radius-xl);
}

.festival-hero-icon {
  font-size: 2.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.festival-hero h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.festival-hero p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  max-width: 480px;
  margin: 0 auto 0.75rem;
  line-height: 1.6;
}

.festival-count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(225, 29, 72, 0.08);
}

/* ─── Festival Grid (Browse by Festival) ───────────────── */
.festival-grid-section {
  padding: 1.25rem 0 1.5rem;
}

.festival-grid-section .section-title {
  margin-bottom: 1rem;
}

.festival-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
}

.festival-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.875rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.25s var(--ease-out);
  box-shadow: var(--shadow-xs);
}

.festival-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.festival-card:active {
  transform: scale(0.98) translateY(0);
}

.festival-card i {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.125rem;
}

.festival-card-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.3;
}

.festival-card-name-as {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  font-family: var(--font-as);
  line-height: 1.3;
}

/* ─── Empty State ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 3rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  display: block;
}

.empty-state h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* ─── Responsive: 768px+ ────────────────────────────────── */
@media (min-width: 768px) {
  h1 { font-size: 2rem; }

  .filter-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 50;
    background: rgba(248, 248, 250, 0.95);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 0.625rem 1rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .filter-toolbar-row {
    flex: 1;
    min-width: 0;
  }

  .filter-toolbar .lang-tabs {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero::after {
    font-size: 20rem;
  }

  .festival-hero h1 {
    font-size: 2rem;
  }

  .festival-hero-icon {
    font-size: 3rem;
  }

  .festival-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .generator-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .generator-preview {
    flex: 1;
    max-width: 480px;
    margin: 0;
  }

  .generator-controls {
    flex: 1;
    max-width: 400px;
  }
}

/* ─── Responsive: 1024px+ ───────────────────────────────── */
@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }

  .desktop-nav {
    display: flex;
  }

  .hamburger {
    display: none;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .festival-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .bottom-nav {
    display: none;
  }

  .toast-container {
    bottom: 1.5rem;
  }
}

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

  body {
    opacity: 1;
  }
}
