/* ============================================
   School Website - Responsive Template
   Royal Blue + White + Gold Academic Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --royal-blue: #1B3A5C;
    --royal-blue-dark: #0F2640;
    --royal-blue-light: #2A5580;
    --gold: #C8A951;
    --gold-light: #D4BC7A;
    --gold-dark: #A88B35;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --mid-gray: #ADB5BD;
    --dark-gray: #495057;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --shadow-sm: 0 2px 8px rgba(27, 58, 92, 0.08);
    --shadow-md: 0 4px 20px rgba(27, 58, 92, 0.12);
    --shadow-lg: 0 8px 40px rgba(27, 58, 92, 0.16);
    --radius: 4px;
    --radius-lg: 8px;
    --transition: all 0.3s ease;
    --font-heading: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
    --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container-max: 1200px;
    --header-height: 80px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--white);
    line-height: 1.8;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--royal-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.4;
    color: var(--royal-blue);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

/* ---- Utility Classes ---- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-white { color: var(--white); }
.text-gold { color: var(--gold); }
.text-gray { color: var(--text-secondary); }
.bg-white { background: var(--white); }
.bg-blue { background: var(--royal-blue); }
.bg-blue-dark { background: var(--royal-blue-dark); }
.bg-offwhite { background: var(--off-white); }
.bg-lightgray { background: var(--light-gray); }

/* Section title */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 15px auto 0;
}
.section-title p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 10px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 10px 28px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.5px;
}
.btn-primary {
    background: var(--royal-blue);
    color: var(--white);
    border-color: var(--royal-blue);
}
.btn-primary:hover {
    background: var(--royal-blue-dark);
    border-color: var(--royal-blue-dark);
    color: var(--white);
}
.btn-gold {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--royal-blue);
    border-color: var(--royal-blue);
}
.btn-outline:hover {
    background: var(--royal-blue);
    color: var(--white);
}
.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.btn-outline-white:hover {
    background: var(--white);
    color: var(--royal-blue);
}

/* ============================================
   Header - 参考旧站两层结构
   1. 顶部深蓝色信息栏 (Logo + 欢迎语/搜索/主页)
   2. 浅灰色导航栏 (水平下拉菜单)
   ============================================ */

/* 顶部信息栏 */
.header-top {
    background: var(--royal-blue);
    position: relative;
    z-index: 1001;
}
.header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px !important;
}
.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.site-logo img {
    max-height: 80px;
    max-width: 600px;
    width: auto;
}
.header-top-right {
    display: flex;
    align-items: center;
    gap: 18px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    flex-shrink: 0;
}
.welcome-text {
    color: rgba(255,255,255,0.8);
}
.top-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.9);
    padding-left: 18px;
    font-size: 13px;
    position: relative;
    transition: var(--transition);
}
.top-link:hover { color: var(--gold); }
.top-link svg { position: relative; top: -1px; }

/* 浅灰色导航栏 */
.main-navbar {
    background: #f5f5f5;
    border-bottom: 2px solid var(--royal-blue);
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.navbar-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 20px !important;
    position: relative;
}
.nav-menu {
    display: flex;
    align-items: stretch;
}
.nav-menu > li {
    position: relative;
}
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 22px;
    height: 48px;
    font-size: 16px;
    font-weight: 500;
    color: #676767;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: var(--royal-blue);
    background: rgba(27,58,92,0.05);
    border-bottom-color: var(--royal-blue);
}
.nav-menu > li > a .caret {
    font-size: 10px;
    margin-left: 3px;
    transition: transform 0.2s;
}
.nav-menu > li:hover > a .caret {
    transform: rotate(180deg);
}
.nav-home svg {
    position: relative;
    top: -1px;
}

/* Dropdown menu */
.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #f5f5f5;
    border-top: 2px solid var(--royal-blue);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.25s ease;
    z-index: 100;
    padding: 6px 0;
}
.nav-menu > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li a {
    display: block;
    padding: 8px 22px;
    font-size: 14px;
    color: #676767;
    transition: var(--transition);
    white-space: nowrap;
}
.dropdown-menu li a:hover {
    color: var(--royal-blue);
    background: rgba(27,58,92,0.06);
    padding-left: 26px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: transparent;
    border-radius: 4px;
    gap: 5px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #676767;
    transition: var(--transition);
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--royal-blue); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--royal-blue); }

/* ---- Search Overlay ---- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 38, 64, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.search-overlay.active {
    opacity: 1;
    visibility: visible;
}
.search-overlay .search-inner {
    width: 90%;
    max-width: 600px;
}
.search-overlay .search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
}
.search-overlay .search-close:hover { color: var(--gold); }
.search-overlay input[type="text"] {
    width: 100%;
    padding: 18px 0;
    font-size: 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--gold);
    color: var(--white);
    outline: none;
    font-family: var(--font-body);
}
.search-overlay input[type="text"]::placeholder { color: rgba(255,255,255,0.5); }
.search-overlay button[type="submit"] {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.25rem;
    cursor: pointer;
}

/* ---- Hero / Banner ---- */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.hero-slider .slide-item {
    position: relative;
    height: 600px;
    overflow: hidden;
}
.hero-slider .slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-slider .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15,38,64,0.7) 0%, rgba(27,58,92,0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-slider .slide-content h2 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 700;
}
.hero-slider .slide-content p {
    color: rgba(255,255,255,0.85);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 25px;
}
.hero-slider .owl-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

/* ---- Page Banner (category) ---- */
.page-banner {
    position: relative;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-color: var(--royal-blue);
}
.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15,38,64,0.8) 0%, rgba(27,58,92,0.6) 100%);
}
.page-banner .banner-inner {
    position: relative;
    z-index: 1;
}
.page-banner h1 {
    color: var(--white);
    font-size: 1.375rem;
    margin-bottom: 4px;
}
.page-banner p {
    color: var(--gold);
    font-size: 0.9375rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---- Breadcrumb ---- */
.breadcrumb-bar {
    background: var(--off-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.8125rem;
}
.breadcrumb-bar a { color: var(--text-secondary); }
.breadcrumb-bar a:hover { color: var(--royal-blue); }
.breadcrumb-bar span { color: var(--royal-blue); }

/* ---- Sub Navigation ---- */
.sub-nav {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
}
.sub-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}
.sub-nav a {
    display: block;
    padding: 14px 22px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}
.sub-nav a:hover,
.sub-nav a.active {
    color: var(--royal-blue);
}
.sub-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    background: var(--gold);
}

/* ---- Sections ---- */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.section-lg { padding: 100px 0; }

/* ---- Feature Cards (Homepage Quick Links) ---- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.feature-card {
    text-align: center;
    padding: 40px 25px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}
.feature-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--royal-blue);
    transition: var(--transition);
}
.feature-card:hover .icon {
    background: var(--royal-blue);
    color: var(--gold);
}
.feature-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---- About Section ---- */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-section .about-image {
    position: relative;
}
.about-section .about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about-section .about-image::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    z-index: -1;
}
.about-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}
.about-section h2 span {
    color: var(--gold);
}
.about-section .about-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.9;
}
.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}
.about-stats .stat-item {
    text-align: center;
}
.about-stats .stat-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--royal-blue);
    display: block;
}
.about-stats .stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ---- News Cards ---- */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.news-featured {
    grid-row: span 2;
}
.news-featured .news-image {
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    position: relative;
}
.news-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.news-featured:hover img {
    transform: scale(1.05);
}
.news-featured .news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(15,38,64,0.9));
    color: var(--white);
}
.news-featured .news-overlay h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 8px;
}
.news-featured .news-overlay .date {
    color: var(--gold);
    font-size: 0.8125rem;
}
.news-featured .news-overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    margin-top: 10px;
}

.news-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}
.news-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.news-card .news-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: var(--radius);
    overflow: hidden;
}
.news-card .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-card .news-info h3 {
    font-size: 0.9375rem;
    margin-bottom: 6px;
    line-height: 1.5;
}
.news-card .news-info .date {
    font-size: 0.75rem;
    color: var(--gold);
    margin-bottom: 4px;
}
.news-card .news-info p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Solutions / Programs ---- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.program-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 280px;
}
.program-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.program-card:hover img {
    transform: scale(1.08);
}
.program-card .program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 40%, rgba(15,38,64,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    transition: var(--transition);
}
.program-card:hover .program-overlay {
    background: linear-gradient(transparent 20%, rgba(15,38,64,0.95) 100%);
}
.program-card h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 5px;
}
.program-card p {
    color: rgba(255,255,255,0.7);
    font-size: 0.8125rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}
.program-card:hover p {
    max-height: 50px;
    margin-top: 8px;
}

/* ---- Article List ---- */
.article-list-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}
.article-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
    transform: translateY(-2px);
}
.article-list-item .article-thumb {
    flex-shrink: 0;
    width: 260px;
    border-radius: var(--radius);
    overflow: hidden;
}
.article-list-item .article-thumb img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.article-list-item:hover .article-thumb img {
    transform: scale(1.05);
}
.article-list-item .article-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.article-list-item .article-date {
    font-size: 0.8125rem;
    color: var(--gold);
    margin-bottom: 6px;
    font-weight: 500;
}
.article-list-item h3 {
    font-size: 1.125rem;
    margin-bottom: 10px;
    line-height: 1.5;
}
.article-list-item h3 a {
    color: var(--royal-blue);
}
.article-list-item h3 a:hover {
    color: var(--gold);
}
.article-list-item .article-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-list-item .article-tags {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.article-tags .tag {
    display: inline-block;
    padding: 3px 12px;
    background: var(--off-white);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.article-tags .tag:hover {
    background: var(--royal-blue);
    color: var(--white);
}

/* ---- Article Detail ---- */
.article-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 45px;
}
.article-detail h1 {
    font-size: 1.75rem;
    margin-bottom: 15px;
    line-height: 1.5;
}
.article-detail .meta {
    display: flex;
    gap: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}
.article-detail .content {
    line-height: 2;
    font-size: 1rem;
    color: var(--text-primary);
}
.article-detail .content p { margin-bottom: 18px; }
.article-detail .content img { border-radius: var(--radius); margin: 20px 0; }
.article-detail .content h2,
.article-detail .content h3 {
    margin: 30px 0 15px;
}

/* Article nav */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--light-gray);
}
.article-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 45%;
}
.article-nav a:hover { color: var(--royal-blue); }
.article-nav a span { display: block; font-size: 0.75rem; color: var(--gold); margin-bottom: 3px; }

/* ---- Sidebar ---- */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 35px;
}
.sidebar .widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--light-gray);
}
.sidebar .widget h3 {
    font-size: 1rem;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gold);
    position: relative;
}
.sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--light-gray);
}
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a {
    font-size: 0.875rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar .widget ul li a::before {
    content: '\203A';
    color: var(--gold);
    font-weight: bold;
}
.sidebar .widget ul li a:hover { color: var(--royal-blue); }
.sidebar .recommend-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}
.sidebar .recommend-item:last-child { border-bottom: none; }
.sidebar .recommend-item img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.sidebar .recommend-item h4 {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
    font-family: var(--font-body);
}
.sidebar .recommend-item h4 a { color: var(--text-primary); }
.sidebar .recommend-item h4 a:hover { color: var(--royal-blue); }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid var(--light-gray);
    transition: var(--transition);
}
.pagination a:hover, .pagination .active {
    background: var(--royal-blue);
    color: var(--white);
    border-color: var(--royal-blue);
}

/* ---- Footer ---- */
.site-footer {
    background: var(--royal-blue-dark);
    color: rgba(255,255,255,0.75);
    padding-top: 60px;
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.8;
    margin-top: 15px;
}
.footer-brand .footer-logo { max-height: 40px; margin-bottom: 5px; }
.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 600;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gold);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
    transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); padding-left: 5px; }

.footer-contact .contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.875rem;
}
.footer-contact .contact-item .icon {
    color: var(--gold);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--gold); }

/* ---- Single Page Layout (sp- 前缀) ---- */
.sp-wrap {
    padding: 30px 0;
    background: #f5f7fa;
}
.sp-grid {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

/* 左侧边栏 */
.sp-aside {
    width: 240px;
    flex-shrink: 0;
}
.sp-nav-box {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8ecf1;
}
.sp-nav-hd {
    background: var(--royal-blue);
    padding: 20px;
    text-align: center;
    position: relative;
}
.sp-nav-hd h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-body);
    margin: 0;
    letter-spacing: 1px;
}
.sp-nav-bd {
    padding: 10px 0;
}
.sp-nav-bd ul {
    margin: 0;
    padding: 0;
}
.sp-nav-bd li {
    position: relative;
    transition: all 0.25s ease;
}
.sp-nav-bd li + li {
    border-top: 1px solid #f0f0f0;
}
.sp-nav-bd li a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
    color: #555;
    text-align: center;
    transition: all 0.25s ease;
}
.sp-nav-bd li a:hover {
    color: var(--royal-blue);
    background: #f8f9fa;
}
.sp-nav-bd li.cur {
    background: linear-gradient(to right, rgba(27,58,92,0.05), transparent);
}
.sp-nav-bd li.cur::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold);
}
.sp-nav-bd li.cur a {
    color: var(--royal-blue);
    font-weight: 600;
}

/* 右侧内容区 */
.sp-main {
    flex: 1;
    min-width: 0;
}
.sp-main-box {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e8ecf1;
}

/* 标题栏 */
.sp-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    height: 52px;
    border-bottom: 2px solid var(--royal-blue);
    background: #fafbfc;
}
.sp-bar-name {
    font-size: 17px;
    color: var(--royal-blue);
    font-weight: 700;
    font-family: var(--font-body);
    position: relative;
    padding-left: 14px;
}
.sp-bar-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 4px;
    background: var(--gold);
    border-radius: 2px;
}
.sp-bar-crumbs {
    font-size: 13px;
    color: #aaa;
}
.sp-bar-crumbs a {
    color: #aaa;
    transition: color 0.2s;
}
.sp-bar-crumbs a:hover {
    color: var(--royal-blue);
}

/* 正文 */
.sp-content {
    padding: 35px;
    min-height: 500px;
    line-height: 2;
    font-size: 15px;
    color: #333;
    word-break: break-word;
}
.sp-content p {
    margin-bottom: 16px;
    text-indent: 2em;
}
.sp-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px auto;
    display: block;
    text-indent: 0;
}
.sp-content h2,
.sp-content h3,
.sp-content h4 {
    margin: 28px 0 14px;
    text-indent: 0;
    color: var(--royal-blue);
}
.sp-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    text-indent: 0;
}
.sp-content table td,
.sp-content table th {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
    text-indent: 0;
    font-size: 14px;
}
.sp-content table th {
    background: #f5f7fa;
    font-weight: 600;
}
.sp-content a {
    color: var(--royal-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.sp-content a:hover {
    color: var(--gold);
}
.sp-content ul,
.sp-content ol {
    margin: 10px 0 16px 2em;
    text-indent: 0;
}
.sp-content li {
    margin-bottom: 6px;
    text-indent: 0;
}

/* ---- Search Results ---- */
.search-page .search-box {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}
.search-page .search-box input {
    width: 100%;
    padding: 15px 20px;
    padding-right: 50px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-body);
}
.search-page .search-box input:focus {
    border-color: var(--royal-blue);
}
.search-page .search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 44px;
    background: var(--royal-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}
.search-page .search-box button:hover {
    background: var(--royal-blue-dark);
}

/* ---- Stats Bar ---- */
.stats-bar {
    background: var(--royal-blue);
    padding: 40px 0;
}
.stats-bar .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stats-bar .stat-item .number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}
.stats-bar .stat-item .label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

/* ---- Owl Carousel Override ---- */
.owl-carousel .owl-dots .owl-dot span {
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}
.owl-carousel .owl-dots .owl-dot.active span {
    background: var(--gold);
    width: 28px;
    border-radius: 5px;
}
.owl-carousel .owl-nav button {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2) !important;
    border-radius: 50% !important;
    color: var(--white) !important;
    font-size: 1.25rem !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
}
.owl-carousel .owl-nav button:hover {
    background: var(--gold) !important;
}
.owl-carousel .owl-prev { left: 20px; }
.owl-carousel .owl-next { right: 20px; }

/* ---- Login Dialog ---- */
.login-dialog {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,38,64,0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.login-dialog.active { opacity: 1; visibility: visible; }
.login-dialog .dialog-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
}
.login-dialog .dialog-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.login-dialog h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.25rem;
}
.login-dialog .form-group { margin-bottom: 15px; }
.login-dialog input[type="text"],
.login-dialog input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-body);
}
.login-dialog input:focus { border-color: var(--royal-blue); }
.login-dialog .btn { width: 100%; padding: 13px; font-size: 1rem; }
.login-dialog .input-group { display: flex; gap: 10px; }
.login-dialog .input-group img { height: 42px; border-radius: var(--radius); cursor: pointer; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .about-section { grid-template-columns: 1fr; gap: 40px; }
    .programs-grid { grid-template-columns: repeat(2, 1fr); }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    .footer-main { grid-template-columns: repeat(2, 1fr); }
    .hero-slider .slide-item { height: 450px; }
    .hero-slider .slide-content h2 { font-size: 2.25rem; }
    .article-list-item .article-thumb { width: 200px; }
    .sp-grid { flex-direction: column; }
    .sp-aside { width: 100%; }
    .sp-nav-bd ul { display: flex; flex-wrap: wrap; }
    .sp-nav-bd li { flex: 1; text-align: center; }
    .sp-nav-bd li + li { border-top: none; border-left: 1px solid #f0f0f0; }
    .sp-nav-bd li.cur::before { display: none; }
    .sp-bar { flex-direction: column; height: auto; padding: 12px 20px; gap: 6px; align-items: flex-start; }
    .sp-content { padding: 20px; }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    .section { padding: 50px 0; }
    .section-lg { padding: 60px 0; }

    /* Header top */
    .header-top-inner {
        min-height: auto;
        padding: 10px 15px !important;
    }
    .site-logo img { max-height: 40px; max-width: 280px; }
    .header-top-right { display: none; }

    /* Navbar mobile */
    .menu-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #f5f5f5;
        padding: 15px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu > li > a {
        height: auto;
        padding: 12px 16px;
        border-bottom: 1px solid #ddd;
        font-size: 15px;
        border-bottom-width: 1px;
        margin-bottom: 0;
    }
    .nav-menu > li > a:hover,
    .nav-menu > li.active > a {
        background: transparent;
        border-bottom-color: #ddd;
        border-bottom-width: 1px;
    }

    /* Mobile dropdown */
    .nav-menu .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        padding: 0 0 0 15px;
        display: none;
        background: transparent;
    }
    .nav-menu > li.dropdown-open .dropdown-menu { display: block; }
    .dropdown-menu li a {
        padding: 10px 16px;
        border-bottom: 1px solid #e5e5e5;
    }

    /* Hero */
    .hero-slider .slide-item { height: 350px; }
    .hero-slider .slide-content h2 { font-size: 1.75rem; }
    .hero-slider .slide-content p { font-size: 0.9375rem; }

    /* Page Banner */
    .page-banner { height: 70px; }
    .page-banner h1 { font-size: 1.125rem; }

    /* Sub nav */
    .sub-nav ul {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 10px;
        -webkit-overflow-scrolling: touch;
    }
    .sub-nav li { flex-shrink: 0; }
    .sub-nav a { padding: 12px 15px; white-space: nowrap; }

    /* Grids */
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .feature-card { padding: 25px 15px; }
    .news-grid { grid-template-columns: 1fr; }
    .news-featured .news-image { min-height: 250px; }
    .programs-grid { grid-template-columns: 1fr; }
    .program-card { height: 220px; }
    .stats-bar .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .footer-main { grid-template-columns: 1fr; gap: 25px; }
    .sidebar { grid-template-columns: 1fr; }

    /* Article list */
    .article-list-item {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .article-list-item .article-thumb {
        width: 100%;
    }
    .article-list-item .article-thumb img { height: 200px; }

    /* Article detail */
    .article-detail { padding: 25px; }
    .article-detail h1 { font-size: 1.375rem; }
    .article-detail .meta { flex-wrap: wrap; gap: 10px; }
    .single-content { padding: 25px; }

    /* About */
    .about-section .about-image::before { display: none; }
    .about-stats { gap: 20px; flex-wrap: wrap; }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Section title */
    .section-title { margin-bottom: 35px; }
    .section-title h2 { font-size: 1.5rem; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero-slider .slide-item { height: 280px; }
    .hero-slider .slide-content h2 { font-size: 1.375rem; }
    .btn { padding: 10px 20px; font-size: 0.8125rem; }
    .stats-bar .stats-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .stats-bar .stat-item .number { font-size: 1.75rem; }
    .news-card { flex-direction: column; }
    .news-card .news-thumb { width: 100%; height: 120px; }
    .article-detail .meta { flex-direction: column; gap: 5px; }
}

/* ---- Print ---- */
@media print {
    .site-header, .site-footer, .sidebar, .sub-nav, .breadcrumb-bar { display: none; }
    .article-detail { box-shadow: none; padding: 0; }
    .content-with-sidebar { grid-template-columns: 1fr; }
}

/* ===== HOMEPAGE REDESIGN ===== */
:root {
    --hp-accent: #1A5276;
    --hp-accent-light: #2980B9;
    --hp-text-dark: #2C3E50;
    --hp-text-light: #7F8C8D;
    --hp-border: #E8E8E8;
    --hp-bg-subtle: #FAFBFC;
}

/* A. Hero */
.home-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.home-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    border: 1px solid var(--hp-border);
    border-radius: 50%;
    pointer-events: none;
}
.home-hero__label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--hp-text-light);
    margin-bottom: 14px;
}
.home-hero__title {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    color: var(--hp-text-dark);
    letter-spacing: 2px;
    line-height: 1.3;
    margin-bottom: 0;
}
.home-hero__divider {
    width: 60px;
    height: 1px;
    background: var(--hp-accent);
    margin: 20px auto;
}
.home-hero__subtitle {
    font-size: 1rem;
    color: var(--hp-text-light);
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.8;
}
.home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hp-accent);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.3s ease;
}
.home-hero__cta:hover { gap: 14px; color: var(--hp-accent-light); }
.home-hero__cta svg { transition: transform 0.3s ease; }
.home-hero__cta:hover svg { transform: translateX(4px); }


/* Links */
.home-links {
    padding: 60px 0;
    background: var(--hp-bg-subtle);
}
.home-links__heading {
    text-align: center;
    margin-bottom: 35px;
}
.home-links__heading-label {
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--hp-text-light);
    margin-bottom: 6px;
}
.home-links__heading h2 {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.5rem;
    color: var(--hp-text-dark);
    margin: 0;
}
.home-links__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.home-link {
    text-align: center;
    padding: 30px 16px;
    border: 1px solid var(--hp-border);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s ease;
}
.home-link:hover { border-color: var(--hp-accent); }
.home-link + .home-link { border-left: none; }
.home-link__icon {
    width: 30px;
    height: 30px;
    margin: 0 auto 12px;
    color: var(--hp-accent);
}
.home-link h3 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    color: var(--hp-text-dark);
    margin-bottom: 6px;
}
.home-link p {
    font-size: 0.8125rem;
    color: var(--hp-text-light);
    line-height: 1.5;
}
.home-link__arrow {
    display: inline-block;
    margin-top: 10px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    color: var(--hp-accent);
}
.home-link:hover .home-link__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* E. Closing */
.home-closing {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.home-closing__overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
}
.home-closing__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 20px;
}
.home-closing__content h2 {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.75rem;
    color: var(--hp-text-dark);
    margin-bottom: 10px;
}
.home-closing__content p {
    font-size: 0.9375rem;
    color: var(--hp-text-light);
    margin-bottom: 20px;
}
.home-closing__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hp-accent);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.3s ease;
}
.home-closing__btn:hover { gap: 14px; color: var(--hp-accent-light); }
.home-closing__btn:hover svg { transform: translateX(4px); }
.home-closing__btn svg { transition: transform 0.3s ease; }

/* Homepage responsive */
@media (max-width: 1024px) {
    .home-links__grid { grid-template-columns: repeat(2, 1fr); }
    .home-link:nth-child(2) { border-right: none; }
    .home-link:nth-child(3) { border-top: none; border-right: 1px solid var(--hp-border); }
    .home-link:nth-child(4) { border-top: none; }
}
@media (max-width: 768px) {
    .home-hero { min-height: 60vh; padding: 40px 20px; }
    .home-links { padding: 40px 0; }
    .home-closing { height: 220px; }
    .home-closing__content h2 { font-size: 1.375rem; }
}
@media (max-width: 480px) {
    .home-hero__title { font-size: 1.75rem; }
    .home-links__grid { grid-template-columns: 1fr; }
    .home-link + .home-link { border-left: 1px solid var(--hp-border); border-top: none; }
}
