/* Search Results Page Specific Styles */

/* Basic Reset - Only for search results specific elements */
.search-section *,
.search-box *,
.result *,
.no-results *,
.loading * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
margin: 0;
padding: 0;
  background-color: #144835;
  font-family: 'Jost', sans-serif;
}

/* Main Content */
main {
  font-family: 'Jost', sans-serif;
  background-color: #fff;
  color: #073c2c;
  display: flex;
  justify-content: center;
  padding: 7.25vw 20px;
  margin-top: 6vw;
  min-height: calc(100vh - 6vw);
}

/* Search Section */
.search-section {
  max-width: 700px;
  width: 100%;
  text-align: center;
}

.search-section h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  font-family: 'Jost', sans-serif;
  color: #144835;
}

.underline {
  height: 2px;
  width: 60px;
  background-color: #a2c144;
  margin: 0 auto 30px;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #f4ece5;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.search-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-box input {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  border: none;
  background: transparent;
  color: #073c2c;
  font-family: 'Jost', sans-serif;
}

.search-box input:focus {
  outline: none;
}

.search-box button {
  background: transparent;
  border: none;
  padding: 0 15px;
  cursor: pointer;
  font-size: 18px;
  color: #073c2c;
  transition: color 0.3s ease;
}

.search-box button:hover {
  color: #a2c144;
}

/* Suggestions Dropdown */
#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.suggestion {
  padding: 12px 20px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.3s ease;
  font-family: 'Jost', sans-serif;
}

.suggestion:hover {
  background-color: #f4ece5;
}

/* Results */
.result {
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
  transition: background-color 0.3s ease;
}

.result:hover {
  background-color: #f9f9f9;
}

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

.result a {
  font-size: 18px;
  font-weight: bold;
  color: #144835;
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  transition: color 0.3s ease;
}

.result a:hover {
  color: #a2c144;
  text-decoration: underline;
}

.result p {
  margin-top: 8px;
  color: #666;
  line-height: 1.5;
  font-family: 'Jost', sans-serif;
}

mark {
  background-color: #a2c144;
  color: #144835;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: bold;
}

.category {
    display: inline-block;
  background: #e8f5e8;
  color: #144835;
    font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 12px;
  margin-top: 8px;
  font-weight: 500;
  font-family: 'Jost', sans-serif;
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #144835;
  font-family: 'Jost', sans-serif;
}

.no-results p {
  font-size: 1rem;
  line-height: 1.5;
  font-family: 'Jost', sans-serif;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #a2c144;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  main {
    padding: 6vw 20px;
  }
  
  .search-section {
    max-width: 600px;
  }
  
  .search-section h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  main {
    margin-top: 17vw;
    padding: 4vw 15px;
  }
  
  .search-section {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .search-section h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
  
  .underline {
    width: 50px;
    margin-bottom: 25px;
  }
  
  .search-box {
    margin-bottom: 15px;
    border-radius: 6px;
  }
  
  .search-box input {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .search-box button {
    padding: 0 12px;
    font-size: 16px;
  }
  
  .result {
    padding: 15px;
    margin-bottom: 5px;
  }
  
  .result a {
    font-size: 16px;
    line-height: 1.4;
  }
  
  .result p {
    font-size: 14px;
    margin-top: 6px;
  }
  
  .category {
    font-size: 0.75rem;
    padding: 3px 6px;
    margin-top: 6px;
  }
  
  .suggestion {
    padding: 10px 15px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  main {
    padding: 3vw 10px;
  }
  
  .search-section h1 {
    font-size: 1.6rem;
  }
  
  .search-box input {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .search-box button {
    padding: 0 10px;
    font-size: 14px;
  }
  
  .result {
    padding: 12px;
  }
  
  .result a {
    font-size: 15px;
  }
  
  .result p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  main {
    margin-top: 17vw;
    padding: 2vw 8px;
  }
  
  .search-section {
    padding: 0 5px;
  }
  
  .search-section h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
  }
  
  .underline {
    width: 40px;
    margin-bottom: 20px;
  }
  
  .search-box {
    margin-bottom: 12px;
    border-radius: 4px;
  }
  
  .search-box input {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .search-box button {
    padding: 0 8px;
    font-size: 12px;
  }
  
  .result {
    padding: 10px;
    margin-bottom: 3px;
  }
  
  .result a {
    font-size: 14px;
    line-height: 1.3;
  }
  
  .result p {
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
  }
  
  .category {
    font-size: 0.7rem;
    padding: 2px 4px;
    margin-top: 4px;
  }
  
  .suggestion {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .no-results {
    padding: 30px 15px;
  }
  
  .no-results h3 {
    font-size: 1.2rem;
  }
  
  .no-results p {
    font-size: 0.9rem;
  }
  
  .loading {
    padding: 30px 15px;
  }
}

@media (max-width: 360px) {
  main {
    padding: 1vw 5px;
  }
  
  .search-section h1 {
    font-size: 1.2rem;
  }
  
  .search-box input {
    padding: 6px 8px;
    font-size: 11px;
  }
  
  .search-box button {
    padding: 0 6px;
    font-size: 11px;
  }
  
  .result {
    padding: 8px;
  }
  
  .result a {
    font-size: 13px;
  }
  
  .result p {
    font-size: 11px;
  }
  
  .category {
    font-size: 0.65rem;
    padding: 1px 3px;
  }
}

/* Enhanced Search Box Animation */
.search-box:focus-within {
  box-shadow: 0 4px 16px rgba(162, 193, 68, 0.2);
  border: 2px solid #a2c144;
}

/* Smooth Transitions */
.search-section {
  animation: fadeInUp 0.6s ease-out;
}

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

/* Search Results Animation */
.result {
  animation: slideInUp 0.4s ease-out;
  animation-fill-mode: both;
}

.result:nth-child(1) { animation-delay: 0.1s; }
.result:nth-child(2) { animation-delay: 0.2s; }
.result:nth-child(3) { animation-delay: 0.3s; }
.result:nth-child(4) { animation-delay: 0.4s; }
.result:nth-child(5) { animation-delay: 0.5s; }

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

/* Accessibility Improvements */
.search-box input:focus {
  outline: 2px solid #a2c144;
  outline-offset: 2px;
}

.suggestion:focus,
.result a:focus {
  outline: 2px solid #a2c144;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .search-box {
    border: 2px solid #000;
  }
  
  .result {
    border-bottom: 2px solid #000;
  }
  
  mark {
    background-color: #ffff00;
    color: #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .search-section,
  .result {
    animation: none;
  }
  
  .search-box,
  .search-box button,
  .suggestion,
  .result a {
    transition: none;
  }
}