/**
 * TAG Agent Directory — single agent page styles.
 * Loaded on agent, state, hub, and All agents views. Matches the approved mockups.
 * Open Sans is already provided by Enfold on tagins.net; we inherit it.
 */

:root {
  --tag-ad-gold: #998f61;
  --tag-ad-gold-dark: #706845;
  --tag-ad-gold-meta: #807853;
  --tag-ad-gold-soft: #f7f4ea;
  --tag-ad-text: #292929;
  --tag-ad-heading: #666666;
  --tag-ad-bg2: #f5f5f5;
  --tag-ad-border: #d8d8d4;
  --tag-ad-orange: #d56931;
  --tag-ad-orange-hover: #d64b06;
}

/* Hide Enfold's default single-post chrome on agent pages.
   0.2.11 removes the theme H1 and .big-preview from the HTML via Enfold
   filters; these rules stay as a fallback if a theme update still prints them.
   Our template supplies the only H1 and the photo.
   Sidebar rules are a fallback if avia_layout_filter does not apply. */
body.single-agent h1.post-title.entry-title,
body.single-agent .big-preview,
body.single-agent .blog-meta,
body.single-agent .post_author_timeline,
body.single-agent .avia-post-nav,
body.single-agent .related_posts,
#top.single-agent .sidebar {
  display: none !important;
}

#top.single-agent .content.av-content-small,
#top.single-agent .content {
  width: 100%;
  margin: 0;
  border: none !important;
}

/*
  Width fix: avia_layout_filter already sets these pages to Enfold's
  "fullsize" layout (av-content-full, no sidebar). Enfold then applies
  typography rules meant for full-width blog posts, which shrink the
  column again:

    #top .fullsize .template-blog .post .entry-content-wrapper
      { max-width: 800px; margin: 0 auto; }

    #top .fullsize .template-blog .post .entry-content-wrapper > *
      { max-width: 40em; margin-left: auto; margin-right: auto; }

  Our .tag-ad lives inside .entry-content, a direct child, so it was
  centered in a narrow ~40em column. Override on agent pages only.
  Specificity beats the Enfold rules without !important.
*/
#top.single-agent .fullsize .template-blog .post .entry-content-wrapper,
#top.single-agent .fullsize .template-blog .post .entry-content-wrapper > * {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.tag-ad {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: var(--tag-ad-text);
  margin: 8px 0 24px;
}

.tag-ad-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.tag-ad-photo-frame {
  width: 220px;
  background: #fff;
  border: 1px solid #d6d6d6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tag-ad-photo-frame img.tag-ad-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 235 / 304;
  object-fit: cover;
  object-position: center top;
}

.tag-ad-photo-fallback {
  aspect-ratio: 235 / 304;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
  background: linear-gradient(180deg, #f8f5ec 0%, #efe8d4 100%);
  text-align: center;
}

.tag-ad-photo-fallback img {
  width: 150px;
  height: auto;
  display: block;
}

.tag-ad-fallback-name {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tag-ad-gold-dark);
  font-weight: 600;
  line-height: 1.35;
}

.tag-ad-name {
  margin: 0 0 6px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  color: #222;
}

.tag-ad-agency {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

.tag-ad-location {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 400;
  color: var(--tag-ad-heading);
}

.tag-ad-affiliate {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tag-ad-gold-meta);
  font-weight: 600;
}

.tag-ad-card {
  background: var(--tag-ad-bg2);
  border: 1px solid var(--tag-ad-border);
  border-left: 3px solid var(--tag-ad-gold);
  padding: 20px 22px 18px;
}

.tag-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.tag-ad-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  align-items: start;
  margin: 0 0 12px;
}

.tag-ad-row:last-child {
  margin-bottom: 0;
}

.tag-ad-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tag-ad-heading);
  padding-top: 3px;
}

.tag-ad-value {
  font-size: 14px;
  color: var(--tag-ad-text);
}

body.single-agent .tag-ad .tag-ad-value a.tag-ad-plain {
  color: var(--tag-ad-text);
  text-decoration: none;
}

body.single-agent .tag-ad .tag-ad-value a.tag-ad-plain:hover,
body.single-agent .tag-ad .tag-ad-value a.tag-ad-plain:focus {
  color: var(--tag-ad-orange);
  text-decoration: underline;
}

.tag-ad-address {
  margin: 0;
  font-style: normal;
  line-height: 1.55;
}

body.single-agent .tag-ad a.tag-ad-directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tag-ad-orange);
  text-decoration: none;
}

body.single-agent .tag-ad a.tag-ad-directions:hover,
body.single-agent .tag-ad a.tag-ad-directions:focus {
  color: var(--tag-ad-orange-hover);
  text-decoration: underline;
}

.tag-ad-directions .tag-ad-pin {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

body.single-agent .tag-ad a.tag-ad-btn {
  display: inline-block;
  background: var(--tag-ad-orange);
  border: 2px solid var(--tag-ad-orange);
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 16px;
  line-height: 1.2;
  border-radius: 3px;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body.single-agent .tag-ad a.tag-ad-btn:hover,
body.single-agent .tag-ad a.tag-ad-btn:focus {
  background: var(--tag-ad-orange-hover);
  border-color: var(--tag-ad-orange-hover);
  color: #fff;
}

body.single-agent .tag-ad a.tag-ad-btn-outline {
  background: transparent;
  color: var(--tag-ad-orange);
  border-color: var(--tag-ad-orange);
}

body.single-agent .tag-ad a.tag-ad-btn-outline:hover,
body.single-agent .tag-ad a.tag-ad-btn-outline:focus {
  background: var(--tag-ad-orange);
  border-color: var(--tag-ad-orange);
  color: #fff;
}

.tag-ad-social {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tag-ad-social li {
  margin: 0 0 4px;
}

.tag-ad-also-at {
  margin: 0 0 32px;
  font-size: 13px;
  color: #8a8a8a;
  line-height: 1.5;
}

body.single-agent .tag-ad .tag-ad-also-at a {
  color: #6a6a6a;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
}

body.single-agent .tag-ad .tag-ad-also-at a:hover,
body.single-agent .tag-ad .tag-ad-also-at a:focus {
  color: var(--tag-ad-orange);
  border-color: var(--tag-ad-orange);
}

.tag-ad-about {
  margin: 0 0 36px;
}

.tag-ad-about h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--tag-ad-heading);
  line-height: 1.3;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}

.tag-ad-bio > *:first-child {
  margin-top: 0;
}

.tag-ad-bio > *:last-child {
  margin-bottom: 0;
}

body.single-agent .tag-ad a.tag-ad-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tag-ad-gold-dark);
  text-decoration: none;
}

body.single-agent .tag-ad a.tag-ad-back:hover,
body.single-agent .tag-ad a.tag-ad-back:focus {
  color: var(--tag-ad-orange);
  text-decoration: underline;
}

.tag-ad-editor-content {
  margin: 36px 0 0;
}

@media (max-width: 989px) {
  .tag-ad-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tag-ad-photo-frame {
    width: 200px;
  }

  .tag-ad-name {
    font-size: 26px;
  }
}

@media (max-width: 639px) {
  .tag-ad-photo-frame {
    width: 160px;
  }

  .tag-ad-name {
    font-size: 24px;
  }

  .tag-ad-row {
    grid-template-columns: 1fr;
    gap: 2px;
    margin-bottom: 14px;
  }
}


/* ---------- State pages and hub ----------
   Enfold's body element IS #top, so selectors use #top.tax-agent_state
   and #top.tag-ad-hub (not body.tax-agent_state #top). */

#top.tax-agent_state h1.post-title.entry-title,
#top.tax-agent_state .big-preview,
#top.tax-agent_state .blog-meta,
#top.tax-agent_state .post_author_timeline,
#top.tax-agent_state .avia-post-nav,
#top.tax-agent_state .related_posts,
#top.tax-agent_state .pagination,
#top.tax-agent_state .pagination-wrapper,
#top.tax-agent_state .pagenavi,
#top.tax-agent_state .sidebar,
#top.tag-ad-hub h1.post-title.entry-title,
#top.tag-ad-hub .big-preview,
#top.tag-ad-hub .blog-meta,
#top.tag-ad-hub .pagination,
#top.tag-ad-hub .pagination-wrapper,
#top.tag-ad-hub .pagenavi,
#top.tag-ad-hub .sidebar,
#top.tag-ad-directory .sidebar {
  display: none !important;
}

#top.tax-agent_state .content.av-content-small,
#top.tax-agent_state .content,
#top.tag-ad-hub .content.av-content-small,
#top.tag-ad-hub .content {
  width: 100%;
  margin: 0;
  border: none !important;
}

#top.tax-agent_state .fullsize .template-blog .post .entry-content-wrapper,
#top.tax-agent_state .fullsize .template-blog .post .entry-content-wrapper > *,
#top.tax-agent_state .entry-content-wrapper,
#top.tax-agent_state .entry-content-wrapper > *,
#top.tag-ad-hub .fullsize .template-blog .post .entry-content-wrapper,
#top.tag-ad-hub .fullsize .template-blog .post .entry-content-wrapper > *,
#top.tag-ad-hub .entry-content-wrapper,
#top.tag-ad-hub .entry-content-wrapper > * {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.tag-ad-state,
.tag-ad-hub-page {
  margin: 8px 0 24px;
}

.tag-ad-state-title,
.tag-ad-hub-title {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  color: #222;
}

.tag-ad-state-intro,
.tag-ad-hub-intro {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--tag-ad-text);
  max-width: 46em;
}

.tag-ad-state-intro p,
.tag-ad-term-description > p {
  margin: 0 0 0.6em;
}

.tag-ad-state-intro p:last-child,
.tag-ad-term-description > p:last-child {
  margin-bottom: 0;
}

.tag-ad-city-nav {
  margin: 0 0 36px;
  padding: 16px 18px;
  background: var(--tag-ad-bg2);
  border: 1px solid var(--tag-ad-border);
  border-left: 3px solid var(--tag-ad-gold);
}

.tag-ad-city-nav-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tag-ad-heading);
}

.tag-ad-city-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#top.tax-agent_state .tag-ad-city-nav-list a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--tag-ad-text);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
}

#top.tax-agent_state .tag-ad-city-nav-list a:hover,
#top.tax-agent_state .tag-ad-city-nav-list a:focus {
  color: var(--tag-ad-orange);
  border-color: #e6cbb8;
  background: #fff;
}

.tag-ad-city-nav-list .tag-ad-count,
.tag-ad-city-group h2 .tag-ad-count {
  color: #888;
  font-weight: 400;
}

.tag-ad-city-group {
  margin: 0 0 32px;
  scroll-margin-top: 16px;
}

.tag-ad-city-group h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--tag-ad-heading);
  line-height: 1.3;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}

.tag-ad-city-group h2 .tag-ad-count {
  font-size: 15px;
}

.tag-ad-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tag-ad-agent-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--tag-ad-border);
  background: #fff;
}

.tag-ad-agent-card-photo {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #d6d6d6;
  background: var(--tag-ad-gold-soft);
}

.tag-ad-agent-card-photo img,
.tag-ad-agent-card-photo .tag-ad-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tag-ad-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  background: linear-gradient(180deg, #f8f5ec 0%, #efe8d4 100%);
  box-sizing: border-box;
}

.tag-ad-card-fallback img {
  width: 64px;
  height: auto;
  object-fit: contain;
}

.tag-ad-agent-card-name {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #222;
}


/* Base card/hub styles (work without Enfold's body#top). The #top rules
   below raise specificity so Enfold's .main_color a does not turn links black. */
.tag-ad a.tag-ad-btn-profile {
  display: inline-block;
  background: var(--tag-ad-orange);
  border: 2px solid var(--tag-ad-orange);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  line-height: 1.2;
  border-radius: 3px;
}
.tag-ad a.tag-ad-btn-profile:hover,
.tag-ad a.tag-ad-btn-profile:focus {
  background: var(--tag-ad-orange-hover);
  border-color: var(--tag-ad-orange-hover);
  color: #fff;
}
.tag-ad-agent-card-name a {
  color: #222;
  text-decoration: none;
}
.tag-ad-agent-card-phone a {
  color: var(--tag-ad-text);
  text-decoration: none;
  font-weight: 600;
}
a.tag-ad-state-tile {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--tag-ad-border);
  border-left: 3px solid var(--tag-ad-gold);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
a.tag-ad-state-tile:hover,
a.tag-ad-state-tile:focus {
  border-color: var(--tag-ad-orange);
  border-left-color: var(--tag-ad-orange);
  color: inherit;
}
a.tag-ad-state-tile:hover .tag-ad-state-name,
a.tag-ad-state-tile:focus .tag-ad-state-name {
  color: var(--tag-ad-orange);
}
.tag-ad a.tag-ad-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tag-ad-gold-dark);
  text-decoration: none;
}
.tag-ad a.tag-ad-back:hover,
.tag-ad a.tag-ad-back:focus {
  color: var(--tag-ad-orange);
  text-decoration: underline;
}

#top.tax-agent_state .tag-ad-agent-card-name a {
  color: #222;
  text-decoration: none;
}

#top.tax-agent_state .tag-ad-agent-card-name a:hover,
#top.tax-agent_state .tag-ad-agent-card-name a:focus {
  color: var(--tag-ad-orange);
}

.tag-ad-agent-card-agency,
.tag-ad-agent-card-city {
  margin: 0;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.tag-ad-agent-card-phone {
  margin: 6px 0 8px;
  font-size: 14px;
}

#top.tax-agent_state .tag-ad-agent-card-phone a {
  color: var(--tag-ad-text);
  text-decoration: none;
  font-weight: 600;
}

#top.tax-agent_state .tag-ad-agent-card-phone a:hover,
#top.tax-agent_state .tag-ad-agent-card-phone a:focus {
  color: var(--tag-ad-orange);
  text-decoration: underline;
}

#top.tax-agent_state .tag-ad a.tag-ad-btn-profile,
#top.tag-ad-hub .tag-ad a.tag-ad-btn-profile {
  display: inline-block;
  background: var(--tag-ad-orange);
  border: 2px solid var(--tag-ad-orange);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  line-height: 1.2;
  border-radius: 3px;
}

#top.tax-agent_state .tag-ad a.tag-ad-btn-profile:hover,
#top.tax-agent_state .tag-ad a.tag-ad-btn-profile:focus,
#top.tag-ad-hub .tag-ad a.tag-ad-btn-profile:hover,
#top.tag-ad-hub .tag-ad a.tag-ad-btn-profile:focus {
  background: var(--tag-ad-orange-hover);
  border-color: var(--tag-ad-orange-hover);
  color: #fff;
}

#top.tax-agent_state .tag-ad a.tag-ad-back,
#top.tag-ad-hub .tag-ad a.tag-ad-back,
#top.single-agent .tag-ad a.tag-ad-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tag-ad-gold-dark);
  text-decoration: none;
}

#top.tax-agent_state .tag-ad a.tag-ad-back:hover,
#top.tax-agent_state .tag-ad a.tag-ad-back:focus,
#top.tag-ad-hub .tag-ad a.tag-ad-back:hover,
#top.single-agent .tag-ad a.tag-ad-back:hover {
  color: var(--tag-ad-orange);
  text-decoration: underline;
}

.tag-ad-state-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

#top.tag-ad-hub a.tag-ad-state-tile {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--tag-ad-border);
  border-left: 3px solid var(--tag-ad-gold);
  background: #fff;
  text-decoration: none;
  color: inherit;
}

#top.tag-ad-hub a.tag-ad-state-tile:hover,
#top.tag-ad-hub a.tag-ad-state-tile:focus {
  border-color: var(--tag-ad-orange);
  border-left-color: var(--tag-ad-orange);
  color: inherit;
}

.tag-ad-state-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

#top.tag-ad-hub a.tag-ad-state-tile:hover .tag-ad-state-name,
#top.tag-ad-hub a.tag-ad-state-tile:focus .tag-ad-state-name {
  color: var(--tag-ad-orange);
}

.tag-ad-state-count {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--tag-ad-heading);
}

@media (max-width: 989px) {
  .tag-ad-state-title,
  .tag-ad-hub-title {
    font-size: 26px;
  }

  .tag-ad-card-grid,
  .tag-ad-state-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .tag-ad-state-title,
  .tag-ad-hub-title {
    font-size: 24px;
  }
}


/*
  0.2.1 Enfold typography, list, and border overrides.

  Our plugin stylesheet loads before Enfold's dynamic merged CSS, so
  equal-specificity rules lose. These selectors are deliberately heavier.

  Causes on the live site:
  - .template-page .entry-content-wrapper h1,h2 { text-transform: uppercase }
  - #top #wrap_all .main_color h2 { color: #000 }
  - .entry-content-wrapper ul { list-style: disc outside }
  - .main_color article, .main_color div, .main_color nav
      { border-color: var(--enfold-main-color-border) } // #5e5d5e
*/
#top.tax-agent_state #wrap_all .main_color h1.tag-ad-state-title,
#top.tag-ad-hub #wrap_all .main_color h1.tag-ad-hub-title,
#top.tax-agent_state #wrap_all .template-page .entry-content-wrapper h1.tag-ad-state-title,
#top.tag-ad-hub #wrap_all .template-page .entry-content-wrapper h1.tag-ad-hub-title {
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  color: #222;
  margin: 0 0 10px;
}

#top.tax-agent_state #wrap_all .main_color .tag-ad-city-group h2,
#top.tax-agent_state #wrap_all .template-page .entry-content-wrapper .tag-ad-city-group h2 {
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  color: #666666;
  line-height: 1.3;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  border-color: #e5e5e5;
}

#top.tax-agent_state #wrap_all .entry-content-wrapper ul.tag-ad-city-nav-list,
#top.tax-agent_state #wrap_all .main_color ul.tag-ad-city-nav-list,
#top.tax-agent_state .entry-content-wrapper ul.tag-ad-city-nav-list {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
}

#top.tax-agent_state #wrap_all .entry-content-wrapper ul.tag-ad-city-nav-list > li,
#top.tax-agent_state #wrap_all .main_color ul.tag-ad-city-nav-list > li,
#top.tax-agent_state .entry-content-wrapper ul.tag-ad-city-nav-list > li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#top.tax-agent_state #wrap_all .main_color article.tag-ad-agent-card,
#top.tax-agent_state #wrap_all .main_color .tag-ad-agent-card {
  border: 1px solid #e1e1e1;
  border-color: #e1e1e1;
  box-shadow: none;
  background: #fff;
}

#top.tax-agent_state #wrap_all .main_color nav.tag-ad-city-nav,
#top.tax-agent_state #wrap_all .main_color .tag-ad-city-nav {
  border-style: solid;
  border-width: 1px 1px 1px 3px;
  border-color: #e1e1e1 #e1e1e1 #e1e1e1 #998f61;
  background: #f5f5f5;
}

#top.tag-ad-hub #wrap_all .main_color a.tag-ad-state-tile,
#top.tag-ad-hub #wrap_all a.tag-ad-state-tile {
  border-style: solid;
  border-width: 1px 1px 1px 3px;
  border-color: #e1e1e1 #e1e1e1 #e1e1e1 #998f61;
  background: #fff;
  text-decoration: none;
}

#top.tax-agent_state #wrap_all .main_color .tag-ad a.tag-ad-back,
#top.tag-ad-hub #wrap_all .main_color .tag-ad a.tag-ad-back,
#top.tax-agent_state #wrap_all .main_color a.tag-ad-back {
  color: #706845;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

#top.tax-agent_state #wrap_all .main_color .tag-ad a.tag-ad-back:hover,
#top.tax-agent_state #wrap_all .main_color .tag-ad a.tag-ad-back:focus,
#top.tag-ad-hub #wrap_all .main_color .tag-ad a.tag-ad-back:hover,
#top.tag-ad-hub #wrap_all .main_color .tag-ad a.tag-ad-back:focus {
  color: #d56931;
  text-decoration: underline;
}

@media (max-width: 989px) {
  #top.tax-agent_state #wrap_all .main_color h1.tag-ad-state-title,
  #top.tag-ad-hub #wrap_all .main_color h1.tag-ad-hub-title {
    font-size: 26px;
  }
}

@media (max-width: 639px) {
  #top.tax-agent_state #wrap_all .main_color h1.tag-ad-state-title,
  #top.tag-ad-hub #wrap_all .main_color h1.tag-ad-hub-title {
    font-size: 24px;
  }
}

/*
  Enfold gives every .container_wrap a 1px solid top border. On agent
  pages that line sits directly under the "More agents" link, at the top
  of the footer. The leftover blog .post_delimiter can add a second
  hairline. Remove both on agent pages only.
*/
#top.single-agent #wrap_all #footer.container_wrap,
#top.single-agent #wrap_all .container_wrap.footer_color {
  border-top-width: 0;
  border-top-style: none;
}

#top.single-agent #main .post_delimiter,
#top.single-agent .post_delimiter {
  border-bottom-width: 0;
  border-bottom-style: none;
  margin: 0;
  padding: 0;
  height: 0;
}

/* ---------- 0.2.9 All agents page (/agents/all/) ----------
   Matches the approved all-agents mockup. Every rule is scoped to
   #top.tag-ad-all #wrap_all so Enfold's merged CSS (uppercase headings,
   list bullets, form fields, dark .main_color borders) cannot win. */

#top.tag-ad-all h1.post-title.entry-title,
#top.tag-ad-all .big-preview,
#top.tag-ad-all .blog-meta,
#top.tag-ad-all .avia-post-nav,
#top.tag-ad-all .pagination,
#top.tag-ad-all .pagination-wrapper,
#top.tag-ad-all .pagenavi,
#top.tag-ad-all .sidebar {
  display: none !important;
}

#top.tag-ad-all .content.av-content-small,
#top.tag-ad-all .content {
  width: 100%;
  margin: 0;
  border: none !important;
}

#top.tag-ad-all .entry-content-wrapper,
#top.tag-ad-all .entry-content-wrapper > * {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

/* position: sticky does not work inside an overflow: hidden ancestor, and
   Enfold sets #wrap_all { overflow: hidden }. On this page only, use
   overflow: clip (still clips sideways overflow, but is not a scroll
   container). Browsers without clip fall back to visible. */
#top.tag-ad-all #wrap_all {
  overflow: visible;
  overflow: clip;
}

/* 0.2.10: Enfold's "html.responsive, .responsive body" rule (overflow-x: hidden)
   turns <body> into a scroll container (the other axis computes to auto).
   Because <html> also has overflow-x: hidden, body's overflow is not
   propagated to the viewport, so the sticky panel was bound to <body>,
   which never scrolls (the viewport does), and it never pinned. On this
   page only, make body clip instead (not a scroll container). Sideways
   overflow is still clipped by html (viewport) and #wrap_all. */
html.responsive body#top.tag-ad-all,
body#top.tag-ad-all {
  overflow: visible;
  overflow-x: clip;
  overflow-y: visible;
}

#top.tag-ad-all #wrap_all #main .container_wrap,
#top.tag-ad-all #wrap_all #main .container,
#top.tag-ad-all #wrap_all #main main.content,
#top.tag-ad-all #wrap_all #main .entry-content-wrapper {
  overflow: visible;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page [hidden] {
  display: none !important;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page {
  margin: 8px 0 24px;
  padding: 0;
}

#top.tag-ad-all #wrap_all .main_color h1.tag-ad-all-title,
#top.tag-ad-all #wrap_all .template-page .entry-content-wrapper h1.tag-ad-all-title,
#top.tag-ad-all #wrap_all h1.tag-ad-all-title {
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  color: #222;
  margin: 0 0 10px;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-all-intro {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #292929;
  max-width: 46em;
}

/* Search panel (sticky; JS keeps it below Enfold's fixed header). */
#top.tag-ad-all #wrap_all .main_color .tag-ad-search-panel,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 28px;
  padding: 18px;
  background: #f5f5f5;
  border-style: solid;
  border-width: 1px 1px 1px 3px;
  border-color: #d8d8d4 #d8d8d4 #d8d8d4 #998f61;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

#top.tag-ad-all #wrap_all .tag-ad-all-page form.tag-ad-search-form {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page label.tag-ad-search-label {
  display: block;
  margin: 0 0 8px;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666666;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field svg.tag-ad-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #706845;
  pointer-events: none;
}

#top.tag-ad-all #wrap_all .main_color .tag-ad-search-field input[type="search"],
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field input[type="search"] {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #292929;
  background: #fff;
  border: 1px solid #d8d8d4;
  border-radius: 3px;
  box-shadow: none;
  padding: 12px 44px 12px 42px;
  -webkit-appearance: none;
  appearance: none;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field input[type="search"]::-webkit-search-decoration,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field input[type="search"]::placeholder {
  color: #888;
  opacity: 1;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-field input[type="search"]:focus {
  outline: 2px solid #998f61;
  outline-offset: 1px;
  border-color: #998f61;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page button.tag-ad-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #666;
  font-family: inherit;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  border-radius: 3px;
  padding: 0;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page button.tag-ad-search-clear:hover,
#top.tag-ad-all #wrap_all .tag-ad-all-page button.tag-ad-search-clear:focus {
  color: #d56931;
  background: transparent;
  outline: none;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page button.tag-ad-search-clear:focus-visible {
  outline: 2px solid #998f61;
  outline-offset: 1px;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-result-count {
  margin: 10px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #666666;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-noscript-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: #706845;
}

/* A-Z jump links */
#top.tag-ad-all #wrap_all .main_color nav.tag-ad-letter-nav,
#top.tag-ad-all #wrap_all .tag-ad-all-page nav.tag-ad-letter-nav {
  margin: 0 0 36px;
  padding: 16px 18px;
  background: #f5f5f5;
  border-style: solid;
  border-width: 1px 1px 1px 3px;
  border-color: #d8d8d4 #d8d8d4 #d8d8d4 #998f61;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-label {
  margin: 0 0 10px;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666666;
}

#top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-letter-nav-list,
#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-letter-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-letter-nav-list > li,
#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-letter-nav-list > li {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list a,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 30px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #292929;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list a:hover,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list a:focus {
  color: #d56931;
  border-color: #e6cbb8;
  background: #fff;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list .is-empty,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-nav-list a.is-empty {
  color: #bbb;
  font-weight: 400;
  pointer-events: none;
}

/* List */
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-list-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(200px, 1.45fr) 140px;
  gap: 8px 16px;
  padding: 0 16px 8px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666666;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page section.tag-ad-letter-group {
  margin: 0 0 32px;
  padding: 0;
  border: 0;
  scroll-margin-top: var(--tag-ad-sticky-offset, 96px);
}

#top.tag-ad-all #wrap_all .main_color .tag-ad-letter-group h2,
#top.tag-ad-all #wrap_all .template-page .entry-content-wrapper .tag-ad-letter-group h2,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-group h2 {
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: #666666;
  line-height: 1.3;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  border-color: #e5e5e5;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-group h2 .tag-ad-count {
  font-weight: 400;
  font-size: 15px;
  color: #888;
}

#top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-agent-rows,
#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-agent-rows {
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 0;
  border: 1px solid #d8d8d4;
  border-color: #d8d8d4;
}

#top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-agent-rows > li.tag-ad-agent-row,
#top.tag-ad-all #wrap_all .tag-ad-all-page li.tag-ad-agent-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(200px, 1.45fr) 140px;
  gap: 4px 16px;
  align-items: baseline;
  list-style: none;
  list-style-type: none;
  margin: 0;
  padding: 11px 16px;
  border: 0;
  border-bottom: 1px solid #d8d8d4;
}

/* Zebra rows. These selectors are heavier than the row layout rule above. */
#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-agent-rows > li.tag-ad-agent-row {
  background: #fff;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-agent-rows > li.tag-ad-agent-row:nth-child(even),
#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-agent-rows > li.tag-ad-agent-row.is-even {
  background: #f5f5f5;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-group.is-filtered ul.tag-ad-agent-rows > li.tag-ad-agent-row {
  background: #fff;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-letter-group.is-filtered ul.tag-ad-agent-rows > li.tag-ad-agent-row.is-even {
  background: #f5f5f5;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page ul.tag-ad-agent-rows > li.tag-ad-agent-row:last-child {
  border-bottom: 0;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-row-name {
  font-weight: 600;
  font-size: 15px;
  color: #222;
  text-decoration: none;
  line-height: 1.35;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-row-name:hover,
#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-row-name:focus {
  color: #d56931;
  text-decoration: underline;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-row-agency,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-row-place {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

/* No results */
#top.tag-ad-all #wrap_all .main_color .tag-ad-no-results,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-no-results {
  margin: 0 0 36px;
  padding: 28px 20px;
  text-align: center;
  background: #f7f4ea;
  border: 1px solid #cfc4a0;
  border-color: #cfc4a0;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-no-results p {
  margin: 0;
  font-size: 16px;
  color: #3a3628;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-no-results a {
  color: #d56931;
  font-weight: 600;
  text-decoration: none;
}

#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-no-results a:hover,
#top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-no-results a:focus {
  color: #d64b06;
  text-decoration: underline;
}

/* Back link */
#top.tag-ad-all #wrap_all .main_color .tag-ad a.tag-ad-back,
#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #706845;
  text-decoration: none;
}

#top.tag-ad-all #wrap_all .main_color .tag-ad a.tag-ad-back:hover,
#top.tag-ad-all #wrap_all .main_color .tag-ad a.tag-ad-back:focus,
#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-back:hover,
#top.tag-ad-all #wrap_all .tag-ad-all-page a.tag-ad-back:focus {
  color: #d56931;
  text-decoration: underline;
}

@media (max-width: 989px) {
  #top.tag-ad-all #wrap_all .main_color h1.tag-ad-all-title,
  #top.tag-ad-all #wrap_all h1.tag-ad-all-title {
    font-size: 26px;
  }

  #top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-list-head,
  #top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-agent-rows > li.tag-ad-agent-row,
  #top.tag-ad-all #wrap_all .tag-ad-all-page li.tag-ad-agent-row {
    grid-template-columns: minmax(140px, 1.1fr) minmax(140px, 1.3fr) 110px;
  }
}

@media (max-width: 639px) {
  #top.tag-ad-all #wrap_all .tag-ad-all-page {
    margin-top: 0;
  }

  #top.tag-ad-all #wrap_all .main_color h1.tag-ad-all-title,
  #top.tag-ad-all #wrap_all h1.tag-ad-all-title {
    font-size: 24px;
  }

  #top.tag-ad-all #wrap_all .main_color .tag-ad-search-panel,
  #top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-search-panel {
    padding: 14px;
  }

  #top.tag-ad-all #wrap_all .tag-ad-all-page .tag-ad-list-head {
    display: none;
  }

  #top.tag-ad-all #wrap_all .entry-content-wrapper ul.tag-ad-agent-rows > li.tag-ad-agent-row,
  #top.tag-ad-all #wrap_all .tag-ad-all-page li.tag-ad-agent-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 14px;
  }

  #top.tag-ad-all #wrap_all .tag-ad-all-page section.tag-ad-letter-group {
    scroll-margin-top: var(--tag-ad-sticky-offset, 108px);
  }
}

/* ---------- 0.2.9 Hub: "Search all agents by name" link ---------- */
#top.tag-ad-hub #wrap_all .tag-ad-hub-page .tag-ad-hub-header .tag-ad-hub-intro {
  margin-bottom: 12px;
}

#top.tag-ad-hub #wrap_all .tag-ad-hub-page p.tag-ad-hub-search-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  font-size: 16px;
}

#top.tag-ad-hub #wrap_all .tag-ad-hub-page .tag-ad-hub-search-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d56931;
  font-weight: 600;
  text-decoration: none;
}

#top.tag-ad-hub #wrap_all .tag-ad-hub-page .tag-ad-hub-search-cta a:hover,
#top.tag-ad-hub #wrap_all .tag-ad-hub-page .tag-ad-hub-search-cta a:focus {
  color: #d64b06;
  text-decoration: underline;
}

#top.tag-ad-hub #wrap_all .tag-ad-hub-page .tag-ad-hub-search-cta a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
