/*
Theme Name: NextGeoTools
Theme URI: https://nextgeotools.2bd.net/
Author: NextGeoTools
Author URI: https://nextgeotools.2bd.net/
Description: A premium, SEO-first WordPress theme for NextGeoTools — free GIS, GPS, maps and geospatial tools. Card-based tool directory, live search, structured data, AdSense-ready widget areas and a mobile-first responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nextgeotools
Tags: custom-menu, featured-images, threaded-comments, translation-ready, blog, custom-logo
*/

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
  --ngt-slate-950: #0a1120;
  --ngt-slate-900: #0f1a2e;
  --ngt-slate-800: #16263f;
  --ngt-slate-700: #1f3454;
  --ngt-ink: #152238;
  --ngt-ink-soft: #3c4c63;
  --ngt-muted: #64748b;
  --ngt-line: #e2e8f0;
  --ngt-bg: #f5f8fb;
  --ngt-card: #ffffff;
  --ngt-emerald: #10b981;
  --ngt-emerald-dark: #0b8f66;
  --ngt-emerald-soft: #d9f7e9;
  --ngt-amber: #f59e0b;
  --ngt-danger: #dc2626;
  --ngt-radius: 14px;
  --ngt-radius-sm: 8px;
  --ngt-shadow: 0 10px 30px rgba(10, 17, 32, 0.08);
  --ngt-shadow-sm: 0 2px 10px rgba(10, 17, 32, 0.06);
  --ngt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ngt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ngt-max: 1180px;
}

/* ============================================================
   2. Base
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ngt-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ngt-ink);
  background: var(--ngt-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ngt-slate-950);
  line-height: 1.25;
  margin: 1.6em 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.15rem; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.08rem; }

p { margin: 0 0 1.1em; }

a { color: var(--ngt-emerald-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: var(--ngt-max);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ============================================================
   3. Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, var(--ngt-slate-950), var(--ngt-slate-900));
  color: #e6eef7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

.site-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.site-brand a { color: #fff; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.site-brand a:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--ngt-emerald), #0ea5a4);
  display: inline-flex; align-items: center; justify-content: center;
  color: #04241a; font-weight: 900; font-size: 1.05rem;
}
.site-tagline { display: block; font-size: 0.68rem; font-weight: 500; color: #9fb3c8; letter-spacing: 0.04em; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  color: #dbe7f3; font-weight: 600; font-size: 0.95rem;
  padding: 9px 13px; border-radius: var(--ngt-radius-sm);
  display: block; white-space: nowrap;
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; text-decoration: none; }
.main-nav .current-menu-item > a { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }

.header-search { position: relative; min-width: 220px; }
.header-search input {
  width: 100%; padding: 9px 14px 9px 38px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07); color: #fff; font-size: 0.92rem;
}
.header-search input::placeholder { color: #8ea3b8; }
.header-search input:focus { outline: 2px solid var(--ngt-emerald); background: rgba(255,255,255,0.12); }
.header-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8ea3b8; pointer-events: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,0.2);
  color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer;
}

/* Live search dropdown */
.ngt-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: var(--ngt-radius-sm);
  box-shadow: var(--ngt-shadow); overflow: hidden; z-index: 300;
  border: 1px solid var(--ngt-line); text-align: left;
}
.ngt-search-results a {
  display: block; padding: 10px 14px; color: var(--ngt-ink);
  border-bottom: 1px solid #f1f5f9;
}
.ngt-search-results a:last-child { border-bottom: 0; }
.ngt-search-results a:hover, .ngt-search-results a.ngt-active { background: var(--ngt-emerald-soft); text-decoration: none; }
.ngt-search-results .ngt-search-item { display: block; }
.ngt-search-results .ngt-search-title { font-weight: 700; font-size: 0.95rem; display: block; }
.ngt-search-results .ngt-search-category { font-size: 0.78rem; color: var(--ngt-muted); }

/* ============================================================
   4. Hero
   ============================================================ */
.hero {
  background:
    radial-gradient(900px 380px at 80% -60px, rgba(16, 185, 129, 0.22), transparent 60%),
    radial-gradient(700px 420px at 10% 120%, rgba(14, 165, 164, 0.16), transparent 60%),
    linear-gradient(180deg, var(--ngt-slate-950), var(--ngt-slate-900));
  color: #eaf2fa;
  padding: 72px 0 64px;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 2.6rem; margin: 0 0 12px; letter-spacing: -0.025em; }
.hero .hero-sub { color: #a9bccd; font-size: 1.15rem; max-width: 680px; margin: 0 auto 28px; }
.hero-search { position: relative; max-width: 640px; margin: 0 auto; }
.hero-search input {
  width: 100%; padding: 16px 22px 16px 52px; font-size: 1.05rem;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: #fff;
}
.hero-search input::placeholder { color: #8ea3b8; }
.hero-search input:focus { outline: 2px solid var(--ngt-emerald); }
.hero-search .search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #8ea3b8; font-size: 1.2rem; }
.hero .ngt-search-results { text-align: left; }
.hero-stats { display: flex; gap: 34px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.5rem; color: #fff; }
.hero-stats span { font-size: 0.85rem; color: #93a7bd; }

/* ============================================================
   5. Buttons, sections, cards
   ============================================================ */
.ngt-btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; border: 0; cursor: pointer;
  background: #e8eef5; color: var(--ngt-ink); transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ngt-btn:hover { text-decoration: none; transform: translateY(-1px); }
.ngt-btn-primary { background: linear-gradient(135deg, var(--ngt-emerald), #0ea5a4); color: #03251b; box-shadow: 0 8px 20px rgba(16,185,129,0.35); }
.ngt-btn-primary:hover { color: #03251b; }
.ngt-btn-outline { background: transparent; border: 2px solid var(--ngt-emerald); color: var(--ngt-emerald-dark); }

.section { padding: 56px 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head h2 { margin-top: 0; font-size: 1.9rem; }
.section-head p { color: var(--ngt-muted); margin-bottom: 0; }
.section-link { text-align: center; margin-top: 28px; }

.tool-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.tool-card {
  background: var(--ngt-card); border: 1px solid var(--ngt-line);
  border-radius: var(--ngt-radius); padding: 22px;
  box-shadow: var(--ngt-shadow-sm);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--ngt-shadow); border-color: var(--ngt-emerald); }
.tool-card:hover a.card-title { text-decoration: none; }
.tool-card .card-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--ngt-emerald-soft); color: var(--ngt-emerald-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800;
}
.tool-card .card-title { font-weight: 700; font-size: 1.08rem; color: var(--ngt-slate-950); margin: 0; }
.tool-card p { font-size: 0.92rem; color: var(--ngt-muted); margin: 0; flex: 1; }
.tool-card .card-meta { font-size: 0.78rem; color: var(--ngt-muted); }
.tool-card .card-meta a { color: var(--ngt-emerald-dark); font-weight: 600; }

.cat-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.cat-card {
  background: linear-gradient(160deg, var(--ngt-slate-900), var(--ngt-slate-800));
  color: #dbe7f3; border-radius: var(--ngt-radius); padding: 26px;
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.15s ease;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px;
  border-radius: 50%; background: rgba(16,185,129,0.16);
}
.cat-card h3 { color: #fff; margin: 0 0 8px; font-size: 1.25rem; }
.cat-card h3 a { color: #fff; }
.cat-card h3 a:hover { color: #6ee7b7; text-decoration: none; }
.cat-card p { font-size: 0.92rem; color: #9fb3c8; margin: 0 0 12px; }
.cat-card .cat-count {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  background: rgba(16,185,129,0.18); color: #6ee7b7;
  padding: 3px 12px; border-radius: 999px;
}

/* Article cards */
.post-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.post-card {
  background: var(--ngt-card); border: 1px solid var(--ngt-line);
  border-radius: var(--ngt-radius); overflow: hidden; box-shadow: var(--ngt-shadow-sm);
  display: flex; flex-direction: column;
}
.post-card .post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.05rem; }
.post-card h3 a { color: var(--ngt-slate-950); }
.post-card p { font-size: 0.9rem; color: var(--ngt-muted); margin: 0; flex: 1; }
.post-card .post-meta { font-size: 0.78rem; color: var(--ngt-muted); }

/* ============================================================
   6. Tool page layout
   ============================================================ */
.tool-layout {
  display: grid; gap: 34px;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}
.tool-main { min-width: 0; }
.tool-sidebar .widget { margin-bottom: 26px; }

.breadcrumbs { font-size: 0.85rem; color: var(--ngt-muted); margin: 18px 0 6px; }
.breadcrumbs a { color: var(--ngt-emerald-dark); font-weight: 600; }
.breadcrumbs .sep { margin: 0 6px; color: #b6c2d1; }

.tool-hero {
  background: #fff; border: 1px solid var(--ngt-line);
  border-radius: var(--ngt-radius); padding: 30px; margin-bottom: 26px;
  box-shadow: var(--ngt-shadow-sm);
}
.tool-hero h1 { margin: 0 0 10px; font-size: 2rem; }
.tool-hero .tool-lede { font-size: 1.08rem; color: var(--ngt-ink-soft); }

.tool-app-wrap {
  background: linear-gradient(160deg, var(--ngt-slate-900), var(--ngt-slate-800));
  border-radius: var(--ngt-radius); padding: 30px; margin: 26px 0;
  color: #e6eef7; box-shadow: var(--ngt-shadow);
}
.tool-app-wrap h2 { color: #fff; margin-top: 0; font-size: 1.35rem; }
.tool-app-wrap .ngt-app-note { font-size: 0.85rem; color: #9fb3c8; }

/* Interactive app form controls (dark panel) */
.ngt-form { display: grid; gap: 16px; }
.ngt-form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ngt-field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: #cfe0f2; }
.ngt-field input, .ngt-field select, .ngt-field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--ngt-radius-sm);
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.07);
  color: #fff; font-size: 1rem; font-family: inherit;
}
.ngt-field textarea { min-height: 120px; resize: vertical; font-family: var(--ngt-mono); font-size: 0.92rem; }
.ngt-field input:focus, .ngt-field select:focus, .ngt-field textarea:focus { outline: 2px solid var(--ngt-emerald); border-color: var(--ngt-emerald); }
.ngt-field select option { color: #0f1a2e; }
.ngt-hint { font-size: 0.8rem; color: #8ea3b8; margin-top: 4px; }

.ngt-result {
  margin-top: 18px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(16,185,129,0.4); border-radius: var(--ngt-radius-sm);
  padding: 18px 20px;
}
.ngt-result h3, .ngt-result h4 { color: #6ee7b7; margin-top: 0; }
.ngt-result .big-value { font-size: 1.7rem; font-weight: 800; color: #fff; }
.ngt-result textarea {
  width: 100%; min-height: 140px; font-family: var(--ngt-mono); font-size: 0.88rem;
  background: rgba(0,0,0,0.3); color: #d7f5e6; border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--ngt-radius-sm); padding: 12px;
}

table.ngt-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 10px 0; }
table.ngt-table th, table.ngt-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }
table.ngt-table th { color: #6ee7b7; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.ngt-table td { color: #e6eef7; font-family: var(--ngt-mono); font-size: 0.92rem; }

/* Light content tables */
table.ngt-table-light { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
table.ngt-table-light th, table.ngt-table-light td { border: 1px solid var(--ngt-line); padding: 10px 14px; text-align: left; }
table.ngt-table-light th { background: #eef4f9; font-weight: 700; }
table.ngt-table-light code { font-family: var(--ngt-mono); font-size: 0.85rem; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; word-break: break-word; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
.entry-content table th, .entry-content table td { border: 1px solid var(--ngt-line); padding: 10px 14px; text-align: left; }
.entry-content table th { background: #eef4f9; font-weight: 700; }

.ngt-error {
  background: rgba(220, 38, 38, 0.14); border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5; border-radius: var(--ngt-radius-sm); padding: 10px 14px;
  font-size: 0.92rem; margin-top: 12px;
}
.ngt-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ngt-tab {
  background: rgba(255,255,255,0.07); color: #cfe0f2; border: 1px solid rgba(255,255,255,0.14);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.92rem;
}
.ngt-tab.ngt-tab-active, .ngt-tab:hover { background: var(--ngt-emerald); color: #03251b; border-color: var(--ngt-emerald); }
.ngt-panel { display: none; }
.ngt-panel.ngt-panel-active { display: block; }

/* Content sections on tool page */
.tool-section {
  background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius);
  padding: 28px 30px; margin-bottom: 22px; box-shadow: var(--ngt-shadow-sm);
}
.tool-section h2 { margin-top: 0; font-size: 1.45rem; padding-bottom: 10px; border-bottom: 2px solid var(--ngt-emerald-soft); }
.tool-section ul, .tool-section ol { padding-left: 22px; }
.tool-section li { margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius-sm); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--ngt-slate-950);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ngt-emerald-soft); color: var(--ngt-emerald-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700;
}
.faq-item[open] summary::after { content: "–"; background: var(--ngt-emerald); color: #fff; }
.faq-item .faq-answer { padding: 0 20px 18px; color: var(--ngt-ink-soft); }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* Share links */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.share-row a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 1px solid var(--ngt-line); border-radius: 999px; font-size: 0.88rem;
  font-weight: 600; color: var(--ngt-ink-soft); background: #fff;
}
.share-row a:hover { border-color: var(--ngt-emerald); color: var(--ngt-emerald-dark); text-decoration: none; }

/* How it works strip */
.steps-strip { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 10px; }
.step-card { background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius); padding: 26px; text-align: center; box-shadow: var(--ngt-shadow-sm); }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--ngt-emerald), #0ea5a4);
  color: #03251b; font-weight: 900; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
.step-card h3 { margin: 0 0 8px; }
.step-card p { color: var(--ngt-muted); font-size: 0.93rem; margin: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--ngt-slate-950), var(--ngt-slate-800));
  border-radius: var(--ngt-radius); padding: 48px 40px; text-align: center; color: #e6eef7;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; left: -60px; bottom: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(16,185,129,0.18);
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #a9bccd; max-width: 560px; margin: 0 auto 24px; }

/* Newsletter */
.newsletter-box {
  background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius);
  padding: 36px; text-align: center; box-shadow: var(--ngt-shadow-sm); max-width: 640px; margin: 0 auto;
}
.newsletter-box h2 { margin-top: 0; }
.newsletter-form { display: flex; gap: 10px; max-width: 480px; margin: 20px auto 0; }
.newsletter-form input {
  flex: 1; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--ngt-line); font-size: 1rem;
}
.newsletter-form input:focus { outline: 2px solid var(--ngt-emerald); }
.newsletter-note { font-size: 0.82rem; color: var(--ngt-muted); margin-top: 12px; }

/* ============================================================
   7. Content / blog
   ============================================================ */
.content-area { padding: 40px 0 60px; }
.entry-card {
  background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius);
  padding: 34px 36px; margin-bottom: 26px; box-shadow: var(--ngt-shadow-sm);
}
.entry-card h1, .entry-card h2.entry-title { margin-top: 0; }
.entry-meta { font-size: 0.85rem; color: var(--ngt-muted); margin-bottom: 16px; }
.entry-meta a { color: var(--ngt-emerald-dark); font-weight: 600; }
.entry-content { color: var(--ngt-ink-soft); }
.entry-content > p:first-of-type { font-size: 1.1rem; color: var(--ngt-ink); }
.post-thumbnail { border-radius: var(--ngt-radius); overflow: hidden; margin-bottom: 22px; }

.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }

.widget {
  background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius);
  padding: 22px; margin-bottom: 22px; box-shadow: var(--ngt-shadow-sm);
}
.widget h2, .widget .widget-title { font-size: 1.05rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--ngt-emerald-soft); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 8px; font-size: 0.93rem; }
.widget a { color: var(--ngt-ink-soft); }
.widget a:hover { color: var(--ngt-emerald-dark); }

.tag-list, .post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tag-list a, .post-tags a {
  font-size: 0.82rem; background: #eef4f9; color: var(--ngt-ink-soft);
  padding: 4px 14px; border-radius: 999px; font-weight: 600;
}
.tag-list a:hover, .post-tags a:hover { background: var(--ngt-emerald-soft); color: var(--ngt-emerald-dark); text-decoration: none; }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 9px 16px; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius-sm);
  background: #fff; font-weight: 600; font-size: 0.92rem; color: var(--ngt-ink-soft);
}
.pagination .current { background: var(--ngt-emerald); border-color: var(--ngt-emerald); color: #03251b; }
.pagination a:hover { border-color: var(--ngt-emerald); text-decoration: none; }

/* Filter bar (All Tools page) */
.filter-bar {
  background: #fff; border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius);
  padding: 20px 22px; margin-bottom: 26px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  box-shadow: var(--ngt-shadow-sm);
}
.filter-bar .cat-links { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-bar .cat-links a {
  font-size: 0.88rem; font-weight: 600; padding: 7px 15px; border-radius: 999px;
  background: #eef4f9; color: var(--ngt-ink-soft);
}
.filter-bar .cat-links a:hover, .filter-bar .cat-links a.active {
  background: var(--ngt-emerald); color: #03251b; text-decoration: none;
}
.filter-bar .filter-search { position: relative; flex: 1; min-width: 200px; }
.filter-bar .filter-search input {
  width: 100%; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--ngt-line); font-size: 0.95rem;
}
.filter-bar .filter-search input:focus { outline: 2px solid var(--ngt-emerald); }

/* ============================================================
   8. Footer
   ============================================================ */
.site-footer {
  background: linear-gradient(180deg, var(--ngt-slate-900), var(--ngt-slate-950));
  color: #9fb3c8; margin-top: 40px;
}
.footer-grid {
  display: grid; gap: 34px; padding: 54px 0 36px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.footer-brand .site-brand a { font-size: 1.35rem; }
.footer-brand p { font-size: 0.92rem; max-width: 320px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: 0.93rem; }
.site-footer a { color: #9fb3c8; }
.site-footer a:hover { color: #6ee7b7; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 0.85rem;
}

/* Ad placeholders */
.ad-slot { margin: 24px 0; text-align: center; }

/* ============================================================
   9. Misc: 404, comments, forms
   ============================================================ */
.error-404 { text-align: center; padding: 70px 0; }
.error-404 .big-404 { font-size: 6rem; font-weight: 900; color: var(--ngt-slate-800); line-height: 1; margin-bottom: 10px; }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment { border: 1px solid var(--ngt-line); border-radius: var(--ngt-radius-sm); padding: 18px; margin-bottom: 14px; background: #fff; }

input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="date"], textarea {
  font-family: inherit;
}

/* ============================================================
   10. Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .header-search { min-width: 170px; }
}
@media (max-width: 960px) {
  .tool-layout, .layout-2col { grid-template-columns: 1fr; }
  .tool-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ngt-slate-900); padding: 12px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .main-nav.nav-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .header-inner { flex-wrap: wrap; position: relative; padding: 12px 0; }
  .header-search { order: 5; flex: 1 1 100%; margin-top: 6px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  .hero { padding: 52px 0 46px; }
  .hero h1 { font-size: 2rem; }
  .tool-app-wrap { padding: 22px 18px; }
  .tool-section, .entry-card { padding: 22px 20px; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .ngt-form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
}

/* ============================================================
   11. Print
   ============================================================ */
@media print {
  .site-header, .site-footer, .tool-app-wrap, .share-row,
  .newsletter-box, .cta-band, .ngt-search-results, .sidebar, .tool-sidebar { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .tool-section, .entry-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
