/* =========================================
   SUNAHRI BLOG PAGE
   ========================================= */

:root {
  --blog-green: #1a3a2a;
  --blog-green-deep: #0f2a1c;
  --blog-gold: #d4a017;
  --blog-cream: #f7f4eb;
  --blog-card: #ffffff;
  --blog-muted: #6b7280;
  --blog-serif: var(--font-display);
}

/* ---- Hero uses shared .page-hero (same as products.html) ---- */

/* ---- Main section ---- */
.blog-main {
  background: var(--blog-cream);
  padding: 4rem 0 4.5rem;
  position: relative;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.blog-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.blog-section-head h2 {
  font-family: var(--blog-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--blog-green);
  margin-bottom: 0.5rem;
  text-transform: none;
}

.blog-section-head p {
  font-family: var(--font-body);
  color: var(--muted, var(--blog-muted));
  max-width: 48ch;
  margin: 0;
  font-size: var(--sub-size);
  font-weight: var(--sub-weight);
  line-height: var(--sub-lh);
}

.blog-section-link {
  color: var(--blog-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  margin-top: 0.35rem;
}

.blog-section-link:hover {
  color: var(--primary-dark);
}

/* ---- Cards ---- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.blog-card {
  background: var(--blog-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(26, 58, 42, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 58, 42, 0.1);
}

.blog-card-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 1.25rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  background: #f3e6c0;
  color: #3d3208;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.blog-card-title {
  font-family: var(--blog-serif);
  font-size: 1.2rem;
  color: var(--blog-green);
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--blog-gold);
}

.blog-card-excerpt {
  color: var(--blog-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--blog-muted);
}

.blog-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-meta i {
  color: var(--blog-gold);
  font-size: 0.75rem;
}

.blog-card-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blog-gold);
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.blog-card-arrow:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateX(2px);
}

.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--blog-muted);
  background: #fff;
  border-radius: 16px;
}

/* ---- Pagination ---- */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.blog-page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(26, 58, 42, 0.15);
  background: #fff;
  color: var(--blog-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.blog-page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--blog-gold);
  color: var(--blog-gold);
}

.blog-page-btn.active {
  background: var(--blog-gold);
  border-color: var(--blog-gold);
  color: #1a1a1a;
}

.blog-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Sidebar ---- */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 100px;
}

.blog-widget {
  background: #fff;
  border-radius: 14px;
  padding: 1.35rem;
  box-shadow: 0 6px 24px rgba(26, 58, 42, 0.05);
}

.blog-search {
  position: relative;
}

.blog-search input {
  width: 100%;
  border: 1px solid rgba(26, 58, 42, 0.12);
  border-radius: 10px;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  font-size: 0.9rem;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.blog-search input:focus {
  border-color: var(--blog-gold);
}

.blog-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--blog-gold);
  color: #1a1a1a;
  cursor: pointer;
}

.blog-widget-title {
  font-family: var(--blog-serif);
  font-size: 1.15rem;
  color: var(--blog-green);
  margin-bottom: 1rem;
}

.blog-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-cat-list li {
  margin-bottom: 0.35rem;
}

.blog-cat-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.4rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--blog-green);
  text-align: left;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.blog-cat-list button:hover,
.blog-cat-list button.active {
  background: rgba(212, 160, 23, 0.12);
}

.blog-cat-list .cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(212, 160, 23, 0.18);
  color: var(--blog-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.blog-cat-list .cat-name {
  flex: 1;
}

.blog-cat-list .cat-count {
  font-weight: 700;
  color: var(--blog-muted);
  font-size: 0.85rem;
}

.blog-recent-item {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.blog-recent-item:last-child {
  margin-bottom: 0;
}

.blog-recent-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.blog-recent-item h4 {
  font-size: 0.88rem;
  color: var(--blog-green);
  margin: 0 0 0.3rem;
  line-height: 1.35;
  font-family: var(--blog-serif);
}

.blog-recent-item:hover h4 {
  color: var(--blog-gold);
}

.blog-recent-item time {
  font-size: 0.75rem;
  color: var(--blog-muted);
}

/* Newsletter (visual only) */
.blog-newsletter {
  background: linear-gradient(160deg, #143024 0%, #1a3a2a 100%);
  border-radius: 14px;
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.blog-newsletter::after {
  content: '';
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 100px;
  height: 100px;
  background: url('../images/mv-wheat.png') no-repeat center / contain;
  opacity: 0.25;
  pointer-events: none;
}

.blog-newsletter h3 {
  font-family: var(--blog-serif);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.blog-newsletter p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.blog-newsletter input {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}

.blog-newsletter button {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  background: var(--blog-gold);
  color: #1a1a1a;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.blog-newsletter .nl-msg {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #a7f3d0;
  position: relative;
  z-index: 1;
}

/* ---- CTA bar ---- */
.blog-cta {
  background: linear-gradient(90deg, #143024 0%, #1a3a2a 70%, #243d2c 100%);
  padding: 2.25rem 0;
  position: relative;
  overflow: hidden;
}

.blog-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.blog-cta-text h2 {
  font-family: var(--blog-serif);
  color: #fff;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin-bottom: 0.35rem;
}

.blog-cta-text p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  max-width: 42ch;
  font-size: 0.92rem;
}

.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blog-gold);
  color: #1a1a1a;
  font-weight: 700;
  padding: 0.8rem 1.35rem;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.blog-cta-btn:hover {
  background: #e0b12a;
  color: #1a1a1a;
}

.blog-cta-visual {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(212, 160, 23, 0.5);
  flex-shrink: 0;
}

.blog-cta-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Detail page ---- */
.blog-detail-hero {
  background: linear-gradient(135deg, #143024 0%, #1a3a2a 100%);
  padding: 3.5rem 0 2.5rem;
  color: #fff;
}

.blog-detail-cat {
  display: block;
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0;
  border-radius: 0;
  margin: 0 0 1rem;
}

.blog-detail-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-transform: none;
  color: #fff;
  max-width: 18ch;
  margin: 0 0 1.2rem;
}

.blog-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1rem;
}

.blog-detail-meta i {
  color: var(--blog-gold);
  margin-right: 0.35rem;
}

.blog-detail-body {
  background: var(--blog-cream);
  padding: 3rem 0 4rem;
}

.blog-detail-featured {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.blog-detail-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 28px rgba(26, 58, 42, 0.05);
  margin-bottom: 2.5rem;
}

.blog-detail-content p {
  color: #374151;
  margin-bottom: 1.1rem;
  line-height: 1.75;
}

.blog-detail-content p:last-child {
  margin-bottom: 0;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blog-green);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.blog-back:hover {
  color: var(--blog-gold);
}

.blog-related h3 {
  font-family: var(--blog-serif);
  color: var(--blog-green);
  margin-bottom: 1.25rem;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.blog-missing {
  text-align: center;
  padding: 4rem 1rem;
}

.blog-missing[hidden] {
  display: none !important;
}

.blog-missing h1 {
  font-family: var(--blog-serif);
  color: var(--blog-green);
  margin-bottom: 0.75rem;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .blog-section-head {
    flex-direction: column;
  }

  .blog-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-main::before {
    display: none;
  }
}
