/*
Theme Name: Clean News Portal - תבנית מגזין ופורטל חדשות
Theme URI: https://dlions.co.il
Author: Clean News Studio
Author URI: https://dlions.co.il
Description: תבנית וורדפרס מגזין ופורטל חדשות דינאמית בקו עיצובי נקי, מודרני ונגיש. כוללת הסרת תאריכים מוחלטת, פונט Heebo אחיד, מערכת באנרים מובנית (מלכת החינות ויויו מגנט), סרגל נגישות צף, חיפוש מהיר, ותצוגת מגזין עשירה עם סיידבר הנקראות ביותר, מדורי תוכן ופיד כתבות אחרונות.
Version: 1.1.0
Text Domain: clean-news-portal
Domain Path: /languages
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
*/

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

/* ==========================================================================
   Base & Typography (Strict: Heebo font ONLY across entire site)
   ========================================================================== */
*, *::before, *::after, html, body, input, button, select, textarea {
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box;
}

:root {
  --font-main: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-bg: #fcfcfd;
  --color-card-bg: #ffffff;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #94a3b8;
  --color-primary: #0284c7;
  --color-primary-dark: #0369a1;
  --color-primary-light: #e0f2fe;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --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.03);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Site Header & Navigation
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.site-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}

.site-brand-icon svg {
  width: 22px;
  height: 22px;
}

.site-brand-text h1,
.site-brand-text .site-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.site-brand-text .site-description {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Header Search Form */
.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-form input[type="search"] {
  padding: 0.55rem 2.25rem 0.55rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  width: 200px;
  transition: all 0.2s ease;
}

.header-search-form input[type="search"]:focus {
  background: #ffffff;
  border-color: #0284c7;
  width: 240px;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.header-search-form .search-icon {
  position: absolute;
  right: 12px;
  color: #94a3b8;
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Accessibility Button */
.btn-a11y-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-a11y-pill:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Primary Navigation Menu */
.primary-nav-bar {
  border-top: 1px solid var(--color-border-subtle);
  background: #ffffff;
}

.primary-nav-inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0;
}

.primary-nav-inner::-webkit-scrollbar {
  display: none;
}

.primary-menu-list,
.primary-nav-inner ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem;
}

.primary-menu-list li a,
.primary-nav-inner ul li a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.primary-menu-list li a:hover,
.primary-nav-inner ul li a:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.primary-menu-list li.current-menu-item a,
.primary-menu-list li.active a,
.primary-nav-inner ul li.current-menu-item a {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 800;
}

/* ==========================================================================
   Lead Magazine Section (Hero + Trending Sidebar)
   ========================================================================== */
.lead-magazine-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 992px) {
  .lead-magazine-section {
    grid-template-columns: 8fr 4fr;
    align-items: stretch;
  }
}

/* Featured Hero Article */
.hero-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.hero-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.hero-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.hero-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover .hero-card-media img {
  transform: scale(1.03);
}

.hero-card-content {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.badge-lead {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

.badge-category {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

.meta-reading-time {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-right: auto;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  letter-spacing: -0.015em;
}

.hero-title a:hover {
  color: #0284c7;
}

.hero-excerpt {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.hero-read-more {
  margin-top: auto;
  color: #0284c7;
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Trending Top Stories Sidebar (Right 4 cols in RTL) */
.trending-sidebar-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.trending-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.trending-header svg {
  color: #0284c7;
  width: 18px;
  height: 18px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  text-decoration: none;
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.trending-item:hover .trending-number {
  background: #0284c7;
  color: #ffffff;
}

.trending-info {
  flex: 1;
}

.trending-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.trending-item:hover .trending-item-title {
  color: #0284c7;
}

.trending-item-meta {
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.trending-footer-notice {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-light);
}

/* ==========================================================================
   Moroccan Banner 1 (Home Page Exclusive)
   ========================================================================== */
.banner-moroccan {
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
  padding: 1.85rem 2rem;
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #450a0a 100%);
  border: 1px solid #b91c1c;
  color: #ffffff;
  box-shadow: 0 10px 25px -5px rgba(153, 27, 27, 0.3);
  position: relative;
  overflow: hidden;
}

.banner-moroccan .btn-cta {
  display: inline-block;
  background: #f59e0b;
  color: #451a03;
  font-weight: 900;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.banner-moroccan .btn-cta:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

/* ==========================================================================
   Yoyo Magnet Banner 2 (In-flow / Category Interspersed)
   ========================================================================== */
.banner-yoyo {
  margin: 2.5rem 0;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0369a1 100%);
  border: 1px solid #334155;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.banner-yoyo .btn-cta {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.banner-yoyo .btn-cta:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

/* ==========================================================================
   Category Section Blocks
   ========================================================================== */
.category-section-block {
  margin: 3.5rem 0;
}

.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #0f172a;
}

.category-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-accent-bar {
  width: 4px;
  height: 24px;
  background: #0284c7;
  border-radius: 2px;
}

.category-block-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.category-count-badge {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.category-view-all-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.category-view-all-link:hover {
  color: #0369a1;
}

/* ==========================================================================
   Post Cards & Grid
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.05);
}

.post-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.9rem;
}

.post-card-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.post-card-category {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 999px;
}

.post-card-reading {
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.post-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a:hover {
  color: #0284c7;
}

.post-card-excerpt {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.post-card-link:hover {
  color: #0369a1;
}

/* ==========================================================================
   Latest News Grid Section
   ========================================================================== */
.latest-posts-section {
  margin: 3.5rem 0 4rem;
}

/* Pagination */
.pagination,
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}

.pagination .page-numbers,
.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--color-border);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all 0.15s ease;
}

.pagination .page-numbers:hover,
.nav-links .page-numbers:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}

.pagination .page-numbers.current,
.nav-links .page-numbers.current {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   MANDATORY SPEC: Anchor link highlighter in single post content
   ========================================================================== */
.single-post .entry-content a {
  background-color: #f3f4f6;
  font-weight: 700;
  color: #0284c7;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: all 0.15s ease-in-out;
  display: inline-block;
}

.single-post .entry-content a:hover {
  background-color: #fef08a; /* Soft highlighter yellow */
  color: #0369a1;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

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

.footer-col-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-col-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: #0284c7;
  border-radius: 2px;
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links-list li a {
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links-list li a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
}

/* ==========================================================================
   Accessibility Classes (Toggled via JS)
   ========================================================================== */
body.a11y-high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}

body.a11y-high-contrast .site-header,
body.a11y-high-contrast .hero-card,
body.a11y-high-contrast .trending-sidebar-card,
body.a11y-high-contrast .post-card {
  background-color: #121212 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

body.a11y-high-contrast a,
body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4 {
  color: #ffff00 !important;
}

body.a11y-grayscale {
  filter: grayscale(100%) !important;
}

body.a11y-highlight-links a {
  background-color: #ffff00 !important;
  color: #000000 !important;
  text-decoration: underline !important;
}
