/* CCME — Resources / tools page */

.tools-section {
  padding: var(--spacing-3xl) 0;
  background: var(--surface-color);
}

.tools-category {
  margin-bottom: var(--spacing-3xl);
}

.tools-category h2 {
  font-family: var(--font-secondary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-primary);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid rgba(37, 99, 235, 0.15);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.tool-card {
  background: #fff;
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tool-card h3 {
  font-family: var(--font-secondary);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

.tool-content,
.calculator {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.tool-content label,
.calculator label,
.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tool-content input,
.tool-content select,
.calculator input,
.calculator select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-content input:focus,
.tool-content select:focus,
.calculator input:focus,
.calculator select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.calculator .result {
  background: rgba(37, 99, 235, 0.06);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.calculator .result p {
  margin: 0.25rem 0;
  color: var(--text-primary);
  font-weight: 500;
}

.tool-result {
  margin-top: var(--spacing-sm);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.tool-result p {
  margin: 0.35rem 0;
}

.tool-success {
  color: var(--success-color);
  font-weight: 500;
}

.tool-error {
  color: var(--error-color);
  font-weight: 500;
}

.tool-loading {
  color: var(--text-secondary);
  font-style: italic;
}

.tool-note {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.tool-note a {
  color: var(--primary-color);
}

.tool-disclaimer {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
}

.tool-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: var(--spacing-sm) 0;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.tool-table th,
.tool-table td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.tool-table th {
  background: rgba(37, 99, 235, 0.06);
  color: var(--text-primary);
  font-weight: 600;
}

.invoice-preview {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  background: #fff;
}

.invoice-preview p {
  margin: 0.35rem 0;
}

.guides-section {
  margin-top: var(--spacing-3xl);
}

.guides-section h2 {
  font-family: var(--font-secondary);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--spacing-xl);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.guide-card {
  background: #fff;
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
}

.guide-card h3 {
  font-family: var(--font-secondary);
  margin-bottom: var(--spacing-md);
}

.guide-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--spacing-lg);
}

.guide-card ul li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.guide-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .tools-grid,
  .guides-grid {
    grid-template-columns: 1fr;
  }
}
