/* ===== STILURI PAGINA BLOG ===== */

.blog-hero {
  padding: 10rem 0 3rem;
  background: radial-gradient(ellipse at 30% 0%, rgba(180,30,40,.12) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 100%, rgba(212,175,55,.06) 0%, transparent 50%),
              var(--bg);
}

.blog-main {
  padding: 3rem 0 6rem;
  background: var(--bg);
}

/* ===== GRID BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ===== CARD BLOG ===== */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(180,30,40,0.3);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 40px rgba(180,30,40,0.08);
}

/* Imaginea cardului */
.blog-card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--bg3));
}
.blog-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.08); }
.blog-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,0.85) 0%, transparent 60%);
  pointer-events: none;
}
.blog-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 3rem; opacity: 0.3;
}

/* Badge data pe card */
.blog-date-badge {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(180,30,40,0.92); backdrop-filter: blur(8px);
  color: white; padding: 0.6rem 0.85rem; border-radius: 14px;
  text-align: center; line-height: 1;
  box-shadow: 0 6px 20px rgba(180,30,40,0.4);
}
.blog-badge-day { display: block; font-size: 1.4rem; font-weight: 800; font-family: var(--font-serif); }
.blog-badge-month { display: block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; margin-top: 2px; opacity: 0.85; }

/* Continutul cardului */
.blog-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.blog-card-excerpt {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 1.25rem;
}
.blog-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.blog-card-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.blog-card-link {
  color: var(--red-light);
  font-size: 0.85rem;
  font-weight: 600;
  transition: gap 0.3s, color 0.3s;
  display: flex; align-items: center; gap: 0.3rem;
}
.blog-card:hover .blog-card-link { color: var(--gold); gap: 0.6rem; }

/* ===== MODAL BLOG ===== */
.blog-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(15px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.blog-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.blog-modal-content {
  background: var(--bg2);
  width: 95%;
  max-width: 800px;
  border-radius: 32px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin: 2rem auto;
}
.blog-modal-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: rgba(0,0,0,0.5); border: none; color: white;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.5rem; cursor: pointer; z-index: 10;
  transition: background 0.3s;
}
.blog-modal-close:hover { background: rgba(180,30,40,0.6); }

/* Header modal */
.blog-detail-header {
  position: relative;
  height: 350px;
}
.blog-detail-img {
  width: 100%; height: 100%; object-fit: cover;
}
.blog-detail-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg2) 5%, transparent 60%);
}

/* Continut modal */
.blog-detail-body {
  padding: 2rem 3rem 3rem;
}
.blog-detail-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.blog-detail-meta span {
  display: flex; align-items: center; gap: 0.4rem;
}
.blog-detail-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 2rem;
}
.blog-detail-content {
  color: rgba(255,255,255,0.95);
  font-size: 1.08rem;
  line-height: 1.9;
}
.blog-detail-content p {
  margin-bottom: 1.5rem;
}
.blog-detail-content strong {
  color: #fff;
  font-weight: 700;
}
.blog-detail-content em {
  color: rgba(255,255,255,0.65);
}
.blog-detail-content a {
  color: var(--red-light, #e84855);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}
.blog-detail-content a:hover {
  color: #ff6b6b;
}
.blog-detail-content h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  margin: 2.5rem 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(180,30,40,0.25);
}
.blog-detail-content h3 {
  font-size: 1.25rem;
  color: #fff;
  margin: 2rem 0 0.75rem;
}
.blog-detail-content ul, .blog-detail-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.blog-detail-content li {
  margin-bottom: 0.5rem;
}
.blog-detail-content blockquote {
  border-left: 3px solid var(--gold, #d4af37);
  padding-left: 1.25rem;
  margin: 2rem 0;
  color: rgba(255,255,255,0.75);
  font-style: italic;
}

/* Stare goala (fara articole) */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}
.blog-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}
.blog-empty p {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* ===== RESPONSIV ===== */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .blog-detail-body { padding: 1.5rem 2rem 2rem; }
  .blog-detail-title { font-size: 2rem; }
}
@media (max-width: 640px) {
  .blog-hero { padding: 7rem 0 2rem; }
  .blog-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* card-ul de pe lista */
  .blog-card { border-radius: 16px; }
  .blog-card-img { height: 220px; }
  .blog-card-img img { object-position: center 30%; }

  /* modalu full-screen pe mobil */
  .blog-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
    margin: 0;
    min-height: 100vh;
  }
  .blog-modal-close {
    top: 0.75rem; right: 0.75rem;
    width: 36px; height: 36px;
    font-size: 1.3rem;
  }
  .blog-detail-header { height: 240px; }
  .blog-detail-img { object-position: center 25%; }
  .blog-detail-body { padding: 1rem 1.25rem 2rem; }
  .blog-detail-meta { margin-bottom: 0.75rem; font-size: 0.8rem; }
  .blog-detail-title { font-size: 1.5rem; margin-bottom: 1.25rem; }
  .blog-detail-content { font-size: 0.95rem; line-height: 1.75; }
  .blog-detail-content p { margin-bottom: 1.15rem; }
  .blog-detail-content h2 { font-size: 1.3rem; margin: 1.75rem 0 1rem; }
}
