/* Base layout / reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f5f7;
  color: #1f2933;
  line-height: 1.5;
}

/* Header */
.site-header {
  background: #111827;
  color: #f9fafb;
  border-bottom: 3px solid #f59e0b;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.header-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.header-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  border-color: #f59e0b;
  background: rgba(249, 115, 22, 0.1);
}

/* Main content */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.intro {
  margin-bottom: 12px;
}

.intro h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.intro p {
  margin: 0;
  max-width: 720px;
  font-size: 0.98rem;
  color: #4b5563;
}

/* Status messages */
.status-bar {
  margin-top: 12px;
  margin-bottom: 12px;
  min-height: 24px;
}

.status-message {
  font-size: 0.95rem;
  color: #4b5563;
}

.status-error {
  color: #b91c1c;
}

/* Gallery grid */
.gallery-section {
  margin-top: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Card */
.gallery-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  transition:
    transform 0.12s ease-out,
    box-shadow 0.12s ease-out,
    border-color 0.12s ease-out;
}

.gallery-card:hover,
.gallery-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
  border-color: #f59e0b;
}

/* Image */
.gallery-card-image-wrapper {
  position: relative;
  background: #111827;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

/* Badge for tags or type */
.gallery-card-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Card body */
.gallery-card-body {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gallery-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.gallery-card-caption {
  font-size: 0.9rem;
  color: #4b5563;
}

.gallery-card-meta {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: #6b7280;
}

.gallery-card-date {
  font-style: italic;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 14px 20px 18px;
  background: #111827;
  color: #9ca3af;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
}

.footer-note {
  opacity: 0.8;
}

/* Small screens */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .page-main {
    padding: 16px;
  }

  .gallery-card img {
    height: 170px;
  }
}
