/* ============================================================
   FIRMS LISTING PAGE — firms-listing.css
   ============================================================ */

/* ============================================================
   1. PAGE HEADER
   ============================================================ */

.listing_header {
  background: var(--blue);
  padding: 32px 0px;
}

.listing_header_inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.listing_h1 {
  font-size: clamp(22px, 3.5vw, 36px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.listing_intro {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  max-width: 680px;
}

.listing_meta_row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.result_count_badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
}

.listing_updated,
.listing_verified {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 5px;
}

.listing_updated i,
.listing_verified i {
  color: var(--gold);
}

/* ---- Active Filter Tags ---- */
.active_filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.active_filters_label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.active_filter_tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  transition: background 0.18s;
}

.active_filter_tag:hover {
  background: rgba(255, 255, 255, 0.2);
}

.active_filter_tag .fa-xmark {
  font-size: 11px;
  opacity: 0.6;
}

.clear_all_filters {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.18s;
}

.clear_all_filters:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   2. LAYOUT
   ============================================================ */

.listing_body {
  padding: 36px 0 60px;
  background: #f5f7fa;
}

.listing_layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ============================================================
   3. SIDEBAR FILTER
   ============================================================ */

.filter_sidebar {
  position: sticky;
  top: 88px;
}

.filter_sidebar_inner {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter_sidebar_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f2f5;
}

.filter_sidebar_header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter_sidebar_header h2 i {
  color: var(--gold);
  font-size: 14px;
}

.filter_close_btn {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
}

/* ---- Filter Block ---- */
.filter_block {
  padding: 14px 0;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter_block:last-child {
  border-bottom: none;
}

.filter_block_title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter_block_title i {
  color: var(--gold);
  font-size: 12px;
}

.filter_select {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  background: #f8f9fb;
  border: 1.5px solid #dde3ea;
  border-radius: 7px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23182d48' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.filter_select:focus {
  outline: none;
  border-color: var(--blue);
}

.filter_checkbox_label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  padding: 3px 0;
}

.filter_checkbox_label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.filter_apply_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
  margin-top: 4px;
}

.filter_apply_btn:hover {
  background: #0f1f33;
}

.filter_reset_btn {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #aaa;
  text-decoration: underline;
  margin-top: 8px;
  transition: color 0.18s;
}

.filter_reset_btn:hover {
  color: var(--accent);
}

/* ---- State Links in Sidebar ---- */
.filter_state_links {
  margin-top: 4px;
}

.state_link_list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.state_link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  font-size: 13px;
  color: #555;
  border-radius: 6px;
  transition:
    background 0.18s,
    color 0.18s;
}

.state_link:hover,
.state_link_active {
  background: rgba(24, 45, 72, 0.06);
  color: var(--blue);
  font-weight: 600;
}

.state_count {
  font-size: 11px;
  color: #aaa;
  background: #f0f2f5;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ============================================================
   4. MAIN LISTING — TOP BAR
   ============================================================ */

.listing_main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.listing_top_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 12px 16px;
  gap: 12px;
}

.mobile_filter_btn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: none;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
}

.filter_dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid #fff;
}

.listing_sort_compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.sort_label {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

.sort_select_compact {
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  background: #f8f9fb;
  border: 1.5px solid #dde3ea;
  border-radius: 7px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23182d48' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   5. FIRM LIST CARDS
   ============================================================ */

.firms_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.firm_list_card {
  display: grid;
  grid-template-columns: 44px 100px 1fr 180px;
  gap: 0;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  transition:
    box-shadow 0.25s ease,
    border-color 0.22s ease,
    transform 0.2s ease;
}

.firm_list_card:hover {
  box-shadow: 0 8px 32px rgba(24, 45, 72, 0.11);
  border-color: rgba(24, 45, 72, 0.14);
}

/* ---- Rank Column ---- */
.flc_rank_col {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: rgba(24, 45, 72, 0.04);
  border-right: 1px solid #f0f2f5;
  padding: 16px 0;
}

.flc_rank_num {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.5px;
}

/* ---- Logo Column ---- */
.flc_logo_col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  border-right: 1px solid #f0f2f5;
  height: 100%;
}

.flc_logo_box {
  width: 72px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.flc_logo_box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.flc_verified_badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ---- Info Column ---- */
.flc_info_col {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.flc_name_row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.flc_name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

.flc_name a {
  color: inherit;
  transition: color 0.18s;
}

.flc_name a:hover {
  color: var(--blue);
}

.flc_badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.flc_badge_green {
  background: #e8f5e9;
  color: #2e7d32;
}

.flc_badge_blue {
  background: rgba(24, 45, 72, 0.07);
  color: var(--blue);
}

.flc_description {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flc_practice_tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flc_area_tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(24, 45, 72, 0.06);
  padding: 3px 10px;
  border-radius: 20px;
  transition:
    background 0.18s,
    color 0.18s;
}

.flc_area_tag:hover {
  background: var(--blue);
  color: #fff;
}

.flc_meta_row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #999;
}

.flc_meta_row i {
  margin-right: 4px;
  color: var(--gold);
  font-size: 11px;
}

/* ---- Action Column ---- */
.flc_action_col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 20px 18px;
  border-left: 1px solid #f0f2f5;
  height: 100%;
  justify-content: center;
}

.flc_rating_block {
  text-align: center;
}

.flc_stars {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}

.flc_stars i {
  font-size: 14px;
  color: var(--gold);
}

.flc_rating_num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 3px;
}

.flc_review_count {
  font-size: 11px;
  color: #aaa;
}

.flc_view_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 7px;
  text-align: center;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.flc_view_btn:hover {
  background: #0f1f33;
}

.flc_call_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  text-align: center;
  transition:
    background 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flc_call_btn:hover {
  background: var(--blue);
  color: #fff;
}

/* ============================================================
   6. NO RESULTS
   ============================================================ */

.no_results {
  text-align: center;
  padding: 60px 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
}

.no_results i {
  font-size: 40px;
  color: #ccc;
  margin-bottom: 16px;
  display: block;
}

.no_results h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.no_results p {
  font-size: 15px;
  color: #888;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ============================================================
   7. PAGINATION
   ============================================================ */

.listing_pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.page_btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  background: #fff;
  border: 1.5px solid #e0e4ea;
  border-radius: 8px;
  justify-content: center;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.page_btn:hover {
  background: rgba(24, 45, 72, 0.05);
  border-color: var(--blue);
  color: var(--blue);
}

.page_active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.page_prev,
.page_next {
  padding: 0 16px;
}

/* ============================================================
   8. SEO CONTENT BLOCK
   ============================================================ */

.listing_seo_block {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  padding: 28px 28px 24px;
  margin-top: 8px;
}

.listing_seo_block h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f2f5;
}

.listing_seo_block p {
  font-size: 14px;
  color: #666;
  line-height: 1.75;
  margin-bottom: 12px;
}

.listing_seo_block p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   9. BROWSE BY STATE SECTION
   ============================================================ */

.browse_states_section {
  padding: 56px 0;
  background: #fff;
}

.states_browse_grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.state_browse_card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  background: var(--light-gray);
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  line-height: 1.3;
  transition:
    background 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.state_browse_card:hover {
  background: rgba(24, 45, 72, 0.06);
  border-color: var(--blue);
  color: var(--blue);
}

/* ============================================================
   10. MOBILE FILTER OVERLAY
   ============================================================ */

.filter_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

.filter_overlay.open {
  display: block;
}

/* ============================================================
   11. RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .listing_layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes a slide-in drawer on mobile */
  .filter_sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-radius: 0;
  }

  .filter_sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .filter_sidebar_inner {
    border-radius: 0;
    border: none;
    min-height: 100%;
  }

  .filter_close_btn {
    display: block;
  }

  .mobile_filter_btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .firm_list_card {
    grid-template-columns: 36px 80px 1fr;
    grid-template-rows: auto auto;
  }

  .flc_action_col {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
    border-left: none;
    border-top: 1px solid #f0f2f5;
    gap: 12px;
  }

  .flc_rating_block {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .flc_stars {
    justify-content: flex-start;
  }

  .flc_rating_num {
    font-size: 16px;
  }

  .flc_view_btn {
    flex: 1;
  }

  .flc_call_btn {
    flex-shrink: 0;
  }

  .listing_header {
    padding: 20px 0 24px;
  }

  .listing_body {
    padding: 25px 0 40px;
  }

  .states_browse_grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .browse_states_section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .firm_list_card {
    grid-template-columns: 30px 70px 1fr;
  }

  .flc_description {
    display: none;
  }

  .flc_action_col {
    flex-direction: column;
    gap: 10px;
  }

  .flc_view_btn,
  .flc_call_btn {
    width: 100%;
  }

  .states_browse_grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .listing_meta_row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
