/* ============================================================
   Lizhu Bollard — style.css
   Minimal custom CSS — most styling via Tailwind CDN
   ============================================================ */

/* ===== Table of Contents Links ===== */
.toc-link {
  display: block;
  padding: 4px 0;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
  font-size: 0.875rem;
  line-height: 1.5;
}
.toc-link:hover {
  color: #1a3a5c;
}
.toc-link.active {
  color: #e67e22;
  font-weight: 600;
}

/* ===== Article Content Styles (CMS-friendly — no class on inner elements) ===== */
article.content {
  color: #334155;
  line-height: 1.8;
  font-size: 1rem;
}
article.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
article.content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
article.content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
article.content p {
  margin-bottom: 1.25rem;
}
article.content a {
  color: #e67e22;
  text-decoration: underline;
  text-underline-offset: 2px;
}
article.content a:hover {
  color: #c96b1a;
}
article.content ul,
article.content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
article.content ul {
  list-style-type: disc;
}
article.content ol {
  list-style-type: decimal;
}
article.content li {
  margin-bottom: 0.5rem;
}
article.content blockquote {
  border-left: 4px solid #e67e22;
  background: #f8fafc;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  color: #475569;
  font-style: italic;
}
article.content blockquote p {
  margin-bottom: 0.5rem;
}
article.content cite {
  font-size: 0.875rem;
  color: #64748b;
  font-style: normal;
}
article.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
}
article.content table thead {
  background: #1a3a5c;
  color: #fff;
}
article.content table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
article.content table td {
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
}
article.content table tbody tr:hover {
  background: #f8fafc;
}
article.content figure {
  margin: 1.5rem 0;
  text-align: center;
}
article.content figure img {
  max-width: 100%;
  border-radius: 8px;
  height: auto;
}
article.content figcaption {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.5rem;
}
article.content code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  color: #e11d48;
}
article.content strong {
  color: #1a3a5c;
}

/* ===== FAQ Styles ===== */
details.faq-item summary::-webkit-details-marker {
  display: none;
}
details.faq-item summary {
  list-style: none;
}
details.faq-item[open] summary {
  background: #f1f5f9;
}

/* ===== Swiper Overrides ===== */
.swiper-pagination-bullet-active {
  background: #e67e22 !important;
}
.swiper-button-prev,
.swiper-button-next {
  color: #1a3a5c !important;
}

/* ===== Loading State for Scroll Animation ===== */
.addAnimation.loading {
  opacity: 1;
  transform: none;
}
.addAnimation.loaded {
  opacity: 1;
  transform: none;
}
/* Fallback: show content even if JS fails */
@media (scripting: none) {
  .addAnimation {
    opacity: 1 !important;
    transform: none !important;
  }
}
/* Legacy browsers & JS-disabled fallback via timeout */
.addAnimation:not(.loading) {
  opacity: 1 !important;
  transform: none !important;
}

/* ===== Line Clamp Utility (Tailwind fallback) ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu::-webkit-scrollbar {
  width: 4px;
}
#mobile-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

/* ===== Has-Submenu (desktop hover fix for third-level) ===== */
@media (min-width: 1024px) {
  .has-submenu:hover > ul {
    opacity: 1;
    visibility: visible;
  }
  .submenu-item:hover > ul {
    opacity: 1;
    visibility: visible;
  }
}

/* ===== Plain Layout Article Content ===== */
/* (privacy/terms/cookies — no class/id elements from CMS) */
.max-w-4xl h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.max-w-4xl h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.max-w-4xl p {
  margin-bottom: 1rem;
  color: #475569;
  line-height: 1.7;
}
.max-w-4xl ul,
.max-w-4xl ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: #475569;
  line-height: 1.7;
}
.max-w-4xl li {
  margin-bottom: 0.5rem;
}
.max-w-4xl a {
  color: #e67e22;
  text-decoration: underline;
}
.max-w-4xl strong {
  color: #1e293b;
}
