/*
Theme Name: 搜狗输入法高保真主题
Theme URI: https://www.sogoushurufa.org/
Author: OpenAI Codex
Author URI: https://openai.com/
Description: 基于搜狗输入法站点结构重构的 WordPress 主题，包含首页、文章列表页、分类归档页和文章详情页，适合继续扩展 SEO 内容。
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: shurufa-guide-theme
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff;
    color: #333;
}

ul,
li,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 10%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    text-decoration: none;
    min-width: 0;
}

.logo img {
    height: 30px;
    width: auto;
}

.logo span {
    font-size: 14px;
    line-height: 1.3;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a {
    color: #4361ee;
}

.contact-btn,
.nav-links li:last-child > a {
    padding: 0.5rem 1.5rem;
    background-color: #ff6b6b;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.contact-btn:hover,
.nav-links li:last-child > a:hover {
    color: #fff;
    opacity: 0.92;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.main-content {
    padding: 0 10% 4rem 10%;
    text-align: center;
    background-image: linear-gradient(250.32deg, #e0f2ff 30.39%, #dbeafc 56.8%, #fff8f4 82.82%);
}

.title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
    width: 300%;
}

.feature-card {
    flex: 0 0 33.333%;
    box-sizing: border-box;
}

.feature-card img {
    max-width: 100%;
}

.download-btn {
    text-align: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.download-btn a {
    margin: auto;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #0091ff;
    border-radius: 50px;
    width: 500px;
    max-width: 100%;
    font-size: 40px;
    font-weight: 700;
    height: 100px;
    text-decoration: none;
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.1);
}

.download-btn a:hover {
    background-color: #e3f3ff;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background: #ff6b6b;
}

.features-section {
    padding: 4rem 10%;
    background: #fff;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    position: relative;
}

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

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 1;
    padding: 2rem 0;
}

.feature-content h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.feature-content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 400;
}

.feature-image {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.feature-image:hover img {
    transform: scale(1.02);
}

.feature-highlights {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.highlight-number {
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.highlight-text {
    font-size: 1rem;
    color: #666;
}

.tit {
    text-align: center;
    font-size: 2rem;
    color: #000;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 4rem 10%;
    background-color: #fff;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #f4f4f4;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    border-radius: 12px;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
}

.feature-text h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.feature-text p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.footer {
    background-color: #2d2d2d;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
}

.footer a {
    color: #999;
    text-decoration: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-link-item {
    display: flex;
    align-items: center;
}

.footer-link-item a {
    color: #999;
    text-decoration: none;
}

.footer-link-item a:hover {
    color: #fff;
}

.footer-link-item .divider {
    color: #666;
    margin: 0 10px;
}

.footer-partners {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-copyright {
    text-align: center;
}

.footer-copyright a {
    color: #999;
    text-decoration: none;
}

.footer-copyright a:hover {
    color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 10%;
}

.news-grid-gps {
    padding: 1rem 10% 0 10%;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-content {
    padding: 1.5rem;
}

.news-content p {
    color: #939599;
    margin: 1rem 0;
}

.news-content span {
    color: #939599;
}

.news-content a {
    color: #000;
    text-decoration: none;
}

.news-content a:hover {
    text-decoration: underline;
}

.news-content h3 {
    font-size: 1.25rem;
    line-height: 1.5;
}

.news-main {
    max-width: 1200px;
    margin: auto;
    padding: 1rem 0 0 0;
}

.page-main {
    padding-bottom: 2rem;
}

.breadcrumbs {
    font-size: 14px;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: #333;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #4361ee;
}

.article-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.left {
    max-width: 880px;
    min-width: 0;
    flex: 1;
}

.author {
    font-size: 0.9rem;
    color: #333;
}

.author a {
    color: #000;
}

.author a:hover {
    text-decoration: underline;
    color: #4361ee;
}

.content {
    max-width: 880px;
    font-size: 1rem;
    line-height: 1.8;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: solid 1px #f1f1f1;
}

.content a {
    text-decoration: underline;
    color: #4361ee;
}

.content img {
    display: block;
    max-width: 100%;
    margin: 1rem auto;
}

.content figure {
    margin: 1rem 0;
}

.content h1 {
    font-size: 2.2rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.content h2,
.content h3,
.content h4 {
    font-size: 1.2rem;
    margin-top: 0.8rem;
    line-height: 1.7;
}

.content p,
.content ul,
.content ol,
.content blockquote {
    margin-bottom: 1rem;
}

.content ul li {
    list-style: disc;
    margin-left: 1.4rem;
}

.content ol li {
    list-style: decimal;
    margin-left: 1.4rem;
}

.content iframe {
    max-width: 100%;
    height: 315px;
    margin: 1rem auto;
    display: block;
}

.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content th,
.content td {
    border: 1px solid #ebebeb;
    padding: 0.7rem;
}

.read-table {
    position: sticky;
    top: 0;
    width: 300px;
    padding: 0.4rem 0.8rem;
    border-radius: 0.2rem;
    border-top: solid 2px #4361ee;
    border-right: solid 1px #ebebeb;
    border-bottom: solid 1px #ebebeb;
    border-left: solid 1px #ebebeb;
    line-height: 2.2;
    background: #fff;
}

.read-table.scrolled {
    top: 6rem;
}

.read-tool {
    font-size: 0.95rem;
    cursor: pointer;
}

.read-table ul {
    list-style-type: none;
    counter-reset: section;
    font-size: 0.8rem;
}

.read-table > .read-list > ul > li {
    display: block;
    margin-bottom: 0.3rem;
}

.read-table > .read-list > ul > li::before {
    counter-increment: section;
    content: counter(section) ". ";
    margin-top: 0.15rem;
}

.read-table > .read-list > ul > li > a {
    display: inline-block;
}

.read-table ul li a {
    text-decoration: none;
    color: #000;
}

.read-table ul ul {
    counter-reset: subsection;
    margin-left: 1rem;
    margin-top: 0.35rem;
}

.read-table ul ul li {
    display: block;
}

.read-table ul ul li::before {
    counter-increment: subsection;
    content: counter(section) "." counter(subsection) " ";
}

.read-list {
    max-height: 1000px;
    transition: max-height 0.2s ease-out;
}

.read-list a {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

.read-list a:hover {
    text-decoration: underline;
    color: #4361ee;
}

.read-list.hidden {
    max-height: 0;
    overflow: hidden;
    border-top: none;
}

.article-author {
    background-color: #f1f1f1;
    border: solid 1px #ebebeb;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 0.2rem;
    margin-top: 1rem;
}

.author-avatar {
    width: 150px;
    height: 150px;
    border-radius: 75px;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 0;
    background: #fff;
}

.author-avatar img,
.author-avatar .avatar {
    margin: 0;
    width: 150px;
    height: 150px;
}

.author-info {
    font-size: 0.9rem;
}

.author-info h3 a {
    color: #000;
    text-decoration: none;
    font-size: 1.1rem;
}

.author-info h3 a:hover {
    text-decoration: underline;
    color: #4361ee;
}

.fqa {
    margin-top: 1rem;
}

.faq_content {
    counter-reset: h4-counter;
}

.faq_content h4 {
    counter-increment: h4-counter;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.faq_content h4::before {
    content: counter(h4-counter) ". ";
    font-weight: 700;
}

.faq_content div {
    margin-top: 0.8rem;
    font-size: 1rem;
    color: #333;
    border: solid 1px #e1e1e1;
    padding: 0 0.8rem 0.8rem 0.8rem;
    border-radius: 0.2rem;
}

.preornext {
    margin: 1.5rem 0;
    font-size: 1rem;
    color: #333;
}

.preornext a {
    color: #333;
    text-decoration: none;
}

.preornext a:hover {
    text-decoration: underline;
}

.timg {
    height: 200px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.pagination-wrap {
    padding: 0 10% 3rem;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    background: #f4f4f4;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.pagination-links .page-numbers.current {
    background: #4361ee;
    color: #fff;
}

.pagination-links .page-numbers:hover {
    background: #e8edf8;
}

@media (max-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem 5%;
    }
}

@media (max-width: 768px) {
    .features-section {
        padding: 2rem 5%;
    }

    .feature-row {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 4rem;
        text-align: center;
    }

    .feature-row.reverse {
        flex-direction: column;
    }

    .feature-content {
        padding: 0;
    }

    .feature-content h2 {
        font-size: 2rem;
    }

    .feature-highlights {
        justify-content: center;
    }

    .highlight-item {
        align-items: center;
    }

    .navbar {
        padding: 1rem 5%;
    }

    .hamburger {
        display: flex;
        z-index: 100;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 1rem;
        gap: 1rem;
        display: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
        z-index: 1000;
    }

    .main-content {
        padding: 2rem 5%;
    }

    .title {
        font-size: 1.8rem;
    }

    .news-main {
        padding: 1rem 1rem 2rem 1rem;
    }

    .article-main {
        flex-direction: column;
    }

    .right {
        display: none;
    }

    .content img {
        max-width: 100%;
        height: auto;
    }

    .news-grid {
        padding: 4rem 1rem;
    }

    .news-grid-gps,
    .pagination-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-author {
        flex-direction: column;
    }

    .logo span {
        display: none;
    }

    .content iframe {
        width: 100%;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .footer-partners {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .footer-link-item {
        justify-content: center;
        flex-wrap: wrap;
    }
}

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

    .feature-item {
        padding: 1rem;
    }

    .download-btn a {
        height: 72px;
        font-size: 26px;
        border-radius: 36px;
    }
}
