/*
 * Kenya Business Directory — Custom CSS
 * Complement TailwindCSS CDN
 */

/* ========================
   ARTICLE PROSE — Premium typography
   ======================== */

/* Drop cap on first paragraph */
.article-prose > p:first-of-type::first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  margin: 0.05em 0.12em 0 0;
  font-weight: 700;
  color: #292524; /* stone-800 */
  font-family: var(--font-heading, 'Lora', Georgia, serif);
}

/* Heading anchors */
.prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e7e5e4; /* stone-200 */
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Blockquote — editorial style */
.prose blockquote {
  border-left-width: 3px;
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Table — premium styling */
.prose table {
  font-size: 0.875rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e7e5e4;
}

.prose table th {
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
}

.prose table td {
  padding: 0.625rem 1rem;
}

.prose table tbody tr:hover {
  background-color: #fafaf9; /* stone-50 */
}

.prose table tbody tr {
  transition: background-color 0.15s ease;
}

/* Inline code */
.prose code:not(pre code) {
  background-color: #f5f5f4;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  border: 1px solid #e7e5e4;
}

/* Horizontal rules */
.prose hr {
  border-top: 1px solid #d6d3d1;
  margin: 2.5rem 0;
}

/* ========================
   LAYOUT UTILITIES
   ======================== */

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Transitions */
a, button {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Image loading placeholder */
img {
  background-color: #f5f5f4;
}

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

#toc-nav a {
  border-left: 2px solid transparent;
  margin-left: -1.0625rem;
  padding-left: 0.8125rem;
}

#toc-nav a.font-semibold {
  border-left-color: currentColor;
}

/* ========================
   READING PROGRESS BAR
   ======================== */

#reading-progress {
  background: transparent;
}

/* ========================
   PRINT
   ======================== */

@media print {
  header, footer, nav, aside, .no-print,
  #reading-progress, #toc-sidebar {
    display: none !important;
  }
  .prose {
    max-width: 100%;
  }
  main {
    padding: 0;
  }
}
