/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2c1e1e;        /* חום עמוק */
  --primary-light: #4a3333;
  --accent: #d4af37;          /* זהב רך */
  --accent-light: #e6c87c;
  --bg: #fdfbf7;              /* לבן חמים */
  --text-dark: #2c2c2c;
  --text-light: #f5f5f5;
  --gray: #8a7f7f;
  --border-radius: 16px;
  --box-shadow: 0 15px 40px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
  font-family: 'Assistant', 'Heebo', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  font-weight: 300;
}

h1, h2, h3, h4, .logo a {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Navbar */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-bottom: 2px solid var(--accent);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  max-width: 1300px;
  margin: 0 auto;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo i {
  font-size: 2.2rem;
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 40px;
  transition: var(--transition);
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

nav a:hover,
nav a.active {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2.2rem;
  cursor: pointer;
}

.access-btn, .share-btn {
  background: linear-gradient(145deg, var(--accent), #c4a052);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 62px;
  font-size: 1.0rem;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.access-btn:hover, .share-btn:hover {
  background: var(--accent-light);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 70%, #5a3e3e 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><path d="M20 20 L80 20 L80 80 L20 80 Z" fill="none" stroke="%23d4af37" stroke-width="2"/><path d="M30 30 L70 30 L70 70 L30 70 Z" fill="none" stroke="%23d4af37" stroke-width="2"/></svg>');
  background-size: 60px 60px;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
  font-family: 'Assistant', sans-serif;
}

/* Section Title */
.section-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin: 50px 0 30px;
  position: relative;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  font-weight: 600;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  padding: 35px 25px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #f0e0a0);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  border-color: var(--accent);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 600;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.card a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  border-bottom: 1px dotted transparent;
}

.card a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateX(-5px);
}

/* Table of Contents (for long articles) */
.toc {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin: 40px 0;
  border: 1px solid var(--accent);
}

.toc h4 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.8rem;
  font-weight: 600;
}

.toc ul {
  columns: 2;
  list-style: none;
  padding: 0;
}

.toc li {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.toc a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: var(--transition);
}

.toc a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  padding-right: 5px;
}

/* Article Sections */
.article-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  margin: 40px 0;
  box-shadow: var(--box-shadow);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.article-section h2 {
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 2.2rem;
  border-right: 6px solid var(--accent);
  padding-right: 20px;
  font-weight: 600;
}

.article-section h3 {
  color: var(--primary-light);
  margin: 30px 0 15px;
  font-size: 1.6rem;
  font-weight: 500;
}

.article-section h4 {
  color: var(--primary);
  margin: 20px 0 10px;
  font-size: 1.3rem;
  font-weight: 600;
}

.article-section p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #3a3a3a;
}

.article-section ul, .article-section ol {
  margin-right: 30px;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.article-section li {
  margin-bottom: 8px;
}

.article-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted var(--accent);
}

.article-section a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.article-section strong {
  color: var(--primary);
  font-weight: 700;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  margin-top: 80px;
  padding: 60px 0 30px;
  border-top: 3px solid var(--accent);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 50px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 30px;
}

.footer-column h4 {
  color: var(--accent);
  margin-bottom: 25px;
  font-size: 1.4rem;
  font-weight: 600;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.1rem;
}

.footer-column a:hover {
  color: var(--accent);
  padding-right: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
}

/* Accessibility Panel */
.accessibility-panel {
  position: fixed;
  top: 120px;
  left: 30px;
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  z-index: 9999;
  display: none;
  width: 280px;
  border: 2px solid var(--accent);
}

.accessibility-panel.open {
  display: block;
}

.accessibility-panel h4 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 600;
}

.accessibility-panel button {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 500;
}

.accessibility-panel button:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.accessibility-panel .danger {
  background: #b22222;
}

/* Share Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  margin: 8% auto;
  padding: 40px;
  border-radius: var(--border-radius);
  max-width: 450px;
  text-align: center;
  border: 3px solid var(--accent);
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.modal-content h2 {
  color: var(--primary);
  margin-bottom: 25px;
  font-size: 2rem;
  font-weight: 600;
}

.modal-content p {
  margin: 20px 0;
  font-size: 1.1rem;
}

.modal-content a {
  display: inline-block;
  margin: 8px;
  transition: var(--transition);
}

.modal-content img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.modal-content img:hover {
  transform: scale(1.15);
  border-color: var(--accent);
}

.close {
  float: left;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  color: var(--gray);
  transition: var(--transition);
}

.close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 900px) {
  .nav-container {
    padding: 15px 20px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    width: 100%;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-top: 2px solid var(--accent);
  }

  nav ul.open {
    display: flex;
  }

  nav a {
    font-size: 1.3rem;
    padding: 15px;
    text-align: center;
  }

  .hamburger {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .toc ul {
    columns: 1;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 15px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .card {
    padding: 25px 15px;
  }

  .article-section {
    padding: 25px 15px;
  }

  .article-section h2 {
    font-size: 1.8rem;
  }
}

/* Responsive tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}
.table-responsive table {
  min-width: 600px;
  width: 100%;
  border-collapse: collapse;
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 50px; }
.mb-4 { margin-bottom: 50px; }

   .access-btn {
      color: white !important;
      background: var(--primary) !important;
    }
    .access-btn:hover {
      background: var(--accent) !important;
      color: var(--primary) !important;
    }