/* Resource Detail Page Styles - Professional & Minimalistic */
/* Consistent with main styles.css design system */

/* Page Layout */
.resources-wrapper {
  background: var(--neutral-200);
  min-height: 100vh;
  padding: 0;
}

/* Main Content Container */
.resource-detail {
  background: var(--neutral-100);
  border-radius: 0;
  box-shadow: none;
  border: none;
  overflow: hidden;
}

.resource-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Hero Section */
.resource-detail-hero {
  padding: var(--space-xxl) var(--space-xl);
  background: linear-gradient(135deg, var(--neutral-100) 0%, var(--neutral-200) 100%);
  border-bottom: 1px solid var(--neutral-300);
  text-align: center;
  position: relative;
  width: 100%;
}

.resource-detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23e2e8f0" fill-opacity="0.4"><circle cx="20" cy="20" r="1"/></g></svg>') repeat;
  pointer-events: none;
}

.resource-detail-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.resource-detail-meta > span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-600);
  background: var(--neutral-100);
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--neutral-300);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.resource-detail-meta > span:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.resource-type {
  background: var(--primary-color) !important;
  color: white !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  border-color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.2);
}

.resource-category {
  background: var(--secondary-color) !important;
  color: white !important;
  font-weight: 600 !important;
  border-color: var(--secondary-color) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.resource-detail-meta i {
  font-size: 0.75rem;
  opacity: 0.85;
}

.resource-detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--secondary-color);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 2;
}

.resource-detail-excerpt {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--neutral-600);
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Content Wrapper */
.resource-detail-content-wrapper {
  padding: var(--space-xxl) var(--space-xl);
}

/* Featured Image */
.resource-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: var(--space-xxl);
  box-shadow: var(--shadow-md);
}

/* Main Content */
.resource-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--neutral-700);
  max-width: 800px;
  margin: 0 auto var(--space-xxl) auto;
}

.resource-content h1,
.resource-content h2,
.resource-content h3,
.resource-content h4,
.resource-content h5,
.resource-content h6 {
  color: var(--secondary-color);
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-lg);
  font-weight: 600;
}

.resource-content h2 {
  font-size: 1.8rem;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-light);
}

.resource-content h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.resource-content h4 {
  font-size: 1.3rem;
}

.resource-content p {
  margin-bottom: var(--space-lg);
  text-align: justify;
}

.resource-content ul,
.resource-content ol {
  margin: var(--space-lg) 0;
  padding-left: var(--space-xl);
}

.resource-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.7;
}

.resource-content li::marker {
  color: var(--primary-color);
}

.resource-content blockquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  position: relative;
}

.resource-content blockquote::before {
  content: '"';
  font-size: 3rem;
  color: var(--primary-color);
  position: absolute;
  top: -10px;
  left: var(--space-lg);
  font-weight: bold;
  line-height: 1;
}

.resource-content code {
  background: var(--neutral-300);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--secondary-color);
}

.resource-content pre {
  background: var(--secondary-color);
  color: var(--neutral-100);
  padding: var(--space-lg);
  border-radius: 8px;
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

.resource-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.resource-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-xl) 0;
  background: var(--neutral-100);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.resource-content th,
.resource-content td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--neutral-300);
}

.resource-content th {
  background: var(--primary-color);
  color: var(--neutral-100);
  font-weight: 600;
}

.resource-content tr:nth-child(even) {
  background: var(--neutral-200);
}

.resource-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.3s ease;
}

.resource-content a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--primary-dark);
}

/* PDF Download Section */
.resource-pdf-download {
  margin: var(--space-xxl) auto;
  max-width: 800px;
}

.pdf-download-card {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #dc2626;
  border-radius: 12px;
  padding: var(--space-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pdf-download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #dc2626;
}

.pdf-download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
  border-color: #b91c1c;
}

.pdf-icon {
  font-size: 3rem;
  color: #dc2626;
  min-width: 60px;
  text-align: center;
}

.pdf-info {
  flex: 1;
}

.pdf-info h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: 1.25rem;
  color: var(--secondary-color);
  font-weight: 600;
}

.pdf-info p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pdf-action {
  min-width: 150px;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: #dc2626;
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 2px solid #dc2626;
}

.pdf-download-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.pdf-download-btn i {
  font-size: 0.9rem;
}

/* Tags Section */
.resource-tags {
  padding: var(--space-xl);
  background: var(--neutral-200);
  border-radius: 8px;
  margin: var(--space-xxl) auto 0 auto;
  max-width: 800px;
}

.resource-tags strong {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--secondary-color);
  margin-bottom: var(--space-lg);
  font-size: 1.1rem;
}

.resource-tags div {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--primary-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover {
  background: var(--primary-color);
  color: var(--neutral-100);
  transform: translateY(-1px);
}

/* Related Resources Section */
.related-resources {
  padding: var(--space-xxl) var(--space-xl);
  background: var(--neutral-200);
  border-top: 1px solid var(--neutral-300);
}

.related-title {
  text-align: center;
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin-bottom: var(--space-xxl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.related-title i {
  color: var(--primary-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  max-width: 1000px;
  margin: 0 auto;
}

.related-card {
  background: var(--neutral-100);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-300);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.related-card .card-image {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.related-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card .card-image img {
  transition: transform 0.3s ease;
}

.related-card:hover .card-image img {
  transform: scale(1.05);
}

.related-card .card-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neutral-300) 0%, var(--neutral-400) 100%);
  color: var(--neutral-500);
  font-size: 2rem;
}

.related-card .card-content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.related-card .resource-meta {
  margin-bottom: var(--space-sm);
}

.related-card .resource-meta .resource-type {
  background: var(--primary-color);
  color: var(--neutral-100);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-card .resource-title {
  margin: 0;
  font-size: 1.1rem;
  flex: 1;
}

.related-card .resource-title a {
  color: var(--secondary-color);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.3s ease;
}

.related-card .resource-title a:hover {
  color: var(--primary-color);
}

.related-card .resource-excerpt {
  color: var(--neutral-600);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.related-card .resource-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--neutral-300);
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin-top: auto;
}

.related-card .resource-footer > span {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.related-card .resource-footer i {
  font-size: 0.75rem;
  opacity: 0.8;
}

.related-card > div:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-card h4 {
  flex: 1;
}

.related-card h4 a {
  transition: color 0.3s ease;
}

.related-card h4 a:hover {
  color: var(--primary-color) !important;
}

/* Professional Typography Enhancements */
.resource-content .highlight-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(0, 82, 204, 0.1) 100%);
  border-left: 4px solid var(--primary-color);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  border-radius: 0 8px 8px 0;
  position: relative;
}

.resource-content .highlight-box::before {
  content: '💡';
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 1.5rem;
  opacity: 0.7;
}

.resource-content .key-point {
  background: var(--neutral-200);
  padding: var(--space-lg);
  border-radius: 8px;
  margin: var(--space-xl) 0;
  border-left: 3px solid var(--secondary-color);
}

.resource-content .warning-box {
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
  border-radius: 0 8px 8px 0;
  color: #991b1b;
}

/* Tablet Header Navigation Fix - Universal (768px-1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
  }

  .navbar-nav .nav-item {
    margin: 0 !important;
    position: relative !important;
  }

  .navbar-nav .nav-link {
    padding: var(--space-sm) var(--space-md) !important;
    color: var(--neutral-100) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
  }

  .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--neutral-100) !important;
  }

  .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: var(--secondary-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    min-width: 200px !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
  }

  .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  .dropdown-item {
    padding: var(--space-sm) var(--space-md) !important;
    color: var(--neutral-100) !important;
    background: transparent !important;
    border: none !important;
    font-size: 0.9rem !important;
    transition: background-color 0.3s ease !important;
  }

  .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--neutral-100) !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  .navbar-brand img {
    height: 45px !important;
  }

  .navbar {
    padding: var(--space-sm) 0 !important;
  }

  .navbar .container {
    padding: 0 var(--space-lg) !important;
  }
}

/* iPad Mini Specific (768px-820px) */
@media (min-width: 768px) and (max-width: 820px) {
  .navbar-nav .nav-link {
    padding: var(--space-xs) var(--space-sm) !important;
    font-size: 0.9rem !important;
  }

  .navbar .container {
    padding: 0 var(--space-md) !important;
  }

  .dropdown-menu {
    min-width: 180px !important;
  }
}

/* iPad Air and larger tablets (821px-1024px) */
@media (min-width: 821px) and (max-width: 1024px) {
  .navbar-nav .nav-link {
    padding: var(--space-sm) var(--space-md) !important;
    font-size: 0.95rem !important;
  }

  .dropdown-menu {
    min-width: 220px !important;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .resource-detail-container {
    max-width: 100%;
  }
  
  .resource-detail-title {
    font-size: 2.2rem;
  }
  
  .resource-content {
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  .resources-wrapper {
    padding: 0;
  }
  
  .resource-detail-hero {
    padding: var(--space-xl) var(--space-lg);
    text-align: left;
  }
  
  .resource-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    justify-content: flex-start;
    align-items: stretch;
    margin-bottom: var(--space-lg);
  }
  
  .resource-detail-meta > span {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    justify-content: flex-start;
  }
  
  .resource-type {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
    letter-spacing: 0.75px;
    justify-content: center;
  }
  
  .resource-category {
    grid-column: 1 / -1;
    font-size: 0.8125rem;
  }
  
  .resource-detail-meta .resource-date,
  .resource-detail-meta .resource-read-time {
    font-size: 0.8125rem;
  }
  
  .resource-detail-meta .resource-author {
    grid-column: 1 / -1;
  }
  
  .resource-detail-meta .resource-views {
    grid-column: 1 / -1;
    font-size: 0.8125rem;
  }
  
  .resource-detail-meta i {
    font-size: 0.75rem;
    opacity: 0.9;
  }
  
  .resource-detail-title {
    font-size: 1.875rem;
    text-align: left;
    line-height: 1.25;
    margin-top: var(--space-md);
  }
  
  .resource-detail-excerpt {
    font-size: 1rem;
    text-align: left;
    line-height: 1.6;
  }
  
  .resource-detail-content-wrapper {
    padding: var(--space-xl) var(--space-lg);
  }
  
  .pdf-download-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
  }
  
  .pdf-icon {
    font-size: 2.5rem;
  }
  
  .pdf-action {
    min-width: auto;
  }
  
  .resource-content {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .resource-content h2 {
    font-size: 1.6rem;
  }
  
  .resource-content h3 {
    font-size: 1.4rem;
  }
  
  .resource-content table {
    font-size: 0.9rem;
  }
  
  .resource-content th,
  .resource-content td {
    padding: var(--space-sm);
  }
  
  .related-resources {
    padding: var(--space-xl) var(--space-lg);
  }
  
  .related-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .related-title {
    font-size: 1.6rem;
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .resource-detail-hero {
    padding: var(--space-lg) var(--space-md);
    text-align: left;
  }
  
  .resource-detail-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .resource-detail-meta > span {
    font-size: 0.8125rem;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
  }
  
  .resource-type {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
    letter-spacing: 1px;
    text-align: center;
  }
  
  .resource-category {
    font-size: 0.8125rem;
  }
  
  .resource-detail-meta .resource-date,
  .resource-detail-meta .resource-read-time,
  .resource-detail-meta .resource-author,
  .resource-detail-meta .resource-views {
    font-size: 0.8125rem;
  }
  
  .resource-detail-meta i {
    font-size: 0.75rem;
  }
  
  .resource-detail-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-top: var(--space-md);
  }
  
  .resource-detail-excerpt {
    font-size: 0.9375rem;
    line-height: 1.55;
  }
  
  .resource-detail-content-wrapper {
    padding: var(--space-lg) var(--space-md);
  }
  
  .pdf-download-card {
    padding: var(--space-md);
  }
  
  .pdf-info h4 {
    font-size: 1.1rem;
  }
  
  .pdf-download-btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
  }
  
  .resource-content {
    text-align: left;
  }
  
  .resource-content h2 {
    font-size: 1.4rem;
  }
  
  .resource-content h3 {
    font-size: 1.2rem;
  }
  
  .resource-tags {
    padding: var(--space-lg);
  }
}

/* Extra Small Screens - Enhanced Mobile Experience */
@media (max-width: 375px) {
  .resource-detail-hero {
    padding: 1rem 0.875rem;
  }
  
  .resource-detail-meta {
    gap: 0.4375rem;
  }
  
  .resource-detail-meta > span {
    font-size: 0.75rem;
    padding: 0.4375rem 0.75rem;
  }
  
  .resource-type {
    font-size: 0.6875rem;
    padding: 0.375rem 0.625rem;
  }
  
  .resource-detail-meta i {
    font-size: 0.6875rem;
  }
  
  .resource-detail-title {
    font-size: 1.375rem;
    line-height: 1.25;
    margin-top: 0.75rem;
  }
  
  .resource-detail-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
  }
  
  .resource-detail-content-wrapper {
    padding: 1rem 0.875rem;
  }
}

/* Print Styles */
@media print {
  .resources-wrapper {
    background: white;
    padding: 0;
  }
  
  .related-resources {
    display: none;
  }
  
  .resource-detail {
    box-shadow: none;
    border: none;
  }
  
  .resource-detail-hero {
    background: white;
    border-bottom: 2px solid #000;
  }
  
  .resource-content {
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
  }
  
  .resource-content h2,
  .resource-content h3,
  .resource-content h4 {
    page-break-after: avoid;
    color: #000;
  }
  
  .resource-detail-title {
    color: #000;
    font-size: 18pt;
  }
}

/* Focus and Accessibility */
.tag:focus,
.related-card:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .resource-detail {
    border-width: 2px;
  }
  
  .resource-content blockquote {
    border-left-width: 6px;
  }
  
  .tag {
    border-width: 2px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .related-card,
  .tag,
  .related-card .card-image img {
    transition: none;
  }
  
  .related-card:hover,
  .tag:hover {
    transform: none;
  }
}

/* Animation for content reveal */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resource-detail {
  animation: fadeInUp 0.6s ease forwards;
}

.related-card {
  animation: fadeInUp 0.6s ease forwards;
}

.related-card:nth-child(1) { animation-delay: 0.1s; }
.related-card:nth-child(2) { animation-delay: 0.2s; }
.related-card:nth-child(3) { animation-delay: 0.3s; }

/* ===================================
   QUILL EDITOR CONTENT DISPLAY STYLES
   =================================== */
.ql-editor-display {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
  line-height: 1.6 !important;
  color: #1e293b !important;
  font-size: 1.1rem !important;
}

/* Typography */
.ql-editor-display h1 {
  font-size: 2.25em !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 0.5em !important;
  margin-top: 1.5em !important;
  line-height: 1.2 !important;
}

.ql-editor-display h2 {
  font-size: 1.875em !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 0.5em !important;
  margin-top: 1.25em !important;
  line-height: 1.3 !important;
  padding-bottom: 0.3em !important;
  border-bottom: 2px solid var(--primary-light) !important;
}

.ql-editor-display h3 {
  font-size: 1.5em !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 0.5em !important;
  margin-top: 1em !important;
  line-height: 1.4 !important;
}

.ql-editor-display h4 {
  font-size: 1.25em !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 0.5em !important;
  margin-top: 1em !important;
}

.ql-editor-display h5 {
  font-size: 1.125em !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-bottom: 0.5em !important;
  margin-top: 1em !important;
}

.ql-editor-display h6 {
  font-size: 1em !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-bottom: 0.5em !important;
  margin-top: 1em !important;
}

.ql-editor-display p {
  margin-bottom: 1em !important;
  line-height: 1.8 !important;
  text-align: justify !important;
}

/* ===================================
   LISTS - QUILL EDITOR SUPPORT (IMPROVED COUNTER SYSTEM)
   =================================== */
.ql-editor-display {
  counter-reset: level0 level1 level2 level3 !important;
}

.ql-editor-display ul,
.ql-editor-display ol {
  margin-bottom: 1em !important;
  margin-top: 0.5em !important;
  padding-left: 0 !important;
  list-style: none !important;
}

.ql-editor-display li {
  margin-bottom: 0.5em !important;
  line-height: 1.7 !important;
  position: relative !important;
}

/* ===================================
   QUILL INDENT CLASSES - IMPROVED COUNTER SYSTEM
   =================================== */

/* Level 0 (Default) - Main bullets */
.ql-editor-display ul > li:not([class*="ql-indent"])::before {
  content: "•" !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
  font-weight: bold !important;
}

.ql-editor-display ul > li:not([class*="ql-indent"]) {
  margin-left: 2em !important;
  color: var(--neutral-700) !important;
}

/* Level 0 Ordered Lists */
.ql-editor-display ol > li:not([class*="ql-indent"]) {
  counter-increment: level0 !important;
  margin-left: 2em !important;
  color: var(--neutral-700) !important;
}

.ql-editor-display ol > li:not([class*="ql-indent"])::before {
  content: counter(level0) ". " !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
  font-weight: bold !important;
}

/* Level 1 Indent */
.ql-editor-display ul > li.ql-indent-1::before {
  content: "○" !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-1 {
  margin-left: 4em !important;
  color: var(--neutral-600) !important;
}

.ql-editor-display ol > li.ql-indent-1 {
  counter-increment: level1 !important;
  margin-left: 4em !important;
  color: var(--neutral-600) !important;
}

.ql-editor-display ol > li.ql-indent-1::before {
  content: counter(level1, lower-alpha) ". " !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

/* Level 2 Indent */
.ql-editor-display ul > li.ql-indent-2::before {
  content: "▪" !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-2 {
  margin-left: 6em !important;
  color: var(--neutral-600) !important;
}

.ql-editor-display ol > li.ql-indent-2 {
  counter-increment: level2 !important;
  margin-left: 6em !important;
  color: var(--neutral-600) !important;
}

.ql-editor-display ol > li.ql-indent-2::before {
  content: counter(level2, lower-roman) ". " !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

/* Level 3 Indent */
.ql-editor-display ul > li.ql-indent-3::before {
  content: "•" !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-3 {
  margin-left: 8em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-3 {
  counter-increment: level3 !important;
  margin-left: 8em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-3::before {
  content: counter(level3) ". " !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
}

/* Level 4 and beyond */
.ql-editor-display ul > li.ql-indent-4::before {
  content: "○" !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-4 {
  margin-left: 10em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-4 {
  counter-increment: level1 !important;
  margin-left: 10em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-4::before {
  content: counter(level1, lower-alpha) ". " !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-5::before {
  content: "▪" !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-5 {
  margin-left: 12em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-5 {
  counter-increment: level2 !important;
  margin-left: 12em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-5::before {
  content: counter(level2, lower-roman) ". " !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-6::before {
  content: "•" !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul > li.ql-indent-6 {
  margin-left: 14em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-6 {
  counter-increment: level3 !important;
  margin-left: 14em !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol > li.ql-indent-6::before {
  content: counter(level3) ". " !important;
  color: var(--primary-color) !important;
  margin-right: 0.5em !important;
}

/* ===================================
   TRADITIONAL NESTED LISTS SUPPORT (IMPROVED COUNTER SYSTEM)
   =================================== */
.ql-editor-display ul ul,
.ql-editor-display ol ul,
.ql-editor-display ul ol,
.ql-editor-display ol ol {
  margin-top: 0.5em !important;
  margin-bottom: 0.5em !important;
  padding-left: 2em !important;
  list-style: none !important;
}

.ql-editor-display ol ol {
  counter-reset: nested-level1 !important;
}

.ql-editor-display ol ol ol {
  counter-reset: nested-level2 !important;
}

.ql-editor-display ul ul > li::before {
  content: "○" !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul ul > li {
  color: var(--neutral-600) !important;
}

.ql-editor-display ol ol > li {
  counter-increment: nested-level1 !important;
  color: var(--neutral-600) !important;
}

.ql-editor-display ol ol > li::before {
  content: counter(nested-level1, lower-alpha) ". " !important;
  color: var(--secondary-color) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul ul ul > li::before {
  content: "▪" !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display ul ul ul > li {
  color: var(--neutral-500) !important;
}

.ql-editor-display ol ol ol > li {
  counter-increment: nested-level2 !important;
  color: var(--neutral-500) !important;
}

.ql-editor-display ol ol ol > li::before {
  content: counter(nested-level2, lower-roman) ". " !important;
  color: var(--accent-color, #4a90a4) !important;
  margin-right: 0.5em !important;
}

.ql-editor-display li li {
  margin-top: 0.3em !important;
  margin-bottom: 0.3em !important;
}

.ql-editor-display li > ul,
.ql-editor-display li > ol {
  margin-top: 0.5em !important;
  margin-bottom: 0 !important;
}

/* Links */
.ql-editor-display a {
  color: var(--primary-color) !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  transition: all 0.3s ease !important;
}

.ql-editor-display a:hover {
  color: var(--primary-dark) !important;
  text-decoration-color: var(--primary-dark) !important;
}

/* Blockquotes */
.ql-editor-display blockquote {
  border-left: 4px solid var(--primary-color) !important;
  padding: 16px 16px 16px 24px !important;
  background: #f8fafc !important;
  border-radius: 8px !important;
  color: #475569 !important;
  font-style: italic !important;
  margin: 1.5em 0 !important;
  position: relative !important;
}

.ql-editor-display blockquote::before {
  content: '"' !important;
  font-size: 3rem !important;
  color: var(--primary-color) !important;
  position: absolute !important;
  top: -10px !important;
  left: 16px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  opacity: 0.3 !important;
}

/* Code Blocks */
.ql-editor-display pre {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  padding: 20px !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  margin: 1.5em 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.9em !important;
}

.ql-editor-display code {
  background: #f1f5f9 !important;
  padding: 3px 8px !important;
  color: #dc2626 !important;
  border-radius: 4px !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.9em !important;
}

.ql-editor-display pre code {
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
}

/* Images */
.ql-editor-display img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 1.5em 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  display: block !important;
}

/* Videos */
.ql-editor-display video {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 1.5em 0 !important;
}

/* Text Alignment */
.ql-editor-display .ql-align-center {
  text-align: center !important;
}

.ql-editor-display .ql-align-right {
  text-align: right !important;
}

.ql-editor-display .ql-align-justify {
  text-align: justify !important;
}

/* Font Sizes */
.ql-editor-display .ql-size-small {
  font-size: 0.75em !important;
}

.ql-editor-display .ql-size-large {
  font-size: 1.5em !important;
}

.ql-editor-display .ql-size-huge {
  font-size: 2.5em !important;
}

/* Text Formatting */
.ql-editor-display strong {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.ql-editor-display em {
  font-style: italic !important;
}

.ql-editor-display u {
  text-decoration: underline !important;
}

.ql-editor-display s {
  text-decoration: line-through !important;
  opacity: 0.7 !important;
}

/* Tables (if using Quill table module) */
.ql-editor-display table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 1.5em 0 !important;
  background: var(--neutral-100) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.ql-editor-display th,
.ql-editor-display td {
  padding: 12px 16px !important;
  text-align: left !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.ql-editor-display th {
  background: var(--primary-color) !important;
  color: var(--neutral-100) !important;
  font-weight: 600 !important;
}

.ql-editor-display tr:nth-child(even) {
  background: #f8fafc !important;
}

/* Responsive Quill Content */
@media (max-width: 768px) {
  .ql-editor-display {
    font-size: 1rem !important;
  }
  
  .ql-editor-display h1 {
    font-size: 1.875em !important;
  }
  
  .ql-editor-display h2 {
    font-size: 1.5em !important;
  }
  
  .ql-editor-display h3 {
    font-size: 1.25em !important;
  }
  
  .ql-editor-display pre {
    padding: 16px !important;
    font-size: 0.85em !important;
  }
  
  .ql-editor-display blockquote {
    padding: 12px 12px 12px 20px !important;
  }
  
  /* Nested Lists on Tablet */
  .ql-editor-display ul > li.ql-indent-1 {
    margin-left: 3em !important;
  }
  
  .ql-editor-display ul > li.ql-indent-2 {
    margin-left: 4.5em !important;
  }
  
  .ql-editor-display ul > li.ql-indent-3 {
    margin-left: 6em !important;
  }
  
  .ql-editor-display ol > li.ql-indent-1 {
    margin-left: 3em !important;
  }
  
  .ql-editor-display ol > li.ql-indent-2 {
    margin-left: 4.5em !important;
  }
  
  .ql-editor-display ol > li.ql-indent-3 {
    margin-left: 6em !important;
  }
  
  .ql-editor-display ul ul,
  .ql-editor-display ol ol,
  .ql-editor-display ul ol,
  .ql-editor-display ol ul {
    padding-left: 1.5em !important;
  }
}

@media (max-width: 480px) {
  .ql-editor-display {
    font-size: 0.95rem !important;
  }
  
  .ql-editor-display h1 {
    font-size: 1.5em !important;
  }
  
  .ql-editor-display h2 {
    font-size: 1.3em !important;
  }
  
  .ql-editor-display h3 {
    font-size: 1.15em !important;
  }
  
  .ql-editor-display ul,
  .ql-editor-display ol {
    padding-left: 1.5em !important;
  }
  
  /* Nested Lists on Mobile */
  .ql-editor-display ul > li:not([class*="ql-indent"]) {
    margin-left: 1.5em !important;
  }
  
  .ql-editor-display ol > li:not([class*="ql-indent"]) {
    margin-left: 1.5em !important;
  }
  
  .ql-editor-display ul > li.ql-indent-1,
  .ql-editor-display ol > li.ql-indent-1 {
    margin-left: 2.5em !important;
  }
  
  .ql-editor-display ul > li.ql-indent-2,
  .ql-editor-display ol > li.ql-indent-2 {
    margin-left: 3.5em !important;
  }
  
  .ql-editor-display ul > li.ql-indent-3,
  .ql-editor-display ol > li.ql-indent-3 {
    margin-left: 4.5em !important;
  }
  
  .ql-editor-display ul ul,
  .ql-editor-display ol ol,
  .ql-editor-display ul ol,
  .ql-editor-display ol ul {
    padding-left: 1.2em !important;
  }
  
  /* Reduce nested list spacing on mobile */
  .ql-editor-display li li {
    margin-top: 0.2em !important;
    margin-bottom: 0.2em !important;
  }
}