/* General Styling / 基础样式 */
body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #fcfcfc;
    color: #333;
    padding: 2rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Gallery Grid / 画廊网格 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.gallery-item {
    margin: 0;
    background: #fff;
    padding: 10px;
    border: 1px solid #eee;
    text-align: center;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-item figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* LIGHTBOX LOGIC / 灯箱逻辑 */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hide by default / 默认隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    z-index: 2000;
}

/* Triggered by URL hash / 由 URL 哈希值触发 */
.lightbox:target {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border: 5px solid white;
}

.lightbox-content figcaption {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
}

/* Close Area / 关闭区域 
   The 'close' button is actually an invisible link covering the background.
   关闭按钮实际上是覆盖背景的不可见链接。
*/
.lightbox-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* SEO Lesson UI / 教学 UI */
.seo-lesson {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    border-top: 2px solid #eee;
    padding-top: 30px;
}

@media (max-width: 700px) {
    .seo-lesson { grid-template-columns: 1fr; }
}
/* Layout Fix for Footer Stacking */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* SEO Insight Box Styling / SEO 见解区块样式 */
.seo-insight-box {
    margin: 3rem 0;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: left;
}

.seo-insight-box h2 {
    color: #2563eb;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #f8fafc;
    padding-bottom: 0.5rem;
}

.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.seo-insight-box article h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #1a1a1b;
}

.seo-insight-box p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #4b5563;
}

.seo-insight-box p[lang="zh"] {
    color: #6b7280;
    font-size: 0.9rem;
    border-left: 3px solid #eff6ff;
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .insight-grid { grid-template-columns: 1fr; }
}

/* Footer Styling */
.pattern-footer {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 2rem 1rem;
    text-align: center;
}

.back-nav a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.corporate-links {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.corporate-links a {
    color: var(--accent-blue);
    text-decoration: none;
}

@media (max-width: 768px) {
    .insight-grid { grid-template-columns: 1fr; }
}