/* Tools shortcode styles */
.tools { position: relative; }
.tools::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(197, 75, 116, 0.05) 0%, transparent 50%); pointer-events: none; }
.tools .container { position: relative; z-index: 1; }

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-2xl); margin-top: var(--spacing-4xl); }

.tool-card { background: var(--color-white); border-radius: var(--radius-2xl); padding: var(--spacing-2xl); box-shadow: var(--shadow-md); border: 1px solid var(--color-border); transition: all var(--transition-normal); display:flex; flex-direction:column; align-items:flex-start; }
.tool-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--color-primary); }
.tool-thumb { width: 100%; background: var(--color-background); border-radius: var(--radius-lg); overflow: hidden; display:flex; align-items:center; justify-content:center; }
.tool-thumb img { width: 100%; height: auto; object-fit: contain; }
.tool-title { font-size: var(--font-size-xl); margin: var(--spacing-lg) 0 var(--spacing-sm); color: var(--color-text); }
.tool-excerpt { color: var(--color-text-light); margin-bottom: var(--spacing-md); }
.tool-meta { display:flex; flex-wrap:wrap; gap: var(--spacing-xs); margin-bottom: var(--spacing-md); }
.tool-chip { display:inline-flex; align-items:center; gap:6px; padding: 4px 10px; border-radius: 999px; background: var(--color-background); color: var(--color-text); font-size: 12px; line-height: 1.4; border: 1px solid var(--color-border); }
.tool-actions { margin-top: auto; display:flex; gap: var(--spacing-sm); }


.tools-footer {
	margin-top: var(--spacing-4xl);
}

/* Responsive */
@media (max-width: 1024px) { .tools-grid { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-xl); } }
@media (max-width: 768px) {
  .tools-grid { grid-template-columns: 1fr; gap: var(--spacing-lg); }
  .tool-card { padding: var(--spacing-xl); }
  .tool-title { font-size: var(--font-size-lg); }
}
@media (max-width: 480px) { .tool-card { padding: var(--spacing-lg); } }

/* List layout */
.tools-list { display: flex; flex-direction: column; gap: var(--spacing-xl); margin-top: var(--spacing-4xl); }
.tools-list .tool-card { flex-direction: row; align-items: stretch; }
.tools-list .tool-thumb { flex: 0 0 220px; max-width: 220px; height: auto; border-radius: var(--radius-lg); overflow: hidden; }
.tools-list .tool-thumb img { width: 100%; height: auto; object-fit: contain; }
.tools-list .tool-body { flex: 1; padding-left: var(--spacing-xl); display: flex; flex-direction: column; }
.tools-list .tool-meta { margin-top: auto; }

@media (max-width: 768px) {
  .tools-list .tool-card {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .tools-list .tool-thumb {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    margin: 0 0 var(--spacing-md);
  }
  .tools-list .tool-body {
    padding-left: 0;
  }
  .tools-list .tool-meta,
  .tools-list .tool-actions {
    justify-content: flex-start;
  }
}

/* Tool Single (two-column) */
.tool-single { padding: var(--spacing-4xl) 0; }
.tool-single-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--spacing-3xl); align-items: start; grid-template-areas: 'main aside'; }
.tool-single .tool-title { margin: 0 0 var(--spacing-lg); font-size: var(--font-size-2xl); }
.tool-main { min-width: 0; grid-area: main; }
.tool-content > *:first-child { margin-top: 0; }

.tool-aside { position: relative; grid-area: aside; }
.tool-aside-card { position: sticky; top: var(--spacing-2xl); background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-md); padding: var(--spacing-xl); }
.tool-aside-thumb { margin-bottom: var(--spacing-lg); overflow: hidden; border-radius: var(--radius-lg); }
.tool-aside-thumb img { width: 100%; height: auto; display: block; }
.tool-aside .tool-excerpt { color: var(--color-text-light); margin-bottom: var(--spacing-md); }
.tool-aside .tool-meta { margin-bottom: var(--spacing-md); }
.tool-details { list-style: none; padding: 0; margin: var(--spacing-lg) 0; display: grid; row-gap: 8px; }
.tool-details li { color: var(--color-text); }
.tool-details li strong { font-weight: var(--font-weight-semibold); margin-right: 6px; }
.tool-aside .tool-actions { margin-top: var(--spacing-lg); display: flex; gap: var(--spacing-sm); }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tool-single-grid { grid-template-columns: 1fr; grid-template-areas: 'aside' 'main'; }
  .tool-aside-card { position: static; }
}

/* Gallery overrides (keep galleries inside the main column on Tool single) */
.tool-single .tool-main .lubinik-container [class*="-gallery-container"] {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  left: auto;
  right: auto;
  transform: none;
}
.tool-single .tool-main .lubinik-container [class*="gallery-"][class*="-shortcode"] {
  width: 100%;
  max-width: 100%;
}
