@charset "utf-8";
/**
 * girsp.css —— 英文专题（RIPRESD / Home / About / Partners / News & Events）主题样式
 * 参考 "Global Island Resources Sharing Platform" 设计系统：
 * 海洋蓝主色、大图 hero、卡片网格、深蓝页脚、滚动渐显。
 * 说明：本文件为独立主题样式，不依赖 style.css / special_subject_en.css。
 */

/* ===================== 设计变量 ===================== */
:root {
    color-scheme: light;
    --ink: #07235f;
    --ink-strong: #031744;
    --muted: #4e6598;
    --line: #d9e7f8;
    --soft-line: #edf4fc;
    --surface: #ffffff;
    --surface-soft: #f5f9fe;
    --surface-tint: #eaf5ff;
    --accent: #0066d9;
    --accent-strong: #00449f;
    --green: #0b8c78;
    --green-dark: #006d5d;
    --shadow: 0 22px 55px rgba(0, 65, 145, 0.13);
    --shadow-soft: 0 14px 36px rgba(0, 65, 145, 0.1);
    --radius: 8px;
    --container: min(1480px, calc(100% - 48px));
    font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

/* ===================== 基础重置 ===================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, rgba(238, 248, 255, 0.9), rgba(255, 255, 255, 0) 520px), var(--surface-soft);
    color: var(--ink);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.visually-hidden,
.skip-link:not(:focus) {
    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:focus {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--ink-strong);
    color: #fff;
}

/* ===================== 顶部导航 ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(217, 231, 248, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: var(--container);
    min-height: 74px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) auto auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: auto;
    height: 46px;
    max-width: 280px;
    object-fit: contain;
}

.brand-text strong {
    display: block;
    color: var(--ink-strong);
    font-size: clamp(0.9rem, 1.2vw, 1.12rem);
    line-height: 1.15;
}

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 1.7vw, 26px);
    white-space: nowrap;
    font-size: 0.86rem;
    font-weight: 700;
}

.primary-nav a {
    position: relative;
    padding: 27px 0 24px;
    color: var(--ink);
    transition: color 180ms ease;
}

.primary-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: var(--accent);
    transition: transform 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--accent-strong);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a.is-active::after {
    transform: scaleX(1);
}

.primary-nav a.is-active {
    color: var(--accent-strong);
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* 搜索框 */
.girsp-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    transition: border-color 180ms ease, background 180ms ease;
}

.girsp-search:focus-within {
    border-color: rgba(0, 102, 217, 0.45);
    background: var(--surface-tint);
}

.girsp-search input[type="text"] {
    width: 150px;
    border: 0;
    background: transparent;
    color: var(--ink-strong);
    font-size: 0.82rem;
    outline: none;
}

.girsp-search input[type="text"]::placeholder {
    color: var(--muted);
}

.girsp-search button {
    position: relative;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: background 180ms ease;
}

.girsp-search button:hover {
    background: var(--accent-strong);
}

.search-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    margin: -7px 0 0 -6px;
    border: 2px solid #fff;
    border-radius: 50%;
}

.search-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    right: -5px;
    bottom: -2px;
    background: #fff;
    border-radius: 2px;
    transform: rotate(45deg);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.menu-toggle:hover {
    border-color: rgba(0, 102, 217, 0.35);
    background: var(--surface-tint);
}

/* ===================== 页面 hero ===================== */
.page-main {
    background: linear-gradient(180deg, rgba(231, 245, 255, 0.92), rgba(255, 255, 255, 0) 420px), var(--surface-soft);
}

.page-hero {
    position: relative;
    height: 250px;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: #fff;
    background: #064d93 url(../images/girsp/hero-about-hd.png) center / cover no-repeat;
}

/* 不同栏目的 hero 背景图（相对 CSS 定位，避免路径拼接问题） */
.page-hero.hero-about {
    background-image: url(../images/girsp/hero-about-hd.png);
}

.page-hero.hero-events {
    background-image: url(../images/girsp/hero-events-hd.png);
}

.page-hero.hero-network {
    background-image: url(../images/girsp/hero-network-hd.png);
}

.page-hero.hero-island {
    background-image: url(../images/girsp/hero-island.png);
}

.page-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 24, 75, 0.92), rgba(0, 70, 142, 0.58), rgba(0, 82, 160, 0.18)),
        linear-gradient(180deg, rgba(0, 20, 70, 0.1), rgba(0, 28, 70, 0.62));
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    width: var(--container);
    margin: auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    font-weight: 800;
}

.breadcrumb a {
    color: #fff;
}

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(1.75rem, 3.2vw, 2.8rem);
    line-height: 1.08;
}

.page-hero p {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

/* ===================== 区块与标题 ===================== */
.section-block {
    width: var(--container);
    margin: 0 auto;
    padding: 64px 0 0;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 28px;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: var(--ink-strong);
    font-size: clamp(1.8rem, 3.2vw, 2.9rem);
    line-height: 1.16;
}

.section-heading > p:not(.eyebrow) {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.02rem;
}

/* ===================== RIPRESD 模块 ===================== */
.ripresd-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.ripresd-logo {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 65, 145, 0.06);
}

.ripresd-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ripresd-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.ripresd-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(0, 65, 145, 0.07);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ripresd-card:hover,
.ripresd-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(0, 102, 217, 0.35);
    box-shadow: var(--shadow-soft);
}

.ripresd-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-tint);
}

.ripresd-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ripresd-card h3 {
    margin: 0;
    padding: 16px 18px;
    color: var(--ink-strong);
    font-size: 1rem;
    line-height: 1.42;
}

/* ===================== 通用卡片网格（新闻/活动） ===================== */
.girsp-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.girsp-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(0, 65, 145, 0.07);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.girsp-card:hover,
.girsp-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(0, 102, 217, 0.35);
    box-shadow: var(--shadow-soft);
}

.girsp-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-tint);
}

.girsp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.girsp-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.girsp-card-body h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--ink-strong);
    font-size: 1.04rem;
    line-height: 1.42;
}

.girsp-card-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.62;
}

.girsp-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}

.girsp-card-more {
    color: var(--accent-strong);
    font-weight: 900;
}

/* ===================== 正文 / 内容页 ===================== */
.page-content {
    width: var(--container);
    margin: 0 auto;
    padding: 58px 0 76px;
}

.document-reader {
    max-width: 1000px;
    margin: 0 auto;
}

.document-title-block {
    padding: 42px 52px 34px;
    border: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    background: rgba(255, 255, 255, 0.98);
    text-align: center;
}

.document-title-block h1 {
    max-width: 860px;
    margin: 0 auto;
    color: var(--ink-strong);
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    line-height: 1.3;
}

.document-date {
    margin: 14px 0 0;
    color: var(--accent-strong);
    font-size: 0.85rem;
    font-weight: 800;
}

.document-prose {
    padding: 48px 56px 64px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
}

.document-prose {
    color: #3f526c;
    font-size: 1.02rem;
    line-height: 1.92;
}

.document-prose p {
    margin: 0 0 1.45em;
    color: #3f526c;
    font-size: inherit;
    line-height: 1.92;
    word-break: break-word;
}

.document-prose img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
}

.document-prose h2 {
    margin: 2.2em 0 0.8em;
    padding: 16px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
    background: var(--surface-tint);
    color: var(--ink-strong);
    font-size: 1.3rem;
    line-height: 1.45;
}

.document-prose h2:first-child {
    margin-top: 0;
}

.document-prose table {
    width: 100%;
    border-collapse: collapse;
}

.document-prose table td,
.document-prose table th {
    padding: 10px 12px;
    border: 1px solid var(--line);
    word-break: break-word;
}

/* 字号工具栏 */
.girsp-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.82rem;
}

.girsp-toolbar button {
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--accent-strong);
    font-weight: 900;
    cursor: pointer;
    transition: background 180ms ease, border-color 180ms ease;
}

.girsp-toolbar button:hover {
    border-color: rgba(0, 102, 217, 0.35);
    background: var(--surface-tint);
}

/* 上一篇 / 下一篇 */
.girsp-nav-links {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.girsp-nav-links a {
    display: block;
    padding: 14px 18px;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f7fbff, #fff);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
    transition: border-color 180ms ease;
}

.girsp-nav-links a:hover {
    border-color: rgba(0, 102, 217, 0.35);
    color: var(--accent-strong);
}

.girsp-nav-links a span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===================== 分页（page_en.htm） ===================== */
.pages {
    width: var(--container);
    margin: 30px auto 0;
}

.pages .pagination,
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-item {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 800;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

a.page-item:hover {
    border-color: rgba(0, 102, 217, 0.35);
    background: var(--surface-tint);
    color: var(--accent-strong);
}

/* ===================== 页脚 ===================== */
.site-footer {
    margin-top: 48px;
    background: linear-gradient(180deg, #004891, #00316f);
    color: #fff;
}

.footer-inner {
    width: var(--container);
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    gap: 8px;
    text-align: center;
}

.footer-copy {
    margin: 0;
    font-weight: 700;
}

.footer-back {
    color: #8dc4ff;
    font-weight: 800;
}

.footer-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
    line-height: 1.7;
}

/* ===================== 滚动渐显 ===================== */
.section-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1), transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* 未启用脚本时直接显示，避免内容被隐藏 */
@media (scripting: none) {
    .section-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===================== 响应式 ===================== */
@media (max-width: 1160px) {
    .header-inner {
        grid-template-columns: minmax(220px, 1fr) auto auto;
    }

    .primary-nav {
        gap: 12px;
        font-size: 0.78rem;
    }

    .girsp-search input[type="text"] {
        width: 110px;
    }
}

@media (max-width: 860px) {
    :root {
        --container: min(100% - 28px, 1480px);
    }

    .header-inner {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .brand-logo {
        height: 40px;
        max-width: 220px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-actions {
        display: none;
    }

    .primary-nav {
        position: fixed;
        top: 68px;
        left: 14px;
        right: 14px;
        display: grid;
        gap: 0;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow);
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        white-space: normal;
        transition: opacity 180ms ease, transform 180ms ease;
    }

    .primary-nav.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .primary-nav a {
        padding: 14px 12px;
        border-radius: 6px;
    }

    .primary-nav a::after {
        display: none;
    }

    .primary-nav a:hover,
    .primary-nav a:focus-visible {
        background: var(--surface-tint);
    }

    .page-hero-inner {
        margin:auto;
    }

    .ripresd-grid,
    .girsp-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-title-block {
        padding: 34px 26px 30px;
    }

    .document-prose {
        padding: 36px 28px 48px;
    }
}

@media (max-width: 640px) {
    .ripresd-grid,
    .girsp-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .section-block {
        padding-top: 46px;
    }

    .document-prose,
    .document-prose p {
        font-size: 0.98rem;
        line-height: 1.85;
    }
}

@media (max-width: 520px) {
    :root {
        --container: min(100% - 24px, 1480px);
    }

    .document-title-block {
        padding: 28px 20px;
    }

    .document-prose {
        padding: 30px 20px 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .section-reveal {
        opacity: 1;
        transform: none;
    }
}
