/* Simple and Clean Styles for Tech Innovations Listicle */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --text-color: #212529;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #ffffff;
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation */
nav {
  background: white;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-link {
  color: var(--text-color) !important;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background-color: var(--light-color);
  color: var(--primary-color) !important;
}

/* Navigation Buttons */
.nav-button {
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-button:hover {
  background-color: var(--light-color);
  color: var(--primary-color);
}

/* Button Styles */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #545b62;
  transform: translateY(-1px);
}

.btn-info {
  background-color: var(--info-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-info:hover {
  background-color: #138496;
  transform: translateY(-1px);
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

/* Form Labels */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  background-color: var(--light-color);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--secondary-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Controls */
.controls {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

.controls h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.search-container input,
.filter-container select,
.sort-container select {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  transition: border-color 0.2s ease;
}

.search-container input:focus,
.filter-container select:focus,
.sort-container select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Main Content */
main {
  background: white;
  border-radius: 8px;
  margin: 1rem auto;
  padding: 2rem;
  min-height: calc(100vh - 200px);
}

/* Featured Section */
.featured-section {
  margin-bottom: 2rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.featured-card {
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-color: var(--info-color);
}

.featured-card h3 {
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.featured-card p {
  opacity: 0.9;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.featured-card .rating {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Innovations List */
.innovations-container {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.innovation-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  cursor: pointer;
}

.innovation-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.innovation-card.featured {
  border-left: 4px solid var(--warning-color);
}

.innovation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.innovation-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.innovation-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-color);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--success-color);
}

.innovation-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--secondary-color);
}

.innovation-description {
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.innovation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--light-color);
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.loading p {
  font-size: 1.125rem;
}

/* About Section */
.about-section {
  color: #000000;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.about-section h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
  padding: 2rem 0;
  text-align: center;
  color: #6b7280;
}

/* Modal - Simplified Design */
dialog {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

dialog article {
  padding: 0;
}

dialog header {
  background: var(--primary-color);
  color: white;
  border-radius: 8px 8px 0 0;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

dialog h3 {
  color: white;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

dialog main {
  padding: 1.5rem;
  background: white;
  margin: 0;
  box-shadow: none;
}

/* Modal Content Styles */
.modal-info-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-info-section:last-of-type {
  border-bottom: none;
}

.modal-info-section h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.modal-description,
.modal-impact {
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  font-size: 0.9rem;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item label {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.8rem;
  margin: 0;
}

.detail-value {
  color: var(--text-color);
  font-size: 0.9rem;
}

.rating-highlight {
  color: var(--success-color);
  font-weight: 600;
  font-size: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-tag {
  background: var(--light-color);
  color: var(--text-color);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.featured-indicator {
  background: var(--warning-color);
  color: var(--dark-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-align: center;
  font-weight: 600;
  margin: 1rem 0;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Simple animations */
.fade-in-up {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .controls .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .innovation-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .innovation-meta {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .modal-details {
    grid-template-columns: 1fr;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .button-group {
    flex-direction: column;
    align-items: center;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}