/*
Theme Name: 优超医学英语
Theme URI: https://ycsono.com
Author: Crystal
Author URI: https://ycsono.com
Description: 专注ARDMS考试辅导的WordPress主题
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ycsono
*/

/* ==================== 基础重置 ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #2D2D2D;
    background: linear-gradient(135deg, #FFF8F0 0%, #F0FFF5 100%);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

a:hover,
a:active,
a:focus {
    color: #FA5A5A;
}

ul, ol {
    list-style: none;
}

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;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #FA5A5A;
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* ==================== 页面容器 ==================== */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1;
}

/* ==================== 页眉 ==================== */
.site-header {
    background: #FFF8F0;
    border-bottom: 1px solid #E8E8E8;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo区域 */
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2D2D2D;
}

.site-title a:hover,
.site-title a:active,
.site-title a:focus {
    color: #FA5A5A;
    outline: none;
}

.site-title a:hover {
    color: #FA5A5A;
}

/* 导航菜单 */
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-size: 1rem;
    color: #666666;
    padding: 8px 0;
    display: block;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a:active,
.nav-menu a:focus,
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    color: #FA5A5A;
}

.nav-menu .current-menu-item a::after,
.nav-menu .current_page_item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #FA5A5A;
    border-radius: 1px;
}

/* ==================== 移动端汉堡菜单 ==================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.menu-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: #2D2D2D;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: background 0.3s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #2D2D2D;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.menu-toggle-icon::before {
    top: -7px;
}

.menu-toggle-icon::after {
    top: 7px;
}

/* 汉堡菜单打开状态（X形） */
.menu-toggle.menu-open .menu-toggle-icon {
    background: transparent;
}

.menu-toggle.menu-open .menu-toggle-icon::before {
    top: 0;
    transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.menu-open .menu-toggle-icon::after {
    top: 0;
    transform: translateX(-50%) rotate(-45deg);
}

/* ==================== 页脚 ==================== */
.site-footer {
    background: #2D2D2D;
    color: #fff;
}

.site-footer::before {
    content: '';
    display: block;
    height: 3px;
    background: #FA5A5A;
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 40px 0 30px;
    gap: 60px;
}

.footer-branding {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.footer-logo-text a {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-logo-text a:hover,
.footer-logo-text a:active,
.footer-logo-text a:focus {
    color: #FA5A5A;
    outline: none;
}

.footer-site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.footer-site-name a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-site-name a:hover,
.footer-site-name a:active,
.footer-site-name a:focus {
    color: #FA5A5A;
    outline: none;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #AAAAAA;
}

.footer-contact {
    max-width: 400px;
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-contact-list li {
    margin-bottom: 8px;
    font-size: 0.9375rem;
    color: #AAAAAA;
    line-height: 1.5;
}

.contact-label {
    color: #CCCCCC;
}

.contact-value {
    color: #fff;
    font-weight: 500;
}

.contact-platforms {
    font-size: 0.8125rem;
    color: #999999;
    margin-top: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #3D3D3D;
    background: #252525;
    margin: 0 -40px;
    padding: 16px 40px;
}

.copyright {
    font-size: 0.8125rem;
    color: #777777;
}

.footer-bottom-right {
    text-align: right;
}

.beian-icp,
.beian-gongan {
    display: block;
    margin: 0 0 4px 0;
    font-size: 0.8125rem;
    color: #777777;
    line-height: 1.6;
}

.beian-gongan {
    margin-bottom: 0;
}

.beian-icp a {
    color: #777777;
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-gongan a {
    display: inline-flex;
    align-items: center;
    color: #777777;
    text-decoration: none;
    transition: color 0.3s ease;
}

.beian-icp a:hover,
.beian-icp a:active,
.beian-icp a:focus,
.beian-gongan a:hover,
.beian-gongan a:active,
.beian-gongan a:focus {
    color: #FA5A5A;
    outline: none;
}

/* ==================== 响应式设计 ==================== */
@media screen and (max-width: 1024px) {
    .header-container,
    .footer-container {
        padding: 0 24px;
    }

    .footer-bottom {
        margin: 0 -24px;
        padding: 16px 24px;
    }
}

@media screen and (max-width: 768px) {
    .header-container {
        height: 60px;
        padding: 0 16px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    /* 显示汉堡菜单按钮 */
    .menu-toggle {
        display: block;
    }

    /* 导航菜单移动端展开 */
    .main-navigation {
        position: relative;
    }

    .main-navigation .nav-menu {
        display: none;
        position: absolute;
        top: 60px;
        right: 16px;
        width: 200px;
        background: #FFF8F0;
        flex-direction: column;
        padding: 10px 0;
        gap: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        border-radius: 8px;
        border: 1px solid #E8E8E8;
        z-index: 999;
    }

    .main-navigation .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid #F0F0F0;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 12px 20px;
        font-size: 0.9375rem;
    }

    .nav-menu .current-menu-item a::after,
    .nav-menu .current_page_item a::after {
        display: none;
    }

    .nav-menu a:hover,
    .nav-menu a:active,
    .nav-menu a:focus,
    .nav-menu .current-menu-item a {
        color: #FA5A5A;
        background: transparent;
        outline: none;
    }

    .footer-main {
        flex-direction: column;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .footer-bottom-right {
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .header-container {
        padding: 0 12px;
    }

    .site-logo img {
        width: 40px;
        height: 40px;
    }

    .footer-container {
        padding: 0 16px;
    }

    .footer-bottom {
        margin: 0 -16px;
        padding: 16px;
    }

    .main-navigation .nav-menu {
        width: 180px;
    }
}