/* ============================================
   页面专属样式
   ============================================ */

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}

.hero-bg .orb-1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary-light);
  top: -100px;
  right: -100px;
  animation: float 6s ease-in-out infinite;
}

.hero-bg .orb-2 {
  width: 300px;
  height: 300px;
  background: var(--color-accent-light);
  bottom: -50px;
  left: -50px;
  animation: float 8s ease-in-out infinite reverse;
}

.hero-bg .orb-3 {
  width: 200px;
  height: 200px;
  background: var(--color-primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.15;
  animation: pulse-glow 4s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  animation: fade-in 0.8s var(--ease-out-expo) backwards;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, var(--text-7xl));
  line-height: var(--leading-none);
  margin-bottom: var(--space-6);
  animation: fade-in 0.8s var(--ease-out-expo) 0.1s backwards;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  animation: fade-in 0.8s var(--ease-out-expo) 0.2s backwards;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  animation: fade-in 0.8s var(--ease-out-expo) 0.3s backwards;
}

.hero-visual {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.hero-visual img,
.hero-logo {
  max-height: 520px;
  width: auto;
  opacity: 0.9;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .hero-visual img,
[data-theme="dark"] .hero-logo {
  background: var(--bg-card);
  opacity: 1;
}

/* About page logo */
.about-logo {
  max-width: 160px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
}

/* Stats Row */
.hero-stats {
  display: flex;
  gap: var(--space-12);
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border-light);
  animation: fade-in 0.8s var(--ease-out-expo) 0.4s backwards;
}

.hero-stat h4 {
  font-size: var(--text-3xl);
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.hero-stat p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero-visual { display: none; }
  .hero-stats { gap: var(--space-8); }
}

/* ---------- Feature Section ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-16);
}

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

/* ---------- Products Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.product-card .price {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  font-weight: 600;
}

.product-card .card-body {
  padding: var(--space-6) 0;
}

/* Product Filter */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}

.filter-chip {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ---------- About Page ---------- */
/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-12);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: var(--space-2);
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-10);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-12) - 5px);
  top: var(--space-2);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto var(--space-6);
  border: 3px solid var(--color-primary-light);
  padding: 3px;
  background: var(--bg-card);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  margin-top: var(--space-12);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }
}

.contact-info-item {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: rgba(196, 139, 125, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}

/* ---------- Poster Generator ---------- */
.poster-page {
  min-height: 100vh;
  display: flex;
  padding-top: var(--nav-height);
}

.poster-sidebar {
  width: 400px;
  border-right: 1px solid var(--border-light);
  padding: var(--space-8);
  overflow-y: auto;
  background: var(--bg-secondary);
}

.poster-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--bg-primary);
}

.poster-preview {
  width: 375px;
  min-height: 667px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
}

.poster-canvas {
  width: 100%;
  height: 100%;
  min-height: 667px;
  position: relative;
}

.poster-template-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.poster-template {
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-medium);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-out-expo);
  position: relative;
}

.poster-template:hover {
  border-color: var(--color-primary-light);
  transform: scale(1.02);
}

.poster-template.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(196, 139, 125, 0.2);
}

.poster-template-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-secondary);
}

.poster-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.poster-keyword {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.poster-keyword:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.poster-keyword.selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.poster-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.poster-copy {
  background: var(--color-accent-light);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-6);
  display: none;
}

.poster-copy.visible {
  display: block;
}

/* Poster Preview Content */
.poster-preview .poster-image-area {
  width: 100%;
  height: 55%;
  background: linear-gradient(135deg, #f0ece3 0%, #e8e0d0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-5xl);
  color: var(--color-primary);
}

.poster-preview .poster-text-area {
  padding: var(--space-6);
  background: white;
  min-height: 45%;
}

.poster-preview .poster-brand {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-3);
}

.poster-preview .poster-headline {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
  color: #2c2c2c;
}

.poster-preview .poster-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.poster-preview .poster-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-medium);
}

.poster-preview .poster-qr {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .poster-page { flex-direction: column; }
  .poster-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); }
  .poster-main { min-height: 60vh; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
  align-items: start;
}

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

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

.footer-brand p {
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}

.footer-col h5 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-6);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: var(--space-3);
  overflow-wrap: break-word;
}

.footer-col ul li a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out-expo);
}

.footer-col ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
}

/* ---------- Footer Social & QR Code ---------- */
.social-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out-expo);
  width: fit-content;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--color-primary);
}

.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--duration-fast) var(--ease-out-expo);
}

.social-link:hover .social-icon {
  opacity: 1;
}

/* QR code popup */
.qrcode-popup {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  width: 132px;
  padding: var(--space-2);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out-expo),
              transform var(--duration-normal) var(--ease-out-expo),
              visibility var(--duration-normal) var(--ease-out-expo);
  z-index: 100;
}

.qrcode-popup::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 7px 7px 7px 0;
  border-style: solid;
  border-color: transparent var(--border-light) transparent transparent;
}

.qrcode-popup::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-style: solid;
  border-color: transparent var(--bg-primary) transparent transparent;
}

.qrcode-popup img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
  background: var(--bg-secondary);
}

.qrcode-popup p {
  margin-top: var(--space-2);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}

.social-link:hover .qrcode-popup,
.social-link:focus-visible .qrcode-popup,
.social-link.qrcode-open .qrcode-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

/* Mobile: stack QR below link on small screens */
@media (max-width: 480px) {
  .qrcode-popup {
    position: static;
    transform: scale(0.95);
    margin-top: var(--space-2);
    left: auto;
    top: auto;
    box-shadow: var(--shadow-md);
  }

  .qrcode-popup::before,
  .qrcode-popup::after {
    display: none;
  }

  .social-link:hover .qrcode-popup,
  .social-link:focus-visible .qrcode-popup,
  .social-link.qrcode-open .qrcode-popup {
    transform: scale(1);
  }
}

/* ---------- Section Header ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin: 0 auto;
}

/* ---------- Page Header (for sub-pages) ---------- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-16);
  text-align: center;
  position: relative;
}

.page-header h1 {
  margin-bottom: var(--space-4);
}

.page-header p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin: 0 auto;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: var(--space-16) 0;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--text-muted);
  margin: 0 auto;
}

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-medium);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* ============================================
   Gallery 素材库页面
   ============================================ */

/* ---------- Member Gate ---------- */
.member-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  transition: opacity 0.4s ease;
}

.member-gate-card {
  text-align: center;
  max-width: 420px;
  width: 90%;
  padding: var(--space-12) var(--space-10);
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
}

.member-gate-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.member-gate-card h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.member-gate-card > p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.member-gate-input-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.member-gate-input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  text-align: center;
  letter-spacing: var(--tracking-wide);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.member-gate-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.1);
}

.member-gate-hint {
  font-size: var(--text-xs) !important;
  color: var(--text-muted) !important;
  margin-top: var(--space-6) !important;
}

.member-gate-hint a {
  color: var(--color-accent);
  text-decoration: underline;
}

.member-gate-error {
  color: #e53e3e;
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}

/* ---------- Gallery Toolbar ---------- */
.gallery-toolbar {
  margin-bottom: var(--space-8);
}

.gallery-search-wrap {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.gallery-search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.gallery-search-input {
  width: 100%;
  padding: var(--space-4) var(--space-4) var(--space-4) calc(var(--space-4) * 2 + 20px);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.gallery-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.1);
}

/* ---------- Gallery Stats ---------- */
.gallery-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.gallery-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-stat-num {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.gallery-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* ---------- Gallery Card ---------- */
.gallery-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out-expo);
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.gallery-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-secondary);
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

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

.gallery-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card Overlay Actions */
.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out-expo);
  transform: scale(0.8);
}

.gallery-card:hover .gallery-card-action {
  transform: scale(1);
}

.gallery-card-action:hover {
  background: var(--color-accent);
  color: white;
  transform: scale(1.1);
}

/* Card Body */
.gallery-card-body {
  padding: var(--space-5);
}

.gallery-card-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(201, 169, 98, 0.1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-wide);
}

.gallery-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
}

.gallery-card-copy {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.gallery-tag {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* ---------- Empty State ---------- */
.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-20) 0;
  text-align: center;
  color: var(--text-muted);
}

.gallery-empty h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-4);
  color: var(--text-secondary);
}

.gallery-empty p {
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-6);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-container {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.lightbox-image-wrap {
  flex-shrink: 0;
  max-height: 55vh;
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap img {
  width: 100%;
  height: auto;
  max-height: 55vh;
  object-fit: contain;
}

.lightbox-info {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.lightbox-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(201, 169, 98, 0.1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  letter-spacing: var(--tracking-wide);
}

#lightbox-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.lightbox-copy-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

.lightbox-copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.lightbox-copy-header > span {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.lightbox-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: var(--leading-relaxed);
  white-space: pre-wrap;
  word-break: break-word;
}

.lightbox-actions {
  display: flex;
  gap: var(--space-3);
}



/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-stats {
    gap: var(--space-6);
  }

  .lightbox-content {
    flex-direction: column;
  }

  .lightbox-image-wrap {
    max-height: 40vh;
  }

  .lightbox-image-wrap img {
    max-height: 40vh;
  }

  .gallery-card-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
  }

  .gallery-card-action {
    transform: scale(1);
    width: 38px;
    height: 38px;
  }
}
