.sp-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(var(--sp-grid-layout,3),1fr);
    gap: 20px;
  }
  
  .sp-portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    width: 100%;
    height: 400px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
    transition: background-position 5s linear;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  
  .sp-portfolio-item:hover {
    background-position: bottom center;
  }
  
  .sp-portfolio-title {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--sp-title-bg, #000);
    color: var(--sp-title-color, #fff);
    text-align: center;
    padding: 10px;
    font-size: var(--sp-title-font-size, 24px);
    font-weight: bold;
  }
  
  .sp-portfolio-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .sp-portfolio-item:hover .sp-portfolio-overlay {
    opacity: 1;
  }
  
  .sp-portfolio-button {
    display: inline-block;
    margin: 5px;
    padding: 8px 15px;
    background: var(--sp-btn-bg, #0073aa);
    color: var(--sp-btn-color, #fff);
    font-size: var(--sp-btn-font-size, 16px);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
  }
  
  .sp-portfolio-snippet-button {
    background: var(--sp-snippet-bg, #333);
    color: var(--sp-snippet-color, #fff);
  }
/* Styles for portfolio-preview.php */
html,
body.sp-preview {
    height: 100%;
    margin: 0;
    padding: 0;
}

#preview-bar {
    background: #111;
    color: #fff;
    padding: 10px 20px;
    font-family: sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#preview-frame {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
}

a.back-link {
    color: #00baff;
    text-decoration: none;
    font-weight: bold;
}
  