/* ===============================
   TATSU-SAFE BLOG FOLDER GRID
   =============================== */

/* Force the blog container to behave like a grid even inside Tatsu Shortcode/code wrapper */
code .ebd-blog-container,
.tatsu-column-inner .ebd-blog-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    width: 100% !important;
    max-width: 100% !important;
    justify-items: center;
    align-items: start;
    box-sizing: border-box;
}

/* Make cards fill their grid cell */
code .ebd-blog-container .ebd-card,
.tatsu-column-inner .ebd-blog-container .ebd-card {
    width: 100%;
    box-sizing: border-box;
}

/* ===============================
   FOLDER CARD STYLING
   =============================== */

/* ===============================
   FOLDER CARD STYLING
   =============================== */

.ebd-card {
  position: relative;
  width: 350px;        /* card width */
  height: 400px;       /* card height */
  text-align: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.ebd-folder-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  border-radius: 12px;
}

/* Card content sits centered inside folder */
.ebd-card-content {
  position: relative;          /* relative to card, not absolute */
  z-index: 2;
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;                    /* spacing between elements */
  text-align: center;
  color: #333;
  margin-top: 70px;             /* pushes content down when no image */
  margin-bottom: 20px;         /* adds space from bottom */
}

/* Thumbnail image */
.ebd-thumb {
  width: 100%;
  height: 150px;
  max-height: 40%;              /* ensures it doesn’t overflow folder */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Blog title */
.ebd-card-content h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  word-wrap: break-word;
}

/* Hover effect */
.ebd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Optional: fallback spacing if no thumbnail */
.ebd-card-content.no-thumb {
  margin-top: 100px;  /* pushes text down inside folder */
}

/* ===============================
   RESPONSIVE GRID BREAKPOINTS
   =============================== */
@media (max-width: 1350px) {
    code .ebd-blog-container,
    .tatsu-column-inner .ebd-blog-container {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 1100px) {
    code .ebd-blog-container,
    .tatsu-column-inner .ebd-blog-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    code .ebd-blog-container,
    .tatsu-column-inner .ebd-blog-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}