/* ============================================================
   DotThemes Tools — Main Stylesheet
   ============================================================ */



:root {
  --brand-primary: #4f46e5;
  --brand-primary-dark: #4338ca;
  --brand-secondary: #14b8a6;
  --brand-accent: #f59e0b;
  --brand-dark: #0b1020;
  --brand-light: #f1f5f9;
  --brand-gray: #64748b;
  --sidebar-width: 290px;
  --header-height: 64px;
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.04), 0 10px 40px rgba(0,0,0,0.1);
  --transition: 0.18s ease;
  --border: #e2e8f0;
}

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

body {
  font-family: var(--font-sans);
  color: #1e293b;
  background: #f6f7fb;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; color: var(--brand-dark); }
h1 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
h3 { font-size: 1.05rem; }
p { color: #475569; }

/* Tool Page Hero */
.tool-hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); padding: 1.9rem 0 1.6rem; color: #fff; }
.tool-hero h1 { color: #fff; font-size: clamp(1.3rem, 2.8vw, 1.85rem); }
.tool-hero .lead { color: rgba(255,255,255,0.75); font-size: 0.925rem; margin-top: 0.25rem; }
.breadcrumb-item a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.78rem; }
.breadcrumb-item a:hover { color: rgba(255,255,255,0.9); }
.breadcrumb-item.active { color: rgba(255,255,255,0.8); font-size: 0.78rem; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

/* Page Layout */
.page-layout { display: grid; grid-template-columns: 1fr var(--sidebar-width); gap: 1.5rem; align-items: start; padding: 1.5rem 0 3rem; }
.page-layout.no-sidebar { grid-template-columns: 1fr; }
.main-content { min-width: 0; }
.sidebar { position: sticky; top: calc(var(--header-height) + 1rem); }

/* Tool Card */
.tool-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; margin-bottom: 1.25rem; border: 1px solid var(--border); }
.tool-card textarea, .tool-card input[type="text"], .tool-card input[type="number"], .tool-card input[type="url"], .tool-card input[type="date"], .tool-card input[type="email"], .tool-card input[type="tel"], .tool-card select { border: 1.5px solid #dde3f0; border-radius: var(--radius-sm); padding: 0.58rem 0.85rem; font-family: var(--font-sans); font-size: 0.9rem; transition: border-color var(--transition); width: 100%; color: #1e293b; }
.tool-card textarea:focus, .tool-card input:focus, .tool-card select:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.tool-card textarea { resize: vertical; min-height: 130px; font-family: 'Courier New', monospace; line-height: 1.6; }
.form-label.fw-semibold { font-size: 0.845rem; color: #374151; margin-bottom: 0.3rem; font-weight: 600; }
.form-control { font-family: var(--font-sans); }

/* Buttons */
.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; padding: 0.52rem 1.3rem; transition: var(--transition); font-family: var(--font-sans); }
.btn-primary:hover { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.btn-outline-primary { border-color: var(--brand-primary); color: var(--brand-primary); border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; font-family: var(--font-sans); }
.btn-outline-primary:hover { background: var(--brand-primary); color: #fff; }
.btn-outline-secondary { border-radius: var(--radius-sm); font-weight: 500; font-size: 0.875rem; font-family: var(--font-sans); }
.btn-sm { font-size: 0.8rem !important; padding: 0.3rem 0.7rem !important; }

/* Result Box */
.result-box { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: var(--radius-sm); padding: 1rem 1.1rem; font-family: 'Courier New', monospace; font-size: 0.845rem; min-height: 80px; word-break: break-all; white-space: pre-wrap; line-height: 1.6; }
.stat-badge { display: inline-flex; flex-direction: column; align-items: center; background: #f8fafc; border-radius: var(--radius); padding: 0.8rem 1rem; border: 1px solid var(--border); min-width: 85px; }
.stat-badge .stat-value { font-size: 1.45rem; font-weight: 700; color: var(--brand-primary); font-family: var(--font-heading); line-height: 1; }
.stat-badge .stat-label { font-size: 0.67rem; color: var(--brand-gray); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.22rem; }

/* Content Sections */
.content-section { background: #fff; border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.25rem; border: 1px solid var(--border); }
.content-section h2 { font-size: 1.15rem; margin-bottom: 0.8rem; }
.content-section h3 { font-size: 0.975rem; margin-bottom: 0.5rem; margin-top: 1.1rem; color: #1e293b; }
.content-section p { color: #475569; margin-bottom: 0.85rem; font-size: 0.915rem; line-height: 1.72; }
.content-section ul, .content-section ol { color: #475569; padding-left: 1.25rem; font-size: 0.915rem; }
.content-section ul li, .content-section ol li { margin-bottom: 0.42rem; line-height: 1.65; }
.content-section code { background: #f1f5f9; padding: 0.1rem 0.38rem; border-radius: 4px; font-size: 0.8rem; color: #e11d48; }

/* FAQ Accordion */
.accordion-item { border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; margin-bottom: 0.45rem; overflow: hidden; }
.accordion-button { font-family: var(--font-heading); font-weight: 600; font-size: 0.895rem; color: var(--brand-dark); background: #fff; padding: 0.9rem 1rem; }
.accordion-button:not(.collapsed) { color: var(--brand-primary); background: #eff6ff; box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { font-size: 0.895rem; color: #475569; line-height: 1.7; padding: 0.85rem 1rem; }

/* Related Tools */
.related-tool-card { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.85rem; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: var(--transition); }
.related-tool-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.related-tool-icon { font-size: 1.5rem; flex-shrink: 0; }
.related-tool-name { font-weight: 600; font-size: 0.855rem; color: var(--brand-dark); }
.related-tool-desc { font-size: 0.775rem; color: var(--brand-gray); margin: 0.1rem 0 0; }

/* Ads */
.ad-unit { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: var(--radius-sm); padding: 0.5rem; text-align: center; min-height: 90px; margin-bottom: 1.1rem; }
.ad-label { font-size: 0.6rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.2rem; }
.sidebar .ad-unit { min-height: 250px; }

/* Sidebar */
.sidebar-widget { background: #fff; border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1.1rem; border: 1px solid var(--border); }
.sidebar-widget h5 { font-family: var(--font-heading); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--brand-primary); margin-bottom: 0.8rem; font-weight: 700; }
.sidebar-tool-link { display: flex; align-items: center; gap: 0.42rem; padding: 0.33rem 0; text-decoration: none; color: #334155; font-size: 0.845rem; border-bottom: 1px solid #f1f5f9; transition: color var(--transition); }
.sidebar-tool-link:hover { color: var(--brand-primary); }
.sidebar-tool-link:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 991px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  .tool-hero { padding: 1.1rem 0; }
  .tool-card, .content-section { padding: 1.1rem; }
}





/* ============================================================
   SHARED CHROME: header · footer · sidebar · ads
   ============================================================ */
a { color: var(--brand-primary); }
img { max-width: 100%; height: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(15,23,42,.04); }
.nav-inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-height); }
.nav-logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; flex-shrink: 0; }
.nav-logo-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-primary), #6366f1); display: inline-flex; align-items: center; justify-content: center; }
.nav-logo-name { font-family: var(--font-heading); font-weight: 800; font-size: 1.15rem; color: var(--brand-dark); letter-spacing: -.3px; }
.nav-logo-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-primary); background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 20px; padding: .12rem .5rem; }
.main-nav { display: flex; align-items: center; gap: .15rem; margin-left: .5rem; }
.nav-link { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .7rem; font-size: .86rem; font-weight: 600; color: #334155; text-decoration: none; border-radius: 8px; background: none; border: 0; cursor: pointer; font-family: var(--font-sans); white-space: nowrap; }
.nav-link:hover { background: #f1f5f9; color: var(--brand-primary); }
.nav-drop { position: relative; }
.mega-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; width: 640px; max-width: 92vw; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .75rem; grid-template-columns: repeat(3, 1fr); gap: .15rem; }
.nav-drop.open .mega-menu { display: grid; }
.mega-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: 8px; text-decoration: none; }
.mega-item:hover { background: #f1f5f9; }
.mega-icon { font-size: 1.35rem; line-height: 1; }
.mega-name { display: block; font-size: .84rem; font-weight: 600; color: #1e293b; line-height: 1.25; }
.mega-count { display: block; font-size: .72rem; color: #94a3b8; }
.nav-search { position: relative; flex: 1; min-width: 200px; max-width: 340px; margin-left: auto; }
.nav-search-input { width: 100%; padding: .5rem .9rem; font-size: .86rem; border: 1.5px solid var(--border); border-radius: 999px; background: #f8fafc; font-family: var(--font-sans); outline: none; }
.nav-search-input:focus { border-color: var(--brand-primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 1100; text-align: left; }
.search-results[hidden] { display: none; }
.search-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; text-decoration: none; color: #1e293b; border-bottom: 1px solid #f1f5f9; font-size: .86rem; }
.search-item:last-child { border-bottom: 0; }
.search-item:hover, .search-item.active { background: #f1f5ff; }
.search-item small { display: block; color: #94a3b8; font-size: .72rem; }
.search-empty { padding: .8rem 1rem; color: #64748b; font-size: .85rem; }
.nav-cta { flex-shrink: 0; background: var(--brand-dark); color: #fff; text-decoration: none; font-size: .82rem; font-weight: 700; padding: .5rem .95rem; border-radius: 999px; white-space: nowrap; }
.nav-cta:hover { background: var(--brand-primary); color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: .5rem; cursor: pointer; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #334155; border-radius: 2px; }

@media (max-width: 1320px) { .nav-quick { display: none; } }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-search { order: 5; flex-basis: 100%; max-width: none; margin: 0 0 .6rem; display: none; }
  .nav-cta { display: none; }
  .nav-inner { flex-wrap: wrap; }
  .main-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; margin: 0 0 .5rem; }
  .site-header.menu-open .main-nav, .site-header.menu-open .nav-search { display: flex; }
  .nav-quick { display: inline-flex; }
  .nav-drop .mega-menu { position: static; width: 100%; box-shadow: none; border: 0; padding: 0; grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.72); padding: 3rem 0 1.25rem; margin-top: 2rem; }
.footer-brand { font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.footer-badge { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,.12); padding: .12rem .5rem; border-radius: 20px; }
.footer-desc { font-size: .88rem; line-height: 1.65; color: rgba(255,255,255,.6); max-width: 360px; }
.footer-heading { color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: .92rem; margin-bottom: .8rem; padding-bottom: .5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-link { display: block; color: rgba(255,255,255,.65); text-decoration: none; font-size: .85rem; padding: .22rem 0; }
.footer-link:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.75); }

/* Sidebar extras */
.sb-count { margin-left: auto; font-size: .7rem; color: #94a3b8; }
.sidebar-promo { background: linear-gradient(135deg, #0f172a, #1e3a8a); border: 0; color: #fff; }
.sidebar-promo strong { font-family: var(--font-heading); font-size: 1rem; }
.sidebar-promo p { color: rgba(255,255,255,.75); font-size: .85rem; margin: .35rem 0 .8rem; }

/* Ads — nothing is rendered (no gaps) unless ads are live */
.ad-unit { background: transparent; border: 0; padding: 0; min-height: 0; text-align: center; margin: 0 0 1.1rem; overflow: hidden; }
.ad-label { display: block; font-size: .6rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .2rem; }
.ad-dev { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: var(--radius-sm); padding: .5rem; min-height: 90px; }
.sidebar .ad-dev { min-height: 250px; }
.sidebar .ad-sidebar_sticky { position: sticky; top: calc(var(--header-height) + 1rem); }
.container > .ad-unit { margin-top: 0; }

/* ============================================================
   CATEGORY PAGES (one shared design)
   ============================================================ */
.cat-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%); color: #fff; padding: 2.4rem 0 2rem; }
.cat-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.cat-hero .lead { color: rgba(255,255,255,.82); max-width: 680px; margin-top: .5rem; font-size: 1rem; }
.cat-hero-stats { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.cat-hero-stat { background: rgba(255,255,255,.12); border-radius: 10px; padding: .55rem 1.1rem; min-width: 110px; }
.cat-hero-stat .num { font-size: 1.35rem; font-weight: 800; font-family: var(--font-heading); line-height: 1.1; }
.cat-hero-stat .lbl { font-size: .72rem; opacity: .8; }

.cat-toolbar { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cat-filter { flex: 1; min-width: 200px; padding: .55rem .9rem; border: 1.5px solid var(--border); border-radius: 10px; font-size: .9rem; background: #fff; font-family: var(--font-sans); outline: none; }
.cat-filter:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.sort-select { padding: .55rem .8rem; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; font-size: .86rem; font-family: var(--font-sans); }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .85rem; margin-bottom: 1.5rem; }
.tool-card-item { display: block; background: #fff; border: 1.5px solid var(--border); border-radius: 12px; padding: 1.1rem 1rem; text-decoration: none; color: inherit; transition: var(--transition); }
.tool-card-item:hover { border-color: var(--brand-primary); box-shadow: 0 6px 20px rgba(37,99,235,.1); transform: translateY(-2px); color: inherit; }
.tool-card-item[hidden] { display: none; }
.t-icon { display: block; font-size: 1.9rem; line-height: 1; margin-bottom: .6rem; }
.tool-card-item h3 { font-size: .95rem; margin: 0 0 .3rem; color: #1e293b; }
.tool-card-item:hover h3 { color: var(--brand-primary); }
.tool-card-item p { font-size: .8rem; color: #64748b; margin: 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge-new { display: inline-block; margin-left: .4rem; font-size: .6rem; font-weight: 700; color: #fff; background: #16a34a; border-radius: 4px; padding: .08rem .35rem; vertical-align: middle; }
.empty-state { text-align: center; color: #64748b; padding: 2rem 0; }
.empty-state[hidden] { display: none; }

.related-cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; }
.related-cat-card { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; font-size: .84rem; font-weight: 600; color: #334155; }
.related-cat-card:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: #eff6ff; }
.rc-icon { font-size: 1.2rem; }
.cat-content h2 { font-size: 1.25rem; }

/* ============================================================
   HOME
   ============================================================ */
.home-hero { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%); color: #fff; padding: 3.5rem 0 3rem; position: relative; }
.home-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.15; margin-bottom: .9rem; }
.home-hero .lead { color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 1.6rem; font-size: 1.08rem; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 20px; padding: .3rem .9rem; font-size: .78rem; font-weight: 600; margin-bottom: 1.1rem; }
.hero-search { position: relative; max-width: 560px; margin: 0 auto; }
.hero-search-input { width: 100%; padding: .95rem 1.3rem; font-size: 1rem; border: 0; border-radius: 14px; font-family: var(--font-sans); outline: none; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.hero-stats { display: flex; justify-content: center; gap: 2.2rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-stats .num { font-size: 1.5rem; font-weight: 800; font-family: var(--font-heading); }
.hero-stats .lbl { font-size: .72rem; opacity: .65; text-transform: uppercase; letter-spacing: .04em; }
.home-section { padding: 2.4rem 0; }
.home-section-alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 1.3rem; margin-bottom: 1.1rem; }
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.cat-card { display: flex; align-items: center; gap: .85rem; background: #f8fafc; border: 1.5px solid var(--border); border-radius: 12px; padding: .95rem 1.05rem; text-decoration: none; }
.cat-card:hover { border-color: var(--brand-primary); background: #eff6ff; }
.cat-card-icon { font-size: 1.8rem; }
.cat-card-name { display: block; font-size: .92rem; font-weight: 700; color: #1e293b; }
.cat-card-count { display: block; font-size: .74rem; color: #94a3b8; }
.home-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; text-align: center; }
.home-why h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.home-why p { font-size: .88rem; }

@media (max-width: 768px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .tool-card-item { padding: .85rem .8rem; }
  .cat-hero { padding: 1.6rem 0 1.4rem; }
  .home-hero { padding: 2.5rem 0 2.2rem; }
}
@media (max-width: 420px) { .tools-grid { grid-template-columns: 1fr; } }


/* ============================================================
   THEME v2 — modern look (indigo + teal), glass header, motion
   ============================================================ */
:root { --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #06b6d4 120%); --ring: rgba(79,70,229,.14); }

/* header: glass */
.site-header { background: rgba(255,255,255,.82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(15,23,42,.06); }
.nav-logo-mark { background: var(--grad); box-shadow: 0 4px 14px rgba(79,70,229,.35); }
.nav-logo-badge { color: #4f46e5; background: #eef2ff; border-color: #c7d2fe; }
.nav-link { position: relative; }
.nav-link:hover { background: #eef2ff; color: #4f46e5; }
.nav-cta { background: var(--grad); box-shadow: 0 6px 18px rgba(79,70,229,.35); transition: transform .2s, box-shadow .2s; }
.nav-cta:hover { background: var(--grad); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(79,70,229,.45); color: #fff; }
.nav-search-input:focus { box-shadow: 0 0 0 4px var(--ring); }

/* dropdown that stays open while moving the mouse into it */
.main-nav { align-self: stretch; }
.nav-drop { display: flex; align-items: center; align-self: stretch; }
.mega-menu { top: 100%; border-radius: 0 0 16px 16px; border-top: 0; animation: menu-in .18s ease both; padding: .9rem; }
.mega-item { transition: background .15s, transform .15s; }
.mega-item:hover { background: #eef2ff; transform: translateX(2px); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .nav-drop { display: block; } .mega-menu { animation: none; } }

/* hero bands */
.tool-hero, .cat-hero { background: radial-gradient(900px 300px at 85% -20%, rgba(124,58,237,.55), transparent 60%), radial-gradient(700px 260px at 0% 120%, rgba(20,184,166,.35), transparent 60%), linear-gradient(135deg, #0b1020 0%, #1e1b4b 60%, #312e81 100%); }
.tool-hero { padding: 2.1rem 0 1.8rem; }
.cat-hero-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* cards */
.tool-card, .content-section, .sidebar-widget { border-radius: 16px; border-color: #e8eaf3; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04); }
.btn-primary { background: var(--grad); border: 0; box-shadow: 0 6px 16px rgba(79,70,229,.28); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.06); box-shadow: 0 10px 22px rgba(79,70,229,.38); }
.btn-outline-primary { border-color: #4f46e5; color: #4f46e5; }
.btn-outline-primary:hover { background: #4f46e5; border-color: #4f46e5; }
.tool-card textarea:focus, .tool-card input:focus, .tool-card select:focus { box-shadow: 0 0 0 4px var(--ring); }
.sidebar-widget h5 { color: #4f46e5; }
.sidebar-tool-link { transition: transform .15s, color .15s; }
.sidebar-tool-link:hover { transform: translateX(3px); color: #4f46e5; }
.sidebar-promo { background: radial-gradient(300px 200px at 100% 0, rgba(124,58,237,.6), transparent 70%), linear-gradient(135deg, #0b1020, #312e81); box-shadow: 0 14px 34px rgba(49,46,129,.35); }
.sidebar-promo strong { display: block; font-size: 1.08rem; line-height: 1.3; }
.sidebar-promo .btn { background: #fff; color: #312e81; box-shadow: none; font-weight: 700; }
.sidebar-promo .btn:hover { background: #eef2ff; filter: none; }

.t-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 1.55rem; background: linear-gradient(135deg, #eef2ff, #f5f3ff); border-radius: 12px; margin-bottom: .75rem; transition: transform .25s cubic-bezier(.34,1.56,.64,1), background .25s; }
.tool-card-item { border-radius: 16px; border-color: #e8eaf3; position: relative; overflow: hidden; }
.tool-card-item::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--grad); opacity: 0; transition: opacity .25s; z-index: 0; pointer-events: none; }
.tool-card-item > * { position: relative; z-index: 1; }
.tool-card-item:hover { border-color: #c7d2fe; box-shadow: 0 14px 34px rgba(79,70,229,.16); transform: translateY(-4px); }
.tool-card-item:hover .t-icon { transform: scale(1.12) rotate(-6deg); background: linear-gradient(135deg, #e0e7ff, #ede9fe); }
.tool-card-item:hover h3 { color: #4f46e5; }
.related-cat-card:hover, .cat-card:hover { border-color: #818cf8; background: #eef2ff; color: #4f46e5; }
.cat-filter:focus { box-shadow: 0 0 0 4px var(--ring); border-color: #4f46e5; }

/* ── HOME ── */
.home-hero { background: linear-gradient(135deg, #0b1020 0%, #1e1b4b 55%, #312e81 100%); padding: 4.5rem 0 0; overflow: hidden; isolation: isolate; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); animation: grid-drift 24s linear infinite; }
@keyframes grid-drift { to { background-position: 46px 46px, 46px 46px; } }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: -1; pointer-events: none; }
.orb-1 { width: 420px; height: 420px; background: #7c3aed; top: -140px; right: -80px; animation: float-a 14s ease-in-out infinite; }
.orb-2 { width: 360px; height: 360px; background: #06b6d4; bottom: -120px; left: -100px; opacity: .4; animation: float-b 17s ease-in-out infinite; }
.orb-3 { width: 220px; height: 220px; background: #f472b6; top: 30%; left: 55%; opacity: .25; animation: float-a 20s ease-in-out infinite reverse; }
@keyframes float-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px, 40px) scale(1.12); } }
@keyframes float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px, -30px) scale(1.1); } }
.hero-in > * { opacity: 0; transform: translateY(18px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-in > *:nth-child(1) { animation-delay: .05s; } .hero-in > *:nth-child(2) { animation-delay: .15s; } .hero-in > *:nth-child(3) { animation-delay: .28s; } .hero-in > *:nth-child(4) { animation-delay: .4s; } .hero-in > *:nth-child(5) { animation-delay: .52s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.home-hero h1 .grad { background: linear-gradient(90deg, #a5b4fc, #67e8f9, #f0abfc, #a5b4fc); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 250% 0; } }
.hero-badge { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero-badge::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: .5rem; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero-search-input { border-radius: 16px; padding: 1.05rem 1.4rem; box-shadow: 0 18px 50px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.2); transition: box-shadow .25s, transform .25s; }
.hero-search-input:focus { transform: translateY(-2px); box-shadow: 0 22px 60px rgba(0,0,0,.4), 0 0 0 4px rgba(165,180,252,.5); }
.hero-stats { padding-bottom: 2.2rem; }

/* category marquee under the hero */
.marquee { border-top: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); overflow: hidden; padding: .85rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: .6rem; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .95rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.85); text-decoration: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); white-space: nowrap; transition: background .2s, transform .2s; }
.marquee a:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); color: #fff; }
@keyframes marquee { to { transform: translateX(-50%); } }

.home-section { padding: 3rem 0; }
.home-section-alt { background: #fff; border-color: #eceef6; }
.section-title { font-size: 1.45rem; display: flex; align-items: center; gap: .6rem; }
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #dfe3f3, transparent); }
.cat-card { background: #fff; border-color: #e8eaf3; border-radius: 16px; transition: transform .25s, box-shadow .25s, border-color .25s, background .25s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(79,70,229,.14); }
.cat-card-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, #eef2ff, #f5f3ff); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.cat-card:hover .cat-card-icon { transform: scale(1.12) rotate(6deg); }
.cat-card-body { flex: 1; }
.cat-card::after { content: '→'; color: #a5b4fc; transition: transform .2s, color .2s; }
.cat-card:hover::after { transform: translateX(4px); color: #4f46e5; }
.home-why > div { background: #f6f7fb; border: 1px solid #eceef6; border-radius: 16px; padding: 1.6rem; transition: transform .25s, box-shadow .25s; }
.home-why > div:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(79,70,229,.1); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal.in.tool-card-item:hover, .reveal.in.cat-card:hover { transition-delay: 0ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-in > * { opacity: 1 !important; transform: none !important; }
}

/* ── Long-form article (tool + category content) ── */
.tool-article{background:#fff;border:1px solid var(--border,#e5e7eb);border-radius:16px;padding:1.6rem 1.8rem;margin:1.5rem 0;line-height:1.75;font-size:1.02rem}
.tool-article h2{font-size:1.4rem;margin:2rem 0 .75rem;font-family:'Plus Jakarta Sans',Roboto,sans-serif}
.tool-article h2:first-of-type{margin-top:1.2rem}
.tool-article p{margin:0 0 1rem}
.tool-article a{color:#4f46e5;text-decoration:underline;text-underline-offset:2px}
.answer-box{background:linear-gradient(135deg,#eef2ff,#ecfeff);border-left:4px solid #4f46e5;border-radius:10px;padding:1rem 1.2rem;margin-bottom:1.2rem}
.answer-box strong{display:block;margin-bottom:.25rem}
.howto{padding-left:1.3rem}.howto li{margin-bottom:.6rem}
.feat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.9rem}
.feat{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:.9rem 1rem}
.feat h3{font-size:1rem;margin:0 0 .35rem}.feat p{margin:0;font-size:.95rem}
.uses li,.tips li{margin-bottom:.6rem}
.article-meta{color:#6b7280;font-size:.85rem;margin:1.5rem 0 0}
.cat-article{margin-top:2rem}
.alltools-jump{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}
.alltools-jump a{background:#eef2ff;color:#3730a3;border-radius:999px;padding:.3rem .8rem;font-size:.9rem;text-decoration:none}
.alltools-cat{margin-bottom:1.8rem}.alltools-cat h2{font-size:1.3rem}.alltools-cat h2 a{text-decoration:none;color:inherit}.alltools-cat small{color:#6b7280;font-weight:400}
.alltools-list{list-style:none;padding:0;margin:0;columns:3 240px;column-gap:1.5rem}
.alltools-list li{padding:.2rem 0;break-inside:avoid}.alltools-list a{text-decoration:none}.alltools-list a:hover{text-decoration:underline}
