/* Basic overrides to complement Tailwind */
html, body { height: 100%; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif; font-size: clamp(15px, 1vw + 0.5rem, 18px); }
.prose h1, .prose h2, .prose h3 { font-family: "Playfair Display", serif; }

/* Header vertical centering tweaks */
header .max-w-7xl > .flex { align-items: center; padding-top: 0.5rem; padding-bottom: 0.5rem; }
header { position: relative; z-index: 9999; }
.navbar { position: relative; z-index: 10000; }
#nav-menu-mobile.navbar { position: relative; z-index: 100000; }
header .custom-logo-link { display: inline-flex; align-items: center; }
header .custom-logo-link img { display: block; height: 40px; width: auto; }
header a.text-2xl.font-serif { display: inline-flex; align-items: center; line-height: 1; }
header #nav-toggle i[data-lucide="menu"] { width: 20px; height: 20px; }
@media (max-width: 767.98px) {
  header #nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (min-width: 768px) {
  header #nav-toggle { display: none !important; }
}

.navbar .nav-list { gap: 1rem; }
.navbar .menu-item { position: relative; }
.navbar .nav-list > li > a { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.25rem; color: #334155; line-height: 1; }
.navbar .nav-list > li > a:hover { color: #16A085; }
.navbar .menu-item-has-children > a::after { content: ""; display: inline-block; width: 0.85rem; height: 0.85rem; margin-left: 0.25rem; background-repeat: no-repeat; background-size: 100% 100%; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>'); transition: transform .2s ease; vertical-align: middle; }
.navbar .menu-item-has-children:hover > a::after { transform: rotate(180deg); background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2316A085" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>'); }
.navbar .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 12rem; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05); padding: 0.5rem; z-index: 100000; }
.navbar .sub-menu li a { display: block; padding: 0.5rem 0.75rem; color: #334155; border-radius: 0.375rem; }
.navbar .sub-menu li a:hover { background: #f1f5f9; color: #16A085; }

@media (min-width: 768px) {
  .navbar .menu-item-has-children:hover > .sub-menu { display: block; }
}

#nav-menu-mobile .sub-menu { display: none; position: static; background: transparent; border: 0; box-shadow: none; padding: 0.25rem 0; }
#nav-menu-mobile .menu-item[data-expanded="true"] > .sub-menu { display: block; }
main { position: relative; z-index: 0; overflow: visible; }
.page header, .page .article-content { position: relative; z-index: 0; }

/* Card shadow utility to match design */
.card-shadow { transition: all .3s ease-in-out; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); }
.card-shadow:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,.15), 0 4px 6px -4px rgba(0,0,0,.15); transform: translateY(-2px); }

/* Single post hero title responsiveness */
.single-post header h1 {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
}
/* Page title responsiveness */
.page header h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.3rem);
  line-height: 1.25;
  overflow-wrap: break-word;
  word-break: normal;
  margin-left: auto;
  margin-right: auto;
}

/* Line clamp utilities used by templates */
.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; }

/* Article content styling (single post) */
.article-content { font-size: 1.125rem; line-height: 1.8; }
.article-content h1, .article-content h2, .article-content h3 { font-family: "Playfair Display", serif; color: #1f2937; font-weight: 700; }
.article-content h1 { font-size: clamp(2rem, 3.5vw, 3.25rem); margin-top: 2.5rem; margin-bottom: 1rem; }
.article-content h2 { font-size: clamp(1.375rem, 1.8vw, 1.75rem); margin-top: 2.5rem; margin-bottom: 1rem; }
.article-content h3 { font-size: clamp(1.25rem, 1.8vw, 1.75rem); margin-top: 2rem; margin-bottom: 0.75rem; }
.article-content p { margin-bottom: 1.75rem; }
.article-content blockquote { border-left: 6px solid #e0e7ff; padding: 1.5rem; margin: 2.5rem 0; background-color: #f0f4ff; font-style: italic; color: #4f46e5; border-radius: 0.5rem; }
.article-content code { background-color: #e2e8f0; padding: 0.2rem 0.4rem; border-radius: 0.375rem; font-weight: 500; font-size: 0.9em; }
.toc-link:hover { color: #16A085; }
.related-item:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05); transform: translateY(-2px); }

#blog-section h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }

/* Professional H2 styling */
.article-content h2 { position: relative; scroll-margin-top: 96px; color: #ffffff; background-color: var(--brand-accent); padding: 0.6rem 1rem 0.85rem; border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(22,160,133,.18); letter-spacing: 0.2px; display: inline-block; max-width: 100%; }
.article-content h2::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background-color: rgba(255,255,255,0.9); }
.article-content h2 a { color: inherit; text-decoration: none; }
.article-content h2 a:hover { text-decoration: underline; }

/* List styling */
.article-content ul, .article-content ol { margin-top: 1.25rem; margin-bottom: 1.75rem; padding-left: 1.25rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content ul { list-style: none; }
.article-content ul > li { position: relative; padding-left: 0.75rem; }
.article-content ul > li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 6px; height: 6px; border-radius: 9999px; background-color: #16A085; transform: translateY(-50%); }
.article-content ul ul { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.article-content ul ul > li::before { background-color: #0f766e; }
.article-content ol { list-style: decimal; }
.article-content ol > li::marker { color: #16A085; font-weight: 600; }
.article-content li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-content li a:hover { color: #0f766e; }

/* Horizontal chip list with icons */
.article-content ul.list-horizontal { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-left: 0; }
.article-content ul.list-horizontal > li { list-style: none; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 9999px; background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.article-content ul.list-horizontal > li::before { content: ""; width: 16px; height: 16px; background-repeat: no-repeat; background-size: 16px 16px; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23059669" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>'); }
.article-content ul.list-horizontal > li a { color: inherit; text-decoration: none; }
.article-content ul.list-horizontal > li a:hover { text-decoration: underline; }

/* Vertical stacked chips (like screenshot) */
.article-content ul.list-chips { display: flex; flex-direction: column; gap: 0.75rem; padding-left: 0; }
.article-content ul.list-chips > li { list-style: none; position: relative; display: flex; align-items: center; padding: 0.9rem 1rem 0.9rem 2.4rem; border-radius: 9999px; background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; box-shadow: 0 1px 2px rgba(0,0,0,.06); line-height: 1.6; white-space: normal; word-break: keep-all; overflow-wrap: break-word; }
.article-content ul.list-chips > li::before { content: ""; position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 9999px; background-color: #10b981; box-shadow: inset 0 0 0 4px #d1fae5; }
.article-content ul.list-chips > li a { color: inherit; text-decoration: none; }
.article-content ul.list-chips > li a:hover { text-decoration: underline; }

/* Download button styling */
.article-content a.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  background-color: var(--brand-accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 2px 6px rgba(22,160,133,.25);
  transition: all .2s ease-in-out;
}
.article-content a.download-btn:hover {
  background-color: #0f766e;
  box-shadow: 0 4px 10px rgba(15,118,110,.3);
  transform: translateY(-1px);
  color: #ffffff;
}

ul.selected-links { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-left: 0; margin-top: 0.5rem; }
ul.selected-links > li { list-style: none; }
ul.selected-links > li a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid var(--brand-accent);
  background-color: #ffffff;
  color: var(--brand-accent);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: all .2s ease-in-out;
}
ul.selected-links > li a:hover {
  background-color: rgba(22,160,133,0.08);
}
ul.selected-links > li a i[data-lucide] { width: 16px; height: 16px; }
