/* Static WebTools pages: mirrors the existing Bootstrap/Font Awesome design. */
:root {
  --wt-primary: #6366f1;
  --wt-primary-dark: #4f46e5;
  --wt-secondary: #764ba2;
  --wt-gradient: linear-gradient(135deg, #6366f1 0%, #764ba2 100%);
  --wt-gradient-hero: linear-gradient(135deg, #4f46e5 0%, #764ba2 50%, #9333ea 100%);
  --wt-body-bg: #f8f9ff;
  --wt-card-bg: #ffffff;
  --wt-card-border: rgba(99, 102, 241, .12);
  --wt-text: #1e1e2e;
  --wt-text-muted: #6c757d;
  --wt-navbar-bg: linear-gradient(90deg, #4f46e5 0%, #764ba2 100%);
  --wt-footer-bg: #1e1e2e;
  --wt-footer-text: #adb5bd;
  --wt-shadow-sm: 0 2px 8px rgba(99, 102, 241, .10);
  --wt-shadow-md: 0 6px 24px rgba(99, 102, 241, .18);
  --wt-radius: .75rem;
  --wt-radius-sm: .5rem;
  --wt-transition: all .22s ease;
}

[data-bs-theme="dark"] {
  --wt-body-bg: #12121f;
  --wt-card-bg: #1e1e30;
  --wt-card-border: rgba(99, 102, 241, .20);
  --wt-text: #e2e2f0;
  --wt-text-muted: #9b9bb8;
  --wt-footer-bg: #0d0d1a;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--wt-body-bg);
  color: var(--wt-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

main { flex: 1 0 auto; }
a { color: var(--wt-primary); text-decoration: none; }
a:hover { color: var(--wt-primary-dark); text-decoration: underline; }

.fa-solid {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -.125em;
}

.fa-solid::before {
  content: "";
  display: block;
  width: .72em;
  height: .72em;
  margin: .14em;
  border-radius: .2em;
  background: currentColor;
  opacity: .85;
}

.fa-2x {
  font-size: 2em;
}

.fa-3x {
  font-size: 3em;
}

.wt-navbar {
  background: var(--wt-navbar-bg) !important;
  box-shadow: 0 2px 16px rgba(79, 70, 229, .30);
  padding-top: .45rem;
  padding-bottom: .45rem;
}

.wt-brand {
  color: #fff !important;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.wt-brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.wt-navbar .nav-link {
  color: rgba(255, 255, 255, .85) !important;
  font-weight: 500;
  border-radius: var(--wt-radius-sm);
  padding: .4rem .75rem !important;
}

.wt-navbar .nav-link:hover,
.wt-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, .15);
}

.wt-dropdown {
  border: 0;
  border-radius: var(--wt-radius);
  background: var(--wt-card-bg);
  box-shadow: var(--wt-shadow-md);
  overflow: hidden;
}

.wt-dropdown .dropdown-item {
  color: var(--wt-text);
  padding: .55rem 1.1rem;
  font-size: .92rem;
}

.wt-dropdown .dropdown-item:hover {
  color: var(--wt-primary);
  background: linear-gradient(90deg, rgba(99, 102, 241, .10) 0%, transparent 100%);
}

.wt-theme-btn {
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wt-hero {
  position: relative;
  overflow: hidden;
  background: var(--wt-gradient-hero);
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.wt-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255, 255, 255, .07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(255, 255, 255, .05) 0%, transparent 60%);
  pointer-events: none;
}

.wt-hero > .container { position: relative; z-index: 1; }

.wt-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, .15);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
}

.wt-tool-card,
.wt-panel,
.card {
  background: var(--wt-card-bg);
  border-radius: var(--wt-radius) !important;
  border: 1px solid var(--wt-card-border) !important;
  box-shadow: var(--wt-shadow-sm) !important;
}

.wt-content-section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.wt-content-section h2,
.wt-content-section h3 {
  color: var(--wt-text);
}

.wt-faq-list {
  display: grid;
  gap: 1rem;
}

.wt-faq-item {
  background: var(--wt-card-bg);
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius-sm);
  padding: 1rem;
}

.wt-faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.wt-disclaimer {
  background: rgba(99, 102, 241, .08);
  border-left: 4px solid var(--wt-primary);
  border-radius: var(--wt-radius-sm);
  padding: 1rem;
}

.wt-tool-card {
  height: 100%;
  transition: var(--wt-transition);
  overflow: hidden;
  position: relative;
}

.wt-tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--wt-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.wt-tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--wt-shadow-md) !important;
}

.wt-tool-card:hover::before { transform: scaleX(1); }

.wt-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--wt-primary);
  background: rgba(99, 102, 241, .10);
  border-radius: var(--wt-radius-sm);
}

.wt-btn-primary {
  background: var(--wt-gradient);
  color: #fff !important;
  border: 0;
  border-radius: var(--wt-radius-sm);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, .30);
}

.wt-btn-primary:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.wt-dropzone {
  border: 2px dashed var(--wt-primary);
  border-radius: var(--wt-radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: rgba(99, 102, 241, .03);
  transition: var(--wt-transition);
  position: relative;
}

.wt-dropzone:hover,
.wt-dropzone.dragover {
  background: rgba(99, 102, 241, .08);
  border-color: var(--wt-primary-dark);
}

.wt-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.form-control,
.form-select {
  color: var(--wt-text);
  background-color: var(--wt-body-bg);
  border: 1.5px solid var(--wt-card-border);
  border-radius: var(--wt-radius-sm);
}

.form-control:focus,
.form-select:focus {
  color: var(--wt-text);
  background-color: var(--wt-card-bg);
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.wt-image-preview,
.wt-canvas {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--wt-radius-sm);
  border: 1px solid var(--wt-card-border);
  box-shadow: var(--wt-shadow-sm);
  background: #fff;
}

.wt-stat {
  background: var(--wt-body-bg);
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius-sm);
  padding: 1rem;
}

.wt-output {
  min-height: 220px;
  font-family: Consolas, "Liberation Mono", monospace;
}

.wt-footer {
  background: var(--wt-footer-bg);
  color: var(--wt-footer-text);
}

.wt-footer-brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.wt-footer-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.wt-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.wt-footer-links a {
  color: var(--wt-footer-text);
  font-size: .9rem;
}

.wt-footer-links a:hover {
  color: #fff;
}

.text-muted { color: var(--wt-text-muted) !important; }

@media (max-width: 576px) {
  .wt-hero { padding-top: 3.5rem; }
  .wt-hero .display-4 { font-size: 2rem; }
}

.wt-blog-list-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 249, 255, .96)),
    linear-gradient(135deg, rgba(20, 184, 166, .14), rgba(99, 102, 241, .10));
  border-bottom: 1px solid var(--wt-card-border);
}

[data-bs-theme="dark"] .wt-blog-list-hero {
  background:
    linear-gradient(180deg, rgba(18, 18, 31, .96), rgba(18, 18, 31, .98)),
    linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(99, 102, 241, .12));
}

.wt-blog-eyebrow,
.wt-blog-kicker {
  color: var(--wt-primary);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wt-blog-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .75rem;
  letter-spacing: .04em;
}

.wt-blog-kicker span {
  color: var(--wt-text-muted);
  font-weight: 700;
  text-transform: none;
}

.wt-blog-title {
  max-width: 860px;
  color: var(--wt-text);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.wt-blog-dek {
  max-width: 760px;
  color: var(--wt-text-muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.wt-blog-card-image {
  height: 190px;
  object-fit: cover;
  background: #eef2ff;
}

.wt-blog-featured {
  overflow: hidden;
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius);
  background: var(--wt-card-bg);
  box-shadow: var(--wt-shadow-sm);
}

.wt-blog-featured img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
}

.wt-article-body {
  color: var(--wt-text);
  font-size: 1.03rem;
  line-height: 1.82;
}

.wt-article-body h2 {
  margin-top: 2.25rem;
  margin-bottom: .85rem;
  font-size: 1.55rem;
  font-weight: 800;
}

.wt-article-body h3 {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  font-size: 1.14rem;
  font-weight: 800;
}

.wt-article-body p {
  margin-bottom: 1.05rem;
  color: var(--wt-text-muted);
}

.wt-article-body a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.wt-blog-sidebar {
  align-self: start;
}

@media (min-width: 992px) {
  .wt-blog-sidebar {
    position: sticky;
    top: 6rem;
  }
}

.wt-blog-side-card {
  background: var(--wt-card-bg);
  border: 1px solid var(--wt-card-border);
  border-radius: var(--wt-radius);
  padding: 1.15rem;
  box-shadow: var(--wt-shadow-sm);
}

.wt-blog-side-card .btn {
  white-space: normal;
  text-align: left;
}

.card.wt-tool-card article,
article.card.wt-tool-card {
  overflow: hidden;
}
