/* ============================================================
   Jewish World Review — Classic Newspaper with Jewish Flair
   ============================================================ */

/* -- Color Palette --
   Navy:     #1a237e (deep blue, Star of David inspired)
   Gold:     #c4a35a (Jerusalem stone / Torah gold)
   Ink:      #222
   Parchment: #faf8f3
   Rule:     #1a237e
   Accent:   #0d47a1
*/

:root {
	--navy: #1a237e;
	--gold: #c4a35a;
	--ink: #222;
	--parchment: #faf8f3;
	--rule: #1a237e;
	--accent: #0d47a1;
	--text: #333;
	--light: #666;
	--border: #d4cfc5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: 'Georgia', 'Times New Roman', serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--parchment);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header / Masthead ---- */

body > header {
	background: var(--navy);
	color: #fff;
	padding: 1.2em 1.5em;
}

.header-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.masthead { text-align: left; }

.logo {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 2.2em;
	font-weight: bold;
	color: #fff;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.logo:hover { text-decoration: none; color: var(--gold); }

.tagline {
	font-style: italic;
	font-size: 0.85em;
	color: var(--gold);
	margin-top: 0.15em;
}

.dateline {
	text-align: right;
	font-family: 'Georgia', serif;
}

.dateline .day {
	display: block;
	font-size: 1em;
	color: var(--gold);
	font-weight: bold;
}

.dateline .date {
	display: block;
	font-size: 0.9em;
	color: #c5cae9;
}

/* ---- Navigation ---- */

#main-nav {
	background: #fff;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.nav-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0 1.5em;
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.85em;
}

.nav-inner > a {
	padding: 0.8em 1em;
	color: var(--ink);
	font-weight: 500;
	border-bottom: 3px solid transparent;
	transition: border-color 0.2s;
}

.nav-inner > a:hover {
	text-decoration: none;
	border-bottom-color: var(--navy);
	color: var(--navy);
}

.rss-link {
	color: var(--gold) !important;
	font-weight: 600;
	font-size: 0.8em;
}

.nav-search {
	margin-left: auto;
	position: relative;
}

.nav-search input {
	font-family: inherit;
	font-size: 1em;
	padding: 0.4em 0.8em;
	border: 1px solid var(--border);
	border-radius: 3px;
	width: 200px;
	background: var(--parchment);
	transition: border-color 0.2s, width 0.3s;
}

.nav-search input:focus {
	outline: none;
	border-color: var(--navy);
	width: 280px;
}

.search-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	width: 400px;
	max-height: 400px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--border);
	border-top: none;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	z-index: 200;
	display: none;
}

.search-dropdown:not(:empty) { display: block; }

.search-item {
	display: block;
	padding: 0.7em 1em;
	border-bottom: 1px solid #eee;
	color: var(--ink);
	text-decoration: none;
	font-size: 0.9em;
}

.search-item:hover { background: #f5f3ed; }

.search-item strong { display: block; font-size: 0.95em; }
.search-item span { font-size: 0.8em; color: var(--light); }

/* ---- Rules / Dividers ---- */

.rule {
	border: none;
	border-top: 1px solid var(--border);
	margin: 1.2em 0;
}

.rule-double {
	border: none;
	border-top: 3px double var(--navy);
	margin: 0;
}

/* ---- Container ---- */

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5em;
}

/* ---- Daily Quote ---- */

.daily-quote {
	text-align: center;
	padding: 1em 2em;
	font-style: italic;
	color: var(--light);
}

.daily-quote blockquote {
	font-size: 1.1em;
	line-height: 1.5;
	max-width: 700px;
	margin: 0 auto;
}

.daily-quote cite {
	display: block;
	margin-top: 0.5em;
	font-size: 0.85em;
	font-style: normal;
	color: var(--navy);
	font-weight: 600;
}

/* ---- Content Filter Pills ---- */

.content-filters {
	display: flex;
	gap: 0.5em;
	margin-bottom: 1.5em;
	flex-wrap: wrap;
}

.pill {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.8em;
	padding: 0.35em 0.9em;
	border: 1px solid var(--border);
	border-radius: 2px;
	background: #fff;
	color: var(--light);
	cursor: pointer;
	transition: all 0.2s;
}

.pill:hover { border-color: var(--navy); color: var(--navy); }

.pill.active {
	background: var(--navy);
	color: #fff;
	border-color: var(--navy);
}

/* ---- Hero Article ---- */

.hero-article {
	margin-bottom: 1.5em;
}

.hero-title {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 2em;
	line-height: 1.2;
	color: var(--ink);
	margin-bottom: 0.3em;
}

.hero-title:hover { color: var(--navy); }

.hero-article a { color: inherit; text-decoration: none; }
.hero-article a:hover .hero-title { color: var(--navy); }

.hero-meta {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.85em;
	color: var(--light);
	margin-bottom: 0.6em;
}

.hero-meta .byline { color: var(--navy); font-weight: 600; }
.hero-meta .date { margin-left: 0.5em; }
.hero-meta .hebrew-date {
	margin-left: 0.5em;
	color: var(--gold);
	font-style: italic;
}

.hero-excerpt {
	font-size: 1.05em;
	color: var(--text);
	line-height: 1.65;
}

/* ---- Article Cards / Grid ---- */

.article-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5em 2em;
}

.article-card {
	padding-bottom: 1.2em;
	border-bottom: 1px solid var(--border);
}

.card-title {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 1.15em;
	line-height: 1.3;
	color: var(--ink);
	margin-bottom: 0.25em;
}

.article-card a { color: inherit; text-decoration: none; }
.article-card a:hover .card-title { color: var(--navy); }

.card-meta {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.78em;
	color: var(--light);
	margin-bottom: 0.3em;
}

.card-meta .byline { color: var(--navy); font-weight: 500; }
.card-meta .date { margin-left: 0.3em; }

.type-badge {
	margin-left: 0.5em;
	color: var(--gold);
	font-weight: 600;
}

.card-excerpt {
	font-size: 0.88em;
	color: var(--text);
	line-height: 1.55;
}

.no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--light);
	padding: 2em;
	font-style: italic;
}

.loading {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--light);
	padding: 1.5em;
	font-style: italic;
}

/* ---- Article View (Full Article) ---- */

.article-view {
	max-width: 720px;
	margin: 0 auto;
}

.article-header {
	margin-bottom: 1.5em;
}

.article-header h1 {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 2.4em;
	line-height: 1.15;
	color: var(--ink);
	margin-bottom: 0.4em;
}

.article-meta {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.9em;
	color: var(--light);
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	align-items: baseline;
}

.article-meta .byline { color: var(--navy); font-weight: 600; }
.article-meta .byline a { color: var(--navy); }
.article-meta .hebrew-date { color: var(--gold); font-style: italic; }

.featured-image {
	margin: 0 0 1.5em;
}

.featured-image img {
	width: 100%;
	height: auto;
	display: block;
}

.article-body {
	font-size: 1.05em;
	line-height: 1.75;
	color: var(--ink);
}

.article-body p { margin-bottom: 1.1em; }

.article-body h2 {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 1.5em;
	margin: 1.5em 0 0.5em;
	color: var(--navy);
}

.article-body h3 {
	font-size: 1.2em;
	margin: 1.3em 0 0.4em;
	color: var(--navy);
}

.article-body blockquote {
	border-left: 3px solid var(--gold);
	padding: 0.5em 1em;
	margin: 1em 0;
	font-style: italic;
	color: var(--light);
	background: rgba(196, 163, 90, 0.06);
}

.article-body a { color: var(--accent); text-decoration: underline; }

.article-footer {
	margin-top: 2em;
	padding-top: 1em;
	border-top: 1px solid var(--border);
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.8em;
	color: var(--light);
}

/* ---- Author Page ---- */

.author-header {
	display: flex;
	gap: 1.5em;
	align-items: flex-start;
	margin-bottom: 1em;
}

.author-photo {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 4px;
	border: 2px solid var(--border);
}

.author-header h1 {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 2em;
	margin-bottom: 0.2em;
}

.article-count {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.85em;
	color: var(--light);
}

.author-bio {
	font-size: 0.95em;
	color: var(--text);
	margin-top: 0.5em;
	line-height: 1.5;
}

/* ---- Section Page ---- */

.section-title {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 2em;
	color: var(--navy);
	margin-bottom: 0.3em;
}

.section-subtitle {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 1.4em;
	color: var(--navy);
	margin-bottom: 1em;
}

.section-desc {
	font-style: italic;
	color: var(--light);
	margin-bottom: 0.5em;
}

/* ---- Columnist Grid ---- */

.columnist-grid {
	column-count: 3;
	column-gap: 2em;
	margin-bottom: 2em;
}

.letter-heading {
	font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
	font-size: 1.3em;
	color: var(--navy);
	margin: 1em 0 0.3em;
	border-bottom: 2px solid var(--gold);
	padding-bottom: 0.15em;
	break-after: avoid;
}

.letter-heading:first-child { margin-top: 0; }

.columnist-link {
	display: block;
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.9em;
	padding: 0.25em 0;
	color: var(--ink);
	break-inside: avoid;
}

.columnist-link:hover { color: var(--navy); text-decoration: none; }
.columnist-link .count { color: var(--light); font-size: 0.85em; }

/* ---- Footer ---- */

footer {
	background: var(--navy);
	color: #c5cae9;
	margin-top: 2em;
}

.footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1.5em;
	text-align: center;
	font-size: 0.85em;
}

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

/* ---- Word Count ---- */

.word-count {
	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
	font-size: 0.8em;
	color: var(--light);
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.header-inner { flex-direction: column; text-align: center; gap: 0.5em; }
	.dateline { text-align: center; }
	.logo { font-size: 1.8em; }
	.article-grid { grid-template-columns: 1fr; gap: 1em; }
	.columnist-grid { column-count: 2; }
	.nav-inner { flex-wrap: wrap; justify-content: center; gap: 0; }
	.nav-search { margin-left: 0; margin-top: 0.5em; width: 100%; }
	.nav-search input { width: 100%; }
	.search-dropdown { width: 100%; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.hero-title { font-size: 1.5em; }
	.article-header h1 { font-size: 1.8em; }
	.columnist-grid { column-count: 1; }
	.author-header { flex-direction: column; align-items: center; text-align: center; }
	.container { padding: 1em; }
}
