/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

/* Responsive Nav */
@media (max-width: 768px) {

  .filter-group {
    grid-template-columns: 1fr;
  }
}

/* Heading */
.heading {
  text-align: center;
  padding: 2rem 1rem 1rem;
  animation: fadeInDown 0.6s ease;
}

.heading h1 {
  font-size: 2.2rem;
  color: #0e4b85;
}

/* Filters Section */
.filters {
  max-width: 95%;
  margin: 1rem auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.6s ease;
}

.filters h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #333;
}

.filter-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.filter-group label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  color: #444;
  font-size: 0.8rem;
}

.filter-group select,
.filter-group input[type="text"] {
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.6rem;
}

.filter-group input[type="checkbox"] {
  margin-right: 8px;
}

#search-btn {
  margin-top: auto;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.6rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search-btn:hover {
  background-color: #0056b3;
}

/* Results Section */
#results-section {
  max-width: 90%;
  margin: 2rem auto;
  padding: 0 1rem;
}

#results-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #0f3de6;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Card */
.result-card {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  animation: fadeInCard 0.5s ease;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.result-card h3 {
  margin: 0.5rem 0;
  font-size: 1.3rem;
  color: #333;
}

.result-card p {
  font-size: 0.95rem;
  margin: 0.3rem 0;
  color: #555;
}

.contact-btn {
  margin-top: 1rem;
  background-color: #007bff;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
}

.contact-btn:hover {
  background-color: #0056b3;
}

/* Save Button */
.save-btn {
  background-color: #2196F3;
  color: white;
  border: none;
  padding: 10px 18px;
  margin: 5px 0;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-block;
  width: 100%;
}

.save-btn:hover {
  background-color: #0d8bf2;
  transform: scale(1.05);
}

/* Message Button */
.message-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #00b09b, #96c93d);
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.4s ease;
}

.message-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #1dd1a1, #c0f567);
}

.message-btn:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #0abf53, #c1ff72);
}

/* Modal */
.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.5s ease;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.profile-photo-modal {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal-content h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: #222;
}

.contact-actions {
  margin-top: 1.5rem;
}

.show-contact-btn {
  background-color: #198754;
  color: white;
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.show-contact-btn:hover {
  background-color: #0f5132;
}

.contact-info {
  margin-top: 1rem;
  background: #f1fdf4;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #cce7dd;
}

.contact-info p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: #333;
}

/* Rating Stars */
.rating-section {
  margin-top: 10px;
}

.assist-question {
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 16px;
  color: #333;
}

.stars {
  display: flex;
  gap: 10px;
  font-size: 24px;
  cursor: pointer;
  user-select: none;
}

.star {
  color: #ccc;
  transition: color 0.3s, transform 0.2s;
}

.star:hover,
.star:hover ~ .star {
  color: #FFD700;
  transform: scale(1.1);
}

.status {
  margin-top: 6px;
  font-size: 14px;
  color: green;
}

/* Animations */
@keyframes fadeInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInCard {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.fade-in {
  animation: fadeInCard 0.5s ease;
}


ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


@media (max-width: 768px) {
  /* Filters stack in one column */
  .filter-group {
    grid-template-columns: 1fr;
    margin: 1rem;
  }

  /* Reduce heading size for mobile */
  .heading h1 {
    font-size: 1.6rem;
  }

  /* Reduce padding in filters for smaller view */
  .filters {
    padding: 1rem;
  }

  /* Make result cards fill screen width better */
  .results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .result-card {
    padding: 1rem;
  }

  /* Adjust modal for mobile */
  .modal-content {
    padding: 1rem;
    max-width: 95%;
  }

  /* Buttons more thumb-friendly */
  #search-btn,
  .contact-btn,
  .save-btn,
  .show-contact-btn {
    padding: 10px;
    font-size: 0.9rem;
  }
  
#results-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #0f3de6;
}
  /* Reduce font size in card text */
  .result-card h3 {
    font-size: 1.1rem;
  }

  .result-card p {
    font-size: 0.85rem;
  }
}
