/*
Theme Name: limod
Theme URI: https://limod.co.il/
Author: limod Portal & Studio
Author URI: https://limod.co.il/
Description: תבנית וורדפרס יוקרתית ומתקדמת לפורטל לימוד, ידע, מאמרים ומדריכים בעיצוב מודרני מבוסס כחול בהיר (Sky), ירוק (Emerald) וצהוב (Amber). כוללת הצגת כל הקטגוריות בעמוד הראשי, תפריט ניווט דינמי wp_nav_menu, תבנית פוסט ייחודית, סרגל נגישות מלא, חלון קופץ לעוגיות (Cookies Consent), פוטר עשיר עם קישורי חובה וגופן Heebo בלבד.
Version: 1.1.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: limod
Tags: educational, news, portal, grid-layout, custom-header, custom-menu, rtl-language-support, featured-images, accessibility-ready

All rights reserved to limod.
*/

/* ==========================================================================
   1. GLOBAL FONT DECLARATION - STRICTLY ONE FONT: HEEBO
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

*,
*::before,
*::after,
html,
body,
input,
button,
select,
textarea {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

:root {
    --limod-sky-50: #f0f9ff;
    --limod-sky-100: #e0f2fe;
    --limod-sky-400: #38bdf8;
    --limod-sky-500: #0ea5e9;
    --limod-sky-600: #0284c7;
    --limod-sky-700: #0369a1;
    --limod-sky-800: #075985;
    --limod-sky-900: #0c4a6e;
    
    --limod-emerald-50: #ecfdf5;
    --limod-emerald-400: #34d399;
    --limod-emerald-500: #10b981;
    --limod-emerald-600: #059669;
    --limod-emerald-700: #047857;
    
    --limod-amber-50: #fffbeb;
    --limod-amber-400: #fbbf24;
    --limod-amber-500: #f59e0b;
    --limod-amber-600: #d97706;

    --limod-slate-50: #f8fafc;
    --limod-slate-100: #f1f5f9;
    --limod-slate-200: #e2e8f0;
    --limod-slate-700: #334155;
    --limod-slate-800: #1e293b;
    --limod-slate-900: #0f172a;
    --limod-slate-950: #020617;
}

/* ==========================================================================
   2. CORE BASE STYLING & RESET
   ========================================================================== */
html {
    direction: rtl;
    text-align: right;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--limod-slate-50);
    color: var(--limod-slate-900);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   3. NAVIGATION & WORDPRESS MENU (wp_nav_menu)
   ========================================================================== */
.limod-primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.limod-primary-nav ul li {
    position: relative;
}

.limod-primary-nav ul li a {
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.limod-primary-nav ul li a:hover,
.limod-primary-nav ul li.current-menu-item > a,
.limod-primary-nav ul li.current_page_item > a {
    color: #0284c7 !important;
    border-bottom-color: #0284c7;
}

/* Sub-menus dropdown */
.limod-primary-nav ul li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0;
    min-width: 210px;
    z-index: 50;
    flex-direction: column;
    gap: 0;
}

.limod-primary-nav ul li:hover > ul.sub-menu {
    display: flex;
    animation: limodFadeDown 0.2s ease;
}

.limod-primary-nav ul li ul.sub-menu li {
    width: 100%;
}

.limod-primary-nav ul li ul.sub-menu li a {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 500;
    border-bottom: none;
    box-sizing: border-box;
}

.limod-primary-nav ul li ul.sub-menu li a:hover {
    background-color: #f0f9ff;
    color: #0284c7 !important;
}

@keyframes limodFadeDown {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   4. CONTENT & ARTICLE TYPOGRAPHY
   ========================================================================== */
.entry-content {
    color: #1e293b;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   PROMINENT ANCHOR TEXT LINKS IN POST CONTENT (טקסט עוגן מודגש ובולט)
   ========================================================================== */
.entry-content a {
    color: #0284c7 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-decoration-color: #38bdf8 !important;
    text-decoration-thickness: 2.5px !important;
    text-underline-offset: 4px !important;
    background: linear-gradient(180deg, transparent 60%, #e0f2fe 60%);
    padding: 0 4px;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    display: inline;
}

.entry-content a:hover {
    color: #0c4a6e !important;
    text-decoration-color: #0284c7 !important;
    background: #e0f2fe !important;
    box-shadow: 0 0 0 2px #bae6fd;
}

.entry-content a:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 3px;
    border-radius: 4px;
}


.entry-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-content h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 24px;
    background: #0284c7;
    border-radius: 4px;
}

.entry-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    background: linear-gradient(to left, #f0f9ff, #ffffff);
    border-right: 4px solid #0284c7;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    font-style: italic;
    color: #0369a1;
}

.entry-content pre,
.entry-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

.entry-content pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
    margin: 1.5rem 0;
    border: 1px solid #334155;
}

.entry-content code:not(pre code) {
    background: #e2e8f0;
    color: #0f172a;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    direction: ltr;
    display: inline-block;
}

/* ==========================================================================
   5. ACCESSIBILITY SYSTEM (HIGH CONTRAST, GRAYSCALE, FONT SIZES, FOCUS)
   ========================================================================== */
body.accessibility-large-text {
    font-size: 115% !important;
}

body.accessibility-readable-font *,
body.accessibility-readable-font {
    font-family: Arial, sans-serif !important;
    letter-spacing: 0.02em !important;
}

body.accessibility-high-contrast {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.accessibility-high-contrast * {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}

body.accessibility-high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.accessibility-high-contrast button,
body.accessibility-high-contrast input {
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    background-color: #111111 !important;
}

body.accessibility-grayscale {
    filter: grayscale(100%) !important;
}

body.accessibility-highlight-links a {
    background-color: #fef08a !important;
    color: #000000 !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

body.accessibility-stop-animations *,
body.accessibility-stop-animations *::before,
body.accessibility-stop-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* Accessibility trigger button & modal */
.limod-a11y-trigger {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #0284c7;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.limod-a11y-trigger:hover {
    transform: scale(1.1);
    background-color: #0369a1;
}

.limod-a11y-modal {
    display: none;
    position: fixed;
    bottom: 5rem;
    left: 1.5rem;
    z-index: 1000;
    width: 320px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    animation: limodFadeUp 0.2s ease;
}

.limod-a11y-modal.active {
    display: block;
}

@keyframes limodFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. COOKIE CONSENT BANNER
   ========================================================================== */
.limod-cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(8px);
    border-top: 2px solid #0284c7;
    color: #f8fafc;
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.limod-cookie-banner.active {
    display: block;
    animation: limodSlideUp 0.3s ease;
}

@keyframes limodSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==========================================================================
   7. PAGINATION
   ========================================================================== */
.limod-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0.25rem;
    transition: all 0.15s ease;
}

.limod-pagination .page-numbers:hover,
.limod-pagination .page-numbers.current {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}


/* ==========================================================================
   ULTRA-PROMINENT ANCHOR TEXT LINKS IN POST CONTENT (טקסט עוגן מודגש עם רקע)
   ========================================================================== */
.entry-content a,
.entry-content p a,
.entry-content li a,
.entry-content blockquote a,
.entry-content table a,
.prose a,
article.post .entry-content a {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    border: 1px solid #bae6fd !important;
    border-bottom: 2.5px solid #0284c7 !important;
    text-decoration: underline !important;
    text-decoration-color: #0284c7 !important;
    text-underline-offset: 3px !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.12) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline !important;
}

.entry-content a:hover,
.entry-content p a:hover,
.entry-content li a:hover,
.entry-content blockquote a:hover,
.entry-content table a:hover,
.prose a:hover,
article.post .entry-content a:hover {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    border-bottom-color: #0c4a6e !important;
    text-decoration-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3) !important;
}

.entry-content a:focus-visible {
    outline: 2px solid #0284c7 !important;
    outline-offset: 2px !important;
}
