/* ═══════════════════════════════════════════════
   BLOG PAGE STYLES
   ═══════════════════════════════════════════════ */
.nd-blog-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding-top: 90px;
  padding-bottom: 60px;
  background: var(--nd-bg);
  overflow-x: hidden;
}

.nd-blog-container {
  position: relative;
  z-index: 4;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

/* Header */
.nd-blog-header {
  text-align: center;
}

.nd-blog-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--nd-text);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.nd-blog-subtitle {
  font-size: 1rem;
  color: var(--nd-text-secondary);
  max-width: 580px;
  margin: 0 auto;
}

/* Controls Bar */
.nd-blog-controls {
  position: relative;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background: var(--nd-surface-1);
  border: 1px solid var(--nd-border);
  border-radius: 16px;
  padding: 1rem 1.4rem;
  box-shadow: 0 12px 36px var(--nd-shadow);
}

.nd-blog-search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.nd-blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.5;
  pointer-events: none;
}

.nd-blog-search {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: var(--nd-surface-2);
  border: 1px solid var(--nd-border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--nd-text);
  outline: none;
  transition: all 0.2s ease;
}

.nd-blog-search::placeholder {
  color: var(--nd-text-muted);
}

.nd-blog-search:focus {
  border-color: var(--triny-accent);
  box-shadow: 0 0 16px var(--triny-glow);
  background: var(--nd-surface-3);
}

/* Product Selector (Dropdown) */
.nd-selector--product {
  position: relative;
  z-index: 101;
  cursor: pointer;
  user-select: none;
}

.nd-selector--product .nd-selector__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 1.2rem;
  background: var(--nd-surface-2);
  border: 1px solid var(--nd-border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--nd-text);
  min-width: 190px;
  transition: all 0.2s ease;
}

.nd-selector--product .nd-selector__trigger:hover {
  border-color: var(--nd-border-hover);
  background: var(--nd-surface-3);
}

.nd-selector--product.active .nd-selector__trigger {
  border-color: var(--triny-accent);
  background: var(--nd-surface-3);
  box-shadow: 0 0 16px var(--triny-glow);
}

.nd-selector--product .nd-selector__arrow {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.6;
  transition: transform 0.25s ease;
}

.nd-selector--product.active .nd-selector__arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nd-selector--product .nd-selector__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 190px;
  background: var(--nd-dropdown-bg);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--nd-border);
  border-radius: 10px;
  box-shadow: 0 12px 36px var(--nd-shadow-elevated);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1005;
}

.nd-selector--product.active .nd-selector__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nd-selector--product .nd-selector__option {
  display: block;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--nd-text-secondary);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.nd-selector--product .nd-selector__option:hover {
  background: var(--nd-border);
  color: var(--nd-text);
}

.nd-selector--product .nd-selector__option.selected {
  background: var(--triny-glow);
  color: var(--triny-accent);
  font-weight: 600;
  border-color: var(--triny-glow-strong);
}

/* Blog Grid */
.nd-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.8rem;
}

/* Blog Card */
.nd-blog-card {
  background: var(--nd-surface-1);
  border: 1px solid var(--nd-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px var(--nd-shadow);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.nd-blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--triny-accent);
  box-shadow: 0 20px 50px var(--triny-glow-strong);
}

.nd-blog-card__media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--nd-surface-2);
}

.nd-blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nd-blog-card:hover .nd-blog-card__img {
  transform: scale(1.06);
}

.nd-blog-card__body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.nd-blog-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.nd-blog-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--triny-glow);
  border: 1px solid var(--triny-glow-strong);
  color: var(--triny-accent);
}

.nd-blog-badge--corner {
  background: var(--corner-badge-bg);
  border-color: var(--corner-badge-border);
  color: var(--corner-accent-text);
}

.nd-blog-card__date {
  font-size: 0.78rem;
  color: var(--nd-text-muted);
  font-weight: 500;
}

.nd-blog-card__title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--nd-text);
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.nd-blog-card__excerpt {
  font-size: 0.88rem;
  color: var(--nd-text-secondary);
  line-height: 1.6;
  flex: 1;
}

.nd-blog-card__footer {
  padding-top: 0.8rem;
  border-top: 1px solid var(--nd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nd-blog-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--triny-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.nd-blog-card:hover .nd-blog-link {
  gap: 0.65rem;
}

/* Empty State */
.nd-blog-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--nd-surface-1);
  border: 1px dashed var(--nd-border);
  border-radius: 16px;
  color: var(--nd-text-secondary);
  font-size: 1rem;
}

.nd-blog-empty.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .nd-blog-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Single Blog Post View */
.nd-blog-post-container {
  width: 90%;
  max-width: 860px;
  margin: 0 auto;
  padding-top: 40px;
  padding-bottom: 80px;
  color: var(--nd-text);
}

.nd-blog-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nd-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.nd-blog-back-btn:hover {
  color: var(--triny-accent);
}

.nd-blog-post-header {
  margin-bottom: 32px;
}

.nd-blog-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.nd-blog-post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: #ffffff;
}

.nd-blog-post-hero-img {
  width: 100%;
  aspect-ratio: 1.6 / 1;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 36px;
  border: 1px solid var(--nd-border);
  box-shadow: 0 20px 50px var(--nd-shadow);
}

.nd-blog-post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--nd-text-secondary);
}

.nd-blog-post-content p {
  margin-bottom: 20px;
}

.nd-blog-post-content h1,
.nd-blog-post-content h2,
.nd-blog-post-content h3 {
  color: #ffffff;
  font-weight: 800;
  margin-top: 36px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.nd-blog-post-content hl {
  background: rgba(255, 235, 59, 0.25);
  color: #ffeb3b;
  padding: 2px 8px;
  border-radius: 4px;
}

.nd-blog-post-content a {
  color: var(--triny-accent, #00e5ff);
  text-decoration: none;
  border-bottom: 1px solid var(--triny-accent, #00e5ff);
  transition: all 0.2s ease;
}

.nd-blog-post-content a:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.nd-blog-post-inline-img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 16px;
  margin: 28px 0;
  border: 1px solid var(--nd-border);
}

/* Article Share Box Container */
.nd-blog-share-box {
  margin-top: 54px;
  padding: 24px 28px;
  background: var(--nd-surface-1);
  border: 1px solid var(--nd-border);
  border-radius: 18px;
  box-shadow: 0 16px 40px var(--nd-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.nd-blog-share-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.nd-blog-share-desc {
  font-size: 0.88rem;
  color: var(--nd-text-secondary);
  margin: 0;
}

.nd-blog-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--nd-surface-2);
  border: 1px solid var(--nd-border-hover);
  border-radius: 12px;
  color: var(--nd-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.nd-blog-share-btn:hover {
  background: var(--triny-glow);
  border-color: var(--triny-accent);
  color: var(--triny-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--triny-glow-strong);
}

.nd-blog-share-btn.copied {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

.nd-share-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}