/* ===================================
   SINGLE POST PAGE STYLES
   =================================== */

.single-post {
  background: var(--white);
}

/* Container Narrow */
.container-narrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================
   POST HEADER
   =================================== */

.post-header {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #1a1f4d 100%);
  padding: 140px 0 80px;
  overflow: hidden;
  margin-bottom: 60px;
}

.post-header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 41, 0.8) 100%);
  z-index: 1;
}

.post-header-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.15;
}

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

.post-header-content {
  position: relative;
  z-index: 2;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: 25px;
  animation: fadeInUp 0.6s ease;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb .separator {
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb .current {
  color: var(--white);
  font-weight: 500;
}

/* Post Categories */
.post-categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s backwards;
}

.category-tag {
  background: rgba(146, 47, 22, 0.9);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-tag:hover {
  background: var(--brick);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(146, 47, 22, 0.4);
}

/* Post Title */
.post-title {
  font-size: 3rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 25px;
  animation: fadeInUp 0.6s ease 0.2s backwards;
  font-weight: 800;
}

/* Post Meta */
.post-meta {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s backwards;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.meta-item svg {
  opacity: 0.8;
}

.meta-item strong {
  font-weight: 600;
}

/* ===================================
   POST CONTENT LAYOUT
   =================================== */

.post-content-wrapper {
  padding: 0 0 80px;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 60px;
  align-items: start;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.post-main {
  animation: fadeInUp 0.8s ease;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 50px;
}

.post-content p {
  margin-bottom: 1.5em;
}

.post-content h2 {
  font-size: 2rem;
  color: var(--navy);
  margin-top: 2.5em;
  margin-bottom: 1em;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.post-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: var(--brick);
  border-radius: 2px;
}

.post-content h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-top: 2em;
  margin-bottom: 0.8em;
  font-weight: 600;
}

.post-content h4 {
  font-size: 1.25rem;
  color: var(--navy);
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  font-weight: 600;
}

.post-content a {
  color: var(--brick);
  text-decoration: none;
  border-bottom: 2px solid rgba(146, 47, 22, 0.3);
  transition: all 0.3s ease;
}

.post-content a:hover {
  border-bottom-color: var(--brick);
  color: #7a2513;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-content blockquote {
  border-left: 4px solid var(--brick);
  padding: 20px 30px;
  margin: 2em 0;
  background: #f8f9fa;
  border-radius: 8px;
  font-style: italic;
  color: #555;
  position: relative;
}

.post-content blockquote::before {
  content: '"';
  font-size: 4rem;
  color: rgba(146, 47, 22, 0.2);
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: Georgia, serif;
}

.post-content ul,
.post-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.post-content li {
  margin-bottom: 0.8em;
}

.post-content code {
  background: #f4f4f4;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e83e8c;
}

.post-content pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 25px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2em 0;
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ===================================
   POST TAGS
   =================================== */

.post-tags {
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 40px;
}

.post-tags h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  background: var(--white);
  color: var(--brick);
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.tag-item:hover {
  border-color: var(--brick);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(146, 47, 22, 0.15);
}

/* ===================================
   SHARE BUTTONS
   =================================== */

.post-share {
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  margin-bottom: 50px;
}

.post-share h4 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.share-btn.twitter {
  background: #1DA1F2;
  color: white;
}

.share-btn.twitter:hover {
  background: #1a8cd8;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.share-btn.facebook {
  background: #4267B2;
  color: white;
}

.share-btn.facebook:hover {
  background: #365899;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(66, 103, 178, 0.4);
}

.share-btn.linkedin {
  background: #0077B5;
  color: white;
}

.share-btn.linkedin:hover {
  background: #006399;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
}

.share-btn.copy-link {
  background: var(--navy);
  color: white;
}

.share-btn.copy-link:hover {
  background: #1a1f4d;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10, 14, 41, 0.4);
}

.share-btn.copied {
  background: #28a745;
}

/* ===================================
   AUTHOR BIO
   =================================== */

.author-bio {
  display: flex;
  gap: 25px;
  padding: 40px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 16px;
  margin-bottom: 50px;
  border: 2px solid #dee2e6;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-info h4 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 10px;
  font-weight: 700;
}

.author-info p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.author-posts-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brick);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.author-posts-link:hover {
  gap: 12px;
}

.author-posts-link svg {
  transition: transform 0.3s ease;
}

.author-posts-link:hover svg {
  transform: translateX(4px);
}

/* ===================================
   POST NAVIGATION
   =================================== */

.post-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
  padding-top: 50px;
  border-top: 2px solid #e9ecef;
}

.nav-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.nav-link:hover {
  background: white;
  border-color: var(--brick);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.nav-link.next {
  text-align: right;
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-link.next .nav-label {
  justify-content: flex-end;
}

.nav-title {
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.3;
}

.nav-link:hover .nav-title {
  color: var(--brick);
}

/* ===================================
   SIDEBAR
   =================================== */

.post-sidebar {
  position: sticky;
  top: 100px;
  animation: fadeInRight 0.8s ease;
}

.sidebar-widget {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Table of Contents */
.toc-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-widget li {
  margin-bottom: 12px;
}

.toc-widget a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  position: relative;
  padding-left: 25px;
}

.toc-widget a::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--brick);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toc-widget a:hover {
  background: white;
  color: var(--brick);
  padding-left: 25px;
}

.toc-widget a:hover::before,
.toc-widget a.active::before {
  opacity: 1;
}

.toc-widget a.active {
  background: white;
  color: var(--brick);
  font-weight: 600;
}

/* Related Posts */
.related-posts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.related-post-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.related-post-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.related-post-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 8px;
}

.related-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumb img {
  transform: scale(1.1);
}

.related-post-content h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.related-post-content a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-post-content a:hover {
  color: var(--brick);
}

.related-post-date {
  font-size: 0.8rem;
  color: #999;
}

/* Newsletter Widget */
.newsletter-widget p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.newsletter-form input {
  padding: 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(146, 47, 22, 0.1);
}

.newsletter-form button {
  padding: 12px;
  background: var(--brick);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.newsletter-form button:hover {
  background: #7a2513;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(146, 47, 22, 0.3);
}

/* ===================================
   COMMENTS SECTION
   =================================== */

.comments-section {
  margin-top: 60px;
  padding-top: 60px;
  border-top: 2px solid #e9ecef;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .post-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .post-header {
    padding: 120px 0 60px;
  }

  .post-title {
    font-size: 2rem;
  }

  .post-meta {
    gap: 15px;
  }

  .meta-item {
    font-size: 0.85rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .post-content h2 {
    font-size: 1.6rem;
  }

  .post-content h3 {
    font-size: 1.3rem;
  }

  .author-bio {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .nav-link.next {
    text-align: left;
  }

  .nav-link.next .nav-label {
    justify-content: flex-start;
  }

  .share-buttons {
    justify-content: center;
  }

  .post-sidebar {
    grid-template-columns: 1fr;
  }
}