/* ===== Base Styles ===== */
body, html {
  font-family: 'Open Sans', sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 0;
  height: 100%;
}

h1 {
  color: #2d2d62;
  text-align: center;
  margin-top: 5%;
  margin-bottom: 1rem;
}

/* ===== Sticky Footer Container ===== */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Search Results Wrapper ===== */
.search-results-wrapper {
  padding-top: 120px;
  box-sizing: border-box;
  flex: 1 0 auto; /* grow only if needed */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* results at top */
}

.search-results-wrapper h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  line-height: 1.2;
}

/* ===== Results Container ===== */
#resultsContainer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 2rem;
  flex: 0 0 auto; /* don't stretch if few/no results */
}

/* ===== No Results Message ===== */
.no-results {
  max-width: 400px;
  margin: 2rem auto;
  font-size: 1.1rem;
  color: #555;
  text-align: center;
}

.no-results strong {
  background-color: #fff59d;
  color: #2d2d62;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
}

/* ===== Individual Result Card ===== */
.search-item {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  min-height: 280px;
}

.search-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  background-color: #fff9db;
}

/* ===== Result Image ===== */
.search-item .search-icon {
  width: 300px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
}

/* ===== Result Text ===== */
.search-item .search-content {
  flex: 1;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-item .search-content strong {
  font-size: 1.1rem;
  color: #2d2d62;
  margin-bottom: 0.25rem;
}

.search-item .search-content p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  line-height: 1.3;
}

/* ===== Highlight Keyword ===== */
.highlight {
  background-color: #fff59d;
  color: #2d2d62;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  animation: fadeInHighlight 0.5s forwards;
}

.search-item .highlight:hover {
  background-color: #ffe066;
  transition: background-color 0.2s;
}

/* ===== Keyframes ===== */
@keyframes fadeInHighlight {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Footer Logos ===== */
.footer-logos {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  color: #777;
}

.footer-logos img {
  object-fit: contain;
  height: 90px;
  transition: transform 0.3s ease;
}

.footer-logos img:hover {
  transform: scale(1.1);
}

/* ===== Partners Section ===== */
.partners-section {
  background-color: transparent;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 0; /* remove extra gap */
}

.partners-title {
  font-size: 34px;
  font-weight: 800;
  color: #2d2d62;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.partners-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
  justify-items: center;
  align-items: center;
}

.partner-logo img {
  max-width: 200px;
  width: 60%;
  height: auto;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.partner-logo:nth-child(1) img,
.partner-logo:nth-child(4) img {
  max-width: 240px;
}

.partner-logo img:hover {
  transform: scale(1.1);
}

/* ===== Footer ===== */
footer.footer {
  flex-shrink: 0;
}

/* ===== Responsive Layout ===== */

@media (max-width: 1024px) {
  .search-results-wrapper { padding-top: 130px; }
  .search-results-wrapper h1 { font-size: 1.8rem; }
  .search-item .search-icon { width: 250px; aspect-ratio: 4 / 3; }
  .partners-container { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
  .partners-section { padding: 40px 20px; }
}

@media (max-width: 750px) {
  .search-item { flex-direction: column; min-height: auto; }
  .search-item .search-icon { width: 100%; height: 300px; aspect-ratio: auto; }
  .search-item .search-content { padding: 20px; }
  .search-item .search-content strong { font-size: 1rem; }
  .search-item .search-content p { font-size: 0.9rem; }
  .partners-section { padding: 30px 15px; } /* reduced padding */
}

@media (max-width: 600px) {
  .search-results-wrapper { padding-top: 160px; }
  .search-results-wrapper h1 { font-size: 1.5rem; }
  .partners-container { grid-template-columns: 1fr; max-width: 300px; }
  .partners-section { padding: 20px 10px; } /* tighter padding for mobile */
}

