/*
Theme Name: CaseConverter by HitPDF
Theme URI: https://caseconverter.hitpdf.com/case-converter/
Author: HitPDF
Author URI: https://hitpdf.com/
Description: A fast, mobile-first case converter hub theme with browser-only text conversion, SEO schema, blog templates, ad placements, and privacy-first UX.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hitpdf-caseconverter
*/

:root {
  --cc-primary: #2563eb;
  --cc-secondary: #0f172a;
  --cc-accent: #10b981;
  --cc-bg: #f8fafc;
  --cc-surface: #ffffff;
  --cc-muted: #64748b;
  --cc-border: #dbe4f0;
  --cc-soft: #eff6ff;
  --cc-text: #152033;
  --cc-shadow: 0 18px 48px rgba(15, 23, 42, .10);
  --cc-radius: 8px;
  color-scheme: light;
}

[data-theme="dark"] {
  --cc-bg: #07111f;
  --cc-surface: #101b2d;
  --cc-soft: #0d223f;
  --cc-text: #e5eefb;
  --cc-muted: #a9b8cc;
  --cc-border: #24354c;
  --cc-shadow: 0 18px 48px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cc-bg);
  color: var(--cc-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--cc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
button, textarea, input, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(16, 185, 129, .55); outline-offset: 2px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, .92);
  border-bottom: 1px solid var(--cc-border);
  backdrop-filter: blur(14px);
}
[data-theme="dark"] .site-header { background: rgba(7, 17, 31, .9); }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cc-secondary); font-weight: 800; }
[data-theme="dark"] .brand { color: #fff; }
.brand img { width: 192px; display: block; }
.nav-toggle { display: none; }
.primary-nav { display: flex; align-items: center; gap: 8px; }
.primary-nav a {
  color: var(--cc-text);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--cc-radius);
}
.primary-nav a:hover { background: var(--cc-soft); text-decoration: none; }
.icon-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--cc-radius);
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn { width: 42px; padding: 0; background: var(--cc-surface); border-color: var(--cc-border); color: var(--cc-text); }
.icon-btn:hover, .btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--cc-primary); color: #fff; box-shadow: 0 10px 22px rgba(37, 99, 235, .24); }
.btn-secondary { background: var(--cc-secondary); color: #fff; }
.btn-ghost { background: var(--cc-surface); color: var(--cc-text); border-color: var(--cc-border); }
.btn-accent { background: var(--cc-accent); color: #03251a; }

.hero {
  padding: 64px 0 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .13), transparent 34%),
    linear-gradient(180deg, #fff 0%, var(--cc-bg) 100%);
}
[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .22), transparent 35%),
    linear-gradient(180deg, #081426 0%, var(--cc-bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 34px;
  align-items: center;
}
.eyebrow { color: var(--cc-accent); font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; }
h1, h2, h3 { color: var(--cc-secondary); line-height: 1.15; margin: 0 0 14px; font-weight: 900; letter-spacing: 0; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f8fbff; }
h1 { font-size: clamp(34px, 5vw, 62px); }
h2 { font-size: clamp(28px, 3vw, 42px); }
h3 { font-size: 22px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--cc-muted); max-width: 700px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 28px;
}
.trust-pill {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 12px;
  font-weight: 800;
  font-size: 13px;
}

.tool-shell {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  overflow: hidden;
}
.tool-topbar,
.tool-actions,
.tool-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--cc-border);
}
.tool-footer { border-bottom: 0; border-top: 1px solid var(--cc-border); justify-content: space-between; }
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  max-height: 260px;
  overflow: auto;
  background: var(--cc-bg);
}
.case-option {
  border: 1px solid var(--cc-border);
  background: var(--cc-surface);
  color: var(--cc-text);
  min-height: 44px;
  border-radius: var(--cc-radius);
  padding: 8px 9px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}
.case-option.active {
  background: var(--cc-primary);
  border-color: var(--cc-primary);
  color: #fff;
}
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 390px;
}
.editor-pane { display: flex; flex-direction: column; min-width: 0; }
.editor-pane + .editor-pane { border-left: 1px solid var(--cc-border); }
.pane-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cc-border);
  font-weight: 900;
  color: var(--cc-secondary);
}
[data-theme="dark"] .pane-label { color: #f8fbff; }
textarea.converter-area {
  width: 100%;
  flex: 1;
  min-height: 320px;
  resize: vertical;
  border: 0;
  background: var(--cc-surface);
  color: var(--cc-text);
  padding: 16px;
  line-height: 1.6;
}
textarea.converter-area:focus { outline: 0; box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .18); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}
.stat {
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 10px;
}
.stat strong { display: block; color: var(--cc-secondary); font-size: 20px; line-height: 1.1; }
[data-theme="dark"] .stat strong { color: #fff; }
.stat span { color: var(--cc-muted); font-size: 12px; font-weight: 800; }
.history-panel {
  border-top: 1px solid var(--cc-border);
  padding: 14px;
  display: none;
}
.history-panel.open { display: block; }
.history-list { display: grid; gap: 8px; margin-top: 10px; }
.history-item {
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  background: var(--cc-bg);
  padding: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--cc-text);
}
.ad-slot {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed #9fb2cf;
  background: rgba(37, 99, 235, .05);
  color: var(--cc-muted);
  border-radius: var(--cc-radius);
  font-size: 13px;
  font-weight: 800;
  margin: 26px 0;
}
.adsterra-banner-468 {
  width: min(468px, 100%);
  min-height: 60px;
  display: grid;
  place-items: center;
}
.ad-smartlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--cc-radius);
  background: var(--cc-primary);
  color: #fff;
  font-weight: 900;
}
.ad-smartlink:hover { text-decoration: none; background: #1d4ed8; }
.content-band { padding: 62px 0; }
.content-band.alt { background: var(--cc-surface); border-block: 1px solid var(--cc-border); }
.section-head { max-width: 780px; margin-bottom: 26px; }
.feature-grid, .use-grid, .faq-grid, .blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature, .faq-item, .post-card {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 22px;
}
.alt .feature, .alt .faq-item, .alt .post-card { background: var(--cc-bg); }
.use-grid { grid-template-columns: repeat(2, 1fr); }
.use-block {
  border-left: 4px solid var(--cc-primary);
  padding: 4px 0 4px 18px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.step {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: 22px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--cc-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 900;
  margin-bottom: 16px;
}
.article-content {
  max-width: 860px;
  margin: 0 auto;
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  padding: min(6vw, 54px);
}
.article-content p, .article-content li { color: var(--cc-text); }
.breadcrumbs { color: var(--cc-muted); font-size: 14px; margin: 18px 0; }
.site-footer {
  background: var(--cc-secondary);
  color: #cbd5e1;
  padding: 42px 0 92px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}
.site-footer a { color: #e0f2fe; }
.sticky-mobile-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: none;
  background: var(--cc-surface);
  border-top: 1px solid var(--cc-border);
  padding: 8px 12px;
  text-align: center;
  color: var(--cc-muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .hero-grid, .editor-grid, .feature-grid, .use-grid, .faq-grid, .blog-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .trust-strip, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-pane + .editor-pane { border-left: 0; border-top: 1px solid var(--cc-border); }
  .mode-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 330px; }
  .primary-nav {
    position: absolute;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--cc-surface);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 10px;
  }
  .primary-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .sticky-mobile-ad { display: block; }
}

@media (max-width: 540px) {
  .wrap { width: min(100% - 22px, 1160px); }
  .hero { padding-top: 36px; }
  .brand img { width: 168px; }
  .mode-tabs, .stats-grid { grid-template-columns: 1fr; }
  .tool-topbar, .tool-actions, .tool-footer { align-items: stretch; }
  .btn, .tool-actions .icon-btn { width: 100%; }
}

@media print {
  .site-header, .site-footer, .tool-topbar, .mode-tabs, .tool-actions, .ad-slot, .sticky-mobile-ad { display: none !important; }
  body { background: #fff; color: #000; }
  .tool-shell, .article-content { box-shadow: none; border: 0; }
}
