/* ======= חיפוש ======= */
.blog-search-section {
  padding: 2rem 0;
  background: var(--white-color);
}
.blog-search-section input#blog-search {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow-light);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.blog-search-section input#blog-search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 56, 123, 0.15);
}

/* ======= גריד פוסטים ======= */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 2rem;
  margin: 3rem 0;
}

/* ======= כרטיס פוסט ======= */
.blog-card {
  display: block;
  background: var(--white-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--box-shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow);
}
.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover img {
  transform: scale(1.1);
}
.blog-card-content {
  padding: 1rem;
}
.blog-card-content .date {
  display: block;
  font-size: 0.85rem;
  color: var(--medium-gray);
}
.blog-card-content h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
  color: var(--primary-color);
}
.blog-card-content p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

/* תגיות */
.tag {
  display: inline-block;
  background: var(--light-gray);
  color: var(--secondary-color);
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 3px;
  font-size: 0.8rem;
}

/* ======= תצוגת פוסט בודד ======= */
.post-hero {
  position: relative;
  height: 60vh;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow: hidden;
  animation: zoomOutHero 10s ease-out forwards;
}
@keyframes zoomOutHero {
  0% { background-size: 115%; }
  100% { background-size: 100%; }
}
.post-hero .overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.post-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.post-hero-content h1 {
  font-size: 2.8rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin: 0;
}

/* תוכן הפוסט */
.post-content {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
  font-size: 1.1rem;
  line-height: 1.8;
}
.back-button {
  display: inline-block;
  margin-top: 2rem;
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
  border: 2px solid var(--primary-color);
  padding: 8px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
}
.back-button:hover {
  background: var(--primary-color);
  color: #fff;
}

/* מטא דטה */
.post-meta-section {
  background: var(--light-gray);
  padding: 1.5rem 0;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--medium-gray);
}
.meta-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--secondary-color);
  font-weight: bold;
}
.meta-date i {
  color: var(--primary-color);
}
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.meta-tags .tag {
  background: var(--primary-color);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* ======= רספונסיביות מתוקנת מלאה ======= */
@media (max-width: 768px) {
  .blog-card img {
    height: 180px;
  }

  .post-hero {
    height: 35vh;
    background-size: 130%;
    background-position: center center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    overflow: hidden;
    animation: zoomOutHeroMobile 10s ease-out forwards;
    padding: 2rem 0;
  }
  .post-hero-content h1 {
    font-size: 1.6rem;
    padding: 0 1rem;
    line-height: 1.4;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
  }
  .post-meta-section {
    padding: 1rem 0;
  }
  .post-meta {
    gap: 0.5rem;
    font-size: 0.85rem;
  }
  .meta-tags .tag {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .post-content {
    padding: 1rem;
    font-size: 1rem;
  }
  .back-button {
    margin-top: 1.5rem;
    padding: 6px 16px;
    font-size: 0.9rem;
  }
}
/* זום אין ואז אאוט במובייל */
@keyframes zoomOutHeroMobile {
  0% { background-size: 130%; }
  100% { background-size: 100%; }
}
