/* ===========================
   HOME PAGE
   =========================== */

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: var(--sp-16) 0 var(--sp-12);
  background: var(--grad-hero);
}
.hero-orb {
  position: absolute; border-radius: 50%;
  pointer-events: none; filter: blur(100px); opacity: 0.32;
}
.hero-orb-1 {
  width: 560px; height: 560px; background: var(--purple);
  top: -200px; left: -180px;
  animation: float 10s ease-in-out infinite;
}
.hero-orb-2 {
  width: 420px; height: 420px; background: var(--cyan);
  bottom: -150px; right: -120px;
  animation: float 13s ease-in-out infinite reverse;
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; max-width: 780px; margin: 0 auto; padding: 0 var(--sp-6);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(124,58,237,0.14); border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--r-full); padding: 0.4rem 1rem;
  font-size: 0.8rem; font-weight: 600; color: var(--purple-light);
  margin-bottom: var(--sp-6);
}
.hero h1 { margin-bottom: var(--sp-5); }
.hero-sub {
  font-size: 1.1rem; color: var(--text-2);
  max-width: 540px; margin: 0 auto var(--sp-8);
}
.hero-search-wrapper { max-width: 620px; margin: 0 auto var(--sp-6); position: relative; }
.hero-search-wrapper .search-input { padding-right: 7.5rem; font-size: 1rem; }
.hero-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
}
.hero-stats {
  display: flex; justify-content: center; gap: var(--sp-10); margin-top: var(--sp-8);
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.stat-val {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1;
}
.stat-lbl { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; letter-spacing: 0.04em; }

/* Home sections */
.home-section { padding: var(--sp-12) 0; }
.home-section + .home-section { padding-top: 0; }

.section-alt {
  background: var(--bg-secondary);
  margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50%); padding-right: calc(50vw - 50%);
  padding-top: var(--sp-12); padding-bottom: var(--sp-12);
}

/* Categories grid */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--sp-4);
}

/* ===========================
   DIRECTORY PAGE
   =========================== */
.dir-header {
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  padding: var(--sp-8) 0 var(--sp-6);
}
.dir-header h1 { margin-bottom: var(--sp-2); }
.dir-header p  { color: var(--text-2); }

.dir-body { padding: var(--sp-8) 0 var(--sp-16); }

.dir-controls {
  display: flex; flex-direction: column; gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
}
.dir-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.dir-row-end { justify-content: space-between; }
.dir-count { font-size: 0.875rem; color: var(--text-3); }
.dir-sort { display: flex; align-items: center; gap: var(--sp-3); }
.dir-sort label { font-size: 0.8rem; color: var(--text-3); }

/* ===========================
   TOOL DETAIL PAGE
   =========================== */
.detail-breadcrumb {
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
  font-size: 0.85rem; color: var(--text-3);
}
.breadcrumb-inner { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumb-inner a { color: var(--text-3); transition: color var(--ease-fast); }
.breadcrumb-inner a:hover { color: var(--text-2); }
.breadcrumb-sep { opacity: 0.4; }

.detail-body { padding: var(--sp-8) 0 var(--sp-16); }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-8);
  align-items: start;
}

/* Tool Hero */
.detail-hero {
  display: flex; gap: var(--sp-6); align-items: flex-start;
  flex-wrap: wrap; margin-bottom: var(--sp-6);
}
.detail-logo {
  width: 80px; height: 80px; border-radius: var(--r-lg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; background: var(--bg-secondary); border: 1px solid var(--border);
}
.detail-info { flex: 1; min-width: 0; }
.detail-name { font-size: clamp(1.6rem, 4vw, 2.25rem); margin-bottom: var(--sp-2); }
.detail-tagline { font-size: 1.05rem; color: var(--text-2); margin-bottom: var(--sp-4); }
.detail-meta-row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.detail-stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.detail-stat-item { display: flex; flex-direction: column; gap: 3px; }
.dstat-label { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.dstat-value { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.detail-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Content sections */
.content-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.content-section h3 { margin-bottom: var(--sp-4); }
.content-section p  { color: var(--text-2); font-size: 0.925rem; }

/* Feature list */
.feature-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.feature-list li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: 0.9rem; color: var(--text-2);
}
.feature-check { color: var(--green); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* Pricing card */
.pricing-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: var(--sp-5);
}
.pricing-box h4 { margin-bottom: var(--sp-2); font-size: 1rem; }
.pricing-box p  { color: var(--text-2); font-size: 0.9rem; }

/* Tags */
.tags-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tag-chip {
  padding: 0.3rem 0.75rem; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-2); font-size: 0.78rem; cursor: default;
}

/* Sidebar */
.detail-sidebar { display: flex; flex-direction: column; gap: var(--sp-5); }
.sidebar-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--sp-5);
}
.sidebar-box h4 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); margin-bottom: var(--sp-4);
}

/* Alternatives */
.alt-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border);
  text-decoration: none; transition: opacity var(--ease-fast);
}
.alt-item:last-child { border-bottom: none; padding-bottom: 0; }
.alt-item:hover { opacity: 0.75; }
.alt-logo {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; background: var(--bg-secondary); border: 1px solid var(--border);
}
.alt-name { font-size: 0.875rem; font-weight: 600; }
.alt-meta { font-size: 0.72rem; color: var(--text-3); }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { flex-direction: row; flex-wrap: wrap; }
  .detail-sidebar > * { flex: 1; min-width: 260px; }
  .ad-rect { width: 100%; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-stats { gap: var(--sp-6); }
  .cats-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .dir-controls { padding: var(--sp-4); }
}

/* ===== LIGHT BUSINESS DIRECTORY HOME ===== */
.hero { background: var(--grad-hero); padding: 5rem 0 5rem; }
.hero-orb { display: none; }
.hero-content { max-width: 900px; }
.hero-eyebrow { background: transparent; border: 0; color: #fff; font-size: .95rem; font-weight: 500; margin-bottom: 1.25rem; padding: 0; }
.hero h1 { color: #fff; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.45; letter-spacing: 0; max-width: 700px; font-weight: 500; margin-bottom: 2.25rem; }
.hero h1 br { display: none; }
.hero h1 .gradient-text { color: #fff; background: none; -webkit-text-fill-color: currentColor; }
.hero-sub { display: none; }
.hero-search-wrapper { max-width: 896px; margin-bottom: 3rem; }
.hero-search-wrapper .search-input { padding-right: 8.5rem; font-size: 1rem; }
.hero-search-btn { right: 8px; min-width: 112px; height: 56px; background: #2563eb; }
.hero-stats { gap: 1rem; margin: 0 auto; max-width: 896px; flex-wrap: nowrap; }
.hero-stat { flex: 1; min-width: 0; padding: 1.1rem .75rem; background: rgba(255,255,255,.12); border-radius: 10px; }
.stat-val { color: #fff; font-size: 1.75rem; font-weight: 500; }
.stat-val.gradient-text { background: none; -webkit-text-fill-color: #fff; }
.stat-lbl { color: rgba(255,255,255,.9); font-size: .78rem; }
.home-section { padding: 4.5rem 0; }
.home-section + .home-section { padding-top: 4.5rem; }
.section-alt { background: #f8fafc; border: 0; padding-top: 4.5rem; padding-bottom: 4.5rem; }
.section-head { margin-bottom: 2rem; }
.cats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.dir-header { background: #2563eb; padding: 3.5rem 0; color: #fff; }
.dir-header p { color: rgba(255,255,255,.82); }
.dir-body { background: #f8fafc; }
.dir-controls { background: #fff; border-color: var(--border); box-shadow: var(--shadow-sm); }
.detail-breadcrumb { background: #fff; }
.detail-body { background: #f8fafc; }
.detail-hero, .content-section, .sidebar-box { background: #fff; border-color: var(--border); box-shadow: var(--shadow-sm); }
.detail-hero { background: #fff; }
.detail-logo { background: #eff6ff; box-shadow: none; }
.detail-tagline, .content-section p, .pricing-box p { color: var(--text-2); }
.pricing-box { background: #f8fafc; border-color: var(--border); }
.tag-chip { background: #eff6ff; border: 0; color: #2563eb; }
@media (max-width: 640px) {
  .hero { padding: 3.75rem 0; }
  .hero h1 { font-size: 1.25rem; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); }
  .hero-stat:last-child { grid-column: 1 / -1; }
  .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .cat-card { min-height: 135px; padding: 1rem; }
}
@media (max-width: 400px) {
  .hero-search-wrapper .search-input { padding-right: 1rem; }
  .hero-search-btn { display: none; }
}

/* ===== VISUAL REFINEMENT ===== */
.hero { padding: 7rem 0 5.5rem; }
.hero-content { max-width: 900px; }
.hero-eyebrow { background: rgba(139,92,246,0.12); border-color: rgba(196,181,253,0.25); }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 700; max-width: 760px; margin-left: auto; margin-right: auto; }
.hero-sub { max-width: 590px; font-size: 1.125rem; }
.hero-search-wrapper { max-width: 680px; }
.hero-stat { min-width: 105px; }
.home-section { padding: 4.5rem 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dir-header { background: var(--grad-hero); padding: 4rem 0 3rem; }
.dir-controls { background: rgba(255,255,255,0.03); }
.detail-breadcrumb { background: rgba(255,255,255,0.02); }
.detail-hero { margin-bottom: var(--sp-8); padding: var(--sp-6); border: 1px solid var(--border); border-radius: var(--r-xl); background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(255,255,255,0.025) 55%); }
.detail-logo { background: rgba(255,255,255,0.08); box-shadow: 0 12px 28px rgba(0,0,0,0.25); }
.content-section, .sidebar-box { box-shadow: inset 0 1px 0 rgba(255,255,255,0.025); }
@media (max-width: 640px) {
  .hero { padding: 5rem 0 4rem; }
  .hero h1 { font-size: clamp(2.5rem, 13vw, 3.5rem); }
  .hero-stats { gap: var(--sp-3); }
  .detail-hero { padding: var(--sp-5); }
}
