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

:root {
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #0891b2;
  --accent-color: #f59e0b;
  --success-color: #10b981;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Blog Header */
.blog-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 100px 20px 80px;
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat bottom;
  background-size: cover;
  opacity: 0.5;
}

.blog-header .container {
  position: relative;
  z-index: 1;
}

.blog-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.blog-header .lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.95;
  line-height: 1.6;
  font-weight: 400;
}

/* Blog Content */
.blog-content {
  background: white;
  border-radius: 16px;
  padding: 50px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

/* Quill Editor Styles Override */
.ql-editor {
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 2em;
  margin-bottom: 0.8em;
  line-height: 1.3;
}

.ql-editor h1 {
  font-size: 2.25rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-top: 1.5em;
}

.ql-editor h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.ql-editor h3 {
  font-size: 1.5rem;
}

.ql-editor h4 {
  font-size: 1.25rem;
}

.ql-editor h5 {
  font-size: 1.125rem;
}

.ql-editor h6 {
  font-size: 1rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ql-editor p {
  margin-bottom: 1.5em;
  color: var(--text-dark);
}

.ql-editor strong {
  font-weight: 600;
  color: var(--text-dark);
}

.ql-editor em {
  font-style: italic;
  color: var(--text-light);
}

.ql-editor a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color);
  transition: all 0.3s ease;
}

.ql-editor a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
  background: rgba(37, 99, 235, 0.05);
}

/* Lists */
.ql-editor ul,
.ql-editor ol {
  padding-left: 2em;
  margin-bottom: 1.5em;
}

.ql-editor ul li,
.ql-editor ol li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.ql-editor ul {
  list-style-type: disc;
}

.ql-editor ul li::marker {
  color: var(--primary-color);
}

.ql-editor ol {
  list-style-type: decimal;
}

.ql-editor ol li::marker {
  color: var(--primary-color);
  font-weight: 600;
}

/* Blockquotes */
.ql-editor blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2em 0;
  font-style: italic;
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  color: var(--text-light);
}

.ql-editor blockquote p {
  margin-bottom: 0;
}

/* Code Blocks */
.ql-editor pre {
  background: var(--text-dark);
  color: #f8f8f2;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2em 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ql-editor code {
  background: var(--bg-light);
  color: var(--primary-color);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
  border: 1px solid var(--border-color);
}

.ql-editor pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
}

/* Images */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: var(--shadow-md);
}

/* Tables */
.ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 2em 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ql-editor table thead {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
}

.ql-editor table th,
.ql-editor table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.ql-editor table th {
  font-weight: 600;
}

.ql-editor table tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.ql-editor table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

/* Horizontal Rule */
.ql-editor hr {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 3em 0;
}

/* Video Embeds */
.ql-editor iframe {
  max-width: 100%;
  border-radius: 12px;
  margin: 2em 0;
  box-shadow: var(--shadow-md);
}

/* Border Bottom */
.borderBottom {
  border-top: 2px solid var(--border-color);
  margin: 40px 0 30px;
}

/* Meta Container */
.meta-container {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.blog-meta {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.meta-item {
  font-size: 0.95rem;
  color: var(--text-light);
}

.meta-item .fw-bold {
  color: var(--text-dark);
  font-weight: 800;
}

/* ── Author Card (replaces old author-highlight) ── */
.author-highlight {
  background: linear-gradient(135deg, #f0f5ff 0%, #faf5ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-left: 4px solid var(--primary-color);
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.author-highlight:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Avatar circle with initials */
.author-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), #764ba2);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

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

.author-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.author-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
}

.author-name-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: none;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.author-name-link:hover {
  color: var(--primary-color);
  border-bottom: none;
  background: transparent;
}

.author-role {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 1px;
}

.author-arrow {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 0.85rem;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.author-highlight:hover .author-arrow {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Views Badge */
.views-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.eye-icon {
  display: flex;
  align-items: center;
  width: 20px;
  height: 20px;
}

.eye-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--text-light);
}

/* Back Section */
.back-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 10px;
  border: 2px solid var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(-5px);
  box-shadow: var(--shadow-md);
}

.btn-back span:first-child {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-back:hover span:first-child {
  transform: translateX(-3px);
}

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

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.row.justify-content-center {
  justify-content: center;
}

.col-lg-10 {
  width: 100%;
  padding: 0 15px;
}

@media (min-width: 992px) {
  .col-lg-10 {
    width: 83.333333%;
  }
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-header {
    padding: 80px 20px 60px;
    margin-top: 60px;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .blog-header .lead {
    font-size: 1rem;
  }

  .blog-content {
    padding: 30px 25px;
    border-radius: 12px;
  }

  .ql-editor {
    font-size: 1rem;
  }

  .ql-editor h1 {
    font-size: 1.75rem;
  }

  .ql-editor h2 {
    font-size: 1.5rem;
  }

  .ql-editor h3 {
    font-size: 1.25rem;
  }

  .ql-editor h4 {
    font-size: 1.125rem;
  }

  .ql-editor ul,
  .ql-editor ol {
    padding-left: 1.5em;
  }

  .ql-editor blockquote {
    padding: 1rem;
    padding-left: 1.25rem;
  }

  .ql-editor pre {
    padding: 1rem;
    font-size: 0.85rem;
  }

  .meta-container {
    padding: 20px;
  }

  .back-section {
    margin-top: 30px;
    padding-top: 20px;
  }

  .author-highlight {
    gap: 12px;
    padding: 16px 18px;
  }

  .author-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .author-arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .blog-content {
    padding: 20px;
  }

  .meta-container {
    padding: 15px;
  }

  .btn-back {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .ql-editor h1 {
    font-size: 1.5rem;
  }

  .ql-editor h2 {
    font-size: 1.35rem;
  }
}

/* Print Styles */
@media print {
  .blog-header {
    background: none;
    color: var(--text-dark);
    padding: 20px 0;
  }

  .blog-content,
  .meta-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .back-section,
  .btn-back {
    display: none;
  }

  .ql-editor a {
    color: var(--text-dark);
    border-bottom: none;
  }

  .ql-editor {
    font-size: 12pt;
  }
}

/* Accessibility */
.btn-back:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

.author-name-link:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: var(--text-dark);
}

::-moz-selection {
  background: rgba(37, 99, 235, 0.2);
  color: var(--text-dark);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

.ql-editor img {
  opacity: 0;
  animation: fadeInImage 0.5s ease-in forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}
