@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/heebo-hebrew-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
    font-family: 'Heebo';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/heebo-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #1f3b63;
    --navy-dark: #152a47;
    --gold: #b8893b;
    --gold-soft: #f4ead7;
    --bg: #faf7f0;
    --surface: #ffffff;
    --text: #1d2433;
    --muted: #6b7280;
    --border: #e7e1d4;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(21, 42, 71, 0.08), 0 4px 14px rgba(21, 42, 71, 0.06);
    --shadow-hover: 0 4px 10px rgba(21, 42, 71, 0.12), 0 12px 28px rgba(21, 42, 71, 0.1);
}

*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Heebo', Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    direction: rtl;
    -webkit-text-size-adjust: 100%;
}
img {
    max-width: 100%;
}
a {
    color: var(--navy);
}
h1, h2, h3, h4 {
    line-height: 1.3;
}
button {
    font-family: inherit;
}
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}
.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.search-wrapper {
    flex: 1;
    max-width: 560px;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 4px 6px 4px 4px;
    padding-inline-start: 16px;
}
.search-wrapper input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    height: 38px;
}
.search-wrapper input::placeholder {
    color: #8a8f99;
}
.search-wrapper input::-webkit-search-decoration,
.search-wrapper input::-webkit-search-cancel-button {
    display: none;
}
.search-icon-color {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

/* Layout */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px 40px;
    min-height: 60vh;
}
.page-title,
h1.title {
    text-align: center;
    color: var(--navy);
    font-size: 30px;
    font-weight: 800;
    margin: 24px 0 20px;
}
h2.title {
    text-align: center;
    color: var(--navy);
}
.section {
    margin: 36px 0;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 16px;
}
.section-title::after {
    content: "";
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, var(--gold-soft), transparent);
}
.section-title a {
    color: inherit;
    text-decoration: none;
}
.breadcrumbs {
    max-width: 900px;
    margin: 16px auto 0;
    font-size: 14px;
    color: var(--muted);
}
.breadcrumbs a {
    color: var(--navy);
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Featured lesson */
.featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.featured-media {
    background: #000;
    display: flex;
    align-items: center;
}
.featured-media video,
.featured-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #000;
}
.featured-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}
.featured-label {
    align-self: flex-start;
    background: var(--gold-soft);
    color: #7a5a22;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}
.featured-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}
.featured-title a {
    color: var(--navy);
    text-decoration: none;
}
.featured-meta {
    color: var(--muted);
}
.featured-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.featured-pair .featured {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
}
.featured-pair .featured-body {
    justify-content: flex-start;
}
.featured-body audio {
    width: 100%;
}
.btn {
    align-self: flex-start;
    display: inline-block;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 999px;
    transition: background 0.2s;
}
.btn:hover {
    background: var(--navy-dark);
}

/* Cards */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    color: var(--text);
    text-decoration: none;
}
.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.card-media {
    position: relative;
    display: block;
}
.avatar {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center 20%;
    background: var(--gold-soft);
}
/* Lesson videos are shot 4:3, so the card keeps that ratio instead of cropping the face */
.lesson-card .avatar {
    height: auto;
    aspect-ratio: 4 / 3;
    object-position: center 35%;
}
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(21, 42, 71, 0.85);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
}
.date-chip {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #fff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
}
.card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.card-title a {
    color: var(--text);
    text-decoration: none;
}
.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.card-rav {
    color: var(--muted);
    font-size: 14px;
}
.card-actions {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    gap: 8px;
}
.icon-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.icon-btn.video-btn {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}
.icon-btn.video-btn:hover {
    background: #9e7430;
    border-color: #9e7430;
    color: #fff;
}
.folder-card .avatar {
    height: 130px;
}
.avatar.cover {
    object-fit: cover;
    object-position: center top;
    background: #fff;
}

/* Header menu */
.header-nav {
    display: flex;
    gap: 18px;
}
.header-nav a {
    color: #d7deea;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
.header-nav a:hover {
    color: #fff;
}

/* Weekly leaflet */
.leaflet-row {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.leaflet-latest img {
    display: block;
    width: 100%;
    aspect-ratio: 640 / 914;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(21, 42, 71, 0.18);
    background: #fff;
}
.leaflet-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.leaflet-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}
.leaflet-title a {
    color: var(--navy);
    text-decoration: none;
}
.leaflet-desc {
    margin: 0;
    color: var(--muted);
}
.leaflet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.leaflet-all {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.leaflet-previous {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    gap: 16px;
    margin-top: 12px;
}
.leaflet-thumb {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}
.leaflet-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 640 / 914;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
}
.folder-card .card-title {
    font-size: 17px;
    color: var(--navy);
}

/* Chips, tags, pager */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}
.chip:hover {
    background: #eef3fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.chip.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.topic-chip {
    font-weight: 700;
}
.tag-chip {
    color: #2a6b4a;
    border-color: #cfe5d8;
    background: #f6fbf8;
}
.chip-count {
    font-size: 11px;
    font-weight: normal;
    color: var(--muted);
}
.chip.active .chip-count {
    color: #dbe4f0;
}
.home-topics,
.tags-section {
    margin: 28px auto;
}
.tags-section .chips,
.home-topics .chips {
    justify-content: center;
}
.list-count {
    text-align: center;
    color: var(--muted);
    margin: 0 0 12px;
}
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 24px 0;
    font-size: 15px;
}
.pager a {
    color: var(--navy);
    font-weight: 600;
}

/* Lesson page */
.lesson {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 24px;
}
.lesson .page-title {
    margin: 16px 0 10px;
}
.lesson-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 10px;
}
.lesson-meta {
    text-align: center;
    color: var(--muted);
}
.share {
    position: relative;
    display: flex;
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.share-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.lesson-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.featured-body .lesson-actions {
    align-self: flex-start;
}
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.like-btn:hover:not(:disabled) {
    border-color: var(--gold);
    color: var(--gold);
}
.like-btn[aria-pressed="true"] {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-soft);
    cursor: default;
}
.share-menu {
    position: absolute;
    top: calc(100% + 6px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    padding: 6px;
}
.share-menu[hidden] {
    display: none;
}
.share-menu a,
.share-menu button {
    display: block;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--text);
    font-size: 15px;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
}
.share-menu a:hover,
.share-menu button:hover {
    background: var(--gold-soft);
}
.lesson-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}
.lesson-tags .chips {
    justify-content: center;
    gap: 6px;
    margin: 0;
}
.lesson-tags .chip {
    padding: 3px 12px;
    font-size: 14px;
}
.lesson-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 12px;
}
.lesson-tab {
    padding: 8px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.lesson-tab[aria-selected="true"] {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.lesson-panel {
    position: relative;
}
.lesson-panel video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: var(--radius);
}
.lesson-panel audio {
    display: block;
    width: 100%;
}
.lesson-text {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 28px;
    font-size: 17px;
    line-height: 1.9;
}
.lesson-text h2 {
    font-size: 19px;
    color: var(--navy);
    margin-top: 0;
}
.unmute-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.unmute-btn[hidden] {
    display: none;
}
.lesson-pdf-open {
    text-align: center;
    margin: 0 0 12px;
}
.lesson-pdf-open a {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.pdf-viewer {
    background: #ece8df;
    border-radius: var(--radius);
    padding: 8px 0;
    direction: ltr;
}
.pdf-page {
    display: block;
    margin: 0 auto 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.pdf-status {
    direction: rtl;
    text-align: center;
    padding: 40px 16px;
    color: var(--muted);
}
.lesson-drive {
    text-align: center;
    font-size: 14px;
}
.lesson-drive a {
    color: var(--muted);
}
.lesson-nav {
    max-width: 900px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.lesson-nav a {
    flex: 1;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.lesson-nav a[rel="next"] {
    text-align: left;
}

/* Video modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
}
.video-box {
    position: relative;
    width: min(960px, 94vw);
}
.video-box video {
    display: block;
    width: 100%;
    max-height: 80vh;
    background: #000;
    border-radius: 8px;
}
.video-title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px 48px;
}
.video-close {
    position: absolute;
    top: -8px;
    left: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

/* Footer */
.site-footer {
    background: var(--navy-dark);
    color: #d7deea;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.footer-phone {
    color: #fff;
    font-size: 20px;
    text-decoration: none;
}
.footer-phone strong {
    color: #e2c27d;
    font-weight: 800;
    direction: ltr;
    unicode-bidi: embed;
}
.footer-links {
    display: flex;
    gap: 18px;
}
.footer-links a {
    color: #d7deea;
    text-decoration: none;
}
.footer-links a:hover {
    color: #fff;
}
.footer-note {
    width: 100%;
    font-size: 13px;
    color: #9aa6ba;
}

/* Tablets */
@media (min-width: 861px) {
    .recent .card-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 860px) {
    .featured,
    .featured-pair {
        grid-template-columns: 1fr;
    }
    .featured-body {
        padding: 18px 20px 22px;
    }
}

/* Phones */
@media (max-width: 600px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 8px 12px 10px;
    }
    .brand-logo {
        width: 36px;
        height: 36px;
    }
    .brand-name {
        font-size: 19px;
    }
    .search-wrapper {
        flex-basis: 100%;
        max-width: none;
        margin: 0;
    }
    .header-nav {
        margin-inline-start: auto;
        gap: 14px;
        font-size: 14px;
    }
    .leaflet-row {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }
    .leaflet-title {
        font-size: 19px;
    }
    .leaflet-desc,
    .leaflet-previous {
        display: none;
    }
    .leaflet-actions {
        gap: 10px;
    }
    .site-main {
        padding: 4px 12px 32px;
    }
    .page-title,
    h1.title {
        font-size: 23px;
        margin: 18px 0 14px;
    }
    .section {
        margin: 28px 0;
    }
    .section-title {
        font-size: 19px;
    }
    .featured-title {
        font-size: 21px;
    }
    .card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .avatar {
        height: 115px;
    }
    .folder-card .avatar {
        height: 100px;
    }
    .card-body {
        padding: 10px 10px 12px;
    }
    .card-title {
        font-size: 15px;
    }
    .card-rav {
        font-size: 13px;
    }
    .date-chip,
    .card-badge {
        font-size: 12px;
    }
    .chip {
        padding: 8px 14px;
        font-size: 15px;
    }
    .section .chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -12px;
        padding: 4px 12px 10px;
        scrollbar-width: none;
    }
    .section .chips::-webkit-scrollbar {
        display: none;
    }
    .section .chip {
        flex-shrink: 0;
    }
    .breadcrumbs {
        font-size: 14px;
        line-height: 1.8;
    }
    .lesson-tab {
        padding: 10px 18px;
        font-size: 16px;
    }
    .lesson-text {
        padding: 16px 16px;
    }
    .lesson-nav {
        flex-direction: column;
    }
    .lesson-nav a[rel="next"] {
        text-align: right;
    }
    .video-box {
        width: 100vw;
    }
    .video-title {
        margin: 0 12px 8px 48px;
    }
    .video-close {
        left: 8px;
        font-size: 36px;
        padding: 4px 8px;
    }
    .pager {
        gap: 12px;
        font-size: 16px;
    }
    .pager a {
        padding: 10px 6px;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-phone {
        font-size: 18px;
    }
}
