/* ============================================
   BeitLimud Shared Styles
   Design tokens from landing page
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1a1a2e;
  --parchment: #faf6f0;
  --warm-cream: #f5ede0;
  --gold: #c8a45c;
  --gold-light: #e8d5a3;
  --deep-blue: #1e3a5f;
  --text: #2c2c3a;
  --text-muted: #6b6b7b;
  --green: #2d7a4f;
  --red: #c44d4d;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--parchment);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.2;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--deep-blue);
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(26, 26, 46, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 164, 92, 0.15);
}

.navbar-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.navbar-brand span {
  color: var(--gold);
}

.navbar-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.navbar-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  position: relative;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--gold);
}

.navbar-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.navbar-live-dot {
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---- PAGE HEADER ---- */
.page-header {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(170deg, var(--ink) 0%, #16213e 40%, var(--deep-blue) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 120%;
  height: 140%;
  background: radial-gradient(ellipse at 30% 20%, rgba(200, 164, 92, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(200, 164, 92, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
  position: relative;
}

.page-header h1 span {
  color: var(--gold);
}

.page-header-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.page-header-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
}

/* ---- CONTENT SECTIONS ---- */
.content-section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--ink);
  margin-bottom: 2rem;
}

/* ---- CARDS ---- */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(200, 164, 92, 0.15);
  padding: 1.5rem 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26, 26, 46, 0.06);
}

/* ---- SUBJECT TAGS ---- */
.subject-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.3em 0.8em;
  border-radius: 4px;
  font-weight: 600;
}

.subject-tag--chumash_rashi {
  color: #6b4c1e;
  background: rgba(200, 164, 92, 0.15);
}

.subject-tag--mishneh_torah {
  color: var(--deep-blue);
  background: rgba(30, 58, 95, 0.08);
}

.subject-tag--shulchan_aruch {
  color: #2d5a3f;
  background: rgba(45, 122, 79, 0.08);
}

/* ---- STATUS BADGES ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3em 0.8em;
  border-radius: 20px;
}

.status-badge--live {
  color: #fff;
  background: #dc3545;
}

.status-badge--upcoming {
  color: var(--deep-blue);
  background: rgba(30, 58, 95, 0.1);
}

.status-badge--archived {
  color: var(--text-muted);
  background: rgba(107, 107, 123, 0.1);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: var(--gold);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--gold-light);
  color: var(--ink);
}

.btn--secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn--secondary:hover {
  background: var(--gold);
  color: var(--ink);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* ---- LOADING ---- */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(200, 164, 92, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* ---- FILTER TABS ---- */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(200, 164, 92, 0.2);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-tab.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ---- FOOTER ---- */
.footer {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--ink);
  border-top: 1px solid rgba(200, 164, 92, 0.15);
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-links a:hover {
  color: var(--gold);
}

@supports not (gap: 1rem) {
  .navbar-links > * + * { margin-left: 2rem; }
  .filter-tabs > * + * { margin-left: 0.5rem; }
  .footer-links > * + * { margin-left: 1.5rem; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(200, 164, 92, 0.15);
  }

  .navbar-links.open {
    display: flex;
  }

  @supports not (gap: 1rem) {
    .navbar-links > * + * {
      margin-left: 0;
      margin-top: 1rem;
    }
  }

  .navbar-toggle {
    display: block;
  }

  .content-section {
    padding: 2rem 1.5rem;
  }

  .page-header {
    padding: 6rem 1.5rem 3rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
}
