/* ===== Blog Page — Editorial Style ===== */

/* ===== Blog Header ===== */
.blog-header {
  padding: 8rem 0 5rem;
  text-align: center;
  background-color: #dceee8;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid background */
.blog-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* ===== Floating Orbs ===== */
.blog-orb {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  animation: float 6s ease-in-out infinite;
  user-select: none;
}

.blog-orb--1 { top: 18%; left: 6%;  animation-delay: 0s;    animation-duration: 7s; }
.blog-orb--2 { top: 12%; right: 8%; animation-delay: 1s;    animation-duration: 6s; }
.blog-orb--3 { bottom: 22%; left: 12%; animation-delay: 2s; animation-duration: 8s; }
.blog-orb--4 { bottom: 18%; right: 6%; animation-delay: 0.5s; animation-duration: 7s; }
.blog-orb--5 { top: 50%; left: 3%;  animation-delay: 1.5s; animation-duration: 9s; }

@keyframes float {
  0%, 100% { transform: translateY(0px);   }
  50%       { transform: translateY(-12px); }
}

/* Hide orbs on small screens */
@media (max-width: 640px) {
  .blog-orb { display: none; }
}

/* ===== Header Text ===== */
.blog-header .section-label {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,0.6);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(0,0,0,0.08);
}

.blog-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #1a1a1a;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.blog-title em {
  font-style: normal;
  color: var(--color-primary);
}

.blog-subtitle {
  font-size: 1rem;
  color: #555;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Blog Section ===== */
.blog-section {
  padding: 5rem 0;
  background: #f9f9f7;
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

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

/* ===== Blog Card ===== */
.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

/* ===== Card Image ===== */
.blog-card-image {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #7ab5ab 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 600;
  overflow: hidden;
  position: relative;
}

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

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

/* ===== Card Content ===== */
.blog-card-content {
  padding: 1.75rem;
}

/* Date badge — like getproven */
.blog-card-meta {
  margin-bottom: 1rem;
}

.blog-card-date {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #dceee8;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

/* Hide dot and tag — not needed with badge style */
.blog-card-dot,
.blog-card-tag {
  display: none;
}

.blog-card-title {
  font-size: 1.3rem;
  font-family: var(--font-heading);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

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

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  transition: gap 0.2s ease;
}

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

/* ===== Blog Actions ===== */
.blog-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ===== Empty State ===== */
.blog-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #999;
  grid-column: 1 / -1;
}

.blog-empty svg {
  margin-bottom: 1rem;
  opacity: 0.3;
}

.blog-empty p {
  font-size: 1.1rem;
  font-family: var(--font-heading);
}

/* ===== Blog Modal ===== */
.blog-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
}

.blog-modal.active {
  opacity: 1;
  visibility: visible;
}

.blog-modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.18);
}

.blog-modal.active .blog-modal-content {
  transform: translateY(0) scale(1);
}

.blog-modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem 0;
}

.blog-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #999;
  transition: all 0.2s ease;
}

.blog-modal-close:hover {
  background: #f0f0f0;
  color: #333;
  transform: rotate(90deg);
}

/* Modal image — sits flush above body */
.blog-modal-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  display: none;
  margin-top: 0.5rem;
}

.blog-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-modal-body {
  padding: 2rem 2.5rem 1.5rem;
}

.blog-post-date {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #dceee8;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.blog-post-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  outline: none;
  padding: 0.25rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.blog-post-title[contenteditable="true"] {
  background: #f5f5f5;
}

.blog-post-content {
  font-size: 1rem;
  color: #444;
  line-height: 1.85;
  outline: none;
  padding: 0.5rem;
  border-radius: 6px;
  min-height: 200px;
  transition: background 0.2s ease;
}

.blog-post-content[contenteditable="true"] {
  background: #f5f5f5;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
  margin: 1.75rem 0 0.75rem;
  letter-spacing: -0.01em;
  color: #1a1a1a;
}

.blog-post-content p { margin-bottom: 1.25rem; }

.blog-post-content ul,
.blog-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-post-content li { margin-bottom: 0.4rem; }

.blog-post-content strong {
  font-weight: 600;
  color: #1a1a1a;
}

.blog-post-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #777;
  font-style: italic;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.blog-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem 2rem;
  border-top: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* ===== Card reveal animation ===== */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.blog-card {
  animation: cardReveal 0.5s ease both;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.13s; }
.blog-card:nth-child(3) { animation-delay: 0.21s; }
.blog-card:nth-child(4) { animation-delay: 0.29s; }
.blog-card:nth-child(5) { animation-delay: 0.37s; }
.blog-card:nth-child(6) { animation-delay: 0.45s; }
