:root {
    --ip-blue: #1677ff;
    --ip-blue-deep: #1d4ed8;
    --ip-cyan: #06b6d4;
    --ip-green: #16a34a;
    --ip-amber: #f59e0b;
    --ip-red: #ef4444;
    --ip-ink: #172033;
    --ip-muted: #64748b;
    --ip-line: #dbe4f0;
    --ip-canvas: #f4f7fb;
}

body.ip-guide-site {
    background: var(--ip-canvas);
    color: var(--ip-ink);
}

.ip-guide-site .header {
    border-bottom: 1px solid var(--ip-line);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 4px 18px rgba(23, 32, 51, .05);
}

.ip-guide-site .navbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 44px;
}

.ip-guide-site .navbar-logo img {
    display: none !important;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.ip-guide-site .navbar-logo::before {
    display: block !important;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    background: url("./ip-guide-logo.png") center / contain no-repeat;
    content: "";
}

.ip-guide-site .navbar-logo::after {
    content: "IP导航";
    color: var(--ip-ink);
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.ip-guide-site .navbar-nav > li > a {
    font-weight: 600;
}

.ip-guide-site .navbar-nav > li > a:hover,
.ip-guide-site .navbar-nav > li.active > a {
    color: var(--ip-blue);
}

.ip-guide-site .main-bg,
.ip-guide-site .theme-box,
.ip-guide-site .zib-widget {
    border-color: var(--ip-line);
}

.ip-guide-site .magoip-quick-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
}

.ip-guide-site .magoip-quick-nav > a {
    display: flex !important;
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 82px;
    padding: 15px 17px;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--ip-line);
    border-radius: 6px;
    color: var(--ip-ink);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ip-guide-site .magoip-quick-nav > a strong,
.ip-guide-site .magoip-quick-nav > a span {
    display: block;
    overflow-wrap: anywhere;
}

.ip-guide-site .magoip-quick-nav > a strong {
    margin-bottom: 5px;
    font-size: 17px;
    line-height: 1.35;
}

.ip-guide-site .magoip-quick-nav > a span {
    color: var(--ip-muted);
    font-size: 13px;
    line-height: 1.45;
}

.ip-guide-site .magoip-quick-nav > a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(23, 32, 51, .09);
}

.ip-guide-site .magoip-quick-nav a:nth-child(1) {
    border-top: 3px solid var(--ip-blue);
    background: #f4f8ff;
}

.ip-guide-site .magoip-quick-nav a:nth-child(2) {
    border-top: 3px solid var(--ip-cyan);
    background: #f1fcfe;
}

.ip-guide-site .magoip-quick-nav a:nth-child(3) {
    border-top: 3px solid var(--ip-green);
    background: #f3fbf5;
}

.ip-guide-site .magoip-quick-nav a:nth-child(4) {
    border-top: 3px solid var(--ip-amber);
    background: #fffbeb;
}

.ip-guide-site .index-tab {
    border: 1px solid var(--ip-line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(23, 32, 51, .05);
}

.ip-guide-site .index-tab .tab-nav-theme {
    border-bottom: 1px solid var(--ip-line);
}

.ip-guide-site .index-tab .tab-nav-theme li > a {
    color: var(--ip-muted);
    font-weight: 650;
}

.ip-guide-site .index-tab .tab-nav-theme li.active > a {
    color: var(--ip-blue);
}

.ip-guide-site .posts-item {
    margin: 0 14px 12px;
    padding: 16px;
    border: 1px solid var(--ip-line);
    border-left-width: 4px;
    border-radius: 6px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ip-guide-site .posts-item:nth-child(4n + 1) {
    border-left-color: var(--ip-blue);
}

.ip-guide-site .posts-item:nth-child(4n + 2) {
    border-left-color: var(--ip-cyan);
}

.ip-guide-site .posts-item:nth-child(4n + 3) {
    border-left-color: var(--ip-green);
}

.ip-guide-site .posts-item:nth-child(4n) {
    border-left-color: var(--ip-amber);
}

.ip-guide-site .posts-item:hover {
    transform: translateY(-2px);
    border-color: #b8cae2;
    box-shadow: 0 12px 28px rgba(23, 32, 51, .08);
}

.ip-guide-site .posts-item .item-heading,
.ip-guide-site .posts-item .item-heading a {
    color: var(--ip-ink);
    font-weight: 700;
}

.ip-guide-site .posts-item .item-heading a:hover {
    color: var(--ip-blue);
}

.ip-guide-site .posts-item .item-thumbnail {
    border-radius: 6px;
}

.ip-guide-site .posts-item.no-thumb .item-body,
.ip-guide-site .posts-item .item-body {
    min-width: 0;
}

.ip-guide-site .posts-item .item-thumbnail:has(img[data-thumb="default"]) {
    border: 1px solid #cfe0f5;
    background: #eef5ff;
}

.ip-guide-site .posts-item .item-thumbnail:has(img[data-thumb="default"])::before {
    position: absolute;
    inset: 22%;
    z-index: 1;
    background: url("./ip-guide-logo.png") center / contain no-repeat;
    content: "";
}

.ip-guide-site .posts-item .item-thumbnail img[data-thumb="default"] {
    opacity: 0;
}

.ip-guide-site .sidebar .zib-widget {
    overflow: hidden;
    border: 1px solid var(--ip-line);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .05);
}

.ip-guide-site .sidebar .zib-widget:nth-child(4n + 1) {
    border-top: 3px solid var(--ip-blue);
}

.ip-guide-site .sidebar .zib-widget:nth-child(4n + 2) {
    border-top: 3px solid var(--ip-green);
}

.ip-guide-site .sidebar .zib-widget:nth-child(4n + 3) {
    border-top: 3px solid var(--ip-cyan);
}

.ip-guide-site .sidebar .zib-widget:nth-child(4n) {
    border-top: 3px solid var(--ip-amber);
}

.ip-guide-site .sidebar .wp-block-heading {
    margin: 0 0 12px;
    color: var(--ip-ink);
    font-size: 16px;
    line-height: 1.4;
}

.ip-guide-site .sidebar .widget_block {
    padding: 16px;
}

.ip-guide-site .wp-block-search__inside-wrapper {
    overflow: hidden;
    border: 1px solid #bfd0e5;
    border-radius: 5px;
    background: #fff;
}

.ip-guide-site .wp-block-search__input {
    min-width: 0;
    border: 0;
    background: transparent;
}

.ip-guide-site .wp-block-search__button {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--ip-blue);
    color: #fff;
}

.ip-guide-site .magoip-sidebar-tools strong {
    display: block;
    margin-bottom: 10px;
    color: var(--ip-ink);
    font-size: 16px;
}

.ip-guide-site .magoip-sidebar-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    width: 100%;
}

.ip-guide-site .magoip-sidebar-tools > a {
    display: block;
    position: relative;
    min-width: 0;
    padding: 10px 12px 10px 28px;
    border-radius: 5px;
    background: #f7f9fc;
    color: var(--ip-ink);
    line-height: 1.5;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.ip-guide-site .magoip-sidebar-tools a::before {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ip-blue);
    content: "";
    transform: translateY(-50%);
}

.ip-guide-site .magoip-sidebar-tools a:nth-of-type(2)::before {
    background: var(--ip-green);
}

.ip-guide-site .magoip-sidebar-tools a:nth-of-type(3)::before {
    background: var(--ip-amber);
}

.ip-guide-site .magoip-sidebar-tools a:hover {
    background: #eef5ff;
    color: var(--ip-blue);
}

.ip-guide-site .wp-block-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
}

.ip-guide-site .wp-block-categories .cat-item {
    margin: 0;
    padding: 8px 9px;
    border-radius: 5px;
    background: #f7f9fc;
    color: var(--ip-muted);
    font-size: 12px;
}

.ip-guide-site .wp-block-categories .cat-item a {
    color: var(--ip-ink);
    font-size: 13px;
    font-weight: 600;
}

.ip-guide-site .wp-block-categories .cat-item:nth-child(4n + 1) {
    border-left: 3px solid var(--ip-blue);
}

.ip-guide-site .wp-block-categories .cat-item:nth-child(4n + 2) {
    border-left: 3px solid var(--ip-cyan);
}

.ip-guide-site .wp-block-categories .cat-item:nth-child(4n + 3) {
    border-left: 3px solid var(--ip-green);
}

.ip-guide-site .wp-block-categories .cat-item:nth-child(4n) {
    border-left: 3px solid var(--ip-amber);
}

.ip-guide-site .wp-block-latest-posts {
    margin: 0;
    padding: 0;
}

.ip-guide-site .wp-block-latest-posts li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f6;
}

.ip-guide-site .wp-block-latest-posts li:last-child {
    border-bottom: 0;
}

.ip-guide-site .wp-block-latest-posts__post-title {
    display: block;
    color: var(--ip-ink);
    font-weight: 600;
    line-height: 1.55;
}

.ip-guide-site .wp-block-latest-posts__post-title:hover {
    color: var(--ip-blue);
}

.ip-guide-site .wp-block-latest-posts__post-date {
    margin-top: 4px;
    color: #94a3b8;
}

.ip-guide-site .magoip-tool-card:nth-child(4n + 1) {
    border-top: 3px solid var(--ip-blue);
    background: #f4f8ff;
}

.ip-guide-site .magoip-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ip-guide-site .magoip-tool-card {
    display: flex;
    min-width: 0;
    min-height: 120px;
    padding: 18px;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--ip-line);
    border-radius: 6px;
    color: var(--ip-ink);
    text-decoration: none;
}

.ip-guide-site .magoip-tool-card strong,
.ip-guide-site .magoip-tool-card span {
    display: block;
}

.ip-guide-site .magoip-tool-card strong {
    margin-bottom: 7px;
    font-size: 18px;
}

.ip-guide-site .magoip-tool-card span {
    color: var(--ip-muted);
    line-height: 1.65;
}

.ip-guide-site .magoip-tool-card:nth-child(4n + 2) {
    border-top: 3px solid var(--ip-green);
    background: #f3fbf5;
}

.ip-guide-site .magoip-tool-card:nth-child(4n + 3) {
    border-top: 3px solid var(--ip-cyan);
    background: #f1fcfe;
}

.ip-guide-site .magoip-tool-card:nth-child(4n) {
    border-top: 3px solid var(--ip-amber);
    background: #fffbeb;
}

.ip-guide-site .footer {
    border-top: 2px solid var(--ip-blue);
    background: #fff;
}

.ip-guide-site .footer-contact,
.ip-guide-site .footer-miniimg {
    display: none !important;
}

@media (max-width: 767px) {
    .ip-guide-site .navbar-logo::after {
        font-size: 18px;
    }

    .ip-guide-site .navbar-logo img {
        width: 34px;
        height: 34px;
    }

    .ip-guide-site .navbar-logo::before {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .ip-guide-site .magoip-quick-nav,
    .ip-guide-site .magoip-tools-grid {
        grid-template-columns: 1fr;
    }

    .ip-guide-site .posts-item {
        margin-right: 8px;
        margin-left: 8px;
        padding: 13px;
    }

    .ip-guide-site .wp-block-categories {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) and (max-width: 1100px) {
    .ip-guide-site .magoip-quick-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
