/* 豫教在线公共视觉系统：沿用首页/PSD 的橙红品牌语言 */
:root {
    --primary-blue: #1754c7;
    --primary-red: #e5232a;
    --accent-orange: #ff6a00;
    --text-dark: #292929;
    --text-muted: #717171;
    --bg-light: #f7f7f7;
    --bg-white: #ffffff;
    --border-color: #e3e3e3;
    --gradient-navigation: linear-gradient(90deg, #fe6600 0%, #d8151e 100%);
    --gradient-red-orange: linear-gradient(90deg, #ff6a00 0%, #e60019 100%);
    --gradient-footer: linear-gradient(90deg, #ff6a00 0%, #e60019 100%);
    --gradient-hover: linear-gradient(90deg, #f55c05 0%, #d91b27 100%);
    --shadow-sm: 0 2px 8px rgba(44, 30, 20, 0.06);
    --shadow-md: 0 10px 28px rgba(44, 30, 20, 0.09);
    --shadow-lg: 0 18px 42px rgba(44, 30, 20, 0.13);
    --radius-sm: 2px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-dark);
    background: var(--bg-white);
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

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

ul {
    list-style: none;
}

button,
input {
    border: 0;
    border-radius: 0;
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(23, 84, 199, 0.55);
    outline-offset: 3px;
}

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

.inner-page main.container,
.inner-page .sub-nav>.container {
    width: min(100% - 40px, 1200px);
    max-width: none;
    padding: 0;
}

site-header,
site-footer {
    display: block;
}

.layout-cols {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-top: 22px;
}

.layout-main {
    flex: 1;
    min-width: 0;
}

.layout-sidebar {
    width: 300px;
    flex: 0 0 300px;
}

/* Header */
.header-top {
    background: var(--bg-white);
    border-bottom: 0;
    padding: 25px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.logo-container>a {
    flex: 0 0 auto;
    max-width: 100%;
}

.logo-icon-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.logo-icon-img--combined {
    width: 650px;
}

.logo-icon-img--fallback {
    height: 50px;
}

.search-bar {
    display: flex;
    align-items: stretch;
    width: auto;
    height: 40px;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #d8d8d8;
    background: #fff;
}

.search-input {
    width: 250px;
    min-width: 0;
    flex: 0 1 250px;
    padding: 0 14px;
    background: #fff;
    color: var(--text-dark);
    font-size: 0.875rem;
    outline: 0;
}

.search-input::placeholder {
    color: #9a9a9a;
}

.search-btn {
    min-width: 0;
    min-height: 0;
    padding: 0 20px;
    border-left: 1px solid #d8d8d8;
    background: #f4f4f4;
    color: #555;
    cursor: pointer;
    font-size: 0.875rem;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.search-btn:hover {
    background: var(--primary-red);
    color: #fff;
}

/* Primary navigation */
.nav-bar {
    overflow-x: auto;
    background: var(--gradient-navigation);
    scrollbar-width: thin;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    min-width: 700px;
    text-align: center;
}

.nav-item-col {
    padding: 15px 0;
}

.nav-link-item {
    display: block;
    min-height: 0;
    margin-bottom: 8px;
    padding: 0;
    color: #fff;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: normal;
    text-underline-offset: 4px;
}

.nav-link-item.sub-link {
    margin-bottom: 0;
    font-size: 1.125rem;
    opacity: 1;
}

.nav-link-item:hover {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 0;
    padding: 16px 0 14px;
    border-bottom: 1px solid var(--border-color);
    color: #777;
    font-size: 0.875rem;
}

.breadcrumbs a:hover {
    color: var(--primary-red);
}

.breadcrumbs span {
    margin: 0 9px;
    color: #bbb;
}

/* Shared panels */
.card-panel {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #dedede;
    background: var(--bg-white);
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 0 9px 10px;
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-orange);
}

.section-title-text {
    color: #4d4d4d;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

.section-title-more {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.section-title-more:hover {
    color: var(--primary-red);
}

.sidebar-text-list {
    display: flex;
    flex-direction: column;
}

.sidebar-text-item {
    position: relative;
    overflow: hidden;
    padding: 8px 0 8px 14px;
    border-bottom: 1px solid #ededed;
    font-size: 0.875rem;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-text-item::before {
    position: absolute;
    top: 8px;
    left: 1px;
    color: #555;
    content: "·";
    font-weight: 700;
}

.sidebar-text-item a:hover {
    color: var(--primary-red);
}

/* Footer */
.footer {
    margin-top: 72px;
    padding: 34px 0 30px;
    background: var(--gradient-footer);
    color: #fff;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-links a {
    color: #fff;
    opacity: 0.94;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-divider {
    display: none;
}

.footer-info-p {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
}

.footer-info-p.copyright {
    margin-top: 4px;
    letter-spacing: 0.04em;
}

.main-footer {
    padding: 30px 0;
    background: linear-gradient(135deg, #ea5514, #d31e24);
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

.main-footer p {
    margin-bottom: 5px;
}

.main-footer a {
    color: #fff;
}

.main-footer a:hover {
    text-decoration: underline;
}

.main-footer-links a + a::before {
    content: " - ";
    text-decoration: none;
}

.main-footer .copyright {
    margin-top: 15px;
    font-size: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .logo-icon-img--combined {
        width: 560px;
    }

    .layout-cols {
        flex-direction: column;
        align-items: stretch;
    }

    .layout-main {
        width: 100%;
    }

    .layout-sidebar {
        width: 100%;
        flex-basis: auto;
    }

    .header-top .container {
        gap: 20px;
    }

}

@media (max-width: 700px) {

    .inner-page main.container,
    .inner-page .sub-nav>.container {
        width: min(100% - 28px, 1200px);
    }

    .header-top {
        padding: 14px 0;
    }

    .header-top .container {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .logo-container {
        justify-content: center;
        gap: 12px;
    }

    .logo-icon-img--fallback {
        height: 42px;
    }

    .search-bar {
        width: 100%;
    }

    .search-input {
        width: auto;
        flex: 1;
    }

    .nav-bar .container {
        width: 100%;
    }

    .nav-grid {
        grid-template-columns: repeat(7, 100px);
        min-width: 700px;
    }

    .nav-item-col {
        padding-block: 9px 10px;
    }

    .nav-link-item {
        font-size: 1rem;
    }

    .nav-link-item.sub-link {
        font-size: 0.9rem;
    }

    .card-panel {
        padding: 18px;
    }

    .footer {
        margin-top: 48px;
        padding: 28px 0 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
