/* =====================================================================
   HERO
   ===================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 80px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}
.hero .container { display: grid; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .lede { margin-bottom: 32px; max-width: 46ch; }

.search-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px;
  box-shadow: var(--shadow-md);
  max-width: 560px;
}
@media (min-width: 560px) { .search-box { flex-direction: row; } }
.search-box input, .search-box select {
  border: none;
  padding: 12px 14px;
  font-size: 0.96rem;
  background: transparent;
}
.search-box input { flex: 1.4; }
.search-box select { flex: 1; border-left: 1.5px solid var(--border); }
.search-box .btn { flex-shrink: 0; }

.hero-stats { display: flex; gap: 28px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 1.5rem; }
.hero-stats span { font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }

/* Signature radar graphic: concentric rings from the favicon, with
   category glyphs orbiting like points found on a directory "radar". */
.hero-radar {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-radar .ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--brand-pale-strong); }
.hero-radar .ring--1 { inset: 0; }
.hero-radar .ring--2 { inset: 15%; border-color: var(--brand-pale-strong); }
.hero-radar .ring--3 { inset: 30%; background: var(--brand-pale); border-color: transparent; }
.hero-radar .core {
  position: relative;
  width: 22%; height: 22%;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 10px var(--brand-pale);
}
.hero-radar .node {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  color: var(--brand);
  animation: node-float 5s ease-in-out infinite;
}
.hero-radar .node .icon { width: 20px; height: 20px; }
.hero-radar .node--1 { top: 4%; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.hero-radar .node--2 { top: 50%; right: -4%; transform: translateY(-50%); animation-delay: 1.1s; }
.hero-radar .node--3 { bottom: 4%; left: 20%; animation-delay: 2.2s; }
.hero-radar .node--4 { top: 22%; left: -2%; animation-delay: 3.3s; }
@keyframes node-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .hero-radar .node { animation: none; } }

@media (min-width: 900px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

/* =====================================================================
   CATEGORY GRID
   ===================================================================== */
.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.category-card .icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--brand-pale);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card .icon-wrap .icon { width: 26px; height: 26px; }
.category-card h3 { font-size: 1.08rem; }
.category-card .count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

/* =====================================================================
   LISTING CARD
   ===================================================================== */
.listing-card { display: flex; flex-direction: column; }
.listing-card .thumb {
  aspect-ratio: 16/10;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-band);
  margin-bottom: 16px;
  position: relative;
}
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-card .thumb .badge-featured { position: absolute; top: 10px; left: 10px; background: var(--bg); box-shadow: var(--shadow-sm); }
.listing-card .cat { font-family: var(--font-mono); font-size: 0.74rem; color: var(--brand); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.listing-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.listing-card .meta { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--ink-soft); margin-top: auto; padding-top: 12px; }
.listing-card .meta .icon { width: 15px; height: 15px; flex-shrink: 0; }

/* =====================================================================
   SECTION DIVIDER — ring watermark
   ===================================================================== */
.ring-divider { position: relative; height: 1px; background: var(--border); margin: 0; overflow: visible; }
.ring-divider::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
}
.ring-divider::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}

/* =====================================================================
   BLOG CARD
   ===================================================================== */
.post-card .thumb { aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden; background: var(--bg-band); margin-bottom: 16px; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .cat { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand); margin-bottom: 8px; }
.post-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.post-card .excerpt { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 12px; }
.post-card .meta { font-size: 0.8rem; color: var(--ink-faint); font-family: var(--font-mono); }

/* =====================================================================
   404
   ===================================================================== */
.error-page { text-align: center; padding: 100px 0; }
.error-page .ring-404 { position: relative; width: 160px; height: 160px; margin: 0 auto 32px; }
.error-page .ring-404 .r1 { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand-pale-strong); }
.error-page .ring-404 .r2 { position: absolute; inset: 22px; border-radius: 50%; border: 3px solid var(--brand-pale); background: var(--brand-pale); }
.error-page .ring-404 .r3 { position: absolute; inset: 44px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.error-search { max-width: 460px; margin: 32px auto; }

/* =====================================================================
   RESPONSIVE CONTAINER TWEAKS
   ===================================================================== */
@media (max-width: 640px) {
  .section { padding: 48px 0; }
}

/* =====================================================================
   RICH CONTENT (sanitized editor output: category/blog descriptions,
   blog posts, static pages)
   ===================================================================== */
.rich-content { font-size: 1rem; line-height: 1.75; color: var(--ink-soft); }
.rich-content h2 { color: var(--ink); font-size: 1.5rem; margin: 1.6em 0 0.6em; }
.rich-content h3 { color: var(--ink); font-size: 1.2rem; margin: 1.4em 0 0.5em; }
.rich-content p { margin: 0 0 1.1em; }
.rich-content ul, .rich-content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.rich-content li { margin-bottom: 0.4em; }
.rich-content ul li { list-style: disc; }
.rich-content ol li { list-style: decimal; }
.rich-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.rich-content img { border-radius: var(--r-md); margin: 1.2em 0; }
.rich-content blockquote { border-left: 3px solid var(--brand); padding-left: 18px; color: var(--ink-soft); font-style: italic; margin: 1.4em 0; }
.rich-content code { background: var(--bg-band); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.88em; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.rich-content th, .rich-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

/* Plan cards (Upgrade page) */
.plan-card { display: flex; flex-direction: column; }
.plan-card--current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-pale) inset; }
.plan-features { list-style: none; padding: 0; margin: 8px 0 16px; font-size: 0.88rem; color: var(--ink-soft); }
.plan-features li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.plan-features .icon { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; }

/* Sidebar layout (Blog + Listings) */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 900px) {
  .layout-with-sidebar { grid-template-columns: 2fr 1fr; }
}
.sidebar-widget { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 0.95rem; margin-bottom: 14px; }
.sidebar-widget .widget-list { list-style: none; padding: 0; margin: 0; }
.sidebar-widget .widget-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-widget .widget-list li:last-child { border-bottom: none; }
.sidebar-widget .widget-list a { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.sidebar-widget .widget-list a:hover { color: var(--brand); }
.sidebar-widget .widget-meta { font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: var(--r-pill); background: var(--bg-soft); color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; border: 1px solid var(--border); }
.tag-pill:hover { border-color: var(--brand); color: var(--brand); }
.ad-slot { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-slot:empty { display: none; }

/* Single listing page: hero image is always clipped to a fixed
   aspect ratio, regardless of the uploaded file's native dimensions —
   prevents an oversized/odd-shaped image from blowing out the page. */
.listing-hero { width: 100%; aspect-ratio: 21 / 7; max-height: 420px; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-soft); }
.listing-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .listing-hero { aspect-ratio: 16 / 9; max-height: 280px; }
}
.sidebar-sticky { position: sticky; top: 20px; }

/* =====================================================================
   FILTER BAR (All Listings directory page)
   ===================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
}
.filter-bar input[type="text"],
.filter-bar select {
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  background: var(--bg);
}
.filter-bar input[type="text"] { flex: 1.6; min-width: 180px; }
.filter-bar select { flex: 1; min-width: 140px; }

/* =====================================================================
   PARTNERS / CLIENTS CAROUSEL (homepage)
   ===================================================================== */
.partners-carousel {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: partners-scroll 28s linear infinite;
}
.partners-carousel:hover .partners-track { animation-play-state: paused; }
.partner-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  filter: grayscale(1) opacity(0.7);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.partner-logo:hover { filter: grayscale(0) opacity(1); transform: translateY(-2px); }
.partner-logo img { max-height: 44px; max-width: 140px; width: auto; height: auto; object-fit: contain; }
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; overflow-x: auto; }
}

/* =====================================================================
   TESTIMONIALS (homepage)
   ===================================================================== */
.testimonial-card { display: flex; flex-direction: column; gap: 14px; }
.testimonial-stars { color: var(--amber); font-size: 1rem; letter-spacing: 2px; }
.testimonial-quote { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.6; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img,
.testimonial-avatar-fallback {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--ink-faint);
}
.testimonial-author strong { display: block; font-size: 0.9rem; }
.testimonial-author span { display: block; font-size: 0.8rem; color: var(--ink-faint); }
