/* 
   JJ77 Game Custom Animations & Micro-Interactions
*/

@keyframes jj-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes jj-pulse-glow {
  0%, 100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.05);
  }
}

.jj-svg-hero-phone .floating-badge-1 {
  animation: jj-float 4s ease-in-out infinite;
}

.jj-svg-hero-phone .floating-badge-2 {
  animation: jj-float 5s ease-in-out infinite 1s;
}

.jj-svg-hero-phone circle[fill="url(#hero_glow)"] {
  animation: jj-pulse-glow 6s ease-in-out infinite;
}

/* Feature & Category Card Hover Effects */
.jj-card-interactive {
  position: relative;
  overflow: hidden;
}

.jj-card-interactive::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: 0.5s;
}

.jj-card-interactive:hover::after {
  left: 100%;
}

/*
   Single Post Article Typography
   Styles the full post content output by the_content() on single.php
*/
.jj-article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--jj-text);
}

.jj-article-content > * + * {
  margin-top: 1.25em;
}

.jj-article-content h1,
.jj-article-content h2,
.jj-article-content h3,
.jj-article-content h4 {
  line-height: 1.3;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  color: var(--jj-text);
}

.jj-article-content h2 { font-size: 1.6rem; }
.jj-article-content h3 { font-size: 1.3rem; }
.jj-article-content h4 { font-size: 1.1rem; }

.jj-article-content p {
  color: var(--jj-text);
}

.jj-article-content a {
  color: var(--jj-emerald);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jj-article-content a:hover {
  color: var(--jj-emerald-dark);
}

.jj-article-content ul,
.jj-article-content ol {
  padding-left: 1.4em;
}

.jj-article-content li + li {
  margin-top: 0.4em;
}

.jj-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--jj-radius-md);
  box-shadow: var(--jj-shadow-sm);
}

.jj-article-content figure {
  margin: 0;
}

.jj-article-content figcaption {
  font-size: 0.85rem;
  color: var(--jj-text-light);
  text-align: center;
  margin-top: 0.5em;
}

.jj-article-content blockquote {
  margin: 0;
  padding: 16px 24px;
  border-left: 4px solid var(--jj-emerald);
  background-color: var(--jj-emerald-light);
  border-radius: 0 var(--jj-radius-sm) var(--jj-radius-sm) 0;
  color: var(--jj-text-muted);
  font-style: italic;
}

.jj-article-content pre {
  background-color: var(--jj-text);
  color: var(--jj-slate-50);
  padding: 16px 20px;
  border-radius: var(--jj-radius-sm);
  overflow-x: auto;
  font-size: 0.9rem;
}

.jj-article-content code {
  background-color: var(--jj-slate-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.jj-article-content pre code {
  background-color: transparent;
  padding: 0;
}

.jj-article-content table {
  width: 100%;
  border-collapse: collapse;
}

.jj-article-content th,
.jj-article-content td {
  border: 1px solid var(--jj-border);
  padding: 10px 14px;
  text-align: left;
}

.jj-article-content th {
  background-color: var(--jj-slate-50);
}

.jj-article-content hr {
  border: none;
  border-top: 1px solid var(--jj-border);
}

.jj-pagination-links {
  margin-top: 1.5em;
  font-size: 0.9rem;
}

/*
   Single Post: TOC (left) + Article Content (right)
*/
.jj-article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.jj-article-layout.jj-article-layout-no-toc {
  grid-template-columns: minmax(0, 1fr);
}

.jj-toc-sidebar {
  position: sticky;
  top: 24px;
}

.jj-toc-box {
  background-color: var(--jj-slate-50);
  border: 1px solid var(--jj-border);
  border-radius: var(--jj-radius-md);
  padding: 20px;
}

.jj-toc-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--jj-text-light);
  margin-bottom: 12px;
}

.jj-toc-scroll {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 6px;
}

.jj-toc-scroll::-webkit-scrollbar {
  width: 6px;
}

.jj-toc-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.jj-toc-scroll::-webkit-scrollbar-thumb {
  background-color: var(--jj-slate-300);
  border-radius: 999px;
}

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

.jj-toc-item {
  margin: 0;
}

.jj-toc-item + .jj-toc-item {
  margin-top: 4px;
}

.jj-toc-item a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--jj-radius-sm);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--jj-text-muted);
  text-decoration: none;
  transition: var(--jj-transition);
}

.jj-toc-item a:hover {
  background-color: var(--jj-emerald-light);
  color: var(--jj-emerald-dark);
}

.jj-toc-level-3 a {
  padding-left: 22px;
  font-size: 0.83rem;
}

.jj-article-main {
  min-width: 0;
}

@media (max-width: 900px) {
  .jj-article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .jj-toc-sidebar {
    position: static;
  }

  .jj-toc-scroll {
    max-height: 260px;
  }
}
