/* RTL Hebrew overrides for Ghost Source theme */

[dir="rtl"] .gh-form > svg {
    left: auto;
    right: 22px;
}

[dir="rtl"] button.gh-form-input {
    text-align: right;
    padding-right: 52px;
    padding-left: 16px;
}

[dir="rtl"] .gh-form .gh-button {
    right: auto;
    left: 6px;
}

[dir="rtl"] .gh-navigation.is-middle-logo .gh-navigation-menu {
    margin-right: 0;
    margin-left: 64px;
}

.gh-header.is-classic.has-image::before {
    opacity: 0.75;
}

.gh-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25D366;
    color: #fff;
    border-radius: 4px;
    padding: 6px 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.gh-whatsapp-btn:hover {
    background-color: #1da851;
    color: #fff;
}

.gh-whatsapp-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

[dir="rtl"] .gh-footer-copyright {
    text-align: left;
}

[dir="rtl"] .gh-navigation-inner {
    direction: rtl;
}

[dir="rtl"] .gh-navigation-menu {
    direction: rtl;
}

[dir="rtl"] .gh-navigation-actions {
    direction: rtl;
}

[dir="rtl"] .gh-navigation-members {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
}

@media (max-width: 767px) {
    [dir="rtl"] .gh-navigation-brand {
        flex-direction: row-reverse;
    }

    [dir="rtl"] .gh-burger {
        margin-right: auto;
        margin-left: 0;
    }

    [dir="rtl"] .gh-navigation-menu {
        text-align: right;
    }

    [dir="rtl"] .gh-navigation-menu a {
        text-align: right;
    }
}

/* === Fix 1: Hero overlay gradient (replaces opacity-only rule above) === */
.gh-header.is-classic.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.35) 60%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 1;
}

.gh-header.is-classic .gh-header-inner {
    position: relative;
    z-index: 2;
}

/* === Fix 2: Unified navbar buttons === */
.gh-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border: 1.5px solid rgba(255,255,255,0.8);
    border-radius: 6px;
    background: transparent;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.gh-nav-btn:hover {
    background: rgba(255,255,255,0.12);
}

.gh-whatsapp-btn {
    background: transparent !important;
    border-color: rgba(255,255,255,0.8) !important;
}

.gh-navigation-members {
    gap: 16px;
    display: flex;
    align-items: center;
}

/* === Fix 3: Footer sign-in link === */
.gh-footer-signin {
    text-align: center;
    text-decoration: none;
    color: inherit;
    opacity: 0.75;
    transition: opacity 0.2s;
}
.gh-footer-signin:hover { opacity: 1; }

/* === Fix 4: Typography RTL global === */
.gh-content,
.gh-post-content,
article,
.post-content {
    text-align: justify;
    direction: rtl;
}

h1, h2, h3, h4 {
    text-align: right;
    direction: rtl;
}

.gh-content p,
.post-content p {
    text-align: justify;
}

/* כותרות פוסטים — יישור לימין */
.gh-article-title,
.article-title,
.post-title,
.gh-card-title,
.is-title,
h1, h2, h3, h4, h5, h6 {
    text-align: right !important;
    direction: rtl;
}

/* תיקון כפתור הרשמה — טקסט גלוי */
.gh-button,
a.gh-button {
    background-color: var(--ghost-accent-color, #5C1D24) !important;
    color: #ffffff !important;
    border: none !important;
}

.gh-button:hover,
a.gh-button:hover {
    opacity: 0.85;
}

/* כל כפתורי הניווט — מסגרת אחידה */
.gh-navigation-members a,
.gh-navigation-members a.gh-button {
    border: 1.5px solid rgba(255,255,255,0.8) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    text-decoration: none;
}

.gh-navigation-members a:hover,
.gh-navigation-members a.gh-button:hover {
    background: rgba(255,255,255,0.12) !important;
}
