/**
 * MODERN DASHBOARD DESIGN
 * Inspired by Aleph Beta, Sefaria, and 2025 design trends
 * Focus: Hyper-minimalism, smooth animations, impressive visual impact
 */

/* ═══════════════════════════════════════════════════════════
   ROOT VARIABLES - Modern Color Palette & Typography
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colors: Sophisticated Dark (Aleph Beta Style) */
  --primary-bg: #FFFFFF;
  --header-bg: #000000;
  --accent-blue: #158EFF;
  --accent-purple: #8B5CF6;
  --accent-gold: #D4AF37;  /* Warm gold accent (FPI Tier 1) */
  --accent-gradient: linear-gradient(135deg, #158EFF 0%, #8B5CF6 100%);
  --accent-gradient-vibrant: linear-gradient(135deg, hsl(206, 100%, 60%) 0%, hsl(258, 84%, 65%) 100%);  /* +20% saturation */
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F4CF87 100%);  /* Warm gold gradient */

  /* Text Colors */
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-tertiary: #94A3B8;
  --text-white: #FFFFFF;

  /* Surface Colors */
  --surface-light: #F8FAFC;
  --surface-gray: #F1F5F9;
  --border-light: #E2E8F0;
  --border-gray: #CBD5E1;

  /* Shadows - Enhanced 2x for better depth (FPI Tier 1) */
  --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.08);
  --shadow-md: 0 8px 12px -2px rgb(0 0 0 / 0.15), 0 4px 8px -4px rgb(0 0 0 / 0.15);
  --shadow-lg: 0 20px 30px -6px rgb(0 0 0 / 0.15), 0 8px 12px -8px rgb(0 0 0 / 0.15);
  --shadow-xl: 0 40px 50px -10px rgb(0 0 0 / 0.15), 0 16px 20px -12px rgb(0 0 0 / 0.15);
  --shadow-2xl: 0 50px 100px -24px rgb(0 0 0 / 0.35);

  /* Typography */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-content: "Crimson Pro", Georgia, serif;
  --font-hebrew: "Frank Ruhl Libre", serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Container Widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════ */

.modern-dashboard {
  font-family: var(--font-ui);
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════
   MODERN NAVIGATION
   ═══════════════════════════════════════════════════════════ */

.nav-modern {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Glass-morphism effect (FPI Tier 2) */
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-container-modern {
  max-width: var(--container-2xl);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

.logo-modern {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-white);
  transition: opacity var(--transition-base);
}

.logo-modern:hover {
  opacity: 0.8;
}

.logo-icon {
  font-size: var(--text-3xl);
  line-height: 1;
}

.logo-text {
  font-weight: 700;
}

.logo-light {
  font-weight: 300;
  opacity: 0.7;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  justify-content: center;
}

.nav-link-modern {
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-white);
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: 500;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
}

.nav-link-modern:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-link-modern.active {
  background: rgba(255, 255, 255, 0.15);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.search-trigger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hebrew-date-modern {
  font-size: var(--text-sm);
  color: var(--text-white);
  opacity: 0.8;
  font-weight: 500;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-white);
  transition: all var(--transition-base);
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION - MASSIVE & IMPRESSIVE
   ═══════════════════════════════════════════════════════════ */

.hero-modern {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FAFBFC 0%, #FFFFFF 100%);
}

.hero-bg-gradient {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  /* Mesh Gradient: Multiple morphing color blobs (FPI Tier 2) */
  background:
    radial-gradient(circle at 20% 30%, rgba(21, 142, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 20%, rgba(21, 142, 255, 0.10) 0%, transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  animation: meshMove 20s ease-in-out infinite;
  filter: blur(60px);
  opacity: 0.9;
}

@keyframes meshMove {
  0%, 100% {
    background-position: 0% 0%, 100% 100%, 50% 50%, 90% 20%, 10% 80%;
  }
  25% {
    background-position: 100% 0%, 0% 100%, 80% 20%, 20% 80%, 90% 10%;
  }
  50% {
    background-position: 100% 100%, 0% 0%, 20% 80%, 10% 90%, 80% 20%;
  }
  75% {
    background-position: 0% 100%, 100% 0%, 30% 70%, 70% 30%, 50% 50%;
  }
}

.hero-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--container-lg);
  padding: var(--space-4xl) var(--space-xl);
}

.hero-content-modern {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  /* Glass-morphism badge (FPI Tier 2) */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-2xl);
}

.badge-icon {
  font-size: var(--text-base);
}

.hero-title-modern {
  font-size: clamp(var(--text-5xl), 8vw, var(--text-7xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 var(--space-xl) 0;
}

.title-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subtitle-modern {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto var(--space-2xl) auto;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

.btn-primary-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-2xl);
  background: var(--accent-blue);
  color: var(--text-white);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.btn-primary-modern:hover {
  background: #0F7FE8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-2xl);
}

.btn-secondary-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-2xl);
  background: var(--text-white);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
  border: 2px solid var(--border-gray);
  transition: all var(--transition-base);
}

.btn-secondary-modern:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

.current-parsha-modern {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-2xl);
  /* Glass-morphism card (FPI Tier 2) */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-2xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  min-width: 320px;
  transition: all var(--transition-base);
}

.current-parsha-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.parsha-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.parsha-name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.parsha-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition-base);
}

.parsha-link:hover {
  color: #0F7FE8;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-3xl);
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* ═══════════════════════════════════════════════════════════
   SECTION MODERN
   ═══════════════════════════════════════════════════════════ */

.section-modern {
  padding: var(--space-4xl) var(--space-xl);
}

.container-modern {
  max-width: var(--container-xl);
  margin: 0 auto;
}

.section-header-modern {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header-modern.centered {
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-blue);
  margin-bottom: var(--space-md);
}

.section-title-modern {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 var(--space-md) 0;
}

.section-description {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   CARDS GRID
   ═══════════════════════════════════════════════════════════ */

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.card-modern {
  position: relative;
  padding: var(--space-2xl);
  background: var(--text-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

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

.card-featured {
  border: 2px solid var(--accent-blue);
  background: linear-gradient(135deg, rgba(21, 142, 255, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
}

.featured-label {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-gradient);
  color: var(--text-white);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
}

.card-icon.blue {
  background: rgba(21, 142, 255, 0.1);
  color: var(--accent-blue);
}

.card-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
}

.card-icon.gradient {
  background: var(--accent-gradient);
  color: var(--text-white);
}

.card-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-md) 0;
}

.card-description {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl) 0;
}

.card-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.card-features li svg {
  color: var(--accent-blue);
  flex-shrink: 0;
}

.card-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--surface-gray);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  width: 100%;
  justify-content: center;
}

.card-button:hover {
  background: var(--accent-blue);
  color: var(--text-white);
}

.card-button.btn-gradient {
  background: var(--accent-gradient);
  color: var(--text-white);
}

.card-button.btn-gradient:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════
   QUICK ACCESS CARDS
   ═══════════════════════════════════════════════════════════ */

.quick-access-section {
  background: var(--surface-light);
}

.access-card-modern {
  padding: var(--space-2xl);
  background: var(--text-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: all var(--transition-base);
}

.access-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.access-icon-modern {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
}

.access-card-modern h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-md) 0;
}

.access-card-modern p {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

.access-link-modern {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  transition: all var(--transition-base);
}

.access-link-modern:hover {
  color: #0F7FE8;
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════
   STATS SECTION
   ═══════════════════════════════════════════════════════════ */

.stats-section {
  background: var(--header-bg);
  color: var(--text-white);
}

.stats-section .section-eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.stats-section .section-title-modern {
  color: var(--text-white);
}

.stats-section .section-description {
  color: rgba(255, 255, 255, 0.7);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
}

.stat-card-modern {
  padding: var(--space-2xl);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card-modern:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.stat-number-modern {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: var(--space-sm);
  font-variant-numeric: tabular-nums;
}

.stat-label-modern {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: var(--space-xs);
}

.stat-sublabel {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER MODERN
   ═══════════════════════════════════════════════════════════ */

.footer-modern {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-4xl) var(--space-xl) var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-white);
  margin-bottom: var(--space-lg);
}

.footer-description {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.footer-heading {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 var(--space-lg) 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.footer-links a:hover {
  color: var(--text-white);
  transform: translateX(4px);
  display: inline-block;
}

.footer-bottom {
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .nav-container-modern {
    padding: 0 var(--space-lg);
  }

  .hero-title-modern {
    font-size: var(--text-5xl);
  }

  .cards-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-right {
    gap: var(--space-md);
  }

  .hebrew-date-modern {
    display: none;
  }

  .hero-modern {
    min-height: auto;
    padding: var(--space-3xl) 0;
  }

  .hero-title-modern {
    font-size: var(--text-4xl);
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary-modern,
  .btn-secondary-modern {
    width: 100%;
    justify-content: center;
  }

  .section-modern {
    padding: var(--space-3xl) var(--space-lg);
  }

  .section-title-modern {
    font-size: var(--text-3xl);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

/* ═══════════════════════════════════════════════════════════
   SMOOTH SCROLL & PERFORMANCE
   ═══════════════════════════════════════════════════════════ */

html {
  scroll-behavior: smooth;
}

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

/* ═══════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ═══════════════════════════════════════════════════════════
   MICRO-INTERACTIONS (FPI Tier 2)
   ═══════════════════════════════════════════════════════════ */

/* Button Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  animation: ripple-animation 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@keyframes ripple-animation {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(40);
    opacity: 0;
  }
}

/* Button Glow Effect */
.button-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
  pointer-events: none;
  animation: glow-expand 1s ease-out;
}

@keyframes glow-expand {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Scroll Animation - Fade In */
.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

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

  .ripple,
  .button-glow {
    display: none;
  }
}

/* 3D Card Tilt Transform Support */
.mode-card,
.access-card,
.feature-card-modern,
.current-parsha-modern,
.holiday-card,
.parsha-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}


/* ═══════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON (Phase 3)
   ═══════════════════════════════════════════════════════════ */

.theme-toggle {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  overflow: hidden;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.theme-toggle:active {
  transform: translateY(0);
}

/* Theme icons */
.theme-icon {
  position: absolute;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--theme-nav-text);
}

/* Light mode: show moon, hide sun */
.theme-toggle .sun-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

.theme-toggle .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Dark mode: show sun, hide moon */
.theme-toggle.dark-mode .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle.dark-mode .moon-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Focus state for accessibility */
.theme-toggle:focus-visible {
  outline: 2px solid var(--theme-accent-blue);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   THEME TOAST NOTIFICATION (Phase 3)
   ═══════════════════════════════════════════════════════════ */

.theme-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--theme-bg-elevated);
  border: 1px solid var(--theme-border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--theme-shadow-xl);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.theme-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.theme-toast-icon {
  font-size: var(--text-xl);
  line-height: 1;
}

.theme-toast-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--theme-text-primary);
  white-space: nowrap;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  .theme-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    justify-content: center;
  }

  .theme-toggle {
    display: none; /* Hide on mobile for space */
  }
}


/* ═══════════════════════════════════════════════════════════
   TORAH-SPECIFIC ANIMATIONS (Phase 3)
   ═══════════════════════════════════════════════════════════ */

/* Torah Scroll Animation */
.torah-scroll-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  opacity: 0.3;
  pointer-events: none;
}

.torah-scroll-anim {
  width: 400px;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

/* Hebrew Letter Morphing */
.hebrew-morph-container {
  animation: gentleFloat 6s ease-in-out infinite;
}

.hebrew-letter {
  filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

/* Floating Hebrew Letters */
.floating-hebrew-letters {
  z-index: 1;
}

.floating-letter {
  will-change: transform;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.5;
  }
  25% {
    transform: translate(20px, -30px) rotate(5deg);
    opacity: 0.7;
  }
  50% {
    transform: translate(-10px, -60px) rotate(-3deg);
    opacity: 0.5;
  }
  75% {
    transform: translate(15px, -40px) rotate(4deg);
    opacity: 0.6;
  }
}

/* Shabbat Candle Glow */
.shabbat-glow {
  position: relative;
  box-shadow:
    0 0 40px rgba(255, 200, 100, 0.4),
    0 0 80px rgba(255, 200, 100, 0.2),
    inset 0 0 40px rgba(255, 200, 100, 0.1);
  border-color: rgba(255, 200, 100, 0.4);
  animation: candleGlow 3s ease-in-out infinite;
}

@keyframes candleGlow {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(255, 200, 100, 0.4),
      0 0 80px rgba(255, 200, 100, 0.2),
      inset 0 0 40px rgba(255, 200, 100, 0.1);
  }
  50% {
    box-shadow:
      0 0 60px rgba(255, 200, 100, 0.6),
      0 0 100px rgba(255, 200, 100, 0.3),
      inset 0 0 50px rgba(255, 200, 100, 0.15);
  }
}

.shabbat-candles {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.candle-flame {
  width: 10px;
  height: 15px;
  background: linear-gradient(180deg, #FFA500 0%, #FFD700 50%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.8);
  animation: flicker 0.3s ease-in-out infinite alternate;
}

.flame-2 {
  animation-delay: 0.15s;
}

@keyframes flicker {
  0% {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.95) scaleX(1.05);
    opacity: 0.9;
  }
}

/* Custom Icon Styles */
.custom-icon {
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
}

.inline-icon {
  margin: 0 0.2em;
}

.icon-primary {
  color: var(--theme-accent-blue);
}

.icon-secondary {
  color: var(--theme-accent-gold);
}

[data-theme="dark"] .icon-primary {
  opacity: 0.7;
}

[data-theme="dark"] .icon-secondary {
  opacity: 0.8;
}

