/* ===== עיצוב דף הבלוג ===== */

.blog-wrapper {
  flex: 1;
  padding: 40px 20px;
  margin-top: 140px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.blog-header {
  text-align: center;
  margin-bottom: 50px;
  margin-top: 40px;
}

.blog-title {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.blog-title i {
  -webkit-text-fill-color: #ff758c;
}

.blog-subtitle {
  font-size: 24px;
  color: #2c3e50;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  border-radius: 50px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* רשת הפוסטים */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 35px;
  margin-top: 40px;
}

/* כרטיס פוסט */
.blog-post {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 182, 193, 0.3);
  display: flex;
  flex-direction: column;
}

.blog-post:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(255, 117, 140, 0.3);
}

/* תמונת הפוסט */
.post-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-post:hover .post-image img {
  transform: scale(1.1);
}

/* קטגוריה */
.post-category {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* תוכן הפוסט */
.post-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.blog-post:hover .post-title {
  color: #ff758c;
}

/* מטא דאטה */
.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #666;
  flex-wrap: wrap;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta i {
  color: #ff758c;
}

/* תקציר */
.post-excerpt {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

/* כפתור קרא עוד */
.read-more-btn {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  font-family: "Heebo", sans-serif;
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 117, 140, 0.4);
}

.read-more-btn i {
  transition: transform 0.3s ease;
}

.read-more-btn:hover i {
  transform: translateX(-5px);
}

/* ===== Modal לתוכן מלא ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  overflow-y: auto;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: sticky;
  top: 20px;
  left: 20px;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  float: left;
  margin: 20px 20px 0 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 15px rgba(255, 117, 140, 0.5);
}

.modal-body {
  padding: 40px;
  clear: both;
}

.modal-body h2 {
  font-size: 36px;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
}

.modal-body .post-meta {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.modal-body h3 {
  font-size: 26px;
  color: #34495e;
  margin: 30px 0 15px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body h3 i {
  color: #ff758c;
}

.modal-body p {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

.modal-body ul {
  margin: 20px 0;
  padding-right: 30px;
}

.modal-body ul li {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 12px;
  position: relative;
}

.modal-body ul li::marker {
  color: #ff758c;
  font-weight: bold;
}

.modal-body strong {
  color: #ff758c;
  font-weight: 600;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.benefit-card {
  background: linear-gradient(135deg, #fff5f7 0%, #ffe5ec 100%);
  padding: 20px;
  border-radius: 15px;
  border: 2px solid rgba(255, 117, 140, 0.2);
  transition: all 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(255, 117, 140, 0.2);
}

.benefit-card i {
  font-size: 32px;
  color: #ff758c;
  margin-bottom: 10px;
}

.benefit-card h4 {
  font-size: 20px;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
}

.benefit-card p {
  font-size: 16px;
  color: #555;
  margin: 0;
}

.cta-section {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin-top: 40px;
  color: white;
}

.cta-section h3 {
  color: white;
  margin: 0 0 15px 0;
  font-size: 28px;
}

.cta-section p {
  color: white;
  margin-bottom: 20px;
  font-size: 18px;
}

.cta-button {
  background: white;
  color: #ff758c;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* כפתור פעיל בניווט */
nav a.active {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  color: white;
}

/* Responsive */
@media (max-width: 900px) {
  /* התאמת header לדף הראשי */
  body header {
    padding: 10px 15px !important;
  }

  body .logo-container {
    gap: 10px !important;
  }

  body header .logo-container h1 {
    font-size: 22px !important;
    margin: 5px 0 !important;
  }

  body header .logo-container .logo,
  body header .logo {
    width: 50px !important;
    height: auto !important;
  }

  body header .contact-details {
    font-size: 12px !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
  }

  body header .contact-badge {
    padding: 4px 8px !important;
    font-size: 11px !important;
    margin: 2px 4px !important;
  }

  body header nav {
    margin-top: 5px !important;
    gap: 5px !important;
  }

  body header nav a {
    font-size: 11px !important;
    padding: 5px 8px !important;
    min-height: 28px !important;
  }

  .blog-wrapper {
    margin-top: 140px;
    padding: 30px 15px;
  }

  .blog-title {
    font-size: 36px;
  }

  .blog-subtitle {
    font-size: 18px;
  }

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

  .modal-body {
    padding: 25px;
  }

  .modal-body h2 {
    font-size: 28px;
  }

  .modal-body h3 {
    font-size: 22px;
  }

  .modal-body p,
  .modal-body ul li {
    font-size: 16px;
  }

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

@media (max-width: 600px) {
  /* התאמת header לדף הראשי */
  body header {
    padding: 8px 10px !important;
  }

  body .logo-container {
    gap: 8px !important;
  }

  body header .logo-container h1 {
    font-size: 20px !important;
    margin: 4px 0 !important;
  }

  body header .logo-container .logo,
  body header .logo {
    width: 45px !important;
    height: auto !important;
  }

  body header .contact-details {
    font-size: 11px !important;
  }

  body header .contact-badge {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }

  body header nav a {
    font-size: 10px !important;
    padding: 4px 7px !important;
    min-height: 26px !important;
  }

  body header nav a i {
    font-size: 10px !important;
    margin-left: 3px !important;
  }

  .blog-title {
    font-size: 28px;
    flex-direction: column;
    gap: 10px;
  }

  .blog-subtitle {
    font-size: 16px;
  }

  .post-image {
    height: 200px;
  }

  .post-title {
    font-size: 20px;
  }

  .post-meta {
    font-size: 13px;
  }

  .post-excerpt {
    font-size: 15px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-body h2 {
    font-size: 24px;
  }

  .modal-body h3 {
    font-size: 20px;
  }

  .modal-body p,
  .modal-body ul li {
    font-size: 15px;
  }

  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .cta-section h3 {
    font-size: 22px;
  }

  .cta-section p {
    font-size: 16px;
  }

  .cta-button {
    font-size: 16px;
    padding: 12px 24px;
  }
}
/* תיקון אפקט focus/active בכפתורי ניווט */
nav a:focus,
nav a:active {
  outline: none;
}

/* רק כפתור עם class="active" יישאר ורוד */
nav a:not(.active):focus,
nav a:not(.active):active {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
}

/* סגנונות ניווט - וידוא עקביות */
nav {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

nav a {
  color: #333;
  text-decoration: none;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

nav a:hover {
  color: white;
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 117, 140, 0.4);
}

/* הדגשת קישורי footer במובייל */
@media (max-width: 600px) {
  .footer-link {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    padding: 8px 12px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin: 5px;
  }
}

/* ===== מצב כהה לדף הבלוג ===== */
.dark-mode-active .blog-wrapper {
  background-color: #1a1a2e !important;
}

.dark-mode-active .blog-subtitle {
  background: #252542 !important;
  color: #eaeaea !important;
}

.dark-mode-active .blog-post {
  background: #252542 !important;
  border-color: #3a3a5c !important;
}

.dark-mode-active .post-title {
  color: #ffffff !important;
}

.dark-mode-active .post-meta {
  color: #b0b0b0 !important;
}

.dark-mode-active .post-meta span {
  color: #b0b0b0 !important;
}

.dark-mode-active .post-excerpt {
  color: #e0e0e0 !important;
}

.dark-mode-active .post-content {
  background: #252542 !important;
  color: #eaeaea !important;
}

/* Modal במצב כהה */
.dark-mode-active .modal {
  background: rgba(10, 10, 20, 0.95) !important;
}

.dark-mode-active .modal-content {
  background: #252542 !important;
  color: #eaeaea !important;
}

.dark-mode-active .modal-body {
  background: #252542 !important;
}

.dark-mode-active .modal-body h2 {
  color: #ffffff !important;
}

.dark-mode-active .modal-body h3 {
  color: #ffffff !important;
}

.dark-mode-active .modal-body p {
  color: #e0e0e0 !important;
}

.dark-mode-active .modal-body ul li {
  color: #e0e0e0 !important;
}

.dark-mode-active .modal-body .post-meta {
  border-bottom-color: #3a3a5c !important;
}

.dark-mode-active .benefit-card {
  background: linear-gradient(135deg, #2d2d4a 0%, #3a3a5c 100%) !important;
  border-color: rgba(255, 117, 140, 0.3) !important;
}

.dark-mode-active .benefit-card h4 {
  color: #ffffff !important;
}

.dark-mode-active .benefit-card p {
  color: #e0e0e0 !important;
}

/* ניווט במצב כהה */
.dark-mode-active nav a {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.dark-mode-active nav a:hover,
.dark-mode-active nav a.active {
  background: linear-gradient(135deg, #ff758c, #ff7eb3) !important;
  color: #ffffff !important;
}

/* כלל לכל אלמנט עם רקע rgba לבן */
.dark-mode-active [style*="rgba(255, 255, 255"],
.dark-mode-active [style*="rgba(255,255,255"] {
  background-color: #252542 !important;
  color: #eaeaea !important;
}

/* וידוא שכל הטקסטים נראים */
.dark-mode-active [style*="color: #2c3e50"],
.dark-mode-active [style*="color:#2c3e50"],
.dark-mode-active [style*="color: #34495e"],
.dark-mode-active [style*="color:#34495e"],
.dark-mode-active [style*="color: #333"],
.dark-mode-active [style*="color:#333"] {
  color: #eaeaea !important;
}

/* כרטיסי קריאה נוספים */
.dark-mode-active .read-more-btn {
  background: linear-gradient(135deg, #ff758c, #ff7eb3) !important;
  color: #ffffff !important;
}

.dark-mode-active .post-category {
  background: linear-gradient(135deg, #ff758c, #ff7eb3) !important;
  color: #ffffff !important;
}

/* ===== שמירת מיקום פאנל נגישות במצבי נגישות ===== */

/* שמירת מיקום וסגנון פאנל נגישות בכל המצבים */
.high-contrast-active .accessibility-panel,
.invert-colors-active .accessibility-panel {
  position: fixed !important;
  top: 50% !important;
  left: 70px !important;
  transform: translateY(-50%) scale(0.95) !important;
  filter: none !important;
  background: white !important;
  z-index: 100000 !important;
}

.dark-mode-active .accessibility-panel {
  position: fixed !important;
  top: 50% !important;
  left: 70px !important;
  transform: translateY(-50%) scale(0.95) !important;
  filter: none !important;
  z-index: 100000 !important;
}

.high-contrast-active .accessibility-panel.active,
.invert-colors-active .accessibility-panel.active {
  transform: translateY(-50%) scale(1) !important;
  filter: none !important;
  background: white !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.dark-mode-active .accessibility-panel.active {
  transform: translateY(-50%) scale(1) !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* שמירת סגנון תוכן פאנל נגישות במצב ניגודיות גבוהה והפוך צבעים */
.high-contrast-active .accessibility-panel *,
.invert-colors-active .accessibility-panel * {
  background: inherit !important;
  color: inherit !important;
  filter: none !important;
}

.high-contrast-active .accessibility-header,
.invert-colors-active .accessibility-header {
  background: linear-gradient(135deg, #2196f3, #1976d2) !important;
  color: white !important;
}

.high-contrast-active .accessibility-content,
.invert-colors-active .accessibility-content {
  background: white !important;
  color: #333 !important;
}

.high-contrast-active .accessibility-section h3,
.invert-colors-active .accessibility-section h3 {
  color: #1976d2 !important;
}

.high-contrast-active .accessibility-panel .accessibility-btn,
.invert-colors-active .accessibility-panel .accessibility-btn {
  background: #f5f5f5 !important;
  color: #333 !important;
  border-color: transparent !important;
}

.high-contrast-active
  .accessibility-panel
  .accessibility-btn[aria-pressed="true"],
.invert-colors-active
  .accessibility-panel
  .accessibility-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
  color: white !important;
}

.high-contrast-active .accessibility-panel .accessibility-btn i,
.invert-colors-active .accessibility-panel .accessibility-btn i {
  color: #2196f3 !important;
}

.high-contrast-active
  .accessibility-panel
  .accessibility-btn[aria-pressed="true"]
  i,
.invert-colors-active
  .accessibility-panel
  .accessibility-btn[aria-pressed="true"]
  i {
  color: white !important;
}

/* שמירת מיקום כפתור נגישות בכל המצבים */
.high-contrast-active .accessibility-trigger,
.dark-mode-active .accessibility-trigger,
.invert-colors-active .accessibility-trigger {
  position: fixed !important;
  top: 50% !important;
  left: 15px !important;
  transform: translateY(-50%) !important;
  filter: none !important;
  background: linear-gradient(135deg, #2196f3, #1976d2) !important;
  color: white !important;
  z-index: 100000 !important;
}

.high-contrast-active .accessibility-trigger:hover,
.high-contrast-active .accessibility-trigger:focus,
.dark-mode-active .accessibility-trigger:hover,
.dark-mode-active .accessibility-trigger:focus,
.invert-colors-active .accessibility-trigger:hover,
.invert-colors-active .accessibility-trigger:focus {
  transform: translateY(-50%) scale(1.1) !important;
}

/* מובייל - שמירת מיקום פאנל נגישות */
@media (max-width: 768px) {
  .high-contrast-active .accessibility-panel,
  .invert-colors-active .accessibility-panel,
  .dark-mode-active .accessibility-panel {
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    top: 45% !important;
  }

  .high-contrast-active .accessibility-panel.active,
  .invert-colors-active .accessibility-panel.active,
  .dark-mode-active .accessibility-panel.active {
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    top: 45% !important;
    transform: translateY(-50%) scale(1) !important;
  }

  .high-contrast-active .accessibility-trigger,
  .dark-mode-active .accessibility-trigger,
  .invert-colors-active .accessibility-trigger {
    top: 40% !important;
  }
}
