/* ============================================================
   Shared design system for /learn/english/*.html SEO landing pages.
   Mirrors /learn/math/ design with extra components for language
   learning: vocab tables, phrase cards, grammar conjugation grids.
   ============================================================ */

:root {
    --ink: #0d1117;
    --ink-soft: #1a1a2e;
    --bg: #fafafa;
    --card: #ffffff;
    --text: #1a1a2e;
    --muted: #5b6172;
    --accent: #1f7a8c;            /* English-themed teal (vs math orange) */
    --accent2: #f7a51e;
    --border: #e6e8ee;
    --soft: #eaf6f8;
    --maxw: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Heebo', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

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

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header / hero ---------- */
header.page-header {
    background: linear-gradient(140deg, var(--ink) 0%, #16263a 100%);
    color: #fff;
    padding: 56px 0 64px;
    position: relative;
    overflow: hidden;
}
header.page-header::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31,122,140,0.28), transparent 70%);
}
.crumbs { font-size: 14px; color: #c8ccd6; margin-bottom: 18px; }
.crumbs a { color: #c8ccd6; }
.crumbs a:hover { color: #fff; }
header.page-header h1 {
    font-family: 'Frank Ruhl Libre', Georgia, serif;
    font-size: clamp(30px, 5.2vw, 46px);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.2;
}
header.page-header .lead {
    font-size: clamp(16px, 2.4vw, 19px);
    color: #d6d9e2;
    max-width: 640px;
    margin: 0;
}

/* ---------- Sections ---------- */
main { padding: 40px 0 80px; }
section { margin: 40px 0; }

h2 {
    font-family: 'Frank Ruhl Libre', Georgia, serif;
    font-size: clamp(22px, 3.4vw, 30px);
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0 0 16px;
    line-height: 1.3;
}
h3 {
    font-size: clamp(18px, 2.6vw, 22px);
    font-weight: 700;
    color: var(--ink-soft);
    margin: 24px 0 10px;
}
p { margin: 0 0 14px; }
ul, ol { padding-right: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
strong { color: var(--ink-soft); }

/* ---------- Vocabulary table (English | Hebrew | Phonetic) ---------- */
.vocab-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin: 20px 0;
    font-size: 16px;
}
.vocab-table thead { background: var(--ink); color: #fff; }
.vocab-table th,
.vocab-table td {
    text-align: right;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.vocab-table th { font-weight: 700; }
.vocab-table tbody tr:last-child td { border-bottom: 0; }
.vocab-table tbody tr:nth-child(even) { background: #f8fafb; }
.vocab-table .en {
    direction: ltr;
    text-align: left;
    font-weight: 600;
    color: var(--accent);
    font-family: 'Heebo', system-ui, sans-serif;
}
.vocab-table .ph {
    direction: ltr;
    text-align: left;
    color: var(--muted);
    font-style: italic;
}
.vocab-table .he { font-weight: 600; }

/* ---------- Vocab card grid (for kids: colors, numbers, animals) ---------- */
.vocab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.vocab-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 14px 12px;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.vocab-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,17,23,0.07);
}
.vocab-card .he {
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0 0 4px;
}
.vocab-card .en {
    direction: ltr;
    color: var(--accent);
    font-weight: 600;
    margin: 0 0 4px;
}
.vocab-card .ph {
    direction: ltr;
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

/* ---------- Color swatches (colors page) ---------- */
.vocab-card.swatch { padding: 0; overflow: hidden; }
.vocab-card.swatch .chip {
    display: block;
    height: 70px;
    border-bottom: 1px solid var(--border);
}
.vocab-card.swatch .body { padding: 12px 12px 14px; }

/* ---------- Phrase block (Hebrew → English) ---------- */
.phrase {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 12px 0;
    box-shadow: 0 1px 3px rgba(13,17,23,0.04);
}
.phrase .he {
    font-weight: 700;
    color: var(--ink-soft);
    font-size: 17px;
    margin: 0 0 6px;
}
.phrase .en {
    direction: ltr;
    text-align: left;
    color: var(--accent);
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 4px;
}
.phrase .ph {
    direction: ltr;
    text-align: left;
    color: var(--muted);
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

/* ---------- Grammar conjugation table ---------- */
.conjugation {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0;
    font-size: 16px;
}
.conjugation th,
.conjugation td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: right;
}
.conjugation thead { background: var(--ink); color: #fff; }
.conjugation tbody tr:last-child td { border-bottom: 0; }
.conjugation .pronoun {
    direction: ltr;
    text-align: left;
    font-weight: 700;
    color: var(--ink-soft);
}
.conjugation .form {
    direction: ltr;
    text-align: left;
    color: var(--accent);
    font-weight: 600;
}
.conjugation .he { color: var(--muted); font-size: 14px; }

/* ---------- Example sentence box ---------- */
.example-box {
    background: var(--soft);
    border-right: 4px solid var(--accent);
    border-radius: 10px;
    padding: 12px 16px;
    margin: 10px 0;
}
.example-box .en {
    direction: ltr;
    text-align: left;
    font-weight: 600;
    color: var(--ink-soft);
    margin: 0 0 4px;
}
.example-box .he { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Hero formula (for grammar pages) ---------- */
.formula-hero {
    background: var(--ink);
    border-radius: 20px;
    padding: 44px 32px;
    margin: 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.formula-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31,122,140,0.28), transparent 70%);
}
.formula-label {
    color: #b9bdca;
    font-size: 14px;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
    text-transform: uppercase;
}
.formula-main {
    color: var(--accent2);
    font-size: clamp(22px, 4.2vw, 36px);
    font-weight: 700;
    line-height: 1.4;
    direction: ltr;
}
.formula-desc {
    color: #d6d9e2;
    font-size: 14px;
    margin-top: 14px;
}

/* ---------- FAQ ---------- */
.faq details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink-soft);
    font-size: 17px;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    float: left;
    color: var(--accent);
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details > p,
.faq details > div { margin-top: 10px; color: var(--text); }

/* ---------- Related + CTA + Footer ---------- */
.related {
    background: var(--ink-soft);
    color: #e6e8ee;
    border-radius: 18px;
    padding: 30px 28px;
    margin-top: 40px;
}
.related h2 { color: #fff; margin-top: 0; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.related-grid a {
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
    transition: background .15s;
}
.related-grid a:hover {
    background: rgba(31,122,140,0.35);
    text-decoration: none;
}

.cta {
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    color: #fff;
    border-radius: 18px;
    padding: 34px 28px;
    text-align: center;
    margin: 40px 0;
}
.cta h2 { color: #fff; margin-top: 0; }
.cta p { color: #eaf6f8; max-width: 540px; margin: 0 auto 18px; }
.cta a.btn {
    display: inline-block;
    background: #fff;
    color: var(--accent);
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 16px;
}
.cta a.btn:hover { text-decoration: none; background: var(--ink-soft); color: #fff; }

footer.page-footer {
    background: var(--ink);
    color: #9ca0ad;
    padding: 28px 0;
    text-align: center;
    font-size: 14px;
}
footer.page-footer a { color: var(--accent2); }
