/* ============================================================
   AKAYO BLOG + VLOG STYLES
   ============================================================ */

/* ---- Blog Hero ---- */
.blog-hero {
  background: linear-gradient(135deg, #1a0050 0%, #3b2a9e 60%, #00b4d8 100%);
  padding: 80px 20px 50px;
  text-align: center;
  color: white;
}
.blog-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 10px 0 16px; }
.blog-hero p  { font-size: 1.1rem; opacity: .85; max-width: 560px; margin: 0 auto; }

/* ---- Filter Bar ---- */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 28px 20px 10px;
}
.blog-filter-btn {
  background: white;
  border: 2px solid var(--purple, #3b2a9e);
  color: var(--purple, #3b2a9e);
  padding: 7px 20px;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: var(--purple, #3b2a9e);
  color: white;
}

/* ---- Blog Grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1180px;
  margin: 24px auto 60px;
  padding: 0 20px;
}

/* ---- Blog Card ---- */
.blog-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(59,42,158,.10);
  overflow: hidden;
  cursor: pointer;
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(59,42,158,.18);
}
.blog-card-thumb {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: #e8e0ff;
}
.blog-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.06); }

.vlog-play-badge, .blog-type-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.vlog-play-badge  { background: #ff4d4d; color: white; }
.blog-type-badge  { background: var(--purple, #3b2a9e); color: white; }

.blog-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-cat-tag {
  display: inline-block;
  background: #ede9ff;
  color: var(--purple, #3b2a9e);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
  letter-spacing: .03em;
}
.blog-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a0050;
  margin: 0 0 10px;
  line-height: 1.4;
}
.blog-excerpt {
  font-size: .875rem;
  color: #666;
  line-height: 1.6;
  flex: 1;
  margin: 0 0 14px;
}
.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: #999;
}
.blog-readmore {
  color: var(--purple, #3b2a9e);
  font-weight: 700;
  font-size: .82rem;
}

/* ---- Blog Post Modal ---- */
.blog-post-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: white;
  overflow-y: auto;
}
.blog-post-modal.open { display: block; }
.blog-post-modal-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 24px 60px;
}
.bpm-close {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 2px solid var(--purple, #3b2a9e);
  color: var(--purple, #3b2a9e);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 28px;
  font-size: .9rem;
}
.bpm-header h1 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #1a0050;
  margin: 12px 0 8px;
  line-height: 1.3;
}
.bpm-date { color: #999; font-size: .85rem; margin-bottom: 22px; }
.bpm-thumb {
  width: 100%; border-radius: 14px;
  max-height: 420px; object-fit: cover; margin-bottom: 28px;
}
.bpm-video {
  position: relative; padding-bottom: 56.25%;
  height: 0; overflow: hidden;
  border-radius: 14px; margin-bottom: 28px;
}
.bpm-video iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 14px;
}
.bpm-content {
  font-size: 1rem; line-height: 1.8; color: #333;
}
.bpm-content h2 { color: #1a0050; margin-top: 28px; }
.bpm-content h3 { color: var(--purple, #3b2a9e); }
.bpm-content ul, .bpm-content ol { padding-left: 22px; }
.bpm-content li { margin-bottom: 8px; }
.bpm-footer { margin-top: 36px; }

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */
#page-admin {
  min-height: 100vh;
  background: #f4f2ff;
}

/* Login Screen */
.admin-login-screen {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: linear-gradient(135deg, #1a0050 0%, #3b2a9e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-login-box {
  background: white;
  border-radius: 20px;
  padding: 44px 44px 36px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 80px rgba(0,0,0,.4);
}
.admin-login-box img {
  height: 60px; border-radius: 8px; margin-bottom: 16px;
}
.admin-login-box h2 { color: #1a0050; font-size: 1.5rem; margin-bottom: 6px; }
.admin-login-box p  { color: #888; font-size: .9rem; margin-bottom: 22px; }
.admin-login-box input {
  width: 100%; padding: 12px 16px;
  border: 2px solid #ddd; border-radius: 10px;
  font-size: 1rem; margin-bottom: 14px;
  box-sizing: border-box;
}
.admin-login-box input:focus { border-color: var(--purple, #3b2a9e); outline: none; }
.admin-login-box .btn-login {
  width: 100%; padding: 13px;
  background: var(--purple, #3b2a9e); color: white;
  border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.admin-login-box .btn-login:hover { background: #2a1a7e; }
.admin-login-err { color: #d00; font-size: .85rem; margin-top: 10px; min-height: 18px; }

/* Admin Dashboard */
.admin-dashboard-wrap {
  max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px;
}
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 30px; flex-wrap: wrap; gap: 12px;
}
.admin-topbar h1 { color: #1a0050; font-size: 1.6rem; margin: 0; }
.admin-topbar .btn-logout {
  background: #fff0f0; color: #c00;
  border: 2px solid #c00;
  padding: 8px 20px; border-radius: 8px;
  font-weight: 700; cursor: pointer; font-size: .88rem;
}

/* Admin sections */
.admin-section {
  background: white; border-radius: 16px;
  padding: 26px 28px; margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(59,42,158,.07);
}
.admin-section h2 {
  font-size: 1.15rem; color: #1a0050; margin: 0 0 18px;
  border-bottom: 2px solid #ede9ff; padding-bottom: 10px;
}

/* Table */
.admin-posts-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-posts-table thead tr { background: var(--purple, #3b2a9e); color: white; }
.admin-posts-table th, .admin-posts-table td {
  padding: 11px 14px; text-align: left; vertical-align: middle;
}
.admin-posts-table tbody tr:nth-child(even) { background: #f8f6ff; }
.admin-posts-table tbody tr:hover { background: #ede9ff; }
.admin-posts-table td:last-child { white-space: nowrap; }

.admin-status-badge {
  display: inline-block; padding: 3px 12px; border-radius: 50px;
  font-size: .75rem; font-weight: 700;
}
.admin-status-badge.pub   { background: #d4f5e9; color: #0a6640; }
.admin-status-badge.draft { background: #fff3cd; color: #7a5800; }

.admin-post-actions { display: flex; gap: 8px; }
.admin-btn-edit, .admin-btn-del {
  padding: 5px 14px; border-radius: 7px;
  font-size: .8rem; font-weight: 600; cursor: pointer; border: none;
  transition: opacity .2s;
}
.admin-btn-edit { background: #ede9ff; color: var(--purple, #3b2a9e); }
.admin-btn-del  { background: #fff0f0; color: #c00; }
.admin-btn-edit:hover, .admin-btn-del:hover { opacity: .75; }

/* Category manager */
.admin-cat-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.admin-cat-item {
  display: flex; align-items: center; gap: 8px;
  background: #ede9ff; border-radius: 50px; padding: 5px 14px;
  font-size: .85rem; font-weight: 600; color: #3b2a9e;
}
.admin-cat-item button {
  background: none; border: none; color: #c00;
  font-size: .9rem; cursor: pointer; padding: 0 2px; line-height: 1;
}
.admin-add-cat-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.admin-add-cat-row input {
  flex: 1; min-width: 180px; padding: 9px 14px;
  border: 2px solid #ddd; border-radius: 9px; font-size: .9rem;
}
.admin-add-cat-row input:focus { border-color: var(--purple,#3b2a9e); outline: none; }
.admin-add-cat-row button {
  padding: 9px 22px; background: var(--purple,#3b2a9e); color: white;
  border: none; border-radius: 9px; font-weight: 700; cursor: pointer;
}

/* Post Form */
.admin-post-form-section { display: none; }
.post-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media(max-width:640px){ .post-form-grid { grid-template-columns: 1fr; } }
.post-form-grid .span-2 { grid-column: 1 / -1; }

.post-form-field { display: flex; flex-direction: column; gap: 5px; }
.post-form-field label { font-size: .82rem; font-weight: 700; color: #555; }
.post-form-field input,
.post-form-field select,
.post-form-field textarea {
  padding: 10px 13px;
  border: 2px solid #ddd; border-radius: 9px; font-size: .9rem;
  font-family: inherit; transition: border-color .2s;
}
.post-form-field input:focus,
.post-form-field select:focus,
.post-form-field textarea:focus { border-color: var(--purple,#3b2a9e); outline: none; }
.post-form-field textarea { min-height: 180px; resize: vertical; }

.post-form-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px;
}
.btn-save-post {
  padding: 11px 30px; background: var(--purple,#3b2a9e); color: white;
  border: none; border-radius: 9px; font-weight: 700; font-size: .95rem; cursor: pointer;
}
.btn-cancel-post {
  padding: 11px 24px; background: #f0f0f0; color: #555;
  border: none; border-radius: 9px; font-weight: 600; font-size: .95rem; cursor: pointer;
}
.btn-new-post {
  padding: 10px 22px; background: #1a9e5e; color: white;
  border: none; border-radius: 9px; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.admin-table-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.admin-table-header h2 { margin: 0; border: none; padding: 0; }
