/* Blog Article Header Styles */
.blog-article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.blog-article-meta {
  color: var(--muted-text);
  font-size: 0.9em;
}

.blog-article-meta-separator {
  margin: 0 0.5rem;
}

.blog-article-author {
  margin-top: 0.75rem;
  font-size: 0.95em;
  color: var(--muted-text);
}

.blog-article-author-link,
.blog-article-author-name {
  font-weight: 600;
}

/* Blog post images - centered, responsive, never upscale */
/* Max dimensions: 100% width (container), 700px height for optimal SEO and UX */
.blog-post-content img {
  display: block;
  max-width: 100%;
  max-height: 700px;
  width: auto;
  height: auto;
  margin: 1.5rem auto;
  border-radius: var(--radius-small, 0.25rem);
  object-fit: contain;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-post-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Image Preview Modal */
#blogImagePreviewModal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
}

#blogImagePreviewModal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-image-preview-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.blog-image-preview-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: default;
  transform: none;
}

.blog-image-preview-close {
  position: absolute;
  top: -56px;
  right: 0;
  color: #ffffff;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  padding: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 10001;
}

.blog-image-preview-close:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.blog-image-preview-close:active {
  transform: scale(0.95);
}

/* Light mode specific styles */
body.theme-light .blog-image-preview-close {
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.theme-light .blog-image-preview-close:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Dark mode specific styles */
body.theme-dark .blog-image-preview-close {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

body.theme-dark .blog-image-preview-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8);
}

.blog-post-content .alert {
  display: block !important;
}

.blog-post-content .alert > p {
  display: block !important;
  margin: 0 0 0.75rem 0 !important;
  padding: 0 !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

.blog-post-content .alert > p > strong {
  display: block !important;
}

.blog-post-content .alert > ul {
  display: block !important;
  margin: 0 !important;
  padding-left: 1.5rem !important;
  clear: both !important;
  width: 100% !important;
  float: none !important;
}

.faq-container {
  max-width: 900px;
  margin: 50px auto 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.faq-item:hover {
  border-color: var(--primary-blue);
  box-shadow:
    0 4px 20px rgba(99, 102, 241, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.05) inset;
  transform: translateX(5px);
}

.faq-item[aria-expanded='true'] {
  border-color: var(--primary-blue);
}

.faq-question {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none !important;
  padding: 20px 25px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  color: var(--heading-color);
  font-size: 1.05em;
  font-weight: 500;
  transition: color 0.3s ease;
  font-family: inherit;
  box-sizing: border-box;
  overflow: hidden;
  white-space: normal;
}

.faq-question span {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  line-height: 1.5;
  white-space: normal !important;
  display: block;
}

.faq-question:hover {
  color: var(--primary-blue);
}

.faq-item[aria-expanded='true'] .faq-question {
  color: var(--primary-blue);
}

.faq-question i {
  font-size: 0.9em;
  color: var(--primary-blue);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    padding 0.3s ease;
  padding: 0 25px;
}

.faq-item[aria-expanded='true'] .faq-answer {
  padding: 0 25px 20px 25px;
}

.faq-answer p {
  color: var(--muted-text);
  line-height: 1.7;
  margin: 0 0 12px 0;
}

.faq-features {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
}

body.theme-light .faq-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.theme-light .faq-item:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow:
    0 3px 15px rgba(99, 102, 241, 0.1),
    0 0 0 1px rgba(99, 102, 241, 0.05) inset;
}

body.theme-light .faq-item[aria-expanded='true'] {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.12);
}

@media (max-width: 768px) {
  .faq-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .faq-question {
    padding: 18px 20px;
    font-size: 0.95em;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }

  .faq-question span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 30px) !important;
    padding-right: 0;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
    white-space: normal !important;
    display: block !important;
  }

  .faq-question i {
    flex-shrink: 0;
    flex-grow: 0;
    align-self: flex-start;
    margin-top: 2px;
    width: auto;
  }

  .faq-answer {
    padding: 0 20px;
  }

  .faq-item[aria-expanded='true'] .faq-answer {
    padding: 0 20px 18px 20px;
  }
}

/* Promotional Box */
.promotional-box {
  margin: 3rem auto 2rem auto;
  width: fit-content;
  max-width: 100%;
}

.promotional-box-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.promotional-box-link:hover {
  text-decoration: none;
  color: inherit;
}

.promotional-box-content {
  background: #7b88c7;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-medium);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 20px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  min-height: 120px;
  max-width: 850px;
  width: fit-content;
}

/* Adjust layout when no icon is present - gap is handled by conditional rendering */

body.theme-dark .promotional-box-content {
  background: #7b88c7;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 20px rgba(255, 255, 255, 0.1);
}

body.theme-light .promotional-box-content {
  background: #a5b4fc;
  border: 2px solid rgba(99, 102, 241, 0.5);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(99, 102, 241, 0.15),
    0 0 20px rgba(99, 102, 241, 0.15);
}

.promotional-box-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      ellipse at top left,
      rgba(255, 255, 255, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom right,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 50%
    );
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  border-radius: var(--radius-medium);
}

.promotional-box-content:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 8px 32px rgba(123, 136, 199, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.promotional-box-content:hover::before {
  opacity: 1;
}

body.theme-dark .promotional-box-content:hover {
  background: #8b95d0;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 8px 32px rgba(123, 136, 199, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 25px rgba(255, 255, 255, 0.2);
}

body.theme-light .promotional-box-content:hover {
  background: #b8c4ff;
  border: 2px solid rgba(99, 102, 241, 0.75);
  box-shadow:
    0 8px 32px rgba(99, 102, 241, 0.4),
    inset 0 0 0 1px rgba(99, 102, 241, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.35),
    0 0 25px rgba(99, 102, 241, 0.2);
}

.promotional-box-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  z-index: 1;
  position: relative;
  text-align: center;
}

.promotional-box-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.promotional-box-text h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  width: 100%;
  text-align: center;
}

.promotional-box-content:hover .promotional-box-text h3 {
  color: white;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.promotional-box-animation {
  flex-shrink: 0;
  width: auto;
  height: 80%;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  position: relative;
}

.promotional-box-animation i {
  font-size: 6rem;
  color: white;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    filter 0.3s ease;
  line-height: 1;
  transform: rotate(0deg) scale(1);
}

.promotional-box-animation svg {
  width: 6rem;
  height: 6rem;
  max-width: none;
  max-height: none;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    filter 0.3s ease;
  transform: rotate(0deg) scale(1);
}

/* Don't force white color on SVG - let it use its original colors */
.promotional-box-animation svg path,
.promotional-box-animation svg rect,
.promotional-box-animation svg circle,
.promotional-box-animation svg ellipse,
.promotional-box-animation svg polygon,
.promotional-box-animation svg polyline {
  /* Remove !important to allow original colors */
}

.promotional-box-animation svg text {
  /* Remove !important to allow original colors */
}

.promotional-box-content:hover .promotional-box-animation i,
.promotional-box-content:hover .promotional-box-animation svg {
  opacity: 1;
  transform: rotate(15deg) scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
  .promotional-box {
    width: 100%;
  }

  .promotional-box-content {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    gap: 1.25rem;
    width: 100%;
    display: flex;
  }

  .promotional-box-main {
    width: 100%;
    text-align: center;
  }

  .promotional-box-text {
    width: 100%;
    text-align: center;
  }

  .promotional-box-text h3 {
    font-size: 1.6rem;
    white-space: normal;
    text-align: center;
  }

  .promotional-box-animation {
    width: auto;
    height: 80%;
    min-height: 80px;
    order: -1;
    align-self: center;
  }

  .promotional-box-animation i {
    font-size: 4.5rem;
  }

  .promotional-box-animation svg {
    width: 4.5rem;
    height: 4.5rem;
  }
}
