/* assets/css/style.css */
/* TechTrekr Site-Wide Styling - Futurepedia-inspired Design */

:root {
  --g1: #1D4ED8;
  --g2: #2563EB;
  --g3: #3B82F6;
  --g7: #DBEAFE;
  --g8: #EFF6FF;
  --glow: rgba(37, 99, 235, 0.16);
  --bg: #FFFFFF;
  --bg2: #F9FAFB;
  --bg3: #E5E7EB;
  --ink: #0F172A;
  --ink2: #334155;
  --muted: #64748B;
  --border: #E2E8F0;
  --shadow: rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- HEADER ---------- */
.site-header {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav > a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
}

.main-nav > a:hover { color: var(--g1); }

.nav-dropdown {
  position: relative;
}

.nav-dropdown > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
}

.nav-dropdown:hover > span { color: var(--g1); }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-width: 220px;
  box-shadow: 0 12px 32px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
}

.nav-dropdown-menu a:hover {
  background: var(--g8);
  color: var(--g1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- MAIN ---------- */
.site-main { min-height: 60vh; }

/* ---------- HERO ---------- */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 80px 24px 50px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--g8);
  color: var(--g1);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--ink);
}

.hero p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.search-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 4px 16px var(--shadow);
}

.search-form input {
  flex: 1;
  height: 46px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: transparent;
}

.search-form button {
  height: 46px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  background: var(--g2);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-form button:hover { background: var(--g1); }

/* ---------- CATEGORY FILTER ---------- */
.category-filter {
  max-width: 1180px;
  margin: 10px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cat-pill {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  transition: all 0.15s;
}

.cat-pill:hover {
  border-color: var(--g3);
  color: var(--g1);
  background: var(--g8);
}

.cat-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- TOOLS GRID ---------- */
.tools-grid-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 70px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 22px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.tool-card {
  position: relative;
  background: var(--bg);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px var(--shadow);
  border-color: var(--g3);
}

.tool-icon {
  font-size: 28px;
  margin-bottom: 14px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g8);
  border-radius: 12px;
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.tool-card p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.tool-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--g1);
  background: var(--g8);
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- BREADCRUMB ---------- */
.tool-breadcrumb {
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.tool-breadcrumb a { color: var(--muted); font-weight: 500; }
.tool-breadcrumb a:hover { color: var(--g1); }

/* ---------- SINGLE TOOL PAGE ---------- */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 70px;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.tool-icon-large {
  font-size: 34px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g8);
  border-radius: 16px;
  flex-shrink: 0;
}

.tool-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}

.tool-category-tag {
  display: inline-block;
  background: var(--g8);
  color: var(--g1);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}

.tool-description {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.tool-embed-box { margin-bottom: 34px; }

.tool-rich-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink2);
  margin-bottom: 30px;
}
.tool-rich-content h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 22px 0 10px; }
.tool-rich-content ul, .tool-rich-content ol { margin: 10px 0 10px 22px; }
.tool-rich-content a { color: var(--g1); text-decoration: underline; }

.related-tools-section { margin-bottom: 34px; }
.related-tools-section .tools-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.back-link a {
  color: var(--g1);
  font-weight: 600;
  font-size: 14px;
}

.back-link a:hover { text-decoration: underline; }

/* ---------- CATEGORY PAGE ---------- */
.category-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 70px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.category-icon-large {
  font-size: 36px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g8);
  border-radius: 16px;
}

.category-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

/* ---------- STATIC PAGES (about, contact, legal) ---------- */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.static-page h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--ink);
}

.static-page-body p {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink2);
  margin: 0 0 18px;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 50px 24px 24px;
  margin-top: 30px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-social a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}

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

.footer-logo { color: #fff; }

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 14px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 10px;
}

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

.footer-bottom {
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .mobile-menu-btn { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open { display: flex; }

  .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 8px 0 0; display: none; }
  .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: flex; }

  .hero { padding: 50px 20px 36px; }
  .search-form { flex-direction: column; background: transparent; border: none; box-shadow: none; padding: 0; gap: 10px; }
  .search-form input { border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); }
  .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tool-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .tools-grid { grid-template-columns: 1fr; }
}
