/* ===== Gallery / Showcase Styles ===== */

/* --- Buttons --- */
.btn-small { padding: 8px 20px; font-size: 13px; }

/* --- Collection Card (Moments) --- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.collection-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.collection-cover { cursor: pointer; }
.collection-info { padding: 24px; }
.collection-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}
.collection-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* --- Photo Placeholder --- */
.photo-placeholder {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.collection-cover .photo-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}
.ph-icon { font-size: 36px; }
.ph-label { font-weight: 600; color: var(--text); }

/* --- Photo Grid inside Collection --- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 24px 24px;
}
.photo-grid.hidden { display: none; }
.photo-item { cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; }
.photo-item .photo-placeholder {
    aspect-ratio: 1;
    font-size: 24px;
    transition: transform 0.3s ease;
}
.photo-item:hover .photo-placeholder {
    transform: scale(1.08);
}

/* --- Showcase Grid (Showcase page) --- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.showcase-item {
    cursor: pointer;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.showcase-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.showcase-item.hidden { display: none; }
.showcase-img {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    text-align: center;
}
.showcase-icon { font-size: 32px; }
.showcase-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.showcase-author {
    font-size: 12px;
    color: var(--text-light);
}

/* Art placeholder */
.art-placeholder { border-radius: var(--radius); }

/* Calligraphy placeholder */
.calligraphy-placeholder {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
}
.calligraphy-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    font-family: 'KaiTi','STKaiti','FangSong',serif;
    letter-spacing: 4px;
}

/* Award placeholder */
.award-placeholder {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: var(--radius);
}
.award-icon { font-size: 40px; }

/* --- Writing Cards --- */
.writing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.writing-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}
.writing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.writing-card.hidden { display: none; }
.writing-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 4px;
}
.writing-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}
.writing-author {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}
.writing-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.writing-tag {
    display: inline-block;
    margin-top: 16px;
    padding: 4px 12px;
    background: var(--warm-light);
    color: var(--warm);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

/* --- Showcase More Button --- */
.showcase-more {
    text-align: center;
    margin-top: 32px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}
.lightbox-img-wrap {
    background: #fff;
    border-radius: var(--radius);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    font-size: 18px;
    color: var(--text-secondary);
}
.lightbox-caption {
    color: #fff;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 500;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}
.lightbox-close {
    top: 20px; right: 20px;
    width: 44px; height: 44px;
    font-size: 28px;
    line-height: 1;
}
.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    font-size: 20px;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .collection-grid { grid-template-columns: repeat(2, 1fr); }
    .showcase-grid { grid-template-columns: repeat(3, 1fr); }
    .writing-grid { grid-template-columns: repeat(2, 1fr); }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

@media (max-width: 640px) {
    .collection-grid { grid-template-columns: 1fr; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .showcase-grid { grid-template-columns: repeat(2, 1fr); }
    .writing-grid { grid-template-columns: 1fr; }
    .calligraphy-text { font-size: 22px; }
    .lightbox { padding: 16px; }
    .lightbox-img-wrap { min-height: 200px; padding: 24px; }
    .lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 22px; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 16px; }
}
