/*
Theme Name: Mivzak Press - עיתון ומגזין חדשות
Theme URI: https://dlions.co.il/
Author: Dlions & Liga SEO
Author URI: https://dlions.co.il/
Description: תבנית חדשות ומגזין מקצועית לוורדפרס, מותאמת במלואה לעברית ו-RTL, פונט אחיד Heebo, תפריט קטגוריות היררכי, סרגל מבזקים מתפרצים, תוסף נגישות מובנה, סיידבר עשיר ופוטר מלא עם קישורים ודיסקליימר משפטי.
Version: 1.2.0
Requires at least: 6.0
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: mivzak-press
Domain Path: /languages
Tags: news, magazine, rtl-language-support, accessibility-ready, custom-menu, featured-images, footer-widgets, two-columns
*/

@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-primary: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --color-primary: #b91c1c; /* Red 700 */
  --color-primary-hover: #991b1b;
  --color-primary-dark: #7f1d1d;
  --color-primary-light: #fef2f2;
  --color-dark: #1c1917; /* Stone 900 */
  --color-text: #292524;
  --color-text-muted: #78716c;
  --color-bg: #f5f5f4; /* Stone 100 */
  --color-card-bg: #ffffff;
  --color-border: #e7e5e4;
  --color-border-light: #f5f5f4;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* Reset & Global Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  direction: rtl;
  text-align: right;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-dark);
  font-weight: 800;
  line-height: 1.25;
}

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

a:hover {
  color: var(--color-primary);
}

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

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

/* ==========================================================================
   1. Top Bar
   ========================================================================== */
.top-bar {
  background-color: #0c0a09;
  color: #a8a29e;
  font-size: 12px;
  border-bottom: 1px solid #292524;
  padding: 6px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.market-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.market-up { color: #22c55e; }
.market-down { color: #ef4444; }

/* ==========================================================================
   2. Main Site Header (Desktop Default)
   ========================================================================== */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 990;
}

.header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 20px;
}

/* Branding (Right Side) */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo-badge {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: -0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-titles-box {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.site-description {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.2;
}

/* Header Actions (Left Side) */
.header-actions {
  display: flex;
  align-items: center;
}

.desktop-search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  background-color: #f5f5f4;
  transition: border-color 0.2s, background-color 0.2s;
}

.desktop-search-form:focus-within {
  border-color: var(--color-primary);
  background-color: #ffffff;
}

.desktop-search-form .search-field {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  width: 220px;
  color: var(--color-dark);
}

.desktop-search-form .search-submit {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}

.desktop-search-form .search-submit:hover {
  color: var(--color-primary);
}

/* Mobile-only elements hidden completely on desktop */
.mobile-nav-toggle,
.mobile-search-btn,
.mobile-search-bar,
.mobile-drawer,
.drawer-backdrop {
  display: none !important;
}

/* ==========================================================================
   3. Primary Category Navigation Bar
   ========================================================================== */
.primary-nav-bar {
  background-color: #ffffff;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border);
}

.nav-scroll-container {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 0;
  list-style: none;
  z-index: 50;
}

.nav-menu li:hover > .sub-menu {
  display: block;
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.nav-menu .sub-menu li a:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* ==========================================================================
   4. Breaking News Ticker
   ========================================================================== */
.breaking-news-bar {
  background-color: #1c1917;
  color: #ffffff;
  font-size: 13px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid #292524;
  height: 40px;
}

.ticker-badge {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 900;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 100%;
}

.ticker-content {
  flex-grow: 1;
  padding: 0 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ticker-link {
  color: #e7e5e4;
  font-weight: 600;
}

.ticker-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* ==========================================================================
   5. Layout Grids & Front Page
   ========================================================================== */
.main-layout {
  padding: 20px 0 40px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 8fr 4fr;
  }
}

.hero-section {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.lead-story {
  display: flex;
  flex-direction: column;
}

.lead-story-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: #e7e5e4;
}

.lead-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lead-story:hover .lead-story-image img {
  transform: scale(1.03);
}

.badge-category {
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.lead-story-title {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 900;
  margin-top: 10px;
  margin-bottom: 6px;
  color: var(--color-dark);
  line-height: 1.3;
}

.lead-story-subtitle {
  font-size: 14px;
  color: #57534e;
  line-height: 1.55;
}

/* Category Block */
.category-block {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.category-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.category-block-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--color-dark);
  position: relative;
  padding-right: 12px;
}

.category-block-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Sidebar & Widgets */
.sidebar-widget {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--color-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: inline-block;
}

/* Single Article Styling */
.single-article {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 20px;
}

.article-title {
  font-size: clamp(20px, 4.5vw, 32px);
  font-weight: 900;
  line-height: 1.3;
  margin: 10px 0;
  color: var(--color-dark);
}

.article-subtitle {
  font-size: clamp(14px, 3.2vw, 17px);
  color: #57534e;
  line-height: 1.55;
  font-weight: 400;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  padding: 10px 0;
  margin-top: 14px;
}

.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: #292524;
}

.article-content p {
  margin-bottom: 18px;
}

.article-content a {
  color: #991b1b;
  font-weight: 700;
  text-decoration: none;
  background-color: #fee2e2;
  border-bottom: 2px solid #b91c1c;
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  display: inline;
}

.article-content a:hover {
  background-color: #b91c1c;
  color: #ffffff !important;
  border-bottom-color: transparent;
}

.article-content blockquote {
  border-right: 4px solid var(--color-primary);
  padding: 14px 18px;
  background-color: var(--color-primary-light);
  font-style: italic;
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Post Cards */
.post-card-horizontal {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.post-card-thumb {
  width: 160px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f4;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer & Legal */
.site-footer {
  background-color: #0c0a09;
  color: #d6d3d1;
  font-size: 14px;
  padding-top: 40px;
  border-top: 3px solid var(--color-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 32px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  border-right: 3px solid var(--color-primary);
  padding-right: 10px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #a8a29e;
}

.footer-links a:hover {
  color: #ffffff;
  padding-right: 4px;
}

.footer-disclaimer-box {
  background-color: #1c1917;
  border: 1px solid #292524;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 28px;
}

.disclaimer-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.disclaimer-text {
  font-size: 12px;
  color: #a8a29e;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid #292524;
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #78716c;
}

/* ==========================================================================
   6. Mobile Only Specific Rules (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .top-bar {
    font-size: 11px;
    padding: 4px 0;
  }
  .top-bar-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .top-bar-inner::-webkit-scrollbar {
    display: none;
  }
  .top-bar-right, .top-bar-left {
    gap: 8px;
    flex-shrink: 0;
  }
  .market-hide-mobile {
    display: none;
  }

  .header-main-row {
    padding: 8px 0;
    gap: 10px;
  }

  .desktop-search-form {
    display: none !important;
  }

  /* Show Hamburger & Search Buttons */
  .mobile-nav-toggle {
    display: flex !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
  }
  .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--color-dark);
    border-radius: 2px;
  }

  .mobile-search-btn {
    display: flex !important;
    background: #f5f5f4;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    cursor: pointer;
  }

  .site-title {
    font-size: 18px;
  }
  .site-logo-badge {
    font-size: 12px;
    padding: 4px 8px;
  }
  .site-description {
    display: none;
  }

  /* Expandable Mobile Search */
  .mobile-search-bar {
    display: none;
    background-color: #ffffff;
    border-top: 1px solid var(--color-border-light);
    padding: 8px 0;
  }
  .mobile-search-bar.is-active {
    display: block !important;
  }
  .search-form-mobile {
    display: flex;
    gap: 6px;
  }
  .search-field-mobile {
    flex-grow: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    background-color: #f5f5f4;
  }
  .search-submit-mobile {
    background-color: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  /* Horizontal swipeable category nav */
  .primary-nav-bar {
    border-bottom: 1px solid var(--color-border);
  }
  .nav-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-left: 8px;
    padding-right: 8px;
  }
  .nav-scroll-container::-webkit-scrollbar {
    display: none;
  }
  .nav-menu {
    flex-wrap: nowrap;
    width: max-content;
    gap: 2px;
    padding: 2px 0;
  }
  .nav-menu > li > a {
    padding: 8px 10px;
    font-size: 13px;
    border-bottom-width: 2px;
  }
  .nav-menu .sub-menu {
    display: none !important;
  }

  /* Mobile Drawer (Only on mobile) */
  .drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99998;
  }
  .drawer-backdrop.is-active {
    display: block !important;
  }

  .mobile-drawer {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background-color: #ffffff;
    z-index: 99999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    text-align: right;
    overflow-y: auto;
  }
  .mobile-drawer.is-open {
    transform: translateX(0) !important;
  }

  .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    background-color: #fafaf9;
  }
  .drawer-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-dark);
    cursor: pointer;
    padding: 4px 8px;
  }
  .drawer-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .drawer-search-form {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 14px;
    background-color: #f5f5f4;
  }
  .drawer-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
  }
  .drawer-search-btn {
    background: none;
    border: none;
    padding: 0 10px;
    cursor: pointer;
  }
  .drawer-nav-menu {
    list-style: none;
    margin-bottom: 20px;
  }
  .drawer-nav-menu li {
    border-bottom: 1px solid var(--color-border-light);
  }
  .drawer-nav-menu li a {
    display: block;
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 700;
  }
  .drawer-footer-info {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .breaking-news-bar {
    height: 36px;
    font-size: 12px;
  }
  .ticker-badge {
    padding: 0 10px;
    font-size: 11px;
  }
  .ticker-content {
    padding: 0 10px;
  }

  .hero-section {
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }
  .category-block {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }
  .category-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .single-article {
    padding: 16px 12px;
    border-radius: var(--radius-md);
  }
  .post-card-horizontal {
    padding: 10px;
    gap: 10px;
  }
  .post-card-thumb {
    width: 95px;
    height: 70px;
  }
  .post-card-excerpt {
    display: none;
  }
  .site-footer {
    padding-top: 24px;
  }
}
