/* ==============================================
   InquiryBase v8.2 — Polished Research Dashboard
   ============================================== */

body {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: #f6f8fa;
  color: #222;
}

/* ===== HERO ===== */
header {
  position: relative;
  text-align: center;
  color: white;
  background-color: #072b57;
  overflow: hidden;
}
#heroBg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 260px;
  z-index: 0;
}
.hero-text {
  position: relative; z-index: 1;
}
header h1 {
  font-size: 2.6rem;
  margin: 0;
  padding-top: 90px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
header p {
  margin: 10px 0 60px;
  font-size: 1.05rem;
  color: #dce8f6;
}

/* ===== CONTROLS ===== */
.controls {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.2rem 1.5rem;
  display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: center;
  align-items: center;
}
.controls label {
  font-weight: 600; color: #333;
}
select,
input[type="text"] {
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 190px;
}
select:focus, input:focus {
  outline: none;
  border-color: #005fcc;
  box-shadow: 0 0 0 2px rgba(0,95,204,0.15);
}
.note {
  font-size: 0.85rem;
  color: #666;
  margin-left: 0.5rem;
}

/* ===== RESULTS ===== */
#results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
  padding: 2rem 2.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ===== LOADING SPINNER ===== */
.loading {
  text-align: center;
  font-size: 1rem;
  color: #555;
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.loading.fade-out {
  opacity: 0;
}
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #cfe2ff;
  border-top-color: #005fcc;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== CARD ===== */
.card {
  background: #fff;
  border: 1px solid #e3e7ea;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
  opacity: 0; transform: translateY(6px);
  animation: fadeIn 0.4s forwards;
}
@keyframes fadeIn { to {opacity: 1; transform: none;} }

.card:hover {
  transform: translateY(-3px);
  border-color: #c6d9f3;
  box-shadow: 0 6px 18px rgba(0,80,160,0.08);
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #072b57;
  margin: 0 0 0.5rem;
}
.card p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.45;
  margin: 0.4rem 0;
}
.card a {
  text-decoration: none;
  color: #005fcc;
  font-weight: 600;
}
.card a:hover { text-decoration: underline; }
.source-tag {
  display: inline-block;
  background: #eff6ff;
  color: #005fcc;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 3px 8px;
  margin-bottom: 0.7rem;
}

/* ===== OVERVIEW ===== */
#overview {
  position: absolute;
  right: 2rem; top: 14.5rem;
  background: #fff;
  border: 1px solid #cbd8e6;
  box-shadow: 0 3px 12px rgba(0,0,0,0.07);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  width: 250px; z-index: 2;
}
#overview.hidden { display: none; }
#overview h3, #overview h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: #072b57;
  font-weight: 700;
}
#overview ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem; color: #444;
}

/* ===== PAGINATION ===== */
.pagination {
  text-align: center;
  padding: 1rem;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  font-size: 0.95rem;
}
.pagination button {
  background: #005fcc;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.pagination button:hover {
  background: #073a84;
}
.pagination.hidden { display: none; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #overview { position: static; margin: 1.5rem auto; width: 90%; }
  .controls { flex-direction: column; gap: 0.8rem; }
  #results { padding: 1.3rem; }
}
