/* Blog styles */

html {
  scroll-behavior: smooth;
}

/* Table of Contents */
.table-of-contents {
  background-color: #fcfcfc;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem 2rem;
  margin: 0rem 0 4rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table-of-contents h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #000;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem
}

.table-of-contents a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.5rem 0;
}

.table-of-contents a:hover {
  color: #8c1515;
}

/* Hero section */
.chronicle-hero {
  padding: 4rem 0;
  color: #fff;
  background-color: #333;
  position: relative;
}

/* Direct link to headings - hide by default, show on hover */
.direct-link {
  font-size: 0.8em;
  margin-right: 0.3em;
  opacity: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}

h1:hover .direct-link,
h2:hover .direct-link,
h3:hover .direct-link,
h4:hover .direct-link,
h5:hover .direct-link,
h6:hover .direct-link {
  opacity: 0.5;
}

.direct-link:hover {
  opacity: 1 !important;
}

/* Default left-aligned breadcrumbs for all pages */
.breadcrumbs-container {
  width: 100%;
  margin-bottom: 1rem;
}

/* Center alignment only for post pages */
.chronicle-post-template .breadcrumbs-container {
  text-align: center;
  display: flex;
  justify-content: center;
}

.breadcrumbs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.chronicle-post-template .breadcrumbs {
  justify-content: center;
}

.breadcrumbs li {
  position: relative;
  margin: 0 5px;
  display: flex;
  align-items: center;
}

.breadcrumbs li a, 
.breadcrumbs li:not(:last-child):after {
  color: white;
}

.breadcrumbs li a {
  text-decoration: none;
}

.breadcrumbs li:not(:last-child):after {
  content: "›";
  margin: 0 5px;
}

.breadcrumbs li:last-child a {
  color: white;
  pointer-events: none;
}


.chronicle-hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
}


.chronicle-hero-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-family: 'Public Sans';
  line-height: 3.6rem;
}

.chronicle-hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.chronicle-meta {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #eee;
}

.chronicle-meta span {
  margin-right: 1rem;
}

.chronicle-tags {
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.3s;
}

.tag:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* Blog content */
.chronicle-post {
  padding: 4rem 0;
}

.chronicle-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}

.chronicle-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  margin-left: -6px;
  font-size: 2rem;
  display: flex;
  text-align: left;
}

.chronicle-content h3 {
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    margin-left: -5px;
    font-size: 1.7rem;
}

.chronicle-content p {
  margin-bottom: 2.1rem;
  font-size: 1.22rem;
  color: #3b3b3b;
  margin-top: -10px;
  line-height: 2rem;
}

.chronicle-content img {
  max-width: 100%;
  height: auto;
  margin: 1rem 0 0 0;
  border-radius: 5px;
}

.chronicle-content ul, .chronicle-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.chronicle-content li {
  margin-bottom: 0.5rem;
  list-style: auto;
}

.chronicle-content blockquote {
  border-left: 4px solid #666;
  padding-left: 1.5rem;
  font-style: italic;
  margin: 2rem 0;
}

.chronicle-content code {
  font-family: monospace;
  background-color: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

.chronicle-content pre {
  background-color: #f4f4f4;
  padding: 1rem;
  border-radius: 5px;
  overflow-x: auto;
  margin: 2rem 0;
}

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

.chronicle-post p strong {
  
  font-weight: 700;
  display: block;
  margin: 3.5rem 0 0.75rem 0;
  line-height: 1.2;
  color: #000;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.5rem;
  
  font-family: 'Public Sans';
  margin-bottom: -20px;
}


/* Featured posts */
.featured-posts {
  padding: 4rem 0;
  background-color: #f9f9f9;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
}

/* Use the same card layout for featured posts */
.featured-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  background: white;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #FFD700;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

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

.featured-card-content {
  padding: 1.5rem;
}

.featured-card-content h3 {
  margin-bottom: 0.5rem;
}

.featured-card-content h3 a {
  color: #000;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.8rem;
  font-size: 1.4rem;
}

.featured-card-meta {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Blog list */
.chronicle-list {
  padding: 4rem 0;
}

.chronicle-sidebar-layout {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: 3rem;
}

.chronicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
}

.chronicle-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.chronicle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.chronicle-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.chronicle-card-content {
  padding: 1.5rem;
}

.chronicle-card-content h3 {
  margin-bottom: 0.5rem;
}

.chronicle-card-content h3 a {
  color: #000;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.8rem;
  font-size: 1.4rem;
}

.chronicle-card-meta {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.read-more {
  display: inline-block;
  color: #1e5456;
  text-decoration: underline;
  font-weight: 600;
  margin-top: 1rem;
  text-transform: uppercase;
  font-size: 0.8rem !important;
}

/* Sidebar */
.chronicle-sidebar {
  padding-top: 2rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.category-list, .recent-posts {
  list-style: none;
  padding: 0;
}

.category-list li, .recent-posts li {
  margin-bottom: 0.5rem;
}

.category-list a, .recent-posts a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.category-list a:hover, .recent-posts a:hover {
  color: #8c1515;
}

.category-list a.active {
  color: #8c1515;
  font-weight: 600;
}

.post-date {
  display: block;
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.2rem;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  text-align: center;
}

.pagination ul {
  display: inline-flex;
  list-style: none;
  padding: 0;
}

.pagination li {
  margin: 0 0.25rem;
}

.pagination a, .pagination span {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid #eee;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s;
}

.pagination a:hover {
  background-color: #f4f4f4;
}

.pagination li.active a {
  background-color: #8c1515;
  color: #fff;
  border-color: #8c1515;
}

.pagination li.disabled span {
  color: #ccc;
  cursor: not-allowed;
}

/* Blog share */
.chronicle-share {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  text-align: center;
}

.chronicle-share h3 {
  font-weight: 600;
}

.share-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.share-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-decoration: none;
  color: #fff;
  background-color: #235759;
  transition: all 0.3s ease;
}

.share-links a:hover {
  background-color: #6e1010;
  transform: translateY(-3px);
}

.share-links svg {
  width: 20px;
  height: 20px;
}

/* Related posts */
.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

/* Back link */
.back-link {
  margin-top: 2rem;
}

.back-link a {
  display: inline-block;
  color: #8c1515;
  text-decoration: none;
  font-weight: 600;
}

/* Media queries */
@media (max-width: 768px) {
  .chronicle-sidebar-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .chronicle-grid, .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .chronicle-hero-title {
    font-size: 1.6rem;
    line-height: 2.3rem;
  }
  .chronicle-card-content h3 {
    font-size: 1.4rem;
    line-height: 2rem;
}
.featured-card-content h3 a {
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 2rem;
}
  
  .chronicle-hero-subtitle {
    font-size: 1rem;
  }

  .chronicle-content h2 {
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    margin-left: -6px;
    font-size: 2rem;
    display: flex;
    text-align: left;
    line-height: 2.6rem;
}

.chronicle-content h3 {
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  margin-left: -5px;
  font-size: 1.7rem;
  display: flex;
  line-height: 2.6rem;
}
.chronicle-card-content h4 {
  font-size: 1.6rem;
  line-height: 2.2rem;
  font-weight: 700;
}

}

/* Responsive grid adjustments for larger screens */
@media (min-width: 769px) and (max-width: 1199px) {
  .chronicle-grid, .featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
  
  .related-posts .chronicle-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

@media (min-width: 1200px) {
  .chronicle-grid, .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .related-posts .chronicle-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .chronicle-content {
    max-width: 800px;
  }
  
  .related-posts, .chronicle-share {
    max-width: 100%;
  }
}

@media (min-width: 1600px) {
  .chronicle-grid, .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* CTA inside chronicle content */
.chronicle-content .cta-section {
  background-color: #f0f7f0;
  padding: 2rem;
  border-radius: 12px;
  margin: 3rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chronicle-content .cta-container {
  text-align: center;
}

.chronicle-content .cta-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color, #235759);
}

.chronicle-content .cta-text {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.chronicle-content .cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: #235759;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.chronicle-content .cta-button:hover {
  background-color: #6e1010;
  transform: translateY(-3px);
}

/* Add script to handle TOC links at the bottom of the page */
.chronicle-content::after {
  content: "";
  display: block;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Script moved to src/assets/js/chronicle.js */ 