/* ============================================================
   NECHO — Blog Page Styles (blog.css)
   Luxury Red/Orange/Black Theme Edition
   ============================================================ */

.blog-main {
  padding-bottom: 10rem;
  background: var(--bg);
}

/* ── Header ── */
.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  color: rgba(232, 77, 28, 0.9);
  margin-bottom: 1.25rem;
}

.blog-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: linear-gradient(to right, #e84d1c, #f59e0b);
}

.add-post-btn {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e84d1c, #f59e0b);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(232, 77, 28, 0.3);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s;
}

.add-post-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 15px 50px rgba(232, 77, 28, 0.4);
}

/* ── Grid & Cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem 2.5rem;
}

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

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  cursor: pointer;
  position: relative;
}

.blog-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid var(--border);
  margin-bottom: 1.75rem;
  background: var(--surface);
  transition: border-color 0.5s, transform 0.5s;
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s;
}

.blog-card:hover .blog-img {
  border-color: rgba(232, 77, 28, 0.3);
  transform: translateY(-8px);
}

.blog-card:hover .blog-img img {
  filter: grayscale(0) contrast(1);
  transform: scale(1.08);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.75rem;
  padding: 0 4px;
}

.blog-meta span:first-child {
  color: rgba(232, 77, 28, 0.8);
}

.blog-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
  padding: 0 4px;
  transition: color 0.3s;
}

.blog-card:hover .blog-title {
  color: white;
}

/* Tags on cards */
.bc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 12px;
}

.bc-tag {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(232, 77, 28, 0.06);
  border: 1px solid rgba(232, 77, 28, 0.15);
  color: rgba(232, 77, 28, 0.8);
}

/* ── Full Editor Overlay ── */
.blog-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: none;
  flex-direction: column;
}

.blog-editor-overlay.open {
  display: flex;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 80px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-back {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s;
}

.editor-back:hover {
  color: white;
}

.editor-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.2);
}

.editor-publish-btn {
  background: linear-gradient(135deg, #e84d1c, #f59e0b);
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  box-shadow: 0 10px 30px rgba(232, 77, 28, 0.25);
}

.editor-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.editor-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 4rem 15% 6rem;
}

@media (max-width: 1200px) {
  .editor-left {
    padding: 3rem 10% 4rem;
  }
}

@media (max-width: 900px) {
  .editor-left {
    padding: 2rem 5% 3rem;
  }
}

.editor-right {
  width: 360px;
  flex-shrink: 0;
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: #080808;
  padding: 2.5rem;
}

@media (max-width: 1024px) {
  .editor-main {
    flex-direction: column;
  }

  .editor-right {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: visible;
  }
}

.editor-title {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: white;
  padding: 0;
  margin-bottom: 1rem;
}

.editor-title::placeholder {
  color: rgba(255, 255, 255, 0.08);
}

.editor-slug-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
}

.editor-slug-prefix {
  font-weight: 400;
  opacity: 0.5;
}

.editor-slug-input {
  background: transparent;
  border: none;
  outline: none;
  color: #e84d1c;
  font-weight: 600;
  padding: 0;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tb-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.03);
}

.tb-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.tb-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

.tb-clear {
  color: #ff6b6b;
  opacity: 0.6;
}

.tb-clear:hover {
  opacity: 1;
  background: rgba(255, 107, 107, 0.1);
}

.editor-body {
  flex: 1;
  min-height: 400px;
  outline: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1.8;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

.editor-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: white;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.editor-body blockquote {
  border-left: 2px solid #e84d1c;
  padding-left: 2rem;
  margin: 3rem 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Sidebar Elements ── */
.ed-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(232, 77, 28, 0.7);
  margin-bottom: 1rem;
}

.ed-text-input,
.ed-textarea,
.ed-select {
  width: 100%;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  color: white;
  font-size: 13px;
  outline: none;
  transition: border-color 0.3s;
}

.ed-text-input:focus,
.ed-textarea:focus,
.ed-select:focus {
  border-color: rgba(232, 77, 28, 0.4);
}

.ed-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: #0c0c0c;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.ed-upload-btn:hover {
  border-color: #e84d1c;
  color: #e84d1c;
}

.ed-img-preview {
  width: 100%;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ed-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ed-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(232, 77, 28, 0.08);
  border: 1px solid rgba(232, 77, 28, 0.2);
  border-radius: 99px;
  color: #e84d1c;
  font-size: 10px;
  font-weight: 700;
}

/* SEO Score */
.seo-score-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.seo-score-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.3);
}

.seo-score-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.seo-score-val.green {
  color: #22c55e;
}

.seo-bar-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  margin-bottom: 15px;
  overflow: hidden;
}

.seo-bar-fill {
  height: 100%;
  transition: width 0.6s ease;
}

.seo-bar-fill.green {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.seo-check {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 4px;
}

.seo-check.pass {
  color: rgba(34, 197, 94, 0.7);
}

/* ── Post View Overlay ── */
.post-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #050505;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.post-view-overlay.open {
  display: flex;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.pv-close {
  position: fixed;
  top: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  transition: 0.3s;
  z-index: 1010;
  backdrop-filter: blur(10px);
}

.pv-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: rotate(90deg);
}

.post-view-inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 10rem;
}

.pv-hero-img {
  width: 100%;
  border-radius: 2.5rem;
  margin-bottom: 4rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pv-meta {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #e84d1c;
  margin-bottom: 1.5rem;
}

.pv-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  color: white;
  line-height: 1.05;
  margin-bottom: 2rem;
}

.pv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4rem;
}

.pv-body {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
  line-height: 1.85;
  font-weight: 300;
}

.pv-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  color: white;
  margin: 3.5rem 0 1.5rem;
}

.pv-body blockquote {
  border-left: 2px solid #e84d1c;
  padding-left: 2.5rem;
  margin: 4rem 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.75rem;
  color: rgba(255, 255, 255, 0.5);
}