* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7f9;
  color: #333;
  line-height: 1.6;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

header {
  background: linear-gradient(to right, #990000, #cc3333);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.logo {
  height: 60px;
  width: auto;
  margin-right: 1rem;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  font-family: 'Work Sans', sans-serif;
  margin: 0;
}

header p {
  font-size: 1.2rem;
  margin: 0;
  opacity: 0.9;
}

.container {
  max-width: 1000px;
  margin: 180px auto 0;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

form {
  margin-bottom: 20px;
  position: relative;
  display: block;
}

.search-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-type {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 200px;
}

.search-type label {
  margin: 0;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
}

.search-type select {
  padding: 8px;
  border-radius: 5px;
  font-size: 15px;
  border: 1px solid #dadada;
  background: #fff;
}

.autocomplete-container {
  position: relative;
  flex: 1;
  max-width: 500px;
  min-width: 200px;
}

.autocomplete-container input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  box-sizing: border-box;
}

#autocomplete-list {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  z-index: 1001;
  border: 1px solid #eee;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0 0 5px 5px;
  margin-top: -1px;
}

#autocomplete-list div {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 15px;
}

#autocomplete-list div:hover {
  background-color: #e6e6e6;
}

.form-filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  align-items: flex-end;
}

.filter-block {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  flex: 1 1 180px;
  margin-bottom: 0;
}

.filter-block label {
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  margin-bottom: 3px;
  font-size: 14px;
}

.filter-block select {
  padding: 8px;
  border-radius: 5px;
  font-size: 15px;
  border: 1px solid #dadada;
  background: #fff;
}

@media (max-width: 900px) {
  .search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .search-type {
    flex: 1;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  header p {
    font-size: 1rem;
  }
  
  .container {
    margin-top: 200px;
  }
}

button,
input[type="submit"] {
  background-color: rgb(153, 0, 0);
  color: white;
  border: 2px solid rgb(153, 0, 0);
  padding: 12px 20px;
  font-size: 16px;
  font-family: 'Work Sans', Helvetica, Arial, sans-serif;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
}

button:hover,
input[type="submit"]:hover {
  background-color: white;
  color: rgb(153, 0, 0);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.card {
  border-radius: 8px;
  padding: 16px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-family: 'Work Sans', sans-serif;
}

.card p {
  margin: 4px 0;
  font-size: 14px;
}

.pagination a {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 5px;
  background: #990000;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a:hover {
  background: #cc3333;
}

.pagination span {
  margin: 0 10px;
  font-weight: bold;
}
