/* search.css - isolated from header.css */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
  }
  
  /* Title */
  .page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(90deg, #ff4081, #ff9100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  /* Search box form (isolated class) */
  .search-box-form {
    margin: 0 auto 2rem;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .search-box-form input,
  .search-box-form select,
  .search-box-form button {
    padding: 8px 12px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  .search-box-form button {
    background: #ff4081;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: 0.3s;
  }
  .search-box-form button:hover {
    background: #e23370;
  }
  
  /* Grid */
  .search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  /* Card */
  .result-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
  }
  .result-card:hover {
    transform: translateY(-4px);
  }
  .result-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }
  
  /* Card body */
  .result-body {
    padding: 15px;
  }
  .result-body a.title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
  }
  .result-body a.title:hover {
    color: #ff4081;
  }
  .result-body p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 8px;
  }
  .result-body small {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
    display: block;
  }
  .result-body b {
    color: #000;
  }
  
  /* Highlight */
  strong {
    background: rgba(255, 230, 0, 0.6);
    padding: 0 2px;
  }
  
  /* No results */
  .no-results {
    text-align: center;
    margin-top: 2rem;
    font-size: 1rem;
    color: #444;
  }
  
  /* Gradient button + form */
.search-box-form button {
    background: linear-gradient(90deg, blue, indigo, violet);
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px 16px;
    transition: opacity 0.3s;
  }
  .search-box-form button:hover {
    background: linear-gradient(90deg, violet,blue,indigo);
    opacity: 0.85;
  }
  
  /* Pagination */
  .pagination {
    margin: 2rem auto;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .page-link {
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    background: #f5f5f5;
    transition: background 0.3s, color 0.3s;
  }
  .page-link:hover {
    background: linear-gradient(90deg, green, blue, indigo, violet);
    color: #fff;
  }
  .page-link.active {
    background: linear-gradient(90deg,  green, blue, indigo, violet);
    color: #fff;
  }
  
 /* ================= Responsive ================= */

/* Mobile responsiveness */
@media (max-width: 600px) {
  /* Make title smaller */
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  /* Stack form elements cleanly */
  .search-box-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .search-box-form input,
  .search-box-form select,
  .search-box-form button {
    width: 100%;
    font-size: 0.95em;
  }

  /* Grid with smaller cards */
  .search-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .result-card img {
    height: 150px;
  }

  /* Pagination tighter */
  .pagination {
    gap: 6px;
  }
  .page-link {
    padding: 6px 10px;
    font-size: 0.85em;
  }
}

/* Ultra-small screens (below 300px) */
@media (max-width: 300px) {
  .page-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .search-box-form {
    flex-direction: column;
    gap: 6px;
  }
  .search-box-form input,
  .search-box-form select,
  .search-box-form button {
    width: 100%;
    font-size: 0.85em;
    padding: 6px;
  }

  .search-grid {
    grid-template-columns: 1fr;  /* Always single column */
    gap: 12px;
  }
  .result-card img {
    height: 120px;
  }

  .pagination {
    gap: 4px;
    flex-wrap: wrap; /* so buttons don’t overflow */
    justify-content: center;
  }
  .page-link {
    padding: 5px 8px;
    font-size: 0.75em;
  }
}
