/* Emma Mickelberg - static mirror. Faithful to the Astra theme palette. */
:root {
  --accent: #046bd2;
  --accent-dark: #045cb4;
  --heading: #1e293b;
  --text: #334155;
  --bg: #f0f5fa;
  --surface: #ffffff;
  --border: #d1d5db;
  --max: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-logo {
  display: block;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1rem;
}
.site-logo img { width: 200px; height: auto; }

/* Main */
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.site-tagline {
  text-align: center;
  color: var(--text);
  font-size: 1.05rem;
  margin: 0 0 2rem;
}

/* Grid */
.painting-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 900px) { .painting-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .painting-grid { grid-template-columns: 1fr; } }

.painting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.painting-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12); transform: translateY(-2px); }
.card-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.card-body { padding: 1rem 1.1rem 1.25rem; }
.card-title { font-size: 1.15rem; margin: 0 0 0.25rem; line-height: 1.3; }
.card-title a { color: var(--heading); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta { margin: 0 0 0.5rem; font-size: 0.82rem; color: #64748b; }
.card-desc { margin: 0; font-size: 0.95rem; }

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2.5rem 0 0;
}
.pagination a, .pagination span {
  min-width: 2.2rem;
  padding: 0.4rem 0.7rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.95rem;
}
.pagination a:hover { border-color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .gap { border: none; background: none; min-width: auto; }

/* Single painting */
.painting-single {
  max-width: 820px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2rem 2.5rem;
}
.painting-title { color: var(--heading); font-size: 2rem; margin: 0 0 0.35rem; line-height: 1.2; }
.painting-meta { margin: 0 0 1.5rem; color: #64748b; font-size: 0.9rem; }
.painting-figure { margin: 0 0 1.5rem; }
.painting-figure img { width: 100%; border-radius: 6px; }
.painting-desc { font-size: 1.1rem; color: var(--heading); }
.painting-year { color: var(--text); }
.painting-buy a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}
.painting-buy a:hover { background: var(--accent-dark); text-decoration: none; }

.painting-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.painting-pagination .next { margin-left: auto; text-align: right; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  padding: 1.5rem 1rem;
  color: #64748b;
  font-size: 0.9rem;
}
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 2.6rem;
  height: 2.6rem;
  line-height: 2.6rem;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.to-top:hover { background: var(--accent-dark); text-decoration: none; }
