/* =============================================
   AffinityAlly — Single Post Styles (single-style.css)
   ============================================= */

/* ── SINGLE HERO ── */
.aa-single-hero {
  position: relative;
  padding: 72px 32px 60px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
}
.aa-single-hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.aa-single-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aa-single-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,11,24,.95) 0%, rgba(8,11,24,.5) 60%, rgba(8,11,24,.2) 100%);
  z-index: 1;
}
.aa-single-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.aa-single-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.aa-single-breadcrumb a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.aa-single-breadcrumb a:hover { color: #fff; }
.aa-single-cat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #06b6d4;
  margin-bottom: 12px;
  display: inline-block;
  background: rgba(6,182,212,.15);
  border: 1px solid rgba(6,182,212,.3);
  border-radius: 100px;
  padding: 4px 12px;
}
.aa-single-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: 24px;
  max-width: 820px;
}
.aa-single-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.aa-single-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aa-single-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2);
}
.aa-single-author-name {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
}
.aa-single-author-role {
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}
.aa-single-meta-items {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  flex-wrap: wrap;
}
.aa-single-meta-items span { white-space: nowrap; }

/* ── SINGLE BODY LAYOUT ── */
.aa-single-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 32px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 52px;
  align-items: start;
}

/* ── TOC (inline, mobile only) ── */
.aa-toc {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 36px;
  display: none; /* shown only on mobile via JS */
}
.aa-toc-head {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 12px;
}
.aa-toc-list a {
  display: block;
  font-size: .82rem;
  color: #3b5bdb;
  padding: 5px 0;
  text-decoration: none;
  border-bottom: 1px solid #dbeafe;
  transition: color .2s;
}
.aa-toc-list a:last-child { border-bottom: none; }
.aa-toc-list a:hover { color: #1d4ed8; }
.aa-toc-list a.h3 { padding-left: 14px; font-size: .78rem; }

/* ── POST CONTENT ── */
.aa-single-content {
  font-size: 1rem;
  line-height: 1.85;
  color: #374151;
}
.aa-single-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: #0d0f14;
  margin: 48px 0 18px;
  padding-top: 8px;
  line-height: 1.2;
}
.aa-single-content h2:first-child { margin-top: 0; }
.aa-single-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: #0d0f14;
  margin: 36px 0 14px;
  line-height: 1.3;
}
.aa-single-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 28px 0 10px;
}
.aa-single-content p { margin-bottom: 22px; }
.aa-single-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.aa-single-content a:hover { color: #1d4ed8; }
.aa-single-content ul,
.aa-single-content ol {
  margin: 0 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aa-single-content li { line-height: 1.7; }
.aa-single-content ul li { list-style: disc; }
.aa-single-content ol li { list-style: decimal; }
.aa-single-content blockquote {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
  font-style: italic;
  color: #1e40af;
  font-size: .98rem;
  line-height: 1.7;
}
.aa-single-content blockquote p { margin-bottom: 0; }
.aa-single-content code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .88em;
  font-family: 'Courier New', monospace;
  color: #be185d;
}
.aa-single-content pre {
  background: #0f172a;
  border-radius: 12px;
  padding: 22px 24px;
  overflow-x: auto;
  margin: 28px 0;
}
.aa-single-content pre code {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: .88rem;
  padding: 0;
}
.aa-single-content img {
  border-radius: 12px;
  margin: 28px 0;
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.aa-single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: .9rem;
  overflow-x: auto;
  display: block;
}
.aa-single-content table th {
  background: #1e3a8a;
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .05em;
  white-space: nowrap;
}
.aa-single-content table td {
  padding: 11px 16px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}
.aa-single-content table tr:hover td { background: #f8fafc; }
.aa-single-content .wp-block-image { margin: 28px 0; }
.aa-single-content .wp-block-quote {
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  padding: 18px 22px;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
}
/* Highlight box — use <div class="aa-highlight"> in posts */
.aa-single-content .aa-highlight {
  background: linear-gradient(135deg, #eff6ff, #f0fdfe);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 0 12px 12px 0;
  padding: 20px 22px;
  margin: 28px 0;
}
.aa-single-content .aa-pro-con {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.aa-single-content .aa-pros {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-top: 3px solid #22c55e;
  border-radius: 12px;
  padding: 18px;
}
.aa-single-content .aa-cons {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-top: 3px solid #f43f5e;
  border-radius: 12px;
  padding: 18px;
}
.aa-single-content .aa-pros h4 { color: #15803d; margin: 0 0 10px; }
.aa-single-content .aa-cons h4 { color: #be123c; margin: 0 0 10px; }
/* Rating box */
.aa-single-content .aa-rating-box {
  background: #0f172a;
  border-radius: 14px;
  padding: 28px;
  margin: 28px 0;
  text-align: center;
  color: #fff;
}
.aa-single-content .aa-rating-score {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: #f59e0b;
  line-height: 1;
}
.aa-single-content .aa-rating-stars {
  font-size: 1.5rem;
  color: #f59e0b;
  margin: 8px 0;
}
.aa-single-content .aa-rating-label {
  font-size: .85rem;
  color: #9ca3af;
}
/* CTA box inside content */
.aa-single-content .aa-cta-box {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 36px 0;
  text-align: center;
  color: #fff;
}
.aa-single-content .aa-cta-box h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #fff;
  margin: 0 0 10px;
  font-size: 1.2rem;
}
.aa-single-content .aa-cta-box p { color: #bfdbfe; margin-bottom: 18px; font-size: .9rem; }
.aa-single-content .aa-cta-box a {
  display: inline-block;
  background: #22d3ee;
  color: #0f172a;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 800;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s;
}
.aa-single-content .aa-cta-box a:hover { background: #06b6d4; }

/* ── TAGS ── */
.aa-single-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 28px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}
.aa-single-tags-label {
  font-size: .78rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.aa-single-tag {
  font-size: .72rem;
  font-weight: 500;
  color: #374151;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 100px;
  padding: 5px 12px;
  text-decoration: none;
  transition: all .2s;
}
.aa-single-tag:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ── SHARE ── */
.aa-share {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 32px;
}
.aa-share-label {
  font-size: .8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.aa-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.aa-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
}
.aa-share-btn:hover { opacity: .85; transform: translateY(-1px); }
.aa-share-tw { background: #000; color: #fff; }
.aa-share-fb { background: #1877f2; color: #fff; }
.aa-share-ln { background: #0a66c2; color: #fff; }
.aa-share-wa { background: #25d366; color: #fff; }

/* ── AUTHOR BOX ── */
.aa-author-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.aa-author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.aa-author-box-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #0d0f14;
  margin-bottom: 3px;
}
.aa-author-box-role { font-size: .72rem; color: #6b7280; margin-bottom: 10px; }
.aa-author-box-bio { font-size: .85rem; color: #374151; line-height: 1.7; margin-bottom: 14px; }
.aa-author-box-links { display: flex; gap: 10px; flex-wrap: wrap; }
.aa-author-box-cta {
  background: #2563eb;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.aa-author-box-cta:hover { background: #1d4ed8; }
.aa-author-box-social {
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.aa-author-box-social:hover { border-color: #2563eb; color: #2563eb; }

/* ── POST NAV ── */
.aa-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.aa-post-nav a {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  display: block;
  transition: border-color .2s, box-shadow .2s;
}
.aa-post-nav a:hover { border-color: #2563eb; box-shadow: 0 4px 14px rgba(37,99,235,.1); }
.aa-post-nav-next a { text-align: right; }
.aa-pnav-label { font-size: .7rem; font-weight: 700; color: #2563eb; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.aa-pnav-title { font-size: .88rem; font-weight: 700; color: #0d0f14; line-height: 1.4; }

/* ── SIDEBAR (single) ── */
.aa-single-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Reuse blog-style.css widget styles */
.aa-widget { background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; overflow: hidden; }
.aa-widget-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .88rem;
  font-weight: 800;
  color: #0d0f14;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aa-widget-body { padding: 18px 20px; }

/* TOC sticky sidebar */
.aa-toc-sticky-list a {
  display: block;
  font-size: .8rem;
  color: #6b7280;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  transition: color .2s;
  line-height: 1.4;
}
.aa-toc-sticky-list a:last-child { border-bottom: none; }
.aa-toc-sticky-list a:hover,
.aa-toc-sticky-list a.active { color: #2563eb; font-weight: 600; }
.aa-toc-sticky-list a.h3 { padding-left: 14px; font-size: .75rem; }

/* Related posts */
.aa-related-list { display: flex; flex-direction: column; gap: 14px; }
.aa-related-item { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.aa-related-thumb {
  width: 56px;
  height: 56px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  overflow: hidden;
}
.aa-related-img { width: 100%; height: 100%; object-fit: cover; }
.aa-related-title {
  font-size: .8rem;
  font-weight: 700;
  color: #0d0f14;
  line-height: 1.35;
  margin-bottom: 3px;
  transition: color .2s;
}
.aa-related-item:hover .aa-related-title { color: #2563eb; }
.aa-related-meta { font-size: .68rem; color: #9ca3af; }

/* Reuse from blog-style */
.aa-nl-widget { background: linear-gradient(135deg,#1e3a8a,#1e40af); border: none; }
.aa-nl-widget .aa-widget-head { background: rgba(0,0,0,.2); border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
.aa-nl-emoji { font-size: 2rem; margin-bottom: 10px; }
.aa-nl-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: .95rem; font-weight: 800; color: #fff; margin-bottom: 6px; }
.aa-nl-sub { font-size: .78rem; color: #93c5fd; line-height: 1.6; margin-bottom: 14px; }
.aa-nl-input { width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 11px 14px; font-size: .82rem; color: #fff; font-family: 'Inter', sans-serif; outline: none; margin-bottom: 8px; display: block; }
.aa-nl-input::placeholder { color: #64748b; }
.aa-nl-btn { width: 100%; background: #22d3ee; color: #0f172a; border: none; border-radius: 8px; padding: 11px; font-size: .85rem; font-weight: 800; cursor: pointer; font-family: 'Inter', sans-serif; transition: background .2s; display: block; text-align: center; }
.aa-nl-btn:hover { background: #06b6d4; }
.aa-nl-note { font-size: .63rem; color: #64748b; margin-top: 8px; text-align: center; }
.aa-cta-widget { background: linear-gradient(135deg,#080b18,#0f1629); border: none; }
.aa-cta-widget .aa-nl-sub { color: #9ca3af; }
.aa-tags-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.aa-tag-chip { font-size: .72rem; font-weight: 500; color: #374151; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 100px; padding: 5px 12px; transition: all .2s; text-decoration: none; }
.aa-tag-chip:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ── COMMENTS ── */
.aa-comments { margin-top: 8px; }
.aa-comments .comment-list { list-style: none; }
.aa-comments .comment { padding: 20px 0; border-bottom: 1px solid #e5e7eb; }
.aa-comments .comment-author b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: .9rem; font-weight: 700; color: #0d0f14; }
.aa-comments .comment-meta { font-size: .72rem; color: #9ca3af; margin: 4px 0 10px; }
.aa-comments .comment-content p { font-size: .88rem; color: #374151; line-height: 1.7; }
.aa-comments #respond { margin-top: 32px; }
.aa-comments #reply-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.2rem; font-weight: 800; color: #0d0f14; margin-bottom: 20px; }
.aa-comments input, .aa-comments textarea {
  width: 100%; border: 1px solid #e5e7eb; border-radius: 9px;
  padding: 12px 14px; font-size: .88rem; font-family: 'Inter', sans-serif;
  color: #0d0f14; outline: none; transition: border-color .2s; margin-bottom: 12px;
}
.aa-comments input:focus, .aa-comments textarea:focus { border-color: #2563eb; }
.aa-comments textarea { min-height: 130px; resize: vertical; }
.aa-comments #submit {
  background: #2563eb; color: #fff; border: none; border-radius: 9px;
  padding: 12px 28px; font-size: .9rem; font-weight: 700;
  cursor: pointer; font-family: 'Inter', sans-serif; transition: background .2s;
}
.aa-comments #submit:hover { background: #1d4ed8; }

/* ── RESPONSIVE ── */
@media(max-width:1024px) {
  .aa-single-body { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; }
  .aa-single-sidebar { position: static; }
  .aa-toc-sticky { display: none; }
  .aa-toc { display: block; }
  .aa-single-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media(max-width:768px) {
  .aa-single-hero { padding: 52px 20px 44px; min-height: 300px; }
  .aa-single-title { font-size: clamp(1.5rem, 5vw, 2rem); }
  .aa-single-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .aa-single-body { padding: 28px 16px; gap: 24px; }
  .aa-single-sidebar { grid-template-columns: 1fr; }
  .aa-author-box { flex-direction: column; align-items: center; text-align: center; padding: 22px; }
  .aa-author-box-links { justify-content: center; }
  .aa-post-nav { grid-template-columns: 1fr; }
  .aa-post-nav-next a { text-align: left; }
  .aa-share-btns { gap: 7px; }
  .aa-share-btn { padding: 8px 12px; font-size: .72rem; }
  .aa-single-content .aa-pro-con { grid-template-columns: 1fr; }
}
@media(max-width:480px) {
  .aa-single-hero { padding: 40px 14px 36px; }
  .aa-single-title { font-size: 1.45rem; }
  .aa-single-body { padding: 20px 14px; }
  .aa-single-content h2 { font-size: 1.3rem; }
  .aa-single-content h3 { font-size: 1.1rem; }
  .aa-author-box-avatar { width: 60px; height: 60px; font-size: 1.2rem; }
  .aa-single-content table { font-size: .78rem; }
  .aa-single-meta-items { gap: 10px; font-size: .7rem; }
  .aa-single-breadcrumb { display: none; }
}
@media(max-width:360px) {
  .aa-single-hero { padding: 32px 12px 28px; }
  .aa-single-body { padding: 16px 12px; }
  .aa-single-title { font-size: 1.25rem; }
  .aa-share-btns { flex-direction: column; }
  .aa-share-btn { justify-content: center; }
}
