/*
Theme Name: 口腔前沿网主题
Theme URI: http://www.kqqy.com
Author: Your Name
Description: 专为口腔前沿网定制的现代响应式 WordPress 主题。
Version: 1.6
License: GNU General Public License v2 or later
Text Domain: kqqyw
*/

/* 把原 HTML 里的 :root { ... } 以及所有 CSS 粘贴到这里 */
  /* ================= 基础与配色变量 ================= */
        :root {
            --primary-red: #A81C22; /* 提取自LOGO的深红色 */
            --primary-hover: #8b171c;
            --text-dark: #1a1a1a;
            --text-gray: #555555;
            --bg-light: #F8F9FA;
            --border-color: #EAEAEA;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
            color: var(--text-dark);
            background-color: #FFFFFF;
            -webkit-font-smoothing: antialiased; /* 让PC端字体更平滑 */
        }
        a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
        a:hover { color: var(--primary-red); }

        /* 限制PC端最大内容宽度，提升大屏阅读体验 */
        .container {
            max-width: 1240px; 
        }

        /* ================= 导航栏 ================= */
        .navbar {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px); /* 果冻效果 */
            box-shadow: 0 4px 20px rgba(0,0,0,0.03);
            padding: 18px 0;
            transition: all 0.3s;
        }
        .navbar-brand {
            display: flex;
            align-items: center;
        }
        .navbar-brand img,
        .navbar-logo {
            width: auto;
            height: 48px;
            max-width: 220px;
            object-fit: contain;
            display: block;
        }
.navbar-brand-text {
    display: inline-block;
    color: var(--primary-red);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 48px;
}
.navbar-brand-text:hover {
    color: var(--primary-hover);
}
        .nav-link {
            font-weight: 400;
            font-size: 16px;
            color: var(--text-dark) !important;
            margin: 0 5px;
            position: relative;
            letter-spacing: 0.5px;
        }
        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -4px; left: 50%;
            width: 0; height: 2px;
            background: var(--primary-red);
            transition: all 0.3s;
            transform: translateX(-50%);
        }
        .nav-link:hover::after, .nav-link.active::after { width: 100%; }
        .nav-link:hover, .nav-link.active { color: var(--primary-red) !important; }
        .nav-search-nav {
            margin-left: 10px;
            padding-left: 12px;
            border-left: 1px solid var(--border-color);
        }
        .nav-search-link {
            display: inline-flex !important;
            align-items: center;
            gap: 6px;
        }
        .nav-search-icon {
            flex: 0 0 auto;
        }
        .nav-search-text {
            font-size: 15px;
        }

        /* ================= 英雄横幅 (针对PC端强化) ================= */
        .hero-section {
            background: url('assets/hero.jpg') center/cover no-repeat;
            position: relative;
            padding: 120px 0;
            min-height: 520px;
            display: flex;
            align-items: center;
        }
        /* 增加深色遮罩，保证白色文字清晰可见，同时呼应LOGO红 */
        .hero-section::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 45%, rgba(255,255,255,0) 100%);
        }
        .hero-content {
            position: relative;
            z-index: 2;
            max-width: 600px;
        }
        .hero-title { 
            font-size: 3.5rem; 
            font-weight: 800; 
            letter-spacing: 1px; 
            margin-bottom: 24px; 
            line-height: 1.2;
        }
        .hero-title span { color: var(--primary-red); }
        .hero-subtitle { 
            font-size: 1.25rem; 
            color: var(--text-gray); 
            margin-bottom: 40px; 
            line-height: 1.8;
        }
        .btn-primary-custom {
            background-color: var(--primary-red);
            color: white;
            border: none;
            padding: 14px 40px;
            font-size: 1.1rem;
            border-radius: 50px;
            font-weight: 600;
            box-shadow: 0 8px 25px rgba(168, 28, 34, 0.3);
            display: inline-block;
        }
        .btn-primary-custom:hover { 
            background-color: var(--primary-hover); 
            color: white; 
            transform: translateY(-3px);
            box-shadow: 0 12px 30px rgba(168, 28, 34, 0.4);
        }

        /* ================= 内容区块通用 ================= */
        .section-wrap { padding: 80px 0; }
        .bg-light-gray { background-color: var(--bg-light); }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 40px;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 15px;
        }
        .section-title {
            font-size: 2rem;
            font-weight: 800;
            margin: 0;
            display: flex;
            align-items: center;
        }
        .section-title::before {
            content: '';
            display: inline-block;
            width: 6px; height: 28px;
            background-color: var(--primary-red);
            border-radius: 4px;
            margin-right: 15px;
        }
        .view-more {
            font-size: 15px;
            color: var(--text-gray);
            font-weight: 500;
        }
        .view-more:hover { color: var(--primary-red); transform: translateX(5px); }

        /* ================= 文章卡片组件 (PC端高级感) ================= */
        .article-card {
            background: #fff;
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid transparent;
            box-shadow: 0 5px 20px rgba(0,0,0,0.03);
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .article-card:hover {
            box-shadow: 0 20px 40px rgba(0,0,0,0.08);
            transform: translateY(-8px);
            border-color: rgba(168,28,34,0.1);
        }
        .article-img-wrapper {
            overflow: hidden;
            position: relative;
            height: 220px;
        }
        .article-img {
            width: 100%; height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }
        .article-card:hover .article-img { transform: scale(1.05); }
        
        .article-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
        .tag {
            display: inline-block;
            font-size: 13px;
            padding: 5px 12px;
            border-radius: 6px;
            margin-bottom: 15px;
            font-weight: 600;
            width: fit-content;
        }
        .tag-professional { background: rgba(168, 28, 34, 0.1); color: var(--primary-red); }
        .tag-science { background: #E8F0FE; color: #1a73e8; }
        
        .article-title {
            font-size: 1.25rem;
            font-weight: 700;
            line-height: 1.5;
            margin-bottom: 15px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .article-excerpt {
            font-size: 0.95rem;
            color: var(--text-gray);
            line-height: 1.7;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 20px;
        }
        .article-meta {
            font-size: 0.85rem;
            color: #999;
            margin-top: auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 15px;
            border-top: 1px dashed var(--border-color);
        }

        /* ================= 图片画廊组件 (PC端瀑布流/网格) ================= */
        .gallery-item {
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            display: block;
            aspect-ratio: 1/1; /* PC端正方形更整齐 */
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        }
        .gallery-item img {
            width: 100%; height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }
        .gallery-item:hover img { transform: scale(1.08); }
        .gallery-overlay {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            padding: 30px 20px 20px;
            color: white;
            font-size: 1rem;
            font-weight: 500;
        }

        /* ================= 页脚 ================= */
        footer {
            background: #111;
            color: #888;
            padding: 60px 0 30px;
        }
        footer h5 { color: #fff; font-weight: 700; letter-spacing: 1px; margin-bottom: 20px;}
        footer p { line-height: 1.8; }
        footer a { color: #888; margin-left: 20px; }
        footer a:hover { color: var(--primary-red); }
        .footer-bottom {
            border-top: 1px solid #333;
            margin-top: 40px;
            padding-top: 20px;
            font-size: 0.9rem;
        }
/* 追加到你的 style.css 中优化分页样式 */
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    background: #fff;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
}

/* 单篇文章与图片相册 */
.single-page {
    padding: 36px 0 72px;
    background: #fff;
}
.single-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: #8a8a8a;
    font-size: 0.9rem;
    line-height: 1.6;
}
.single-breadcrumb a {
    color: #666;
}
.single-breadcrumb a:hover {
    color: var(--primary-red);
}
.single-breadcrumb span:last-child {
    color: #333;
}
.single-article {
    max-width: 980px;
    margin: 0 auto;
}
.single-header {
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
}
.single-category {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(168, 28, 34, 0.08);
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 600;
}
.single-title {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.35;
    font-weight: 800;
    color: var(--text-dark);
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #999;
    font-size: 0.9rem;
}
.single-featured {
    margin: 0 0 30px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--bg-light);
}
.single-featured-img,
.single-content img {
    display: block;
    max-width: 100%;
    height: auto;
}
.single-featured-img {
    width: 100%;
}
.single-content {
    color: #333;
    font-size: 1.06rem;
    line-height: 1.9;
    overflow-wrap: break-word;
}
.single-content > *:first-child {
    margin-top: 0;
}
.single-content p {
    margin-bottom: 1.1em;
}
.single-content a {
    color: var(--primary-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ks-photo-gallery,
.ks-photo-missing-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.ks-photo-missing-list {
    margin-top: 16px;
}
.ks-photo-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}
.ks-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ks-photo-item:hover img {
    transform: scale(1.06);
}
.ks-photo-zoom {
    position: absolute;
    right: 12px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.ks-photo-item:hover .ks-photo-zoom,
.ks-photo-item:focus .ks-photo-zoom {
    opacity: 1;
}
.ks-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px dashed #d8d8d8;
    border-radius: 12px;
    background: #fafafa;
    color: #aaa;
    font-size: 0.9rem;
}

.ks-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 70px;
    background: rgba(10, 10, 10, 0.93);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ks-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.ks-lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}
.ks-lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 4px;
}
.ks-lightbox-figure figcaption {
    margin-top: 14px;
    color: #ddd;
    font-size: 0.95rem;
    text-align: center;
}
.ks-lightbox-close,
.ks-lightbox-prev,
.ks-lightbox-next {
    position: absolute;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.ks-lightbox-close:hover,
.ks-lightbox-prev:hover,
.ks-lightbox-next:hover {
    opacity: 1;
}
.ks-lightbox-close {
    top: 20px;
    right: 24px;
    font-size: 2.2rem;
}
.ks-lightbox-prev,
.ks-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    padding: 8px;
}
.ks-lightbox-prev {
    left: 16px;
}
.ks-lightbox-next {
    right: 16px;
}
body.ks-lightbox-open {
    overflow: hidden;
}

.single-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 980px;
    margin: 48px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}
.single-post-nav a {
    color: #555;
}
.single-post-nav a:hover {
    color: var(--primary-red);
}
.single-post-nav-next {
    text-align: right;
}

/* 通用内页头图 */
.page-hero {
    padding: 64px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 15% 20%, rgba(168, 28, 34, 0.10), transparent 34%),
        linear-gradient(135deg, #fff 0%, #faf5f5 55%, #f4eeee 100%);
}
.page-hero-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
}
.page-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.8;
}
.page-content-wrap {
    padding: 64px 0 80px;
}

/* 全站搜索 */
.kq-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 7px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.07);
}
.kq-search-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-dark);
    font-size: 1rem;
}
.kq-search-input::placeholder {
    color: #aaa;
}
.kq-search-submit {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 11px 24px;
    border: 0;
    border-radius: 50px;
    background: var(--primary-red);
    color: #fff;
    font-weight: 600;
    transition: background 0.25s ease;
}
.kq-search-submit:hover {
    background: var(--primary-hover);
}
.search-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.search-summary h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.search-summary span {
    color: #888;
    font-size: 0.9rem;
}
.search-empty {
    padding: 56px 24px;
    border: 1px dashed #ddd;
    border-radius: 18px;
    background: #fafafa;
    text-align: center;
}
.search-empty h2 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 700;
}
.search-empty p {
    margin-bottom: 24px;
    color: var(--text-gray);
}
.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.search-suggestions a {
    padding: 7px 14px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-size: 0.9rem;
}
.search-suggestions a:hover {
    border-color: var(--primary-red);
    background: rgba(168, 28, 34, 0.05);
}

/* 全站导航 */
.site-map-section + .site-map-section {
    margin-top: 36px;
}
.site-map-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 800;
}
.site-map-heading::before {
    content: '';
    width: 5px;
    height: 24px;
    border-radius: 4px;
    background: var(--primary-red);
}
.site-map-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.site-map-card {
    height: 100%;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03);
}
.site-map-card h3 {
    margin-bottom: 14px;
    font-size: 1.1rem;
    font-weight: 700;
}
.site-map-card h3 a {
    color: inherit;
}
.site-map-card h3 a:hover {
    color: var(--primary-red);
}
.site-map-child-list {
    margin: 0;
    padding: 0 0 0 16px;
    border-left: 2px solid #eeeeee;
    list-style: none;
}
.site-map-child-list li + li {
    margin-top: 8px;
}
.site-map-child-list a {
    display: block;
    padding: 2px 0;
    color: #555;
    line-height: 1.55;
}
.site-map-child-list a:hover {
    color: var(--primary-red);
}
.site-map-child-list .site-map-child-list {
    margin-top: 8px;
}
.site-map-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-map-list li + li {
    margin-top: 10px;
}
.site-map-list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #555;
    line-height: 1.55;
}
.site-map-list a:hover {
    color: var(--primary-red);
}
.site-map-count {
    flex: 0 0 auto;
    color: #aaa;
    font-size: 0.8rem;
}
.site-map-all-pages {
    columns: 3 220px;
    column-gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-map-all-pages li {
    break-inside: avoid;
    margin-bottom: 10px;
}
.site-map-all-pages a {
    color: #555;
}
.site-map-all-pages a:hover {
    color: var(--primary-red);
}

/* 开发中页面 */
.coming-soon-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 32px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0, rgba(168, 28, 34, 0.08), transparent 42%),
        #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.05);
    text-align: center;
}
.coming-soon-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: rgba(168, 28, 34, 0.08);
    color: var(--primary-red);
}
.coming-soon-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(168, 28, 34, 0.08);
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 700;
}
.coming-soon-card h2 {
    margin-bottom: 14px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
}
.coming-soon-card p {
    max-width: 500px;
    margin: 0 auto 28px;
    color: var(--text-gray);
    line-height: 1.85;
}

@media (max-width: 991px) {
    .nav-search-nav {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
    .site-map-grid {
        grid-template-columns: 1fr;
    }
    .ks-photo-gallery,
    .ks-photo-missing-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .navbar-brand img,
    .navbar-logo {
        height: 40px;
        max-width: 180px;
    }
    .page-hero {
        padding: 44px 0;
    }
    .page-content-wrap {
        padding: 40px 0 56px;
    }
    .kq-search-form {
        gap: 4px;
        padding: 5px;
        border-radius: 18px;
    }
    .kq-search-input {
        padding: 9px 12px;
    }
    .kq-search-submit {
        padding: 10px 16px;
    }
    .coming-soon-card {
        padding: 44px 22px;
    }
    .single-page {
        padding: 24px 0 52px;
    }
    .single-title {
        font-size: 1.7rem;
    }
    .ks-photo-gallery,
    .ks-photo-missing-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .ks-lightbox {
        padding: 52px 12px;
    }
    .ks-lightbox-prev,
    .ks-lightbox-next {
        font-size: 1.7rem;
    }
    .ks-lightbox-prev {
        left: 2px;
    }
    .ks-lightbox-next {
        right: 2px;
    }
    .single-post-nav {
        flex-direction: column;
        gap: 10px;
    }
    .single-post-nav-next {
        text-align: left;
    }
}

.directory-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 58px;
    border-bottom: 1px solid var(--border-color);
    background:
        radial-gradient(circle at 88% 18%, rgba(168, 28, 34, 0.12), transparent 30%),
        radial-gradient(circle at 12% 90%, rgba(168, 28, 34, 0.06), transparent 34%),
        linear-gradient(135deg, #fff 0%, #fbf7f7 55%, #f6efef 100%);
}
.directory-hero::before {
    content: '';
    position: absolute;
    top: -160px;
    right: -110px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(168, 28, 34, 0.12);
    border-radius: 50%;
    pointer-events: none;
}
.directory-hero .container {
    position: relative;
    z-index: 1;
}
.directory-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--primary-red);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.directory-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
}
.directory-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.85;
}
.directory-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.directory-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 9px 16px;
    border: 1px solid rgba(168, 28, 34, 0.12);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-gray);
    font-size: 0.88rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
}
.directory-stat strong {
    color: var(--primary-red);
    font-size: 1.15rem;
    font-weight: 800;
}
.directory-section {
    padding: 46px 0 76px;
}
.directory-branch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}
.directory-branch-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-size: 0.92rem;
    font-weight: 600;
}
.directory-branch-tabs a span {
    color: #aaa;
    font-size: 0.78rem;
    font-weight: 500;
}
.directory-branch-tabs a:hover,
.directory-branch-tabs a.is-active {
    border-color: var(--primary-red);
    background: var(--primary-red);
    color: #fff;
}
.directory-branch-tabs a:hover span,
.directory-branch-tabs a.is-active span {
    color: rgba(255, 255, 255, 0.78);
}
.directory-category-groups {
    display: grid;
    gap: 14px;
    margin-bottom: 30px;
    padding: 20px 22px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fafafa;
}
.directory-category-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.directory-category-label {
    flex: 0 0 88px;
    padding-top: 7px;
    color: #333;
    font-size: 0.9rem;
    font-weight: 700;
}
.directory-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.directory-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.35;
}
.directory-chip span {
    color: #aaa;
    font-size: 0.75rem;
}
.directory-chip:hover,
.directory-chip.is-active {
    border-color: rgba(168, 28, 34, 0.35);
    background: rgba(168, 28, 34, 0.06);
    color: var(--primary-red);
}
.directory-chip.is-active {
    font-weight: 700;
}
.directory-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.directory-result-bar h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}
.directory-result-bar span {
    color: #888;
    font-size: 0.9rem;
}
.directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}
.directory-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.directory-card:hover {
    transform: translateY(-5px);
    border-color: rgba(168, 28, 34, 0.12);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.08);
}
.directory-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
}
.directory-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #a81c22, #d6656a);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(168, 28, 34, 0.18);
}
.directory-card:nth-child(3n + 2) .directory-avatar {
    background: linear-gradient(135deg, #234b6d, #4e7fa5);
    box-shadow: 0 8px 18px rgba(35, 75, 109, 0.16);
}
.directory-card:nth-child(3n) .directory-avatar {
    background: linear-gradient(135deg, #2e6b55, #62a083);
    box-shadow: 0 8px 18px rgba(46, 107, 85, 0.16);
}
.directory-card-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}
.directory-card-title {
    display: -webkit-box;
    margin: 0 0 5px;
    overflow: hidden;
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.directory-card-title a {
    color: inherit;
}
.directory-card-title a:hover {
    color: var(--primary-red);
}
.directory-domain {
    display: block;
    overflow: hidden;
    color: #999;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.directory-description {
    display: -webkit-box;
    flex-grow: 1;
    margin: 0 0 18px;
    overflow: hidden;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.directory-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}
.directory-card-category {
    display: inline-block;
    max-width: 45%;
    overflow: hidden;
    padding: 4px 9px;
    border-radius: 50px;
    background: rgba(168, 28, 34, 0.07);
    color: var(--primary-red);
    font-size: 0.76rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.directory-visit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-red);
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
}
.directory-visit:hover {
    color: var(--primary-hover);
    transform: translateX(2px);
}
.directory-missing {
    color: #aaa;
    font-size: 0.82rem;
    white-space: nowrap;
}
.directory-empty {
    margin-top: 10px;
}
@media (max-width: 991px) {
    .directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .directory-hero {
        padding: 48px 0 42px;
    }
    .directory-section {
        padding: 34px 0 56px;
    }
    .directory-branch-tabs a {
        flex: 0 0 auto;
    }
    .directory-category-groups {
        padding: 16px;
    }
    .directory-category-group {
        flex-direction: column;
        gap: 8px;
    }
    .directory-category-label {
        flex-basis: auto;
        padding-top: 0;
    }
    .directory-grid {
        grid-template-columns: 1fr;
    }
    .directory-card {
        padding: 18px;
    }
    .directory-result-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
@media (max-width: 420px) {
    .directory-card-footer {
        flex-wrap: wrap;
    }
    .directory-card-category {
        max-width: 100%;
    }
}