/*
Theme Name: Portal Zahav
Theme URI: https://dlions.co.il/
Author: Portal Zahav & DLions Team
Author URI: https://www.ligaseo.co.il/
Description: תבנית וורדפרס יוקרתית בזהב למגזין עסקים, שוק ההון, נדל״ן יוקרה והשקעות. כוללת משיכה דינמית מלאה של תפריטי וורדפרס וקטגוריות (wp_nav_menu), תוסף נגישות מובנה מתקדם (WCAG 2.1 AA), תמיכה מלאה ב-RTL, פונט Heebo, מחשבון זהב אינטראקטיבי, באנר עוגיות תקני, תבניות עמוד ראשי, קטגוריה ופוסט בודד.
Version: 2.1.0
Requires at least: 5.8
Tested up to: 6.7
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: portal-zahav
Tags: news, blog, magazine, gold, luxury, business, investments, rtl-language-support, accessibility-ready, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* -------------------------------------------------------------
   1. GLOBAL STYLES, RESET & HEEBO FONT
------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-main: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-gold-500: #f59e0b;
  --color-gold-400: #fbbf24;
  --color-gold-300: #fcd34d;
  --color-gold-600: #d97706;
  --color-dark-bg: #030712;
  --color-dark-card: #0f172a;
  --color-dark-card-hover: #1e293b;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-border-gold: rgba(245, 158, 11, 0.3);
  --color-border-dark: #1e293b;
}

html {
  direction: rtl;
  text-align: right;
  font-family: var(--font-main);
  background-color: var(--color-dark-bg);
  color: var(--color-text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main) !important;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-dark-bg);
  color: var(--color-text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
p, span, a, input, textarea, button, select, label {
  font-family: var(--font-main) !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fix for WordPress Admin Bar overlap */
body.admin-bar #masthead {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar #masthead {
    top: 46px;
  }
}

.site-container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Gold Gradient utilities */
.gold-gradient-text {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-bg {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
}

.gold-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gold-card {
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  transition: all 0.3s ease;
}
.gold-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
}

/* -------------------------------------------------------------
   2. DYNAMIC WORDPRESS NAVIGATION MENUS
------------------------------------------------------------- */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-navigation ul.nav-menu li {
  position: relative;
}

.main-navigation ul.nav-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.main-navigation ul.nav-menu li a:hover,
.main-navigation ul.nav-menu li.current-menu-item > a,
.main-navigation ul.nav-menu li.current_page_item > a,
.main-navigation ul.nav-menu li.current-cat > a {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Dropdown Sub-menus */
.main-navigation ul.nav-menu li.menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 11px;
  color: #fbbf24;
  margin-right: 4px;
}

.main-navigation ul.nav-menu ul.sub-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.6);
  display: none;
  z-index: 1000;
  flex-direction: column;
  gap: 4px;
}

.main-navigation ul.nav-menu li:hover > ul.sub-menu,
.main-navigation ul.nav-menu li:focus-within > ul.sub-menu {
  display: flex;
}

.main-navigation ul.nav-menu ul.sub-menu li a {
  padding: 8px 12px;
  font-size: 13px;
  color: #e2e8f0;
  border-radius: 6px;
}

.main-navigation ul.nav-menu ul.sub-menu li a:hover {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: #1e293b;
  border: 1px solid rgba(245,158,11,0.3);
  color: #fbbf24;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mobile-nav-toggle {
    display: block;
  }
  .main-navigation {
    display: none;
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(245, 158, 11, 0.2);
  }
  .main-navigation.is-open {
    display: block;
  }
  .main-navigation ul.nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .main-navigation ul.nav-menu ul.sub-menu {
    position: static;
    display: flex;
    background: #090d16;
    border: none;
    padding-right: 15px;
  }
}

/* Footer Nav Menu */
.footer-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  line-height: 2.2;
}
.footer-nav-menu li a {
  color: #cbd5e1;
}
.footer-nav-menu li a:hover {
  color: #fbbf24;
  padding-right: 4px;
}

/* -------------------------------------------------------------
   3. ACCESSIBILITY COMPLIANCE STYLES (WCAG 2.1 AA)
------------------------------------------------------------- */
/* Font scaling */
body.acc-font-sm { font-size: 14px !important; }
body.acc-font-lg { font-size: 18px !important; }
body.acc-font-xl { font-size: 21px !important; }

/* High Contrast mode */
body.acc-high-contrast {
  background-color: #000000 !important;
  color: #ffff00 !important;
}
body.acc-high-contrast .gold-card,
body.acc-high-contrast header,
body.acc-high-contrast footer,
body.acc-high-contrast div,
body.acc-high-contrast article {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
body.acc-high-contrast a,
body.acc-high-contrast button,
body.acc-high-contrast h1,
body.acc-high-contrast h2,
body.acc-high-contrast h3,
body.acc-high-contrast h4 {
  color: #ffff00 !important;
}

/* Inverted contrast mode */
body.acc-inverted {
  filter: invert(100%) hue-rotate(180deg) !important;
  background-color: #ffffff !important;
}
body.acc-inverted img,
body.acc-inverted video {
  filter: invert(100%) hue-rotate(180deg) !important;
}

/* Grayscale mode */
body.acc-grayscale {
  filter: grayscale(100%) !important;
}

/* Link treatments */
body.acc-highlight-links a {
  background-color: #ffff00 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  padding: 2px 4px !important;
  border-radius: 4px !important;
}

body.acc-underline-links a {
  text-decoration: underline !important;
  text-decoration-color: #f59e0b !important;
  text-underline-offset: 4px !important;
}

/* Readable Spacing */
body.acc-readable-spacing {
  letter-spacing: 0.8px !important;
  word-spacing: 2px !important;
  line-height: 2 !important;
}
body.acc-readable-spacing p,
body.acc-readable-spacing h1,
body.acc-readable-spacing h2,
body.acc-readable-spacing h3 {
  line-height: 2 !important;
}

/* Stop Animations */
body.acc-no-animations,
body.acc-no-animations * {
  animation: none !important;
  transition: none !important;
}

/* Large Cursor */
body.acc-big-cursor,
body.acc-big-cursor * {
  cursor: crosshair !important;
}

/* Accessibility Floating Button & Modal Container */
#wp-acc-floating-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #030712;
  border: 2px solid #fef08a;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 15px rgba(245,158,11,0.4);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#wp-acc-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(0,0,0,0.8), 0 0 25px rgba(245,158,11,0.6);
}

/* Accessibility Modal Dialog */
#wp-acc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  direction: rtl;
}
#wp-acc-modal-overlay.is-active {
  display: flex;
}
#wp-acc-modal-box {
  background: #0f172a;
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  color: #f8fafc;
}

/* -------------------------------------------------------------
   4. GOLD ANCHOR LINKS IN POST CONTENT (טקסט עוגן וקישורים בפוסטים)
------------------------------------------------------------- */
.entry-content a,
.article-body a,
.single-post-content a,
.prose a,
.wp-block-post-content a {
  color: #fcd34d !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(251, 191, 36, 0.32) 100%) !important;
  border-bottom: 2px solid #f59e0b !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-block !important;
  line-height: 1.4 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(245, 158, 11, 0.3) !important;
}

.entry-content a:hover,
.article-body a:hover,
.single-post-content a:hover,
.prose a:hover,
.wp-block-post-content a:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  color: #030712 !important;
  border-bottom-color: #fef08a !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45) !important;
  transform: translateY(-1.5px) !important;
  text-decoration: none !important;
}

