/* AICountly Community module */
.community-page,
body.community-page {
  background: #f5f8fb;
}

/* Use community subnav only — main site header is fixed globally and overlaps content */
body.community-page > header {
  display: none;
}

body.community-page {
  padding-top: 0;
}

.community-main,
.community-main-content {
  min-height: 50vh;
}

.community-subnav {
  background: #fff;
  border-bottom: 1px solid #e6edf5;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.community-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.community-site-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.community-site-logo img {
  width: 120px;
  height: auto;
  display: block;
}

.community-subnav-divider {
  width: 1px;
  height: 1.75rem;
  background: #e6edf5;
  flex-shrink: 0;
}

.community-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: #1d5182;
  text-decoration: none;
  white-space: nowrap;
}

.community-subnav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.community-subnav-links a:not(.btn) {
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
}

.community-subnav-links a:not(.btn):hover {
  color: #1d5182;
}

.community-search-mini,
.community-search-hero,
.community-search-bar {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.community-search-mini input,
.community-search-hero input,
.community-search-bar input {
  flex: 1;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.community-search-mini button {
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #f3f6fa;
  color: #1d5182;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.community-search-mini button:hover {
  background: #e8f0f8;
}

.community-search-hero {
  max-width: 640px;
}

.community-hero {
  background: linear-gradient(135deg, #1d5182 0%, #175591 55%, #0f3d66 100%);
  color: #fff;
  padding: 3.5rem 0 4rem;
  margin-top: 0;
}

.community-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.community-hero .btn-outline-primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.community-hero .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

.community-hero .btn-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

.community-hero .btn-link:hover {
  color: #fff;
  text-decoration: underline;
}

body.community-home .community-search-mini {
  display: none;
}

.community-hero h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.community-hero .lead {
  color: rgba(255, 255, 255, 0.9);
}

.community-hero-icon {
  font-size: 120px;
  opacity: 0.35;
}

.community-category-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.community-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 81, 130, 0.12) !important;
}

.community-cat-icon {
  font-size: 2rem;
  color: #1d5182;
  display: block;
  margin-bottom: 0.5rem;
}

.community-cat-icon-lg {
  font-size: 3rem;
  color: #1d5182;
}

.community-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.community-post-card {
  position: relative;
}

.community-post-card .card-title a {
  color: #1d5182;
}

.community-post-meta span + span {
  margin-left: 0.15rem;
}

.community-link-list li {
  margin-bottom: 0.5rem;
}

.community-link-list a {
  color: #1d5182;
  text-decoration: none;
}

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

.community-sidebar-panel .card-body {
  padding: 1.25rem;
}

.community-markdown code {
  background: #f0f4f8;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.community-answer.accepted-answer {
  border-left: 4px solid #96ca68 !important;
}

.community-breadcrumb-wrap {
  background: #fff;
  border-bottom: 1px solid #e6edf5;
}

.community-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
  margin-bottom: 0;
}

.community-autocomplete {
  position: absolute;
  z-index: 1050;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.community-autocomplete.active {
  display: block;
}

.community-autocomplete button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.75rem;
}

.community-autocomplete button:hover {
  background: #f3f6fa;
}

@media (max-width: 767px) {
  .community-subnav-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .community-subnav-divider {
    display: none;
  }

  .community-site-logo {
    justify-content: center;
  }

  .community-brand {
    justify-content: center;
  }

  .community-subnav-links {
    margin-left: 0;
    justify-content: center;
  }

  .community-search-bar {
    flex-direction: column;
  }

  .community-hero {
    padding: 2.5rem 0 3rem;
  }
}
