/* Ora Krupik — site-specific styles on top of W3.CSS v5
 * @created 2026-05-01
 */

:root {
    --ora-primary: #93c47d;
    --ora-primary-dark: #6aa14e;
    --ora-accent: #2e6b4a;
    --ora-paper: #fffdf6;
    --ora-text: #222;
}

html, body {
    font-family: 'Heebo', 'Frank Ruhl Libre', system-ui, -apple-system, Arial, sans-serif;
    background: var(--ora-paper);
    color: var(--ora-text);
}

body { margin-top: 64px; }

/* ─── Navbar (aw-flex / RTL-aware) ─── */
.ora-navbar {
    --ora-bar-h: 64px;
    position: fixed;
    top: 0; right: 0; left: 0;
    z-index: 100;
    background: var(--ora-primary);
    min-height: var(--ora-bar-h);
    padding: 0;
}
.ora-navbar .aw-row { flex-wrap: nowrap; min-height: var(--ora-bar-h); align-items: stretch; }

/* Logo: image fills the full bar height */
.ora-brand {
    flex: 0 0 auto;
    color: white;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    padding: 0;
}
.ora-brand img { height: var(--ora-bar-h); width: auto; display: block; }
.ora-brand-text { margin: 0 8px; font-size: 1.1rem; align-self: center; }

/* Menu fills the middle; flex flow naturally inherits the RTL direction */
.ora-nav-links {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
[dir="rtl"] .ora-nav-links { flex-direction: row; }   /* explicit, so RTL parent makes items flow right→left */

.ora-nav-end {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.ora-nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background .15s;
    white-space: nowrap;
    cursor: pointer;
}
.ora-nav-link:hover,
.ora-nav-link.ora-active {
    background: var(--ora-primary-dark);
}

/* Facebook link — desktop: full-height blue button; mobile: f icon */
.ora-nav-fb-desktop {
    align-self: stretch;
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--ora-bar-h);
    background: #1877f2;            /* Meta Facebook blue */
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    transition: background .15s;
}
.ora-nav-fb-desktop:hover { background: #0e5dc1; color: white; }
.ora-nav-fb-mobile, .ora-nav-hamburger {
    flex: 0 0 auto;
    font-size: 1.2rem;
    padding: 8px 12px;
}
/* In RTL the logo is at index 0 (right edge); the next two flex items
   (fb mobile, hamburger) sit RIGHT next to the logo. We push the menu
   to the LEFT by giving it flex:1 — so the hamburger ends up just to
   the LEFT of the logo (= the right side of the bar visually after the logo). */

.ora-mobile-menu {
    position: fixed; top: 64px; right: 0; left: 0;
    z-index: 99; background: var(--ora-primary);
}
.ora-mobile-menu a { color: white !important; }

/* ─── Main content ─── */
.ora-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* ─── Home: "My New Book" card ─── */
.ora-new-book-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px;
    margin-top: 16px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.ora-new-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.ora-new-book-card img {
    width: 80px; height: 110px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    flex: 0 0 auto;
}
.ora-new-book-meta { flex: 1; }
.ora-new-book-meta h3 { margin: 0 0 4px; }
.ora-new-book-title {
    font-size: 1.2rem; font-weight: 700; color: var(--ora-accent);
    margin: 4px 0;
}

/* ─── Pages ─── */
.ora-page-title {
    color: var(--ora-accent);
    border-bottom: 2px solid var(--ora-primary);
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.ora-page-body { font-size: 1.05rem; line-height: 1.7; }
.ora-page-body img { max-width: 100%; height: auto; border-radius: 6px; }

/* ─── Books grid ─── */
/* CSS grid with direction:rtl so first item (latest book) sits top-right */
.ora-books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    direction: rtl;
    margin-top: 12px;
}
@media (max-width: 992px) { .ora-books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .ora-books-grid { grid-template-columns: repeat(2, 1fr); } }

.ora-book-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ora-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.ora-book-card .ora-bk-cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}
.ora-book-card .ora-bk-meta {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ora-book-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ora-book-card .ora-bk-year { color: #666; font-size: .9rem; }

.ora-decade-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ora-decade-chips button {
    padding: 6px 14px; border: 1px solid var(--ora-primary);
    background: white; border-radius: 999px; cursor: pointer;
    font-size: .9rem;
}
.ora-decade-chips button.active {
    background: var(--ora-primary); color: white;
}

/* ─── Book single page ─── */
.ora-rcol-cover img {
    width: 100%; border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,.15);
    display: block;
}
.ora-stats-title {
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,0,0,.1);
    font-size: 1.1rem;
}
.ora-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
    font-size: .92rem;
}
.ora-stats-grid > div { padding: 2px 0; }
@media (max-width: 600px) { .ora-stats-grid { grid-template-columns: 1fr; } }

.ora-rcol { position: sticky; top: 72px; align-self: flex-start; }
@media (max-width: 992px) { .ora-rcol { position: static; } }

/* Book excerpt — quoted blockquote style */
.ora-book-excerpt {
    background: white;
    border-right: 4px solid var(--ora-primary);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    margin: 12px 0 24px;
    font-size: 1.05rem;
    line-height: 1.85;
    font-family: 'Frank Ruhl Libre', 'Heebo', serif;
    color: #1a1a1a;
}
.ora-book-excerpt p { margin: 0 0 1em; }
.ora-book-excerpt p:last-child { margin-bottom: 0; }
.ora-book-excerpt::before {
    content: '“';
    display: block;
    font-size: 3rem;
    color: var(--ora-primary);
    line-height: 0.5;
    margin-bottom: 12px;
    font-family: serif;
}

.ora-section-h { color: var(--ora-accent); margin-top: 32px; }
.ora-section-h::before { content: '◆ '; color: var(--ora-primary); }

.ora-cmt-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-right: 3px solid var(--ora-primary);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.ora-cmt-meta { color: #666; font-size: .85rem; }

.ora-flash {
    max-width: 1200px; margin: 16px auto 0; border-radius: 6px;
}

/* ─── Links cards (rendered for {CM:links-books:tag=X}) ─── */
.ora-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    direction: rtl;
    margin: 16px 0;
}
.ora-link-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--ora-text);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.ora-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    border-color: var(--ora-primary);
}
.ora-link-card img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}
.ora-link-title { font-size: .9rem; font-weight: 600; }

/* ─── Sidebar (book list — collapsible Vue panel) ─── */
.ora-side-books {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.ora-side-toggle {
    width: 100%;
    background: var(--ora-primary);
    color: white;
    border: none;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 1rem;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ora-side-toggle:hover { background: var(--ora-primary-dark); }
.ora-side-caret { margin-right: auto; }     /* push to visual LEFT in RTL */

.ora-side-body { padding: 10px 12px; }

.ora-side-sort {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 8px; padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.ora-side-sort button {
    background: white;
    border: 1px solid var(--ora-primary);
    color: var(--ora-text);
    border-radius: 999px;
    padding: 2px 12px;
    font-size: .85rem;
    cursor: pointer;
}
.ora-side-sort button.active { background: var(--ora-primary); color: white; }

.ora-side-books ul { list-style: none; padding: 0; margin: 0; }
.ora-side-books li { margin: 0; }
.ora-side-books li a {
    display: flex; gap: 8px; align-items: baseline;
    padding: 6px 6px; border-radius: 4px;
    color: var(--ora-text); text-decoration: none; font-size: .95rem;
}
.ora-side-books li a:hover { background: #f0f8ec; }
.ora-side-year {
    color: #888; font-size: .8rem;
    min-width: 38px; text-align: right;
    flex: 0 0 auto;
}
.ora-side-title { flex: 1 1 auto; }

/* Two-line sidebar list rows used for posts/reviews/events:
   line 1 = small "date (src)", line 2 = title (link), both right-aligned. */
.ora-side-list li { padding: 4px 0; border-bottom: 1px solid #eee; }
.ora-side-list li:last-child { border-bottom: none; }
.ora-side-list li a {
    display: block;
    padding: 4px 6px; border-radius: 4px;
    color: var(--ora-text); text-decoration: none;
    text-align: right;
}
.ora-side-list li a:hover { background: #f0f8ec; color: var(--ora-accent); }
.ora-side-line1 {
    display: block;
    font-size: .72rem; color: #888;
    text-align: right;
}
.ora-side-line2 {
    display: block;
    font-size: .95rem; line-height: 1.35;
    text-align: right;
}
.ora-side-tail  { font-size: .72rem; color: #888; font-weight: 400; }

/* ─── Footer ─── */
.ora-footer { margin-top: 48px; }

.ora-bottom-bar {
    position: fixed; bottom: 16px; left: 16px;
    display: flex; gap: 6px; z-index: 90;
}
.ora-bb-btn {
    width: 44px; height: 44px; padding: 0 !important;
    background: var(--ora-primary) !important; color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ─── Admin ─── */
.ora-admin-card {
    background: white; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 16px; margin-bottom: 16px;
}
.ora-admin-stat {
    display: inline-block; min-width: 140px; text-align: center;
    padding: 18px; margin: 6px;
    background: var(--ora-primary); color: white; border-radius: 8px;
}
.ora-admin-stat b { display: block; font-size: 1.8rem; }

/* ─── Comment form (collapsible card) ─── */
.ora-cmt-form-details {
    border-radius: 8px;
    overflow: hidden;
}
.ora-cmt-form-summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--ora-primary);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}
.ora-cmt-form-summary::-webkit-details-marker { display: none; }
.ora-cmt-form-summary:hover { background: var(--ora-primary-dark); }
.ora-cmt-form-caret { margin-right: auto; transition: transform .2s; }
.ora-cmt-form-details[open] .ora-cmt-form-caret { transform: rotate(180deg); }
.ora-cmt-form-body { background: #fffdf6; }

/* ─── Admin posts: image gallery ─── */
.ora-post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    direction: rtl;
}
.ora-post-image {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ora-post-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    cursor: pointer;
    transition: transform .15s;
    display: block;
}
.ora-post-image img:hover {
    transform: scale(1.04);
}
.ora-post-image-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    font-size: .8rem;
    background: #f7f7f7;
}

/* ─── Forms ─── */
.ora-form label { display:block; margin-top: 12px; font-weight: 600; }
.ora-form input[type=text], .ora-form input[type=email],
.ora-form select, .ora-form textarea {
    width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px;
    font-family: inherit; font-size: 1rem;
}
.ora-form textarea { min-height: 200px; }
