/* ===== Wayne Chin Studio — 样式表 =====
   设计要点：以画作本身为焦点，深色画廊式布局；
   彻底修复原站的表格溢出、单列图片堆叠、无响应式等问题。 */

:root {
    --bg: #faf9f7;
    --ink: #1f1d1b;
    --muted: #6b6560;
    --line: #e4e0db;
    --accent: #7a6a53;          /* 暖棕，与油画色调协调 */
    --accent-dark: #4a3f31;
    --card: #ffffff;
    --shadow: 0 2px 12px rgba(31, 29, 27, 0.08);
    --radius: 6px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* 彻底杜绝原站的横向滚动条 */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--ink); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 1rem; }

/* ===== 头部横幅 ===== */
.site-banner {
    background: linear-gradient(rgba(15, 25, 45, .35), rgba(15, 25, 45, .55)),
                url('/assets/images/cropped-February-Snow.jpg') center/cover no-repeat;
    color: #fff;
}
.banner-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.6rem 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-brand { display: block; color: #fff; }
.brand-name {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.brand-sub {
    font-size: .95rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .92;
    display: block;
    margin-top: .2rem;
}
.banner-phone {
    font-size: 1rem;
    letter-spacing: .05em;
    opacity: .95;
    font-variant-numeric: tabular-nums;
}

/* ===== 导航 ===== */
.main-nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.nav-list {
    max-width: var(--maxw);
    margin: 0 auto;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0 1rem;
}
.nav-item { position: relative; }
.nav-link {
    display: block;
    padding: 1rem 1.15rem;
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--ink);
    border-bottom: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}
.caret { font-size: .75em; vertical-align: .15em; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-top: none;
    box-shadow: var(--shadow);
    min-width: 200px;
    list-style: none;
    display: none;
    z-index: 60;
}
.has-dropdown.open .dropdown { display: block; }
.dropdown-item {
    display: block;
    padding: .7rem 1.2rem;
    font-size: .9rem;
    color: var(--ink);
}
.dropdown-item:hover { background: #f3efe9; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: .9rem 1rem;
    cursor: pointer;
}
.hamburger, .hamburger::before, .hamburger::after {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    margin: 5px 0;
    transition: transform .2s;
}

/* ===== 主内容 ===== */
.site-main {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3.5rem;
    min-height: 55vh;
}
h1.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .4rem;
}
.page-rule {
    width: 56px; height: 3px;
    background: var(--accent);
    margin-bottom: 2rem;
    border: none;
}
.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ===== 首页 ===== */
.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    margin-bottom: 3rem;
}
.home-hero img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 1.2rem;
}
.hero-text p { margin-bottom: 1rem; }
.hero-text a.cta {
    display: inline-block;
    margin-top: .8rem;
    padding: .8rem 1.6rem;
    background: var(--accent-dark);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 500;
}
.hero-text a.cta:hover { background: var(--accent); color: #fff; }

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
}
.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: .6rem;
}
.feature-card a.more {
    display: inline-block;
    margin-top: .8rem;
    font-weight: 600;
    font-size: .9rem;
}

/* ===== 画廊网格 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
}
.gallery-item { position: relative; }
.gallery-item a {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #eee;
}
.gallery-item .thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .3s ease;
}
.gallery-item a:hover .thumb { transform: scale(1.03); }
.gallery-item .caption {
    padding: .6rem .2rem 0;
    font-size: .88rem;
    color: var(--muted);
    text-align: center;
}
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--muted);
    border: 2px dashed var(--line);
    border-radius: var(--radius);
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(12, 12, 12, .92);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 92vw; max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
    position: absolute; top: 1rem; right: 1.4rem;
    color: #fff; font-size: 2rem; line-height: 1;
    background: none; border: none; cursor: pointer;
}
.lightbox-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 2.4rem;
    background: rgba(255,255,255,.12);
    border: none; border-radius: 50%;
    width: 48px; height: 48px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

/* ===== 课程页 ===== */
.classes-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: start;
}
.classes-grid img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.info-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.info-table th, .info-table td {
    text-align: left;
    padding: .9rem 1.2rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.info-table th {
    width: 34%;
    background: #f3efe9;
    font-weight: 600;
    color: var(--accent-dark);
    white-space: nowrap;
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* ===== Exhibits / Awards 表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table th {
    background: #f3efe9;
    font-weight: 600;
    color: var(--accent-dark);
    text-align: left;
}
.data-table th, .data-table td {
    padding: .75rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: none; }
.data-table td.year { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ===== 联络页 ===== */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 2.5rem;
}
.contact-info {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
}
.contact-info h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.contact-info p { margin-bottom: .7rem; }

.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: .35rem;
    font-size: .92rem;
}
.form-group label .req { color: #b3542a; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: #fdfcfa;
    transition: border-color .15s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-submit {
    padding: .85rem 2rem;
    background: var(--accent-dark);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.btn-submit:hover { background: var(--accent); }
.form-note { font-size: .88rem; color: var(--muted); margin-top: .8rem; }

/* ===== 页脚 ===== */
.site-footer {
    background: #25221f;
    color: #d8d3cd;
    margin-top: 3rem;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.footer-col h3 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: .8rem;
    letter-spacing: .04em;
}
.footer-col p { font-size: .92rem; line-height: 1.75; }
.footer-col a { color: #d8d3cd; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid #3a3631;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.2rem 1.5rem;
    font-size: .82rem;
    color: #9b958e;
}

/* ===== 通知 ===== */
.toast {
    position: fixed;
    bottom: 1.5rem; left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--ink);
    color: #fff;
    padding: .8rem 1.4rem;
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
    z-index: 300;
    transition: transform .25s ease;
    max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #8c3b20; }

/* ===== 管理后台入口提示（页面内小链接） ===== */
.admin-hint {
    text-align: center;
    font-size: .78rem;
    color: #b8b2ab;
    margin-top: 2.5rem;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .home-hero, .classes-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .feature-row { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .nav-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .nav-list.open { display: flex; }
    .nav-link { padding: .9rem 1.2rem; border-bottom: none; }
    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: #f7f4ef;
    }
    .form-row { grid-template-columns: 1fr; }
    .data-table { font-size: .88rem; }
    .data-table th, .data-table td { padding: .6rem .8rem; }
}
