/*
Theme Name:   Tivei Child
Theme URI:    https://tivei.co.il
Description:  ערכת נושא מותאמת לפורטל רפואה משלימה טיבעי — ילד של Hello Elementor
Author:       SEO Gavish
Author URI:   https://seo-gavish.co.il
Template:     hello-elementor
Version:      1.0.0
Text Domain:  tivei-child
Tags:         rtl, hebrew, health, alternative-medicine
*/

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Palette — warm sage & earth */
  --clr-forest:    #2D5A27;   /* deep forest green — primary */
  --clr-sage:      #6A9B5E;   /* sage green — secondary */
  --clr-sage-lt:   #A8C89E;   /* light sage */
  --clr-sage-bg:   #F0F5EE;   /* near-white green tint */
  --clr-earth:     #8B5E3C;   /* warm earth brown — accent */
  --clr-sand:      #E8D5B7;   /* sand */
  --clr-sand-lt:   #FAF6F0;   /* off-white warm */
  --clr-gold:      #C9952A;   /* golden accent */
  --clr-sky:       #4A7FA5;   /* calm blue — links */
  --clr-sky-dk:    #2D5F82;

  /* Neutrals */
  --clr-text:      #2A2A2A;
  --clr-text-muted:#6B6B6B;
  --clr-border:    #DDE8D8;
  --clr-white:     #FFFFFF;

  /* Typography */
  --font-display:  'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  --font-body:     'Heebo', 'Arial Hebrew', Arial, sans-serif;
  --font-ui:       'Heebo', Arial, sans-serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(45,90,39,0.10);
  --shadow-md: 0 4px 16px rgba(45,90,39,0.12);
  --shadow-lg: 0 8px 32px rgba(45,90,39,0.16);

  /* Layout */
  --container-max: 1200px;
  --sidebar-width: 280px;
  --header-height: 80px;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text);
  background: var(--clr-sand-lt);
  direction: rtl;
  text-align: right;
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--clr-forest);
  margin-top: 0;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 var(--space-md); }

a {
  color: var(--clr-sky);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--clr-sky-dk); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT CONTAINERS
   ═══════════════════════════════════════════════════════════ */
.site-container,
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--clr-white);
  border-bottom: 3px solid var(--clr-sage);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-lg);
}

/* Logo */
.site-logo a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.site-logo .logo-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--clr-forest);
  line-height: 1;
}

.site-logo .logo-tagline {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  display: block;
  font-family: var(--font-body);
}

/* ═══════════════════════════════════════════════════════════
   PRIMARY NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.main-nav {
  background: var(--clr-forest);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.main-nav ul li a {
  display: block;
  padding: 12px var(--space-md);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.main-nav ul li:last-child a { border-left: none; }

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
  background: var(--clr-sage);
  color: var(--clr-white);
}

/* ═══════════════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════════════ */
.site-hero {
  background: linear-gradient(135deg, var(--clr-forest) 0%, var(--clr-sage) 60%, var(--clr-sage-lt) 100%);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.site-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.site-hero__content {
  position: relative;
  z-index: 1;
}

.site-hero h1 {
  color: var(--clr-white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-shadow: 0 2px 8px rgba(0,0,0,.2);
  margin-bottom: var(--space-md);
}

.site-hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

/* ═══════════════════════════════════════════════════════════
   SEARCH BAR (מחפש מטפל)
   ═══════════════════════════════════════════════════════════ */
.therapist-search {
  background: var(--clr-gold);
  padding: var(--space-md) 0;
}

.therapist-search .search-inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.therapist-search label {
  font-weight: 700;
  color: var(--clr-white);
  white-space: nowrap;
}

.therapist-search select,
.therapist-search input[type="text"] {
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-width: 140px;
}

.therapist-search .btn-search {
  background: var(--clr-forest);
  color: var(--clr-white);
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}

.therapist-search .btn-search:hover {
  background: var(--clr-sage);
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT LAYOUT (3-column)
   ═══════════════════════════════════════════════════════════ */
.site-main {
  padding: var(--space-xl) 0;
}

.content-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
  gap: var(--space-xl);
  align-items: start;
}

/* ═══════════════════════════════════════════════════════════
   CARDS — general
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.card__body {
  padding: var(--space-md) var(--space-lg);
}

.card__meta {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-xs);
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--clr-forest);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.card__title a { color: inherit; }
.card__title a:hover { color: var(--clr-sage); text-decoration: none; }

.card__excerpt {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

.card__footer {
  padding: var(--space-sm) var(--space-lg);
  border-top: 1px solid var(--clr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════════════════════ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--clr-white);
  background: var(--clr-forest);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 1.2em;
  background: var(--clr-gold);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-box {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-white);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.section-box__body {
  padding: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════
   ARTICLES GRID (homepage)
   ═══════════════════════════════════════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.articles-grid .card:first-child {
  grid-column: 1 / -1;
}

.articles-grid .card:first-child .card__title {
  font-size: 1.4rem;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR WIDGETS
   ═══════════════════════════════════════════════════════════ */
.widget { margin-bottom: var(--space-lg); }

/* Category list widget */
.widget-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-categories ul li {
  border-bottom: 1px solid var(--clr-border);
}

.widget-categories ul li:last-child { border-bottom: none; }

.widget-categories ul li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--space-md);
  color: var(--clr-text);
  font-size: 0.9rem;
  transition: background .15s, color .15s;
}

.widget-categories ul li a:hover {
  background: var(--clr-sage-bg);
  color: var(--clr-forest);
  text-decoration: none;
}

.widget-categories ul li a .count {
  background: var(--clr-sage-lt);
  color: var(--clr-forest);
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}

/* Tag cloud */
.widget-tags .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: var(--space-md);
}

.widget-tags .tag-cloud a {
  background: var(--clr-sage-bg);
  color: var(--clr-forest);
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--clr-border);
  transition: background .15s, color .15s;
  text-decoration: none;
}

.widget-tags .tag-cloud a:hover {
  background: var(--clr-sage);
  color: var(--clr-white);
  border-color: var(--clr-sage);
}

/* Recent posts widget */
.widget-recent-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-recent-posts ul li {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--clr-border);
  font-size: 0.875rem;
  line-height: 1.4;
}

.widget-recent-posts ul li:last-child { border-bottom: none; }

.widget-recent-posts ul li a {
  color: var(--clr-text);
  font-weight: 500;
}

.widget-recent-posts ul li a:hover {
  color: var(--clr-forest);
}

.widget-recent-posts ul li .post-date {
  display: block;
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY BADGE (post type label)
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.badge--article   { background: #E8F5E9; color: #2D5A27; }
.badge--treatment { background: #E3F2FD; color: #1565C0; }
.badge--story     { background: #FFF8E1; color: #E65100; }
.badge--lexicon   { background: #F3E5F5; color: #6A1B9A; }

/* ═══════════════════════════════════════════════════════════
   SINGLE POST
   ═══════════════════════════════════════════════════════════ */
.single-post-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-xl);
  align-items: start;
}

.post-article {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post-article__header {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
}

.post-article__meta {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  flex-wrap: wrap;
}

.post-article__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--clr-forest);
  margin-bottom: 0;
}

.post-article__featured-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.post-article__content {
  padding: var(--space-xl);
  font-size: 1.05rem;
  line-height: 1.85;
}

.post-article__content h2,
.post-article__content h3 {
  margin-top: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-sage-bg);
}

.post-article__content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  height: auto;
}

.post-article__content blockquote {
  border-right: 4px solid var(--clr-sage);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--clr-sage-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--clr-forest);
}

/* ═══════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════ */
.breadcrumbs {
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumbs a { color: var(--clr-sky); }
.breadcrumbs .sep { color: var(--clr-border); }

/* ═══════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  margin: var(--space-xl) 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background .2s, color .2s;
}

.pagination a {
  background: var(--clr-white);
  color: var(--clr-forest);
  border: 1px solid var(--clr-border);
  text-decoration: none;
}

.pagination a:hover { background: var(--clr-sage-bg); border-color: var(--clr-sage); }

.pagination .current {
  background: var(--clr-forest);
  color: var(--clr-white);
  border: 1px solid var(--clr-forest);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
  border: none;
  line-height: 1;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

.btn-primary {
  background: var(--clr-forest);
  color: var(--clr-white);
}
.btn-primary:hover { background: var(--clr-sage); color: var(--clr-white); }

.btn-secondary {
  background: var(--clr-white);
  color: var(--clr-forest);
  border: 2px solid var(--clr-forest);
}
.btn-secondary:hover { background: var(--clr-sage-bg); }

.btn-gold {
  background: var(--clr-gold);
  color: var(--clr-white);
}
.btn-gold:hover { background: #b8841f; color: var(--clr-white); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--clr-forest);
  color: rgba(255,255,255,.8);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  color: var(--clr-white);
  font-family: var(--font-display);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--clr-sage);
  font-size: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li { margin-bottom: var(--space-sm); }

.footer-col ul li a {
  color: rgba(255,255,255,.7);
  font-size: 0.9rem;
  transition: color .2s;
  text-decoration: none;
}

.footer-col ul li a:hover { color: var(--clr-sage-lt); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr var(--sidebar-width);
  }

  .content-layout .sidebar-right {
    display: none;
  }

  .single-post-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid .card:first-child {
    grid-column: auto;
  }

  .main-nav ul {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .main-nav ul li a {
    padding: 10px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .post-article__header,
  .post-article__content {
    padding: var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .therapist-search .search-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.text-muted   { color: var(--clr-text-muted); }
.text-forest  { color: var(--clr-forest); }
.text-center  { text-align: center; }
.mt-lg        { margin-top: var(--space-lg); }
.mb-lg        { margin-bottom: var(--space-lg); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
