:root {
    --bg: #ffffff;
    --fg: #111111;
    --accent: #666666;
    --border: #e0e0e0;
    --input-bg: #f8f8f8;
    --shadow: rgba(0, 0, 0, 0.08);
    --serif: Georgia, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sans-narrow: 'Arial Narrow', 'Impact', sans-serif;
    --subtle-blue: #f0f4f8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a;
        --fg: #f5f5f5;
        --accent: #999999;
        --border: #2a2a2a;
        --input-bg: #1a1a1a;
        --shadow: rgba(255, 255, 255, 0.08);
        --subtle-blue: #1a2332;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.7;
    padding: 2rem;
    max-width: 920px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-family: var(--sans);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
	color:#1b468e;
}

h2 {
    font-family: var(--sans);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 2rem 0 1rem 0;
}

h3 {
    font-family: var(--sans);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

p { margin-bottom: 1.5rem; text-align: justify; font-size:1.2rem;font-family: var(--serif);}

a {
    color: var(--fg);
    text-decoration: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    transition: opacity 0.2s ease;
}

a:hover { opacity: 0.8; }

p a {
    color: #e4b33d;
    
}

p a:hover {
    text-decoration: underline;
}

header {
    margin-bottom: 3rem;
    padding-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
}

header a {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--sans);
    color: var(--bg);
    text-decoration: none;
    letter-spacing: -0.03em;
    line-height: 1.1;
    border-radius: 4px;
}

.logo-en {
    font-family: Georgia, 'Times New Roman', serif;
    display: block;
    font-size: 1.2rem;
    color: #000;
}

.logo-he {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #000;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.meta {
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.meta a:hover { color: var(--fg); border-bottom-style: solid; }

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
    border-radius: 4px;
}

.lead-image { margin: 2rem auto 2.5rem auto; box-shadow: 0 4px 12px var(--shadow); }
.lead-image-caption {
    font-size: 0.9rem;
    color: var(--accent);
    font-style: italic;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}
.image-usage {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 4px;
	font-family: var(--sans);
}

.image-usage h3 {
    margin-top: 0;
}

.image-usage ul {
    margin: 0;
    padding-left: 1.5rem;
}

.image-usage li {
    margin-bottom: 0.5rem;
	list-style: disc;
}

.image-usage a {
    text-decoration: none;
}
.image-usage a:hover {
    text-decoration: underline;
}
.cat-list, .entry-list { list-style: none; }

.cat-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.cat-item:hover { background: var(--input-bg); padding-left: 0.5rem; padding-right: 0.5rem; margin: 0 -0.5rem; }

.cat-item a {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
    text-decoration: none;
    flex: 1;
}

.cat-item a:hover { text-decoration: underline; opacity: 1; }

.cat-count {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: capitalize;
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-weight: 500;
}

.entry-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.entry-item:hover { background: var(--input-bg); padding-left: 0.5rem; padding-right: 0.5rem; margin: 0 -0.5rem; }

.entry-item a {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--fg);
    text-decoration: none;
    flex: 1;
}

.entry-item a:hover { text-decoration: underline; opacity: 1; }

.entry-cat {
	font-size:1.1rem;font-family: var(--serif);
}

.az-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2.5rem;
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 600;
}

.az-bar a {
    color: var(--accent);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.az-bar a:hover { background: var(--input-bg); color: var(--fg); opacity: 1; }
.az-bar a.active { background: var(--fg); color: var(--bg); }

label {
    display: block;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.6rem;
    color: var(--accent);
}

input[type="text"], input[type="password"], input[type="email"], textarea, select {
    width: 100%;
    padding: 0.85rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 1rem;
    border-radius: 4px;
}

textarea { height: 280px; resize: vertical; font-family: var(--sans); }

input:focus, textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px var(--shadow); }

button, .btn {
    font-family: var(--sans);
    background: var(--fg);
    color: var(--bg);
    border: 2px solid var(--fg);
    padding: 0.8rem 1.8rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

button:hover, .btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-secondary { background: var(--input-bg); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }

.form-group { margin-bottom: 1.5rem; }

.status {
    padding: 1rem 1.2rem;
    background: var(--input-bg);
    border-left: 4px solid var(--accent);
    margin-bottom: 1.5rem;
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 0.95rem;
}

footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    background: var(--bg);
}

footer > span {
    display: block;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: var(--fg); }

.footer-links { display: flex; gap: 1.5rem; }

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
}

.search-result-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--subtle-blue);
    transition: background 0.15s ease;
}

.search-result-item:hover { background: #e8eff7; }

@media (prefers-color-scheme: dark) {
    .search-result-item:hover { background: #253447; }
}

.search-result-item a { text-decoration: none; color: var(--fg); }
.search-result-item:hover a { text-decoration: underline; }

.result-title { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.result-meta { font-family: var(--sans); font-size: 0.85rem; color: var(--accent); text-transform: uppercase; margin-bottom: 0.8rem; }
.result-excerpt { font-size: 0.95rem; line-height: 1.6; }

.search-empty { text-align: center; padding: 3rem 1rem; color: var(--accent); }

.return-link { font-family: var(--sans); font-weight: 500; color: var(--fg); text-decoration: none; display: inline-block; margin-top: 2rem; }

@media (max-width: 640px) {
    body { padding: 1rem 1rem 5.5rem 1rem; font-size: 0.95rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    header a { font-size: 1.1rem; }
    .logo-en { font-size: 1.1rem; }
    .logo-he { font-size: 1rem; }
    .cat-item, .entry-item { flex-direction: column; align-items: flex-start; }
	p { margin-bottom: 1.5rem; text-align: left; font-size:1.1rem}
    
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 0.5rem 0 0 0;
        border: none;
        border-top: 1px solid var(--border);
        background: var(--bg);
        backdrop-filter: blur(10px);
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        justify-content: space-around;
        align-items: stretch;
        gap: 0;
        height: auto;
        z-index: 100;
        max-width: none;
    }
    
    footer .footer-info {
        display: none;
    }
    
    .footer-links {
        display: flex;
        gap: 0;
        width: 100%;
        justify-content: space-around;
        align-items: stretch;
    }
    
    .footer-links a {
        flex: 1;
        padding: 0.2rem 0.5rem 0.9rem 0.5rem;
        text-align: center;
        border-right: 1px solid var(--border);
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--accent);
        transition: all 0.2s ease;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        letter-spacing: 0.3px;
        position: relative;
    }
    
    .footer-links a::before {
        content: '';
        display: block;
        width: 16px;
        height: 16px;
        margin-bottom: 0.1rem;
        background-size: 16px 16px;
        background-repeat: no-repeat;
        background-position: center;
    }
    
    .footer-links a[href*="contact"]::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2"><path d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/></svg>');
    }
    
    .footer-links a[href*="categories"]::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>');
    }
    
    .footer-links a[href*="search"]::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>');
    }
    
    .footer-links a[href*="home"], .footer-links a:first-child::before {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666666" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>');
    }
    
    .footer-links a:hover {
        background-color: var(--subtle-blue);
        color: var(--fg);
    }
    
    .footer-links a:hover::before {
        filter: brightness(1.2);
    }
    
    .footer-links a:active {
        background-color: rgba(27, 70, 142, 0.1);
        color: #1b468e;
    }
    
    @media (prefers-color-scheme: dark) {
        .footer-links a {
            color: #999999;
        }
        
        .footer-links a:hover {
            background-color: rgba(255, 255, 255, 0.05);
            color: #f5f5f5;
        }
        
        .footer-links a:active {
            background-color: rgba(27, 70, 142, 0.2);
            color: #6ba3ff;
        }
    }
    
    .footer-links a:last-child {
        border-right: none;
    }
    
    .az-bar { gap: 0.3rem; font-size: 0.8rem; }
}