body {
  font-family: system-ui, sans-serif;
  background: #fafbfc;
  margin: 0;
  padding: 0;
}

main {
  max-width: 800px;
  margin: 2em auto;
  padding: 2em 1.5em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

h1 {
  font-size: 1.8em;
  margin-bottom: 0.8em;
  text-align: center;
  color: #1976d2;
}

.welcome-container {
  text-align: center;
  margin-bottom: 2em;
  padding: 1em;
  background: #f5f7fa;
  border-radius: 8px;
}

.welcome-container h2 {
  color: #333;
  margin-bottom: 0.5em;
}

.welcome-container p {
  color: #555;
  line-height: 1.5;
}

h2 {
  font-size: 1.3em;
  margin: 1em 0;
}

h3 {
  font-size: 1em;
  margin: 0.5em 0;
  color: #555;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-bottom: 1.5em;
}

.search-container {
  display: flex;
  gap: 0.5em;
}

input[type="text"] {
  padding: 1em;
  font-size: 1.1em;
  border: 2px solid #1976d2;
  border-radius: 4px;
  flex-grow: 1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.example-queries {
  margin: 1em 0;
  text-align: center;
}

.example-queries p {
  margin-bottom: 0.5em;
  font-size: 0.9em;
  color: #555;
}

.example-query-btn {
  background: #f1f8fe;
  border: 1px solid #90caf9;
  color: #1976d2;
  padding: 0.5em 1em;
  margin: 0.3em;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
}

.example-query-btn:hover {
  background: #e3f2fd;
  border-color: #1976d2;
}

select {
  padding: 0.5em;
  font-size: 0.9em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background-color: white;
}

.filters-container {
  background: #f5f7fa;
  border-radius: 6px;
  padding: 1em;
  margin: 0.5em 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.8em;
}

.filter-group label {
  margin-bottom: 0.3em;
  font-size: 0.9em;
  color: #555;
}

button[type="submit"] {
  padding: 0.7em;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  background: #1976d2;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5em;
}

button[type="submit"]:hover {
  background: #1565c0;
}

button[type="submit"]:disabled {
  background: #90caf9;
  cursor: not-allowed;
}

#loading {
  text-align: center;
  color: #1976d2;
  margin-bottom: 1em;
}

.error {
  color: #c62828;
  background: #ffebee;
  border-radius: 4px;
  padding: 0.7em;
  margin-bottom: 1em;
  text-align: center;
}

#results-container {
  margin-bottom: 1.5em;
}

#results-count {
  margin-bottom: 0.5em;
  color: #555;
  font-size: 0.9em;
}


#results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.result-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s;
}

.result-card:hover {
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8em;
  padding-bottom: 0.8em;
  border-bottom: 1px solid #eee;
}

.result-title {
  font-weight: bold;
  font-size: 1.1em;
  margin: 0;
}


.result-content {
  margin-bottom: 1em;
}

.result-section {
  margin-bottom: 0.8em;
}

.result-section h4 {
  margin: 0 0 0.4em 0;
  color: #555;
  font-size: 0.9em;
}

.result-section p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.4;
}

.result-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-top: 1em;
  padding-top: 0.8em;
  border-top: 1px solid #eee;
}

.metadata-tag {
  background: #f5f5f5;
  color: #555;
  padding: 0.3em 0.6em;
  border-radius: 12px;
  font-size: 0.8em;
}

.more-info-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #1976d2;
  color: #fff;
  border: none;
  padding: 0.7em 0;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 1em;
  cursor: pointer;
  transition: background 0.15s;
}

.more-info-btn:hover {
  background: #1565c0;
}

.result-content.expanded .result-section {
  display: block;
}

.cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #43a047;
  color: #fff;
  text-decoration: none;
  padding: 0.8em 0;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 1.5em;
  transition: background 0.15s;
}

.cta-btn:hover, .cta-btn:focus {
  background: #388e3c;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

.close-modal:hover {
  color: #000;
}

.calendly-inline-widget {
  min-width: 320px;
  height: 580px;
}

.hidden {
  display: none !important;
}

@media (min-width: 768px) {
  .filter-group {
    flex-direction: row;
    align-items: center;
  }
  
  .filter-group label {
    width: 120px;
    margin-bottom: 0;
  }
  
  .filter-group select {
    flex: 1;
  }
}