/* ToolsWala.in — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --primary:    #1a6b3c;
  --primary-lt: #e8f5ee;
  --accent:     #f59e0b;
  --accent-lt:  #fef3c7;
  --dark:       #0f1f17;
  --gray-1:     #f4f6f4;
  --gray-2:     #e2e8e2;
  --gray-3:     #9cad9c;
  --text:       #1c2b1c;
  --text-muted: #6b7c6b;
  --white:      #ffffff;
  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 2px 12px rgba(26,107,60,0.10);
  --shadow-lg:  0 8px 32px rgba(26,107,60,0.14);
  --font-head:  'Baloo 2', cursive;
  --font-body:  'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gray-1);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── NAVBAR ─────────────────────────────────────── */
.navbar {
  background: var(--primary);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.navbar-brand {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand span { color: var(--accent); }

.navbar-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.navbar-links a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.navbar-links a:hover { background: rgba(255,255,255,0.15); color: white; }

/* ── AD BANNER PLACEHOLDER ──────────────────────── */
.ad-slot {
  background: var(--gray-2);
  border: 1.5px dashed var(--gray-3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.ad-slot-header {
  width: 100%;
  height: 90px;
  margin: 16px 0;
}

.ad-slot-sidebar {
  width: 100%;
  height: 250px;
  margin-bottom: 16px;
}

.ad-slot-inline {
  width: 100%;
  height: 100px;
  margin: 24px 0;
}

/* ── HERO ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d9e5f 100%);
  padding: 48px 24px 56px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 16px;
  opacity: 0.88;
  max-width: 500px;
  margin: 0 auto 28px;
  position: relative;
}

.search-bar {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  border-radius: 50px;
  border: none;
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-bar button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── MAIN LAYOUT ─────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 32px 0 48px;
}

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .navbar-links { display: none; }
}

/* ── SECTION TITLE ───────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--gray-2);
  border-radius: 2px;
}

/* ── TOOL CARDS GRID ─────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.22s ease;
  text-decoration: none;
  color: var(--text);
}

.tool-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.tool-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.tool-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.tool-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--primary-lt);
  color: var(--primary);
  font-weight: 500;
}

/* ── SIDEBAR ─────────────────────────────────────── */
.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.sidebar-widget h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

.popular-list { list-style: none; }

.popular-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.popular-list li:last-child { border-bottom: none; }

.popular-list a { color: var(--text); transition: color 0.2s; }
.popular-list a:hover { color: var(--primary); }

/* ── TOOL PAGE LAYOUT ────────────────────────────── */
.tool-page { padding: 32px 0 48px; }

.tool-page-header {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.tool-page-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}

.tool-page-header h1 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
}

.tool-page-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--primary); }

/* ── TOOL CARD (big) ─────────────────────────────── */
.tool-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--gray-1);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus { border-color: var(--primary); background: white; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.btn {
  padding: 13px 28px;
  border-radius: 50px;
  border: none;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(26,107,60,0.3);
}

.btn-primary:hover { background: #155e34; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-2);
  color: var(--text-muted);
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ── RESULT BOX ──────────────────────────────────── */
.result-box {
  background: var(--primary-lt);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 24px;
  display: none;
}

.result-box.show { display: block; animation: fadeUp 0.3s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-box h3 {
  font-family: var(--font-head);
  font-size: 14px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.result-item { text-align: center; }

.result-item .val {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.result-item .lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── FOOTER ──────────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
}

footer a { color: var(--accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ── UTILITIES ───────────────────────────────────── */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

/* Search highlight */
.tool-card.hidden-search { display: none; }
