/* Public directory pages — homepage and shared layout */

.dir-page-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.dir-hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}

.dir-hero .lead {
  max-width: 640px;
}

.dir-search {
  margin-top: 28px;
  max-width: 520px;
  display: flex;
  gap: 10px;
}

.dir-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  font: inherit;
  background: var(--surface);
  color: var(--text-primary);
  width: 100%;
}

.dir-search input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}

.dir-company-grid {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(48px, 8vw, 96px);
}

.dir-company-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.dir-company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border);
}

.dir-company-card__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  object-fit: contain;
  background: var(--secondary);
  border: 1px solid var(--border-light);
}

.dir-company-card__logo-fallback {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 20px;
}

.dir-company-card__name {
  font-size: 20px;
  font-weight: 700;
}

.dir-company-card__meta {
  font-size: 14px;
  color: var(--text-secondary);
}

.dir-company-card__cta {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.dir-empty {
  text-align: center;
  padding: 64px 24px 96px;
  color: var(--text-secondary);
}

.dir-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.dir-site-header__inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dir-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.dir-brand img {
  height: 36px;
  width: auto;
}

.dir-site-footer {
  border-top: 1px solid var(--border-light);
  padding: 32px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.dir-breadcrumb {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.dir-breadcrumb a:hover {
  text-decoration: underline;
}

.dir-breadcrumb [aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 640px) {
  .dir-search {
    flex-direction: column;
  }

  .dir-search .btn {
    width: 100%;
  }
}
