/* ===================================================
   旅游画派艺术网
   Color Palette: Warm art-gallery tones
   Layout: CSS Grid + Flexbox, fully responsive
   =================================================== */

/* --- Font-face (keep original) --- */
@font-face {
    font-family: "霞鹜文楷等宽 GB";
    src: url('/fonts/LXGWWenKaiMonoGB-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "霞鹜文楷等宽 GB";
    src: url('/fonts/LXGWWenKaiMonoGB-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* --- CSS Variables (unified color system) --- */
:root {
    --color-primary: #C8963E;       /* Warm amber - accent */
    --color-primary-dark: #8B6914;
    --color-primary-light: #E8D0A0;
    --color-secondary: #5A8F7B;     /* Muted teal */
    --color-secondary-dark: #3A6E5A;
    --color-link: #5A8F7B;
    --color-link-hover: #C8963E;
    --color-text: #2D2926;           /* Warm dark */
    --color-text-secondary: #6B6360;
    --color-text-light: #9A928F;
    --color-bg: #FEFCF8;             /* Warm white */
    --color-surface: #FFF9EE;        /* Warm cream */
    --color-surface-alt: #F5EDE0;
    --color-border: rgba(45,41,38,0.12);
    --color-border-strong: rgba(45,41,38,0.25);
    --color-divider: rgba(45,41,38,0.06);
    --font-main: "霞鹜文楷等宽 GB", Avenir, "Helvetica Neue", Arial, Helvetica, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 2px 12px rgba(45,41,38,0.08);
    --shadow-hover: 0 6px 24px rgba(45,41,38,0.14);
    --max-width: 1200px;
    --nav-height: 48px;
}

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

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    min-height: 100vh;
}

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

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover, a:focus {
    color: var(--color-link-hover);
}

figure {
    margin: 0;
}

figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

p {
    margin: 0.6rem 0;
}

strong {
    font-weight: bold;
    color: var(--color-primary-dark);
}

em {
    font-style: italic;
}

/* --- HEADER --- */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-divider);
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-link {
    display: block;
    max-width: 100%;
    text-align: center;
}

.logo-img {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    border-radius: var(--radius-sm);
}

.nav-toggle {
    display: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: var(--color-surface-alt);
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s ease;
    position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after  { top: 7px; }

.nav-toggle.active .hamburger-icon {
    background: transparent;
}
.nav-toggle.active .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}
.nav-toggle.active .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- NAVIGATION --- */
.site-nav {
    background: var(--color-text);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 3px solid var(--color-primary);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    height: var(--nav-height);
    color: #F0ECE5;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    transition: background 0.25s, color 0.25s;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    background: var(--color-primary);
    color: #fff;
}

.nav-item.active {
    background: var(--color-primary);
    color: #fff;
    font-weight: bold;
}

.nav-disabled {
    color: #8A847E;
    cursor: default;
    opacity: 0.6;
}

.nav-disabled:hover {
    background: transparent;
    color: #8A847E;
}

/* --- SECTIONS --- */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    text-align: center;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary-light);
    letter-spacing: 0.08em;
}

/* --- MOTTO --- */
.motto-section {
    text-align: center;
    padding: 1.2rem 0;
    margin-bottom: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-divider);
}

.motto-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* --- NEWS --- */
.news-section {
    margin-bottom: 2.5rem;
}

.news-list {
    display: grid;
    gap: 0.75rem;
}

.news-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    color: var(--color-text);
}

.news-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-hover);
    background: #fff;
    color: var(--color-link-hover);
}

.news-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

.news-text {
    font-size: 1rem;
    line-height: 1.6;
}

.news-arrow {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.news-card:hover .news-arrow {
    transform: translateX(4px);
}

/* --- TIBET SECTION --- */
.tibet-section {
    margin-bottom: 2.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid var(--color-divider);
}

.tibet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.tibet-left,
.tibet-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tibet-img-wrap img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.tibet-text {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--color-text);
}

/* --- SNAKE YEAR SECTION --- */
.snake-section {
    margin-bottom: 2.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid var(--color-divider);
}

.snake-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.snake-art {
    display: flex;
    flex-direction: column;
}

.snake-text {
    font-size: 0.95rem;
    line-height: 1.85;
}

/* --- BIO SECTION --- */
.bio-section {
    margin-bottom: 2.5rem;
}

.bio-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid var(--color-divider);
}

.bio-avatar {
    text-align: center;
}

.bio-avatar img {
    height: 120px;
    width: auto;
    max-width: 150px;
    border-radius: var(--radius-md);
    object-fit: contain;
    border: 2px solid var(--color-primary-light);
    margin: 0 auto;
}

.bio-avatar a {
    display: block;
}

.bio-name {
    font-weight: bold;
    font-size: 1rem;
    color: var(--color-primary-dark);
    margin: 0.6rem 0 0 0;
}

.bio-text {
    font-size: 0.95rem;
    line-height: 1.85;
}

/* --- GALLERY LINK --- */
.gallery-link {
    display: block;
    color: var(--color-text);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.gallery-link:hover {
    color: var(--color-text);
}

.gallery-link:hover .art-card,
.gallery-link:hover .album-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* --- ART CARD (Featured Works) --- */
.art-card {
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.art-card img {
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.art-card figcaption {
    padding: 0.4rem 0.5rem 0.2rem;
    font-size: 0.9rem;
}

/* Snake art — height-based fitting (complete image visible) */
.snake-art .art-card img {
    aspect-ratio: auto;
    object-fit: contain;
    width: 100%;
    max-height: 480px;
    background: var(--color-surface-alt);
}

.featured-section {
    margin-bottom: 2.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
}

/* --- ALBUM CARD --- */
.album-card {
    background: var(--color-surface);
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.album-card img {
    border-radius: var(--radius-md);
    aspect-ratio: auto;
    object-fit: contain;
    width: 100%;
    height: 260px;
    background: var(--color-surface-alt);
}

.album-card figcaption {
    padding: 0.3rem 0.5rem 0.15rem;
    font-size: 0.85rem;
}

.album-section {
    margin-bottom: 2.5rem;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.more-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--color-text-secondary);
}

.more-link a {
    color: var(--color-link);
    font-weight: bold;
}

.more-link a:hover {
    color: var(--color-link-hover);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--color-text);
    color: #F0ECE5;
    text-align: center;
    padding: 1.2rem 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-top: 1rem;
}

.site-footer p {
    margin: 0;
}

/* --- LIGHTBOX --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30,27,24,0.92);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    object-fit: contain;
}

.lightbox-caption {
    color: #F0ECE5;
    font-size: 1.1rem;
    margin-top: 1rem;
    text-align: center;
    font-family: var(--font-main);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #F0ECE5;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10;
}

.lightbox-close:hover {
    color: var(--color-primary);
}

/* =========================================
   RESPONSIVE: TABLET (768px - 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .tibet-grid {
        gap: 1.5rem;
    }

    .snake-grid {
        gap: 1.5rem;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .album-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .nav-item {
        padding: 0 0.8rem;
        font-size: 0.88rem;
    }
}

/* =========================================
   RESPONSIVE: MOBILE (<768px)
   ========================================= */
@media (max-width: 768px) {
    :root {
        --nav-height: 44px;
    }

    html {
        font-size: 18px;
    }

    .header-inner {
        padding: 0.8rem 1rem;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: relative;
        top: auto;
        border-bottom: 3px solid var(--color-primary);
    }

    .nav-inner {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .site-nav.nav-open .nav-inner {
        display: flex;
    }

    .nav-item {
        padding: 0.7rem 1.2rem;
        height: auto;
        justify-content: center;
        border-bottom: 1px solid rgba(240,236,229,0.1);
    }

    .site-main {
        padding: 1.5rem 1rem;
    }

    .tibet-grid {
        grid-template-columns: 1fr;
    }

    .snake-grid {
        grid-template-columns: 1fr;
    }

    .bio-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .bio-avatar img {
        height: 100px;
        width: auto;
        max-width: 120px;
    }

    .snake-art .art-card img {
        max-height: 350px;
    }

    .album-card img {
        height: 200px;
    }

    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .album-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .news-card {
        padding: 0.8rem 1rem;
    }

    .tibet-section,
    .snake-section,
    .bio-grid {
        padding: 1.5rem 1rem;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 75vh;
    }
}

/* =========================================
   RESPONSIVE: SMALL MOBILE (<480px)
   ========================================= */
@media (max-width: 480px) {
    html {
        font-size: 17px;
    }

    .header-inner {
        padding: 0.6rem 0.8rem;
    }

    .site-main {
        padding: 1rem 0.7rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .album-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tibet-section,
    .snake-section {
        padding: 1rem 0.7rem;
    }

    .bio-grid {
        padding: 1rem 0.7rem;
    }

    .bio-avatar img {
        height: 80px;
        width: auto;
        max-width: 100px;
    }

    .snake-art .art-card img {
        max-height: 280px;
    }

    .album-card img {
        height: 180px;
    }
}

/* =========================================
   RESPONSIVE: LARGE DESKTOP (>1371px)
   ========================================= */
@media (min-width: 1371px) {
    html {
        font-size: 20px;
    }

    .featured-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .album-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .album-card img {
        height: 300px;
    }
}

/* =========================================
   RESPONSIVE: ULTRA-WIDE (>2801px)
   ========================================= */
@media (min-width: 2801px) {
    html {
        font-size: 24px;
    }

    :root {
        --max-width: 1800px;
    }
}

/* ===================================================
   GALLERY PAGE — 在线画廊专用样式
   =================================================== */

/* --- Page Title --- */
.page-title-section {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.page-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--color-primary-dark);
    margin: 0;
    letter-spacing: 0.1em;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0.5rem 0 0;
}

/* --- Filter Panel --- */
.filter-panel {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid var(--color-divider);
    margin-bottom: 2.5rem;
}

.filter-groups {
    display: grid;
    gap: 1.5rem;
}

.filter-group {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 1rem;
    align-items: start;
}

.filter-group-full {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.filter-group-full .filter-label {
    padding-top: 0;
    font-size: 1.1rem;
}

/* --- Album Text List (plain text version, no card grid) --- */
.album-text-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.album-text-list strong {
    color: #C62828;
}

.filter-label {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--color-primary-dark);
    padding-top: 0.35rem;
    white-space: nowrap;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    user-select: none;
}

.filter-tag:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.filter-tag.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.filter-tag.filter-tag-red {
    color: #C62828;
    font-weight: bold;
    border-color: rgba(198,40,40,0.3);
}

.filter-tag.filter-tag-red:hover {
    border-color: #C62828;
    color: #C62828;
}

a.filter-tag {
    color: #47B1C7;
    border-color: rgba(71,177,199,0.3);
}

a.filter-tag:hover {
    background: #47B1C7;
    border-color: #47B1C7;
    color: #fff;
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* --- Album Card: text-only variant --- */
.album-card-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.album-text-placeholder {
    height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
}

.album-text-placeholder p {
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-secondary);
    margin: 0;
}

/* --- Album Badge (sales status) --- */
.album-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.badge-unsold {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.badge-sold {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.badge-sealed {
    background: #F5F5F5;
    color: #616161;
    border: 1px solid #BDBDBD;
}

.badge-undetermined {
    background: #FFF8E1;
    color: #F57F17;
    border: 1px solid #FFE082;
}

/* --- Album Year --- */
.album-year {
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin: 0.2rem 0 0.3rem;
}

/* --- Gallery link for text cards --- */
.gallery-link .album-card-text {
    cursor: pointer;
}

/* =========================================
   GALLERY PAGE RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .filter-group {
        grid-template-columns: 4.5rem 1fr;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.5rem;
    }

    .filter-panel {
        padding: 1.5rem 1rem;
    }

    .filter-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-label {
        padding-top: 0;
    }

    .album-text-placeholder {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }

    .album-text-placeholder {
        height: 180px;
    }

    .album-text-placeholder p {
        font-size: 0.9rem;
    }
}

@media (min-width: 1371px) {
    .album-text-placeholder {
        height: 300px;
    }
}
