/* =============================================
   Blog Styles - Keep.co.il
   Design system: Fredoka font, #61ce70 green, #2f5aae blue
   ============================================= */

/* Breadcrumb */
.blog-breadcrumb {
  padding: 100px 0 10px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #394C62;
}

html[lang="he"] .breadcrumb-list {
  direction: rtl;
}

.breadcrumb-item a {
  color: #2f5aae;
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumb-item a:hover {
  color: #598ced;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin: 0 4px;
  color: #A3AFBD;
}

.breadcrumb-item.active {
  color: #A3AFBD;
}

/* Blog Hero (Listing Page) */
.blog-hero {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
  padding: 30px 0 50px;
  text-align: center;
}

.blog-hero h1 {
  color: #2f5aae;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
}

.blog-hero p {
  color: #394C62;
  font-size: 20px;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Search */
.blog-search-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  padding-top: 40px;
  position: relative;
}

.blog-search-input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  border: 2px solid #e0e5ec;
  border-radius: 25px;
  font-size: 16px;
  font-family: 'Fredoka', sans-serif;
  color: #394C62;
  background: #fff;
  outline: none;
  transition: border-color 0.3s ease;
}

.blog-search-input::placeholder {
  color: #a0aec0;
}

.blog-search-input:focus {
  border-color: #2f5aae;
}

.blog-search-icon {
  position: absolute;
  left: 16px;
  color: #a0aec0;
  font-size: 16px;
  pointer-events: none;
}

/* Blog Categories Filter */
.blog-categories {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  padding-top: 40px;
  flex-wrap: wrap;
}

.blog-category-btn {
  background: #f5f7fa;
  border: 2px solid transparent;
  border-radius: 25px;
  padding: 8px 24px;
  font-size: 16px;
  font-family: 'Fredoka', sans-serif;
  color: #394C62;
  cursor: pointer;
  transition: all 0.3s ease;
}

.blog-category-btn:hover {
  border-color: #2f5aae;
  color: #2f5aae;
}

.blog-category-btn.active {
  background: #2f5aae;
  color: #fff;
  border-color: #2f5aae;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  padding: 25px;
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #2f5aae;
  border-radius: 15px 15px 0 0;
}

.blog-card-image .blog-card-title {
  color: #fff !important;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  direction: rtl;
  text-align: right;
}

html[lang="en"] .blog-card-image .blog-card-title {
  direction: ltr;
  text-align: left;
}

.blog-card-image.cat-business { background: #2f5aae; }
.blog-card-image.cat-tax { background: #6c5ce7; }
.blog-card-image.cat-invoices { background: #00b894; }

.blog-card-category {
  position: absolute;
  top: 15px;
  background: #61ce70;
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

html[lang="he"] .blog-card-category {
  right: 15px;
}

html[lang="en"] .blog-card-category {
  left: 15px;
}

.blog-card-content {
  padding: 25px 30px 30px;
}

html[lang="he"] .blog-card-content {
  text-align: right;
  direction: rtl;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #A3AFBD;
  margin-bottom: 12px;
}

.blog-card-separator {
  color: #ddd;
}

.blog-card-readtime i {
  margin-left: 4px;
}

html[lang="en"] .blog-card-readtime i {
  margin-left: 0;
  margin-right: 4px;
}

.blog-card-title {
  color: #0f1e49;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.blog-card:hover .blog-card-title {
  color: inherit;
}

.blog-card-excerpt {
  color: #394C62;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-readmore {
  color: #2f5aae;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}

.blog-card:hover .blog-card-readmore {
  gap: 10px;
}

/* Blog CTA Section */
.blog-cta {
  padding: 60px 0;
  background: #f5f7fa;
}

.blog-cta-box {
  background: linear-gradient(135deg, #2f5aae 0%, #598ced 100%);
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  color: #fff;
}

.blog-cta-box h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
}

.blog-cta-box p {
  font-size: 18px;
  margin-bottom: 25px;
  opacity: 0.9;
}

.blog-cta-box .btn2 {
  background: #61ce70;
  max-width: 350px;
  margin: 0 auto;
}

/* =============================================
   Article Page Styles
   ============================================= */

/* Article Hero */
.blog-article-hero {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f0fe 100%);
  padding: 20px 0 30px;
}

html[lang="he"] .blog-article-hero {
  text-align: right;
  direction: rtl;
}

html[lang="en"] .blog-article-hero {
  text-align: left;
}

.blog-article-meta-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #394C62;
}

.blog-article-category {
  background: #61ce70;
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.blog-article-readtime i {
  margin-left: 4px;
}

html[lang="en"] .blog-article-readtime i {
  margin-left: 0;
  margin-right: 4px;
}

.blog-article-title {
  color: #0f1e49;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
}

.blog-article-subtitle {
  color: #394C62;
  font-size: 20px;
  line-height: 1.5;
}

/* Article Hero Image */
.blog-article-hero-image {
  margin-bottom: 40px;
}

.blog-article-hero-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Article Layout (Content + TOC Sidebar) */
.blog-article-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

html[lang="he"] .blog-article-layout {
  direction: rtl;
}

/* Table of Contents */
.blog-toc-sticky {
  position: sticky;
  top: 100px;
}

.blog-toc-title {
  color: #0f1e49;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0fe;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-list li {
  margin-bottom: 10px;
}

.blog-toc-list li a {
  color: #394C62;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  display: block;
  padding: 4px 0;
  transition: color 0.3s, padding 0.3s;
  border-right: 3px solid transparent;
  padding-right: 10px;
}

html[lang="en"] .blog-toc-list li a {
  border-right: none;
  border-left: 3px solid transparent;
  padding-right: 0;
  padding-left: 10px;
}

.blog-toc-list li a:hover,
.blog-toc-list li a.active {
  color: #2f5aae;
  border-right-color: #2f5aae;
}

html[lang="en"] .blog-toc-list li a:hover,
html[lang="en"] .blog-toc-list li a.active {
  border-left-color: #2f5aae;
  border-right-color: transparent;
}

/* Social Share Sidebar */
.blog-share-sidebar {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #e8f0fe;
}

.blog-share-sidebar h4 {
  color: #0f1e49;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.blog-share-buttons {
  display: flex;
  gap: 8px;
}

.blog-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  font-size: 16px;
}

.blog-share-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.blog-share-facebook { background: #1877f2; }
.blog-share-linkedin { background: #0a66c2; }
.blog-share-whatsapp { background: #25d366; }
.blog-share-twitter { background: #000; }

/* Article Content Typography */
.blog-article-content {
  max-width: 750px;
}

html[lang="he"] .blog-article-content {
  direction: rtl;
  text-align: right;
}

.blog-article-content h2 {
  color: #0f1e49;
  font-size: 28px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 20px;
  line-height: 1.3;
  scroll-margin-top: 100px;
}

.blog-article-content h3 {
  color: #2f5aae;
  font-size: 22px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.blog-article-content p {
  color: #394C62;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.blog-article-content ul,
.blog-article-content ol {
  color: #394C62;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  padding: 0;
}

html[lang="he"] .blog-article-content ul,
html[lang="he"] .blog-article-content ol {
  padding-right: 25px;
}

html[lang="en"] .blog-article-content ul,
html[lang="en"] .blog-article-content ol {
  padding-left: 25px;
}

.blog-article-content li {
  margin-bottom: 8px;
}

.blog-article-content blockquote {
  border-right: 4px solid #61ce70;
  background: #f5f7fa;
  padding: 20px 25px;
  margin: 25px 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #394C62;
}

html[lang="en"] .blog-article-content blockquote {
  border-right: none;
  border-left: 4px solid #61ce70;
  border-radius: 10px 0 0 10px;
}

.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-article-content strong {
  color: #0f1e49;
  font-weight: 600;
}

.blog-article-content a {
  color: #2f5aae;
  text-decoration: underline;
  transition: color 0.3s;
}

.blog-article-content a:hover {
  color: #598ced;
}

/* Inline CTA */
.blog-inline-cta {
  background: linear-gradient(135deg, #e8f0fe 0%, #f5f7fa 100%);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  margin: 30px 0;
  border: 2px solid #e8f0fe;
}

.blog-inline-cta p {
  color: #0f1e49;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

.blog-inline-cta .btn2 {
  max-width: 300px;
  margin: 0 auto;
  background: #61ce70;
}

/* Author Box */
.blog-author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
  background: #f5f7fa;
  border-radius: 15px;
  margin: 40px 0;
}

html[lang="he"] .blog-author-box {
  direction: rtl;
  text-align: right;
}

.blog-author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}

.blog-author-info h4 {
  color: #0f1e49;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.blog-author-info p {
  color: #394C62;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Share Bottom */
.blog-share-bottom {
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 40px;
}

.blog-share-bottom h4 {
  color: #0f1e49;
  font-size: 18px;
  margin-bottom: 15px;
}

.blog-share-bottom .blog-share-buttons {
  justify-content: center;
}

.blog-share-bottom .blog-share-btn {
  color: #fff;
}

.footer-hover-link {
  color: #fff;
  text-decoration: none;
}

.footer-hover-link:hover {
  text-decoration: underline;
}

/* =============================================
   Responsive Blog Styles
   ============================================= */
@media (max-width: 991px) {
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .blog-toc {
    order: -1;
  }

  .blog-toc-sticky {
    position: static;
    background: #f5f7fa;
    border-radius: 15px;
    padding: 20px 25px;
    margin-bottom: 30px;
  }

  .blog-share-sidebar {
    display: none;
  }

  .blog-article-title {
    font-size: 32px;
  }
}

@media (max-width: 767px) {
  .blog-breadcrumb {
    padding: 85px 0 10px;
  }

  .blog-hero h1 {
    font-size: 32px;
  }

  .blog-hero p {
    font-size: 17px;
  }

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

  .blog-article-title {
    font-size: 28px;
  }

  .blog-article-content h2 {
    font-size: 24px;
  }

  .blog-article-content h3 {
    font-size: 20px;
  }

  .blog-article-content p {
    font-size: 16px;
  }

  .blog-cta-box {
    padding: 35px 25px;
  }

  .blog-cta-box h2 {
    font-size: 26px;
  }

  .blog-author-box {
    flex-direction: column;
    text-align: center;
  }

  html[lang="he"] .blog-author-box {
    text-align: center;
  }

  .blog-categories {
    padding-top: 25px;
  }
}

@media (max-width: 450px) {
  .blog-hero {
    padding: 20px 0 30px;
  }

  .blog-hero h1 {
    font-size: 28px;
  }

  .blog-card-content {
    padding: 20px;
  }

  .blog-card-title {
    font-size: 20px;
  }
}
