/*
AI THEME CONTRACT V2
This file must exist even if the generated theme mostly uses Tailwind.
Use it for custom refinements, variables, layout tweaks and polish.
*/

:root {
  --theme-primary: #2563eb;
  --theme-accent: #0f172a;
  --theme-ink: #1e293b;
  --theme-muted: #64748b;
  --theme-soft: #eef6ff;
  --theme-warm: #fff8ee;
  --theme-line: #dbe3ee;
  --theme-surface: #ffffff;
  --theme-radius-xl: 1.5rem;
  --theme-radius-2xl: 2rem;
  --theme-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--theme-ink);
}

a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.nav-panel::-webkit-scrollbar,
.category-excerpt::-webkit-scrollbar,
.article-content pre::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.nav-panel::-webkit-scrollbar-thumb,
.category-excerpt::-webkit-scrollbar-thumb,
.article-content pre::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
}

.mobile-menu.is-open {
  display: block;
}

.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.article-content {
  font-size: 1.06rem;
  line-height: 1.95;
  color: #334155;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content > *:last-child {
  margin-bottom: 0;
}

.article-content h2 {
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.7rem, 2vw, 2.35rem);
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.article-content h3 {
  margin: 2rem 0 0.9rem;
  font-size: clamp(1.35rem, 1.6vw, 1.75rem);
  line-height: 1.2;
  font-weight: 800;
  color: #172554;
}

.article-content h4 {
  margin: 1.7rem 0 0.75rem;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 800;
  color: #1e293b;
  text-transform: none;
}

.article-content p {
  margin: 1rem 0 1.2rem;
}

.article-content ul,
.article-content ol {
  margin: 1.2rem 0 1.4rem;
  padding-left: 1.4rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin: 0.5rem 0;
  padding-left: 0.2rem;
}

.article-content li > ul,
.article-content li > ol {
  margin-top: 0.7rem;
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
}

.article-content a {
  color: var(--theme-primary);
  font-weight: 700;
  text-decoration: underline;
  word-break: break-word;
}

.article-content a:hover {
  color: #1d4ed8;
}

.article-content strong {
  color: #0f172a;
  font-weight: 800;
}

.article-content em {
  color: #334155;
}

.article-content blockquote {
  margin: 1.8rem 0;
  padding: 1.3rem 1.4rem 1.3rem 1.2rem;
  border-left: 4px solid var(--theme-primary);
  background: linear-gradient(135deg, #eef6ff, #f8fbff);
  border-radius: 0 1.2rem 1.2rem 0;
  color: #1e3a8a;
  font-weight: 600;
}

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid #dbe3ee;
}

.article-content table {
  width: 100%;
  margin: 1.8rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px #dbe3ee;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.article-content th,
.article-content td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.article-content th {
  background: #eff6ff;
  color: #0f172a;
  font-weight: 800;
}

.article-content tr:nth-child(even) td {
  background: #f8fafc;
}

.article-content figure {
  margin: 2rem 0;
}

.article-content figure img {
  border-radius: 1.4rem;
  box-shadow: var(--theme-shadow);
}

.article-content figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--theme-muted);
  text-align: center;
}

.article-content code {
  background: #eff6ff;
  color: #1e3a8a;
  padding: 0.15rem 0.45rem;
  border-radius: 0.5rem;
  font-size: 0.92em;
}

.article-content pre {
  margin: 1.8rem 0;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.2rem 1.25rem;
  border-radius: 1.2rem;
  overflow-x: auto;
  line-height: 1.7;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-toc {
  margin: 0 0 2rem;
  padding: 1.2rem 1.2rem 1rem;
  border-radius: 1.4rem;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid #bfdbfe;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
}

.article-toc-title {
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #1d4ed8;
}

.article-toc ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.article-toc li {
  margin: 0.35rem 0;
}

.article-toc li ul {
  margin-top: 0.45rem;
  margin-left: 0.7rem;
  padding-left: 0.9rem;
  border-left: 1px dashed #93c5fd;
}

.article-toc a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.2s ease;
}

.article-toc a:hover {
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateX(2px);
}

.category-excerpt .article-toc {
  margin-bottom: 0;
}

.breadcrumbs,
.faq-item,
.cta-box,
.author-box,
.related-posts,
.review-box,
.alert,
.notice,
.info-box,
.warning-box,
.success-box,
.contact-form,
.search-block,
.pagination,
.filters,
.pricing-card,
.service-card,
.timeline,
.testimonial,
.rating-widget {
  border-radius: 1.25rem;
}

@media (max-width: 1023px) {
  .nav-dropdown .nav-panel {
    display: none !important;
  }

  .article-content {
    font-size: 1rem;
    line-height: 1.85;
  }

  .article-content h2 {
    margin-top: 2.2rem;
  }
}
