/* Blog Section — Tailwind-compatible, HostPrestige theme */

/* Card entrance animation */
.blog-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  filter: blur(6px);
}
.blog-card.animate-in {
  animation: blogCardIn 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.blog-card:nth-child(1) { animation-delay: 0.15s; }
.blog-card:nth-child(2) { animation-delay: 0.35s; }
.blog-card:nth-child(3) { animation-delay: 0.55s; }

@keyframes blogCardIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(6px); }
  60% { filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Card hover — lift + gold glow + image zoom */
.blog-card {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}
.blog-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 16px 40px rgba(139,69,19,0.12), 0 0 0 1px rgba(200,148,62,0.2);
}
.blog-card:hover img {
  transform: scale(1.08);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* "Lire l'article" arrow slide on hover */
.blog-card .read-more-arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.blog-card:hover .read-more-arrow {
  transform: translateX(4px);
}

/* Category badge slide-in */
.blog-card .cat-badge {
  transform: translateX(-8px);
  opacity: 0;
  transition: transform 0.4s ease 0.3s, opacity 0.4s ease 0.3s;
}
.blog-card.animate-in .cat-badge {
  transform: translateX(0);
  opacity: 1;
}

/* Modal */
.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.blog-modal.active {
  opacity: 1;
  visibility: visible;
}
.blog-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}
.blog-modal-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: translateY(40px) scale(0.95);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.blog-modal.active .blog-modal-container {
  transform: translateY(0) scale(1);
}
.blog-modal-body {
  overflow-y: auto;
  flex: 1;
}
.blog-modal-body::-webkit-scrollbar { width: 5px; }
.blog-modal-body::-webkit-scrollbar-track { background: transparent; }
.blog-modal-body::-webkit-scrollbar-thumb { background: #C8943E; border-radius: 3px; }

/* Modal content typography */
.blog-modal-text { font-family: 'Lora', serif; font-size: 16px; line-height: 1.8; color: #3D2B1F; }
.blog-modal-text p { margin-bottom: 20px; }
.blog-modal-text p:last-child { margin-bottom: 0; }
.blog-modal-text a { color: #8B4513; text-decoration: underline; text-underline-offset: 3px; }
.blog-modal-text a:hover { opacity: 0.75; }
.blog-modal-heading { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 700; color: #3D2B1F; margin-top: 40px; margin-bottom: 16px; }
.blog-modal-subheading { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: #3D2B1F; margin-top: 32px; margin-bottom: 16px; padding-left: 16px; border-left: 3px solid #C8943E; }
.blog-modal-text .blog-list { margin: 0 0 20px 0; padding-left: 24px; line-height: 1.8; }
.blog-modal-text .blog-list li { margin-bottom: 8px; }
.blog-blockquote { margin: 24px 0; padding: 16px 20px; border-left: 4px solid #C8943E; background: rgba(200,148,62,0.06); border-radius: 0 8px 8px 0; color: #6B3410; font-style: italic; }
.blog-code-block { margin: 24px 0; padding: 20px; background: #1e1e2e; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.blog-code-block code { font-family: 'Courier New', monospace; color: #cdd6f4; white-space: pre; }
.blog-inline-code { font-family: 'Courier New', monospace; font-size: 0.875em; padding: 2px 6px; border-radius: 4px; background: rgba(61,43,31,0.07); }
.blog-hr { border: none; border-top: 1px solid #e8dcc8; margin: 32px 0; }

/* Loading spinner */
.blog-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e8dcc8;
  border-top-color: #C8943E;
  border-radius: 50%;
  animation: blogSpin 0.8s linear infinite;
}
@keyframes blogSpin { to { transform: rotate(360deg); } }

/* Mobile modal */
@media (max-width: 768px) {
  .blog-modal-container { width: 95%; max-height: 95vh; border-radius: 18px; }
}
@media (max-width: 480px) {
  .blog-modal-container { width: 100%; max-height: 100vh; border-radius: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-card.animate-in {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
