/**
 * ==============================================================================
 * 🌟 MAIN HUB / TOOLS DIRECTORY STYLES
 * ==============================================================================
 */

:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --accent: #0284c7;
  --bg-main: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav */
.hub-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.hub-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.hub-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.hub-brand-text {
  display: flex;
  flex-direction: column;
}

.hub-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: -0.3px;
}

.hub-brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hub-nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-hub-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0284c7;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-hub-contact:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

/* Hero Section */
.hub-hero {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  padding: 50px 0 35px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hub-hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.hub-hero-title span {
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px auto;
}

/* Search & Filters */
.hub-search-box {
  max-width: 580px;
  margin: 0 auto 24px auto;
  position: relative;
}

.hub-search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  transition: all 0.2s;
}

.hub-search-box input:focus {
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.hub-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
}

/* Category Filter Tabs */
.hub-category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-tab {
  padding: 8px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.cat-tab:hover {
  border-color: #93c5fd;
  color: #1e40af;
}

.cat-tab.active {
  background: #1e40af;
  color: #ffffff;
  border-color: #1e40af;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

/* Main Grid */
.hub-section {
  padding: 40px 0 60px 0;
  flex: 1;
}

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

/* Tool Card */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #93c5fd;
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tool-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.icon-agri { background: #dcfce7; color: #16a34a; }
.icon-fuel { background: #ffedd5; color: #ea580c; }
.icon-land { background: #e0e7ff; color: #4338ca; }
.icon-tax  { background: #fef3c7; color: #d97706; }

.tool-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-hot { background: #fee2e2; color: #dc2626; }
.badge-new { background: #e0f2fe; color: #0284c7; }
.badge-free { background: #f1f5f9; color: #475569; }

.tool-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2563eb;
}

.tool-card-footer i {
  transition: transform 0.2s;
}

.tool-card:hover .tool-card-footer i {
  transform: translateX(4px);
}

/* Footer */
.hub-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 20px 0;
  font-size: 0.9rem;
}

.hub-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid #334155;
  margin-bottom: 20px;
}

.hub-footer-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
}

.hub-footer-copy {
  text-align: center;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .hub-hero-title {
    font-size: 1.7rem;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .hub-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
