* {
    margin: 0;
    padding: 0;
}

h2 {
    font-size: 40px;
    color: darkblue;
}

h3 {
    color: white;
}

.ad-year {
    color: yellow;
}

.ad-price {
    color: red;
}

#filtration {
    background-color: orange;
    color: darkblue;
    width: 1200px;
    margin: 0 auto;
    margin-bottom: 60px;
    margin-top: 150px;
    padding: 20px;

    border-radius: 20px;
}

.filters {
    display: flex;
}

.filter {
    width: 250px;

    margin-top: 20px;

    border-radius: 30px;

    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding: 5px;

    position: relative;

    border-width: 2px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0);
}

.filter:hover {
    border-color: orange;
}

.filter:not(:first-child) {
    margin-left: 20px;
}

.filter:active .filter-dropdown{
    display: flex;
}

.filter-box {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.filter-dropdown {
    position: absolute;
    
    top: 60px;
    left: 0;

    padding: 10px;

    border-radius: 5px;

    display: none;
    flex-direction: column;

    width: calc(100% - 20px);
    height: 200px;

    background-color: #DEFAB0;

    overflow: auto;
}

.filter-dropdown span {
    padding: 5px;
}

.filter-dropdown span:hover {
    background-color: darkorange;
    
}

.filter-dropdown.open {
    display: flex;
    flex-direction: column;
    max-height: 200px;
}

.filter-box {
    cursor: pointer;
    user-select: none;
}

.filter-box .filter-label {
    flex: 1;
}

.buttons {
    display: flex;
    flex-direction: row;
    margin: 0 20; /* одинаковый отступ со всех сторон */
}

#generateQuery {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: orange;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

#generateQuery:hover {
    background-color: darkorange;
}

.ads-header {
    margin-bottom: 20px;
    color: darkblue;
}

.ads {
    padding: 20px;
    background-color: orange;
    border-radius: 20px;
    width: 1440px;
    margin: 0 auto;
}

.ads-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.ads-list:not(:last-child) {
    margin-bottom: 60px;
}

.ad {
    padding: 10px;
    margin: 10px;
    width: 320px;
    
    background-color: darkblue;

    border-radius: 20px;

    display: flex;
    flex-direction: column;
}

.ad:not(:last-child) {
    margin-right: 10px;
}

.ad-image {
    width: 320px;
    height: 210px;
}

  /* Стиль для модалки */
  .modal {
    display: none; /* по умолчанию скрыта */
    position: fixed;
    top: 0;
    left:0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
  }
  .modal-content {
    background: orange; /* или используйте цветовые коды например #FFA500 */
    padding: 20px;
    border-radius: 4px;
    width: 350px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
  }
  /* Стиль для заголовка */
  h2 {
    margin-top: 0;
    text-align: center;
  }
  /* Стиль для формы */
  form {
    display: flex;
    flex-direction: column;
  }
  /* Метки и поля ввода с равным отступом и выравниванием */
  label {
    margin-top: 10px;
    margin-bottom: 5px;
  }
  input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  /* Кнопка отправки */
  button {
    margin: 15px;
    padding: 10px;
    font-size: 14px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 200px; /* <-- добавлено для уменьшения ширины */
  }
  button:hover {
    background-color: #45a049;
  }
  /* Кнопка закрытия */
  .close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    font-weight: bold;
  }