/* Blog + admin extras (light theme) */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: inherit;
  text-align: left;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.blog-card-media {
  height: 160px;
  background: var(--surface-elevated);
  overflow: hidden;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-media--empty {
  background:
    radial-gradient(circle at 30% 40%, rgba(225, 29, 72, 0.12), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(37, 99, 235, 0.1), transparent 50%),
    var(--surface-elevated);
}

.blog-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Program icons */
.program-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.store-card-top {
  align-items: center;
}

/* Post page */
.post-shell {
  max-width: 720px;
}

.post-excerpt {
  margin: 16px 0 24px;
  max-width: 52ch;
}

.post-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  margin: 8px 0 28px;
}

.post-content {
  line-height: 1.75;
}

.post-content p {
  margin-bottom: 1em;
}

.post-content a {
  color: var(--accent-red);
  font-weight: 500;
}

.post-embed {
  margin: 28px 0;
  display: flex;
  justify-content: center;
}

/* Admin */
.admin-page {
  min-height: 100dvh;
}

.admin-shell {
  padding: 40px 0 80px;
  position: relative;
  z-index: 1;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.admin-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.admin-card h2 {
  margin-bottom: 8px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-height: 480px;
  overflow: auto;
}

.admin-list-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--surface-elevated);
}

.admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-list-actions .btn {
  height: 32px;
  padding: 4px 10px;
  font-size: 12px;
}

textarea {
  font: inherit;
  font-feature-settings: var(--ff);
  width: 100%;
  min-height: 180px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: #fff;
  color: var(--ink);
  resize: vertical;
  outline: none;
}

textarea:focus {
  border-color: rgba(225, 29, 72, 0.45);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
}

input[type="file"] {
  font-size: 13px;
  color: var(--mute);
}

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

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
