/* Step41: City directory structure: section -> letter -> category -> cards */
.directory-hero h1 {
    letter-spacing: -0.025em;
}

.directory-section-picker,
.directory-navigation-panel,
.directory-help-note,
.directory-results-head {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}

.directory-section-picker {
    padding: 20px;
}

.directory-section-picker__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.directory-section-picker__head h2,
.directory-navigation-panel h2,
.directory-help-note h2,
.directory-results-head h2 {
    margin: 0;
    color: #111827;
    font-size: 1.45rem;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.directory-section-picker__head p,
.directory-navigation-panel p,
.directory-help-note p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.directory-section-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.directory-section-card {
    min-height: 142px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fafafa);
    text-decoration: none;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.directory-section-card:hover {
    transform: translateY(-2px);
    border-color: rgba(185, 28, 28, .22);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    text-decoration: none;
}

.directory-section-card.is-active {
    border-color: rgba(185, 28, 28, .30);
    background: linear-gradient(180deg, #fff8f8, #fff);
}

.directory-section-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.directory-section-card strong {
    font-size: 1rem;
    line-height: 1.18;
    letter-spacing: -.01em;
}

.directory-section-card em {
    color: #64748b;
    font-size: .86rem;
    line-height: 1.35;
    font-style: normal;
    flex: 1;
}

.directory-section-card small {
    margin-top: auto;
    color: #991b1b;
    font-size: .78rem;
    font-weight: 650;
}

.directory-navigation-panel {
    padding: 18px;
}

.directory-navigation-panel__title {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.directory-navigation-panel__title > span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex: 0 0 auto;
}

.directory-navigation-panel .catalog-alphabet-box {
    margin: 0;
    box-shadow: none;
    border-radius: 18px;
}

.directory-help-note,
.directory-results-head {
    padding: 18px 20px;
}

.directory-help-note strong {
    color: #991b1b;
}

.catalog-card__top span {
    font-weight: 500;
}

@media (max-width: 1100px) {
    .directory-section-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .directory-section-picker,
    .directory-navigation-panel,
    .directory-help-note,
    .directory-results-head {
        border-radius: 18px;
    }

    .directory-section-picker__head {
        display: block;
    }

    .directory-section-picker__head h2 {
        margin-bottom: 7px;
    }

    .directory-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .directory-section-card {
        min-height: 132px;
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .directory-section-grid {
        grid-template-columns: 1fr;
    }

    .directory-section-card {
        min-height: 0;
    }
}

/* Step 42: automatic table of contents for long catalog descriptions */
html {
    scroll-behavior: smooth;
}

.catalog-auto-toc,
.auto-toc {
    margin: 0 0 22px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.auto-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    color: #0f172a;
}

.auto-toc summary::-webkit-details-marker {
    display: none;
}

.auto-toc__title {
    font-size: 1.02rem;
}

.auto-toc__chevron {
    font-size: 0.86rem;
    transition: transform 0.18s ease;
}

.auto-toc[open] .auto-toc__chevron {
    transform: rotate(180deg);
}

.auto-toc__list {
    margin: 0;
    padding: 0 18px 16px 40px;
}

.auto-toc__list li {
    margin: 7px 0;
    padding-left: 2px;
}

.auto-toc__list a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 650;
}

.auto-toc__list a:hover {
    text-decoration: underline;
}

.catalog-rich-content h2[id],
.catalog-rich-content h3[id] {
    scroll-margin-top: 90px;
}

/* Step 43: page-level catalog contents with service anchors */
.catalog-page-toc {
    margin-bottom: 18px;
}

#catalog-description,
#catalog-gallery,
#catalog-map,
#catalog-contacts,
.catalog-rich-content h2[id],
.catalog-rich-content h3[id] {
    scroll-margin-top: 96px;
}

.catalog-page-toc .auto-toc__list a {
    display: inline-block;
    padding: 2px 0;
}

/* Step 44: alphabet-first catalog landing */
.directory-alpha-panel,
.directory-section-strip {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .045);
}

.directory-alpha-panel {
    padding: 20px;
}

.directory-alpha-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.directory-alpha-panel__head .directory-kicker {
    margin: 0 0 6px;
    color: #991b1b;
    font-size: .82rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.directory-alpha-panel__head h2 {
    margin: 0;
    color: #111827;
    font-size: 1.75rem;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.directory-alpha-panel__head > span {
    flex: 0 0 auto;
    color: #64748b;
    font-weight: 750;
}

.catalog-alphabet-box--primary {
    margin: 0;
    box-shadow: none;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fbfbfb);
}

.catalog-letter-categories--directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.catalog-letter-categories--directory .catalog-letter-category {
    justify-content: space-between;
    min-height: 48px;
    border-radius: 15px;
    padding: 10px 12px;
}

.catalog-letter-categories--directory .catalog-letter-category span {
    font-weight: 750;
}

.catalog-letter-categories--directory .catalog-letter-category em {
    margin-left: auto;
    color: #64748b;
    font-size: .78rem;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-letter-categories--directory .catalog-letter-category small {
    min-width: 0;
    height: auto;
    padding: 0;
    background: transparent;
    color: #991b1b;
    font-size: .9rem;
}

.catalog-letter-categories--directory .catalog-letter-category.is-empty {
    color: #64748b;
    background: #f8fafc;
}

.catalog-letter-categories--directory .catalog-letter-category.is-empty small {
    color: #94a3b8;
}

.directory-section-strip {
    padding: 16px 18px;
}

.directory-section-strip__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.directory-section-strip__title strong {
    color: #111827;
    font-size: 1.05rem;
}

.directory-section-strip__title span {
    color: #64748b;
    font-size: .9rem;
}

.directory-section-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.directory-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: .88rem;
    font-weight: 750;
    text-decoration: none;
}

.directory-section-chip:hover,
.directory-section-chip.is-active {
    border-color: rgba(185, 28, 28, .30);
    background: #fff7f7;
    color: #991b1b;
    text-decoration: none;
}

.directory-section-chip small {
    color: inherit;
    opacity: .72;
}

@media (max-width: 760px) {
    .directory-alpha-panel,
    .directory-section-strip {
        border-radius: 18px;
        padding: 16px;
    }

    .directory-alpha-panel__head {
        display: block;
    }

    .directory-alpha-panel__head h2 {
        font-size: 1.55rem;
        margin-bottom: 5px;
    }

    .catalog-letter-categories--directory {
        grid-template-columns: 1fr;
    }

    .catalog-letter-categories--directory .catalog-letter-category em {
        display: none;
    }

    .directory-section-strip__title {
        display: block;
    }

    .directory-section-strip__title span {
        display: block;
        margin-top: 4px;
    }
}

/* Step 45: cleaner catalog landing, text letters, catalog lightbox polish */
.directory-hero--compact {
    padding: 18px 22px;
}

.directory-hero--compact .directory-kicker {
    margin: 0;
}

.catalog-alphabet-box--primary {
    padding: 14px 16px;
}

.catalog-alphabet-box--primary .catalog-alphabet {
    gap: 14px 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.catalog-alphabet-box--primary .catalog-alphabet__letter {
    min-width: 0;
    height: auto;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #475569;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: none;
}

.catalog-alphabet-box--primary .catalog-alphabet__letter:hover {
    transform: none;
    background: transparent;
    color: #b91c1c;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.catalog-alphabet-box--primary .catalog-alphabet__letter.is-active {
    color: #b91c1c;
    background: transparent;
    border: 0;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

.catalog-rich-content h3::before {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #b91c1c, #f59e0b);
}

.catalog-detail__image.js-lightbox-image,
.catalog-detail__gallery .js-lightbox-image {
    cursor: zoom-in;
}

/* Step 46: cleaner universal content navigation, heading lines and embeds */
.auto-toc__list {
    padding: 0 18px 18px;
    list-style: none;
    counter-reset: toc;
}
.auto-toc__list li {
    counter-increment: toc;
    margin: 8px 0;
    padding: 0;
}
.auto-toc__list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 750;
    background: rgba(248, 250, 252, .72);
    border: 1px solid transparent;
}
.auto-toc__list a::before {
    content: counter(toc, decimal-leading-zero);
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: .78em;
    font-weight: 800;
    letter-spacing: .06em;
}
.auto-toc__list a:hover {
    color: #0f172a;
    text-decoration: none;
    border-color: rgba(37, 99, 235, .18);
    background: rgba(239, 246, 255, .88);
}

.catalog-detail__kicker a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(148, 163, 184, .65);
}
.catalog-detail__kicker a:hover {
    color: #1d4ed8;
    border-bottom-color: currentColor;
}

.article-content h2::before,
.article-content h3::before,
.catalog-rich-content h2::before,
.catalog-rich-content h3::before,
.guide-content h2::before,
.guide-content h3::before,
.clean-article-content h2::before,
.clean-article-content h3::before {
    content: none !important;
    display: none !important;
}
.article-content h2,
.catalog-rich-content h2,
.guide-content h2,
.clean-article-content h2 {
    padding: 0 0 10px !important;
    border-bottom: 3px solid rgba(37, 99, 235, .28);
}
.article-content h3,
.catalog-rich-content h3,
.guide-content h3,
.clean-article-content h3 {
    padding: 0 0 8px !important;
    border-bottom: 2px solid rgba(185, 28, 28, .24);
}

.social-embed {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #f8fafc);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
.social-embed__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #0f172a;
}
.social-embed__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 900;
    font-size: .88rem;
}
.social-embed p {
    margin: 0 0 14px;
    color: #64748b;
    line-height: 1.55;
}
.social-embed__button,
.social-embed__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
}
.social-embed__frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 16px;
    background: #020617;
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
}
.social-embed__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Step 47: refined TOC navigation and heading underline style */
.auto-toc__list {
    margin: 0;
    padding: 0 18px 18px;
    list-style: none;
    counter-reset: toc;
}
.auto-toc__list li {
    counter-increment: toc;
    margin: 0;
    padding: 0;
}
.auto-toc__list li + li {
    border-top: 1px solid rgba(148, 163, 184, .16);
}
.auto-toc__list a,
.catalog-page-toc .auto-toc__list a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111827;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.auto-toc__list a::before {
    content: counter(toc, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
}
.auto-toc__list a:hover,
.auto-toc__list a:focus-visible {
    color: #991b1b;
    background: transparent;
    text-decoration: none;
    outline: none;
}
.auto-toc__list a:hover::before,
.auto-toc__list a:focus-visible::before {
    background: #fff1f2;
    color: #991b1b;
}
.auto-toc__list a:active {
    transform: translateY(1px);
}

.article-content h2,
.catalog-rich-content h2,
.guide-content h2,
.clean-article-content h2,
.article-content h3,
.catalog-rich-content h3,
.guide-content h3,
.clean-article-content h3 {
    position: relative;
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}
.article-content h2::before,
.article-content h3::before,
.catalog-rich-content h2::before,
.catalog-rich-content h3::before,
.guide-content h2::before,
.guide-content h3::before,
.clean-article-content h2::before,
.clean-article-content h3::before {
    content: none !important;
    display: none !important;
}
.article-content h2::after,
.catalog-rich-content h2::after,
.guide-content h2::after,
.clean-article-content h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #b91c1c, #f59e0b);
}
.article-content h3::after,
.catalog-rich-content h3::after,
.guide-content h3::after,
.clean-article-content h3::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #93c5fd);
}


/* Step 68: section-first directory navigation */
.directory-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: .92rem;
}
.directory-breadcrumbs a {
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid rgba(71,85,105,.24);
}
.directory-breadcrumbs a:hover {
    color: #991b1b;
    border-bottom-color: rgba(153,27,27,.45);
}
.directory-breadcrumbs strong { color: #111827; font-weight: 700; }
.directory-section-strip--first { margin-bottom: 18px; }
.directory-alpha-panel { margin-top: 0; }
.directory-section-strip__title strong { display: block; }
.catalog-letter-category.is-empty { opacity: .62; }
.catalog-letter-category.is-empty:hover { opacity: .82; }
@media (max-width: 760px) {
    .directory-breadcrumbs { font-size: .84rem; margin-bottom: 12px; }
}
