/* Calculator Directory Specific Styles */

.calculator-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.calculator-hero .hero-content {
  max-width: 900px;
}

.calculator-hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.calculator-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.calculator-hero .search-container {
  max-width: 600px;
  margin: 0 auto;
}

.calculator-hero .search-input {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
}

.calculator-hero .search-input:focus {
  background: white;
  border-color: var(--accent);
}

/* Calculator Categories Directory */
.calculator-categories-directory {
  padding: 4rem 0;
  background: #f8fafc;
}

.category-section {
  margin-bottom: 4rem;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  flex-shrink: 0;
}

.category-icon img {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1);
}

.category-icon i {
  font-size: 2rem;
  color: white;
}

.category-info h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.category-info p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.category-info .calculator-count {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Calculator Grid */
.calculators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.calculator-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: block;
}

.calculator-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
  border-color: var(--primary);
}

.calculator-card h3 {
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.calculator-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Search Results Styling */
.search-results {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 1000;
  margin-top: 0.5rem;
  display: none;
}

.search-result-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.search-result-description {
  font-size: 0.9rem;
  color: var(--text-light);
}

.search-result-category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .calculator-hero {
    padding: 120px 0 40px;
  }

  .calculator-hero h1 {
    font-size: 2.25rem;
  }

  .category-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .category-icon {
    width: 60px;
    height: 60px;
  }

  .category-icon img {
    width: 30px;
    height: 30px;
  }

  .category-info h2 {
    font-size: 1.5rem;
  }

  .calculators-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calculator-card {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .calculator-hero h1 {
    font-size: 1.875rem;
  }

  .category-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .calculator-card {
    padding: 1rem;
  }

  .calculator-card h3 {
    font-size: 1.1rem;
  }
}

/* Animation for category sections */
.category-section {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Highlight matching search terms */
.highlight {
  background: yellow;
  font-weight: bold;
}
