/**
 * Vitalisite FSE - Cards Styles
 * 
 * Styles for the Cards pattern (legacy style replication)
 * 
 * @package Vitalisite_FSE
 * @since 1.0.0
 */

/* ==========================================================================
   Cards Grid
   ========================================================================== */

.vitalisite-cards-grid,
.wp-block-vitalisite-cards-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem; /* gap-8 */
  width: 100%;
  justify-content: start;
  padding-top: 50px;
}

@media (min-width: 768px) {
  .vitalisite-cards-grid,
  .wp-block-vitalisite-cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .vitalisite-cards-grid,
  .wp-block-vitalisite-cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Card Item (Legacy Style)
   ========================================================================== */

.vitalisite-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;

  /* Legacy visual styles */
  background-color: #fff;
  border: 1px solid var(--wp--preset--color--border); /* Refined border thickness */
  border-radius: var(
    --wp--custom--image-radius
  ); /* Inherited from theme.json */
  padding: 2.5rem; /* Increased padding */
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 4px 6px -2px rgba(0, 0, 0, 0.025); /* Smoother shadow */

  transition:
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease;
}

.vitalisite-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.vitalisite-card > * {
  margin-top: 0;
  margin-bottom: 0;
}

.vitalisite-card .wp-block-buttons {
  margin-top: auto !important;
}

/* Heading Style Override */
.vitalisite-card h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 300; /* Ensure thin weight is applied via CSS too if needed */
}

/* ==========================================================================
   Editor Adjustments
   ========================================================================== */

/* 
 * In the editor, InnerBlocks adds a wrapper. 
 * We need to apply the grid to the inner layout container.
 */
.wp-block-vitalisite-cards-container
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 768px) {
  .wp-block-vitalisite-cards-container
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .wp-block-vitalisite-cards-container
    > .block-editor-inner-blocks
    > .block-editor-block-list__layout {
    grid-template-columns: repeat(3, 1fr);
  }
}
