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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #fff;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #1a1a2e;
}

/* Typography */
h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1a1a2e;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #2c2c54;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: #2563eb;
  text-decoration: underline;
}

a:hover {
  color: #1d4ed8;
}

/* Lists */
ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

li {
  margin-bottom: 0.35rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
}

th {
  background: #f5f5f5;
  font-weight: 600;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid #2563eb;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: #f8f9fa;
  color: #555;
}

/* Hub Cards */
.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.hub-card {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.hub-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hub-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.hub-card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0;
}

/* Article list on hub pages */
.article-list {
  list-style: none;
  padding-left: 0;
}

.article-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.article-list a {
  font-size: 1.1rem;
  font-weight: 600;
}

.article-list p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #666;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid #e5e5e5;
  color: #999;
  font-size: 0.85rem;
}

/* Language Toggle Button */
.lang-toggle {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s;
  white-space: nowrap;
}

.lang-toggle:hover {
  background: #1d4ed8;
}

/* Language Visibility */
html.lang-he .lang-en { display: none !important; }
html.lang-en .lang-he { display: none !important; }

/* RTL Support for Hebrew */
html.lang-he {
  direction: rtl;
}

html.lang-he body {
  text-align: right;
}

html.lang-he blockquote {
  border-left: none;
  border-right: 4px solid #2563eb;
}

html.lang-he ul, html.lang-he ol {
  padding-left: 0;
  padding-right: 1.75rem;
}

html.lang-he th, html.lang-he td {
  text-align: right;
}

html.lang-he .article-list {
  padding-right: 0;
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .nav-container { flex-direction: column; align-items: flex-start; }
}
