/* WOWBookSwitch - Main Stylesheet */

/* ===== Design System - CSS Variables ===== */
:root {
  --background: hsl(240, 10%, 98%);
  --foreground: hsl(240, 10%, 10%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(240, 10%, 10%);
  --primary: hsl(142, 76%, 36%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(195, 100%, 50%);
  --secondary-foreground: hsl(0, 0%, 100%);
  --muted: hsl(240, 5%, 96%);
  --muted-foreground: hsl(240, 4%, 46%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --border: hsl(240, 6%, 90%);
  --input: hsl(240, 6%, 90%);
  --ring: hsl(142, 76%, 36%);
  --radius: 0.5rem;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--background); color: var(--foreground); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-1 { flex: 1; }

.grid { display: grid; gap: 1.5rem; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem; }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; } h5 { font-size: 1.25rem; } h6 { font-size: 1rem; }
.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; } .text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; } .text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; } .text-6xl { font-size: 3.75rem; }
.font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.text-muted { color: var(--muted-foreground); } .text-primary { color: var(--primary); }
.text-destructive { color: var(--destructive); } .leading-relaxed { line-height: 1.625; }

/* ===== Spacing ===== */
.p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-2 { padding-top: 0.5rem; } .pt-4 { padding-top: 1rem; }
.pb-6 { padding-bottom: 1.5rem; } .pb-8 { padding-bottom: 2rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; } .mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; } .mt-16 { margin-top: 4rem; }
.mr-2 { margin-right: 0.5rem; } .ml-2 { margin-left: 0.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ===== Width & Display ===== */
.w-full { width: 100%; } .max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; } .max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; } .max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; } .mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; } .block { display: block; }
.inline-block { display: inline-block; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 500; border-radius: var(--radius); border: 1px solid transparent;
  transition: all 0.2s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { opacity: 0.9; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); color: white; border-color: transparent; }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-ghost { background: transparent; border: none; }
.btn-ghost:hover { background: var(--muted); }
.btn-link { background: transparent; border: none; color: var(--primary); text-decoration: underline; padding: 0; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; width: 2.5rem; height: 2.5rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Cards ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.2s; display: flex; flex-direction: column; height: 100%; }
.card:hover { border-color: var(--primary); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); }
.card-header { padding: 1.5rem; }
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-description { color: var(--muted-foreground); font-size: 0.875rem; }
.card-content { padding: 1.5rem; padding-top: 7px; flex: 1; display: flex; flex-direction: column; }

/* Pricing Cards Alignment */
#pricing .card { min-height: 100%; }
#pricing .card-header { display: flex; flex-direction: column; }
#pricing .card-title { min-height: 3.5rem; display: flex; align-items: center; }
#pricing .card-description { min-height: 2.5rem; }
#pricing .card-content { justify-content: space-between; }
#pricing .card-content ul { flex: 1; }
#pricing .card-content .btn { margin-top: auto; }

/* ===== Responsive Header ===== */
@media (min-width: 768px) and (max-width: 1023px) {
  header nav a { font-size: 1rem !important; }
  header a span.text-xl { display: none !important; }
}

/* ===== Pricing Empty State Animations ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes ping {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.1; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

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

/* ===== Badge ===== */
.badge { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem;
  font-size: 0.75rem; font-weight: 600; border-radius: calc(var(--radius) - 2px); white-space: nowrap; }
.badge-default { background: var(--primary); color: var(--primary-foreground); }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.badge-destructive { background: var(--destructive); color: var(--destructive-foreground); }

/* ===== Forms ===== */
.input, .select, textarea { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem;
  border: 1px solid var(--input); border-radius: var(--radius); background: var(--background);
  color: var(--foreground); transition: border-color 0.2s; font-family: inherit; }
.input:focus, .select:focus, textarea:focus { outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(44,160,28,0.1); }
.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; background: var(--muted); }
textarea { resize: vertical; min-height: 80px; }
.label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.checkbox, .radio { width: 1rem; height: 1rem; cursor: pointer; accent-color: var(--primary); }
.form-group { margin-bottom: 1rem; }

/* ===== Progress Bar ===== */
.progress { width: 100%; height: 0.5rem; background: var(--muted); border-radius: var(--radius); overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); transition: width 0.3s; }

/* ===== Header ===== */
header { background: rgba(255,255,255,0.95); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); }
header .container { align-items: center; justify-content: space-between;
  padding-top: 1rem; padding-bottom: 1rem; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.125rem; }
nav { display: flex; align-items: center; gap: 1.5rem; }
nav a { color: var(--foreground); transition: color 0.2s; font-size: 0.9375rem; }
nav a:hover { color: var(--primary); }
.mobile-menu-btn { display: none; }
header .btn:not(.mobile-menu-btn):not(.btn-icon) { min-width: 110px; text-align: center; }

/* ===== Mobile Menu ===== */
.mobile-menu { position: fixed; left: -100%; top: 0; width: 16rem; height: 100vh;
  background: var(--card); box-shadow: 2px 0 8px rgba(0,0,0,0.1); transition: left 0.3s;
  z-index: 100; padding: 2rem 0; }
.mobile-menu.active { left: 0; }
.mobile-menu nav { flex-direction: column; gap: 0; }
.mobile-menu nav a { padding: 0.75rem 1.5rem; display: block; width: 100%; }
.mobile-menu nav a:hover { background: var(--muted); }
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; display: none; }
.mobile-overlay.active { display: block; }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 4rem; }

/* ===== Modals ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal-overlay.active { display: flex; }
.modal-content { background: var(--card); border-radius: var(--radius); max-width: 32rem;
  width: 100%; max-height: 90vh; overflow-y: auto; padding: 1.5rem; position: relative; }
.modal-header { margin-bottom: 1rem; }
.modal-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.modal-description { color: var(--muted-foreground); font-size: 0.875rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border); }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  padding: 0.5rem; color: var(--muted-foreground); }

/* ===== Accordion ===== */
.accordion-item { border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 1rem; background: var(--card); transition: all 0.3s ease; }
.accordion-trigger { width: 100%; padding: 1rem 1.5rem; text-align: left; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; background: none;
  border: none; color: var(--foreground); font-family: inherit; font-size: 1rem; 
  transition: background 0.2s ease; }
.accordion-trigger:hover { background: rgba(0,0,0,0.02); }
.accordion-icon { transition: transform 0.3s ease; }
.accordion-trigger.active .accordion-icon { transform: rotate(180deg); }
.accordion-content { padding: 0; max-height: 0; overflow: hidden; 
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
  color: var(--muted-foreground); opacity: 0; }
.accordion-content.active { padding: 0 1.5rem 1.5rem; max-height: 1000px; opacity: 1; }

/* ===== Tabs ===== */
.tabs-list { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab-trigger { padding: 0.75rem 1rem; background: none; border: none;
  border-bottom: 2px solid transparent; color: var(--muted-foreground); font-weight: 500;
  transition: all 0.2s; font-family: inherit; font-size: 0.875rem; cursor: pointer; }
.tab-trigger:hover { color: var(--foreground); }
.tab-trigger.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; }
thead { border-bottom: 1px solid var(--border); }
th { padding: 0.75rem; text-align: left; font-weight: 600; font-size: 0.875rem; }
td { padding: 0.75rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

/* ===== Borders & Backgrounds ===== */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: calc(var(--radius) * 1.5); }
.rounded-xl { border-radius: calc(var(--radius) * 2); }
.rounded-full { border-radius: 9999px; }
.bg-muted { background: var(--muted); }
.bg-primary { background: hsl(142, 76%, 36%); }
.bg-card { background: var(--card); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }

/* ===== Animations ===== */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.animate-spin { animation: spin 1s linear infinite; }
.spinner { border: 2px solid var(--muted); border-top-color: var(--primary); border-radius: 50%;
  width: 1rem; height: 1rem; animation: spin 0.6s linear infinite; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.5rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  z-index: 1000; display: none; min-width: 300px; }
.toast.show { display: block; animation: slideIn 0.3s; }
.toast.toast-success { border-color: hsl(142, 76%, 36%); border-left-width: 4px; }
.toast.toast-error { border-color: hsl(0, 84%, 60%); border-left-width: 4px; }
.toast-title { font-weight: 600; margin-bottom: 0.25rem; }
.toast-description { font-size: 0.875rem; color: var(--muted-foreground); }

/* ===== Hero Description Card (Quote Style) ===== */
.hero-description-card {
  background: transparent;
  padding: 1rem 1rem;
  margin-top: 1rem;
  position: relative;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.quote-icon {
  flex-shrink: 0;
  opacity: 1;
  fill: var(--primary);
}

.quote-open {
  align-self: flex-start;
  margin-left: 1rem;
}

.quote-close {
  align-self: flex-end;
  margin-right: 1rem;
}

.quote-content {
  text-align: center;
  padding: 0 2rem;
}

.hero-description-text {
  font-size: 18px;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.6;
  font-style: italic;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  nav { display: none !important; } 
  .mobile-menu-btn { display: block !important; }
  
  header .btn:not(.mobile-menu-btn):not(.btn-icon) {
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    min-width: 90px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.25rem; }
  .text-4xl { font-size: 1.875rem; } .text-5xl { font-size: 2.25rem; } .text-6xl { font-size: 2.5rem; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  nav { display: none; } .mobile-menu-btn { display: block; }
  .modal-content { max-width: 100%; }
  
  /* Mobile header buttons */
  header .btn:not(.mobile-menu-btn):not(.btn-icon) {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    min-width: 80px;
  }
  
  header .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  header .flex.items-center.gap-2 {
    gap: 0.5rem;
  }
  
  .hero-description-card {
    padding: 1.5rem 0.5rem;
    margin-top: 1.5rem;
    gap: 0.5rem;
  }
  
  .quote-icon {
    width: 50px;
    height: 50px;
  }
  
  .quote-open {
    margin-left: 0.5rem;
  }
  
  .quote-close {
    margin-right: 0.5rem;
  }
  
  .quote-content {
    padding: 0 1rem;
  }
  
  .hero-description-text {
    font-size: 16px;
  }
}
@media (min-width: 640px) {
  .sm\:flex { display: flex; } .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) and (max-width: 992px) {
  header nav.md\:flex { display: none !important; }
  header .mobile-menu-btn.md\:hidden { display: block !important; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:flex { display: flex !important; } .md\:hidden { display: none !important; }
  .md\:inline { display: inline !important; }
  .md\:inline-flex { display: inline-flex !important; }
  .md\:text-4xl { font-size: 2.25rem; } .md\:text-5xl { font-size: 3rem; }
  .md\:text-6xl { font-size: 3.75rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:col-span-1 { grid-column: span 1; }
  .lg\:col-span-2 { grid-column: span 2; }
}