/**
 * Listicle styles for FungusHead theme
 * Applied directly from listicle-prototype.html
 * Following 1280px max-width container pattern
 */

/* Container - following FungusHead max-width pattern */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Main container spacing for single listicle pages */
.single-listicle .site-main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .single-listicle .site-main {
    padding-top: 3rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 1024px) {
  .single-listicle .site-main {
    padding-top: 4rem;
    padding-bottom: 5rem;
  }
}

/* Article layout - two column with TOC sidebar */
.two-column-layout {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 300px 1fr;
  }
}

/* Left sidebar - Table of Contents */
.left-sidebar {
  order: 2;
}

@media (min-width: 1024px) {
  .left-sidebar {
    order: 1;
    position: sticky;
    top: 2rem;
    height: fit-content;
  }
}

.toc-sidebar {
  padding: 1.5rem;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  background-color: #fff;
  transition: all 0.2s ease;
}

.toc-sidebar:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.toc-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: #000000;
}

.toc-dropdown-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (min-width: 1024px) {
  .toc-dropdown-toggle {
    display: none;
  }
}

.toc-list {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list.toc-open {
  display: flex;
}

@media (min-width: 1024px) {
  .toc-list {
    display: flex !important;
  }
}

.toc-list ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  display: block;
  text-decoration: none;
  color: #000;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: all 0.2s ease;
}

.toc-list a:hover {
  color: #ff69b4;
  border-left-color: #ff69b4;
  text-decoration: none;
}

/* Right content area */
.right-content {
  order: 1;
}

@media (min-width: 1024px) {
  .right-content {
    order: 2;
  }
}

/* Article header */
.article-header {
  margin-bottom: 2rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-badge {
  background-color: #000;
  color: #fff;
  border: 2px solid #000;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.article-title {
  /* Fluid baseline; JS will fine-tune per-title length */
  font-size: clamp(2.25rem, 6vw + 0.5rem, 6.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

@media (min-width: 768px) {
  .article-title {
    font-size: inherit; /* keep fluid clamp */
  }
}

@media (min-width: 1024px) {
  .article-title {
    font-size: inherit; /* keep fluid clamp */
  }
}

/* Header featured image - optional, between title and excerpt */
.article-featured-image {
  margin: 1.5rem 0;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  overflow: hidden;
  transition: all 0.2s ease;
}

.article-featured-image:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.header-featured-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

@media (min-width: 768px) {
  .article-featured-image {
    margin: 2rem 0;
  }
  
  .header-featured-img {
    max-height: 500px;
  }
}

@media (min-width: 1024px) {
  .article-featured-image {
    margin: 2.5rem 0;
  }
  
  .header-featured-img {
    max-height: 600px;
  }
}

.article-excerpt {
  font-size: 1.125rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid #000;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.8);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 500;
  margin:0px;
}

.author-role {
  font-size: 0.75rem;
  color: #333;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #333;
}

/* Featured image */
.featured-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  margin-bottom: 2rem;
  border: 4px solid #000;
  overflow: hidden;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  transition: all 0.2s ease;
}

.featured-image:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Listicle content styles - Force full width */
.entry-content {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.single-post .entry-content,
.right-content .entry-content,
body .entry-content {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.listicle-intro {
  margin-bottom: 2rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.listicle-intro p {
  margin-bottom: 1rem;
}

/* Listicle item styling */
.listicle-item {
  margin: 2.5rem 0; /* Even spacing above and below each card */
  padding: 2rem;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  background-color: #fff;
  transition: all 0.2s ease;
  scroll-margin-top: 2rem; /* For smooth scroll to anchor */
}

.listicle-item:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.listicle-item-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.listicle-number {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background-color: #ff69b4;
  color: #fff;
  border: 4px solid #000;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.8);
}

.listicle-item-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
  margin: 0;
}

@media (min-width: 768px) {
  .listicle-item-title {
    font-size: 2rem;
  }
}

.listicle-item-content {
  margin-left: 0;
}

@media (min-width: 768px) {
  .listicle-item-content {
    margin-left: 4.5rem; /* Align with title text */
  }
}

.listicle-item-content p {
  line-height: 1.6;
}

.listicle-item-content ul, .listicle-item-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.listicle-item-content li {
  margin-bottom: 0.5rem;
}

.listicle-item-content strong {
  color: #ff69b4;
  font-weight: 600;
}

/* Tip box styling */
.tip-box {
  background-color: #f8f9fa;
  padding: 1rem;
  border-left: 4px solid #ff69b4;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}

.tip-box p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* Content images within listicle items */
.listicle-item-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  margin: 1.5rem 0;
  border: 4px solid #000;
  overflow: hidden;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  transition: all 0.2s ease;
}

.listicle-item-image:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.listicle-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Conclusion section */
.listicle-conclusion {
  margin-top: 3rem;
  padding: 2rem;
  background-color: #f8f9fa;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  transition: all 0.2s ease;
}

/* Blog-style typography for top and bottom content sections (intro + conclusion) */
.single-listicle .listicle-intro,
.single-listicle .listicle-conclusion {
  font-family: var(--font-primary, 'Inter', sans-serif);
  line-height: 1.7;
  color: #374151;
}

.single-listicle .listicle-intro h2,
.single-listicle .listicle-conclusion h2 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #111827;
  margin: 3rem 0 1.5rem 0;
  font-family: var(--font-secondary, "bebas-neue", sans-serif);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.single-listicle .listicle-intro h3,
.single-listicle .listicle-conclusion h3 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #111827;
  margin: 2.5rem 0 1rem 0;
  font-family: var(--font-secondary, "bebas-neue", sans-serif);
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.single-listicle .listicle-intro h4,
.single-listicle .listicle-conclusion h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 1rem 0 0.5rem 0;
  font-family: var(--font-secondary, "bebas-neue", sans-serif);
  letter-spacing: 1px;
}

.single-listicle .listicle-intro p,
.single-listicle .listicle-conclusion p {
  font-size: 18px;
  margin-bottom: 1.5rem;
}

.single-listicle .listicle-intro ul,
.single-listicle .listicle-intro ol,
.single-listicle .listicle-conclusion ul,
.single-listicle .listicle-conclusion ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.single-listicle .listicle-intro li,
.single-listicle .listicle-conclusion li {
  font-size: 18px;
  margin-bottom: 0.5rem;
}

.listicle-conclusion:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.listicle-conclusion h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #ff69b4;
  margin-bottom: 1rem;
}

.listicle-conclusion p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Social sharing */
.social-sharing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 4px solid #000;
  background-color: #fff;
  color: #000;
  box-shadow: 6px 6px 0px 0px rgba(0,0,0,0.8);
  transition: all 0.2s ease;
  cursor: pointer;
  border-radius: 0;
}

.social-btn:hover {
  transform: translateY(-3px);
  box-shadow: 8px 8px 0px 0px rgba(255,105,180,0.8);
}

/* Author box */
.author-box {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 4px solid #000;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.8);
  background-color: #fff;
  transition: all 0.2s ease;
}

.author-box:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0px 0px rgba(255,105,180,0.8);
}

.author-box-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .author-box-content {
    flex-direction: row;
  }
}

.author-box-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .author-box-avatar {
    width: 25%;
  }
}

.author-box-avatar-img {
  position: relative;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #000;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.8);
  margin-bottom: 0.75rem;
}

.author-box-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-box-role {
  font-size: 0.875rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.author-box-info {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .author-box-info {
    width: 75%;
  }
}

/* Mobile-specific centering for author box */
@media (max-width: 767px) {
  .author-box-content {
    text-align: center;
    align-items: center;
  }
  
  .author-box-info {
    align-items: center;
    text-align: center;
  }
  
  .author-box-bio-title,
  .author-box-bio {
    text-align: center;
  }
}

.author-box-bio-title {
  font-size: 3.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.author-box-bio {
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #000;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 6px 6px 0px 0px rgba(0,0,0,0.8);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 8px 8px 0px 0px rgba(255,105,180,0.8);
  text-decoration: none;
}

.btn-primary {
  background-color: #ff69b4;
  color: #fff;
}

.entry-content .author-box a.author-box-cta,
.entry-content .author-box a.author-box-cta:hover {
  color: #fff !important;
}

/* Remove underlines on hover for all links in listicle */
.single-listicle a:hover {
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }

  .listicle-item {
    padding: 1.5rem;
  }

  .listicle-item-header {
    flex-direction: column;
    gap: 1rem;
  }

  .listicle-number {
    align-self: flex-start;
  }
}

/* Product showcase styles for listicle items */
.product-showcase-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin: 1.5rem 0;
  transition: transform 0.2s ease;
}

.product-showcase-link:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.product-showcase {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 1.5rem;
  background-color: #f8f9fa;
  border: 3px solid #000;
  box-shadow: 6px 6px 0px 0px rgba(0,0,0,0.6);
  transition: all 0.2s ease;
}

.product-showcase-link:hover .product-showcase {
  box-shadow: 8px 8px 0px 0px rgba(255,105,180,0.6);
}

.product-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.product-image {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border: 3px solid #000;
  overflow: hidden;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.8);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-and-cta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-basic-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-name {
  font-size: 2rem;
  font-weight: 700;
  color: #000;
  margin: 0;
  width: 100%;
}

.product-type {
  font-size: 0.75rem;
  color: #000;
  text-transform: uppercase;
  font-weight: 600;
  width: fit-content;
  background-color: #fff;
  border: 2px solid #000;
  padding: 0.25rem 0.75rem;
  box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.8);
  margin: 0;
  display: inline-block;
  letter-spacing: 0.5px;
}

.product-description {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #333;
  width: 100%;
  margin-bottom: 1rem;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #ff69b4;
  color: #fff;
  border: 3px solid #000;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.8);
  transition: all 0.2s ease;
  width: 100%;
  cursor: pointer;
  pointer-events: none; /* Prevents interference with parent link */
}

.product-showcase-link:hover .product-cta {
  transform: translateY(-1px);
  box-shadow: 5px 5px 0px 0px rgba(0,0,0,0.8);
}

/* Mobile responsive adjustments for product showcase */
@media (max-width: 767px) {
  .product-header {
    flex-direction: column;
    gap: 1rem;
  }

  .product-image {
    width: 100%;
    height: 200px;
  }
}