/* Professional Content Page Styles for Blogs and Projects */

:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --content-max-width: 900px;
}

.dark-mode {
  --primary-color: #4da6ff;
  --secondary-color: #1a2530;
  --accent-color: #ff6b6b;
  --text-color: #e0e0e0;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
}

/* Header Styles */
.content-header {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 2rem 5%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-nav {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  transition: var(--transition);
}

.back-to-home:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-3px);
}

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

.share-btn {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Breadcrumb Navigation */
.breadcrumb {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

.breadcrumb-separator {
  color: var(--text-color);
  opacity: 0.5;
}

/* Main Content Container */
.content-container {
  max-width: var(--content-max-width);
  margin: 2rem auto;
  padding: 0 2rem;
}

.content-article {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

/* Title Section */
.content-title {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.dark-mode .content-title {
  color: var(--primary-color);
}

.content-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-color);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  opacity: 0.8;
  font-size: 0.95rem;
}

.meta-item i {
  color: var(--primary-color);
}

/* Content Body Styles */
.content-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

.content-body h2,
.content-body h3,
.content-body h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  line-height: 1.3;
}

.dark-mode .content-body h2,
.dark-mode .content-body h3,
.dark-mode .content-body h4 {
  color: var(--primary-color);
}

.content-body h2 {
  font-size: 2rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.content-body h3 {
  font-size: 1.6rem;
}

.content-body h4 {
  font-size: 1.3rem;
}

.content-body p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.content-body ul,
.content-body ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.content-body li {
  margin-bottom: 0.7rem;
}

.content-body strong {
  color: var(--secondary-color);
  font-weight: 600;
}

.dark-mode .content-body strong {
  color: var(--primary-color);
}

.content-body a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color);
  transition: var(--transition);
}

.content-body a:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.content-body code {
  background: var(--bg-color);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
}

.content-body pre {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-color);
}

.content-body blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-color);
  opacity: 0.9;
}

/* Repository and Demo Links */
.content-links {
  background: var(--bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  border-left: 4px solid var(--primary-color);
}

.content-links p {
  margin-bottom: 0.8rem;
}

.content-links strong {
  display: inline-block;
  min-width: 120px;
}

/* Tags and Categories */
.content-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--bg-color);
}

.tag {
  background: var(--primary-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.tag:hover {
  background: var(--accent-color);
  transform: scale(1.05);
}

/* Related Content Section */
.related-content {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

.related-content h3 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.dark-mode .related-content h3 {
  color: var(--primary-color);
}

.related-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.related-item {
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-color);
  border-left: 3px solid var(--primary-color);
}

.related-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related-item h4 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.dark-mode .related-item h4 {
  color: var(--primary-color);
}

/* Footer */
.content-footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 5%;
  margin-top: 3rem;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  margin-top: 1rem;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.dark-mode-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  background: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-header {
    padding: 1.5rem 3%;
  }

  .header-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .breadcrumb {
    padding: 1rem;
  }

  .content-container {
    padding: 0 1rem;
  }

  .content-article {
    padding: 2rem 1.5rem;
  }

  .content-title {
    font-size: 1.8rem;
  }

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

  .content-body h2 {
    font-size: 1.5rem;
  }

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

  .content-body h4 {
    font-size: 1.1rem;
  }

  .related-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .content-title {
    font-size: 1.5rem;
  }

  .share-buttons {
    width: 100%;
  }

  .share-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Copy Link Toast Notification */
.toast {
  position: fixed;
  bottom: 100px;
  right: 2rem;
  background: var(--secondary-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
