/* =============================================
   BLOG WELLNESS - CSS
   ============================================= */

/* ---- Blog Preview Grid (Homepage) ---- */
.blog-preview__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

/* ---- Blog Card ---- */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.blog-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
}
.blog-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.blog-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card__category {
  display: inline-block;
  background: #ea3335;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
  width: fit-content;
}
.blog-card__title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.blog-card__excerpt {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  color: #555;
  margin: 0;
  flex: 1;
}
.blog-card__date {
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  display: block;
}

/* ---- Blog Page Hero ---- */
.blog-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 60px 0 40px;
  text-align: center;
}
.blog-hero .h2 {
  color: #ffcc2a;
  margin-bottom: 8px;
}
.blog-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  font-weight: 300;
}

/* ---- Blog Filters ---- */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.blog-filter-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}
.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: #ea3335;
  border-color: #ea3335;
  color: #fff;
}

/* ---- Blog Grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
}

/* ---- Blog Post Page ---- */
.blog-post-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 60px 0 40px;
}
.blog-post-hero .blog-card__category { margin-bottom: 16px; }
.blog-post-hero h1 {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
}
.blog-post__meta {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 300;
}
.blog-post__meta span + span::before {
  content: '·';
  margin: 0 8px;
}
.blog-post__cover {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 12px;
  margin: -30px auto 30px;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* ---- Blog Post Content ---- */
.blog-post__content {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 0 60px;
}
.blog-post__content h2,
.blog-post__content h3,
.blog-post__content h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}
.blog-post__content h2 { font-size: 26px; color: #ea3335; }
.blog-post__content h3 { font-size: 22px; }
.blog-post__content h4 { font-size: 18px; }
.blog-post__content p {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: #333;
  margin-bottom: 1.2em;
}
.blog-post__content a {
  color: #ea3335;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-post__content a:hover { color: #c1272d; }
.blog-post__content ul,
.blog-post__content ol {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: #333;
  margin-bottom: 1.2em;
  padding-left: 24px;
}
.blog-post__content li { margin-bottom: 6px; }
.blog-post__content ul li { list-style-type: disc; }
.blog-post__content ol li { list-style-type: decimal; }
.blog-post__content strong { font-weight: 600; }
.blog-post__content blockquote {
  border-left: 4px solid #ea3335;
  margin: 1.5em 0;
  padding: 12px 20px;
  background: #fafafa;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #555;
}
.blog-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 13px;
  color: #999;
}
.breadcrumb a {
  color: #ea3335;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep {
  margin: 0 6px;
  color: #ccc;
}

/* ---- Responsive ---- */
@media screen and (max-width: 991px) {
  .blog-preview__grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 767px) {
  .blog-preview__grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-post-hero h1 { font-size: 26px; }
}
@media screen and (max-width: 479px) {
  .blog-card__title { font-size: 16px; }
}
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: #f7f7f7;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
}
.login-card img {
  width: 100px;
  margin-bottom: 20px;
}
.login-card h2 {
  font-family: Poppins, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1a1a1a;
}
.login-card p {
  color: #777;
  font-size: 14px;
  margin-bottom: 28px;
  font-weight: 300;
}
.login-field {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.login-field:focus {
  border-color: #ea3335;
}
.login-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: #ea3335;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 6px;
}
.login-btn:hover {
  background: #c1272d;
}
.login-error {
  color: #ea3335;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* ---- Admin Dashboard ---- */
.admin-bar {
  background: #1a1a1a;
  padding: 14px 0;
  display: flex;
  align-items: center;
}
.admin-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-bar__title {
  color: #ffcc2a;
  font-weight: 600;
  font-size: 15px;
}
.admin-bar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-bar__btn {
  background: #ea3335;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.admin-bar__btn:hover {
  background: #c1272d;
}
.admin-bar__btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.admin-bar__btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

.admin-posts-list {
  margin-top: 30px;
}
.admin-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.admin-post-row:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}
.admin-post-row__info {
  flex: 1;
  min-width: 0;
}
.admin-post-row__title {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 4px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-post-row__meta {
  font-size: 13px;
  color: #999;
}
.admin-post-row__actions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
  flex-shrink: 0;
}
.admin-action-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-action-btn--edit {
  background: #ffcc2a;
  color: #1a1a1a;
}
.admin-action-btn--edit:hover {
  background: #e6b800;
}
.admin-action-btn--delete {
  background: #f0f0f0;
  color: #ea3335;
}
.admin-action-btn--delete:hover {
  background: #ea3335;
  color: #fff;
}
.admin-action-btn--view {
  background: #f0f0f0;
  color: #333;
}
.admin-action-btn--view:hover {
  background: #ddd;
}

/* ---- Editor Page ---- */
.editor-section {
  padding: 40px 0 60px;
  background: #f7f7f7;
  min-height: calc(100vh - 200px);
}
.editor-form {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.editor-field-group {
  margin-bottom: 16px;
}
.editor-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}
.editor-input,
.editor-select {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.editor-input:focus,
.editor-select:focus {
  border-color: #ea3335;
}

/* Rich text editor area */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.editor-toolbar button {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 5px 10px;
  font-family: Poppins, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: #333;
  line-height: 1.3;
}
.editor-toolbar button:hover {
  background: #ea3335;
  color: #fff;
  border-color: #ea3335;
}
.editor-toolbar .separator {
  width: 1px;
  background: #ddd;
  margin: 0 4px;
  align-self: stretch;
}

.editor-content {
  min-height: 400px;
  border: 1px solid #ddd;
  border-radius: 0 0 8px 8px;
  padding: 20px 24px;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: #333;
  outline: none;
  overflow-y: auto;
}
.editor-content:focus {
  border-color: #ea3335;
}
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6 {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0.8em 0 0.4em;
}
.editor-content h1 { font-size: 28px; }
.editor-content h2 { font-size: 24px; color: #ea3335; }
.editor-content h3 { font-size: 20px; }
.editor-content p {
  margin-bottom: 0.8em;
}
.editor-content ul,
.editor-content ol {
  padding-left: 24px;
  margin-bottom: 0.8em;
}
.editor-content ul li { list-style-type: disc; }
.editor-content ol li { list-style-type: decimal; }
.editor-content a {
  color: #ea3335;
  text-decoration: underline;
}
.editor-content blockquote {
  border-left: 3px solid #ea3335;
  padding: 8px 16px;
  margin: 0.8em 0;
  background: #fafafa;
  color: #555;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.editor-btn {
  padding: 11px 28px;
  border-radius: 8px;
  border: none;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.editor-btn--publish {
  background: #2ecc71;
  color: #fff;
}
.editor-btn--publish:hover {
  background: #27ae60;
}
.editor-btn--cancel {
  background: #f0f0f0;
  color: #555;
}
.editor-btn--cancel:hover {
  background: #ddd;
}

.editor-cover-preview {
  width: 200px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
  display: none;
}

/* ---- Responsive ---- */
@media screen and (max-width: 991px) {
  .blog-preview__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .blog-preview__grid {
    grid-template-columns: 1fr;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-post-hero h1 {
    font-size: 26px;
  }
  .editor-row {
    grid-template-columns: 1fr;
  }
  .admin-post-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .admin-post-row__actions {
    margin-left: 0;
  }
  .login-card {
    padding: 32px 24px;
  }
}
