/* Main post */
.top-side #main {
  width: 900px;
  margin: 3.1em 0 0 0;
}

#content {
  width: 100%;
  min-height: 500px;
}

#sidebar {
  width: 440px;
  margin: 50px 50px 0 0;
}

.category-title-container{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center; 
  position: relative;   
  width: 100%;
  padding: .8em 1em;
  font-size: 16px;
  border: 1px solid #696969;
  border-radius: 5px;
  outline: none;
  margin: 3.15em 0 1em 0;
}

.bar-title{
  position: absolute;
  left: 1em; 
  font-size: 1.5em;
  color: #696969;
  cursor: pointer;
  visibility: hidden;
  display: block;
  padding: .2em .5em;
}

.bar-title-text{
  font-size: 1.5em;
  color: #696969;
  font-weight: 400;
  font-family: "Fira Sans", sans-serif;
  text-align: center;
}

.post-action {
  display: flex;
  display: -moz-flex;
  display: -webkit-flex;
  display: -ms-flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-around;
  width: 100%;
}

.page-actions-search {
  float: right;
  width: auto;
  margin: 1.5em 0;
}

.post-action .post {
  position: relative;
  background-color: #ffffff;
  width: 350px;
  height: 250px;
  transition: all 0.5s;
  -moz-transition: all 0.5s;
  -webkit-transition: all 0.5s;
  -ms-transition: all 0.5s;
  cursor: pointer;
  margin: 2em 0;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  padding: .5em;
}

.post > header {
  display: -moz-flex;
  display: -webkit-flex;
  display: -ms-flex;
  display: flex;
  margin: 0;
  position: absolute;
  bottom: 1em;
  left: 1em;
  border-radius: 18px;
}

.post > header .title {
  background-color: #ffb03b;
  width: auto;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  padding: 0 1em;
  border-radius: 10px;
}

.post > header .title a{
  display: block;
}

.post .title:before {
  position: absolute;
  content: "";
  top: 100%;
  right: -50%;
  width: 200%;
  height: 250%;
  background: #468966;
  transform: rotate(360deg);
  -moz-transform: rotate(360deg);
  -o-transform: rotate(360deg);
  -ms-transform: rotate(360deg);
  -webkit-transform: rotate(360deg);
  transition: 0.4s;
  -moz-transition: 0.4s;
  -webkit-transition: 0.4s;
  -ms-transition: 0.4s;
  z-index: 2;
}

.post:hover .title:before {
  top: 0;
}

.post > header .title h2 {
  position: relative;
  z-index: 10;
  font-family: "Fira Sans", sans-serif;
  font-size: 1.1em;
  text-align: center;
  margin: 0 !important;
  color: #fff;
  letter-spacing: 0;
  line-height: 40px;
}

.post > header .meta {
  display: none;
}

.post > .image.featured {
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.post > .image.featured img {
  display: block;
  -moz-transition: -moz-opacity 0.4s ease-out;
  -webkit-transition: -webkit-opacity 0.4s ease-out;
  -ms-transition: -ms-opacity 0.4s ease-out;
  transition: opacity 0.4s ease-out;
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

/* Title post */
.title-post-page {
  position: relative;
  margin: 1em 0 4em 0;
  text-transform: uppercase;
}

.title-post {
  font-family: "Fira Sans", sans-serif;
  font-size: 2em;
  font-weight: 500;
  letter-spacing: 0;
  color: #fff;
  background-color: #ffb03b;
  padding: 0.35em 0.5em;
  width: auto;
  line-height: 1.5;
}

.title-page {
  position: relative;
  margin: 1em 0 2em 0;
}

.title-all-page {
  font-family: "Fira Sans", sans-serif;
  font-size: 1.55em;
  font-weight: 500;
  letter-spacing: 0;
  color: #fff;
  background-color: #ffb03b;
  padding: 0.35em 0.5em;
  line-height: 1.5;
}

/* Kontener dla wyszukiwarki postów*/
.search-wrapper {
  position: relative;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  margin: 0 3em;
}

#search-input {
  width: 300px;
  padding: .45em 1em;
  font-size: 16px;
  border: 1px solid #696969; /* Pomarańcz jak na stronie */
  border-radius: 5px;
  outline: none;
}

#search-input:focus {
  border: 1px solid #f6a623;
}

.search-message {
  margin-top: 8rem;
  text-align: center;
  color: #696969;
  font-style: italic;
}

#sort-order,
#sort-order-default {
  width: 220px; /* podobnie jak input wyszukiwarki */
  height: 3.3em;
  padding: 0px 25px;
  border: 1px solid #696969;
  border-radius: 5px;
  font-size: 16px;
  color: #696969; /* kolor tekstu podobny do placeholdera */
  background-color: #fff;
  outline: none;
  box-sizing: border-box;
  appearance: none; /* usunięcie domyślnego stylu strzałki */
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  /* Styl dla listy w Firefoxie */
  -moz-appearance: none;
  cursor: pointer;
}

/* Firefox i WebKit - odstęp między select a dropdown menu */
#sort-order:focus,
#sort-order-default:focus {
  border: 1px solid #f6a623;
}

/* Stylizacja całego <option> nie działa w 100%, ale możesz zminimalizować różnice */
#sort-order option,
#sort-order-default option {
  background-color: #fff;
  padding: 0px 25px;
  cursor: pointer;
}

/* Przycisk "X" do czyszczenia wyszukiwarki postów*/
.clear-btn {
  background-color: #f6a623;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  font-size: 20px; /* trochę większy dla 'x' */
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-left: 10px;
  line-height: 1; /* żeby nie był rozciągnięty */
}

.clear-btn:hover {
  background-color: #e58e1d; /* Zmiana koloru po najechaniu */
}

/* Styl dla loadera wyszukiwarki postów*/
.loader {
  text-align: center;
  margin-top: 8rem;
  padding: 20px;
}

.loader::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 4px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Animacja obracania dla loadera */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 1280px) {
  .top-side #main {
    width: 900px;
  }

  .post-action .post {
    width: 296px;
    height: 220px;
  }

  .post > header .title {
    min-width: 180px;
  }

  .post > header .title h2 {
    font-size: 1em;
    line-height: 35px;
  }
  
  .category-title-container{
    margin: 2.9em 0 1em 0;
  }

}

@media screen and (max-width: 1080px) {
  .post-action .post {
    width: 270px;
    height: 200px;
  }

  .post > header .title {
    min-width: 160px;
  }

  .post > header .title h2 {
    font-size: 0.92em;
    line-height: 34px;
  }
  
  .post .title:before {
	  top: 100% !important;
	}

  .post:hover .title:before {
	  color: inherit !important;
	}

}

@media screen and (max-width: 1440px) {
  .search-wrapper {
	margin: 0 1em;
  }
}

@media screen and (max-width: 1280px) {
  .search-wrapper {
	margin: 0 1.5em;
  }
}

@media screen and (max-width: 1080px) {
  .search-wrapper {
	margin: 0 .5em;
  }
}

@media screen and (max-width: 980px) {
  .top-side #main {
    width: 100%;
    margin: 1em 0 0 0;
  }
  
  .top-side{
	margin: 0 !important;
  }
  
  #sidebar {
    align-self: flex-start;
    width: 100%;
    margin: 0;
  }

  .post-action .post {
    width: 320px;
    height: 250px;
    margin: 1em 0;
  }

  .post > header .title {
    min-width: 180px;
  }

  .post > header .title h2 {
    font-size: 1.1em;
    line-height: 36px;
  }

  .image-offer {
    width: 90%;
    height: auto;
  }
  
  .title-post {
    font-size: 1.8em;
    color: #ffb03b;
	background-color: transparent;
	padding: 0;
  }
  
  .title-post-page{
	margin: 1em 0;
   }

  .title-page {
    margin: 1em 0 2em 0;
  }

  .title-all-page {
    font-size: 1.5em;
    padding: 0.4em 0.5em;
  }
  
  .bar-title{
    visibility: visible;
  }

  .category-title-container{
    margin: .5em 0 0 0;
    width: auto;
  }
  
  .search-wrapper {
	margin: 0;
  }
  
  .loader {
    margin-top: 5rem;
  }
  
  .search-message {
    margin-top: 5rem;
  }
}

@media screen and (max-width: 736px) {
  
  #sidebar {
    align-self: flex-start;
  }
  
  .post-action .post {
    width: 440px;
    height: 320px;
    margin: 1em 0 0 0;
  }

  .post > header .title {
    min-width: 230px;
  }

  .post > header .title h2 {
    font-size: 1.05em;
    line-height: 40px;
  }

  .image-offer {
    width: 100%;
    height: auto;
  }
  
  .title-post {
    font-size: 1.7em;
  }

  .title-all-page {
    font-size: 1.4em;
    padding: 0.35em 0.5em;
  }
  
  .search-wrapper {
    justify-content: space-between;
    align-items: first baseline;
	gap: 1em;
  }

  .input-wrapper {
    display: flex;
    width: 100%;
    align-items: center;
    margin: 1em 0;
  }
  
  #search-input {
    width: 100%;
  }
  
  #sort-order,
  #sort-order-default {
    margin: 1em 0;
	width: 100%;
  }

}

@media screen and (max-width: 480px) {
  .post-action .post {
    width: 100%;
    height: 100%;
  }

  .post > header .title {
    min-width: 190px;
  }

  .post > header .title h2 {
    font-size: 1.05em;
    line-height: 36px;
  }

  .image-offer {
    width: 100%;
    height: auto;
  }
  
  .search-wrapper {
    flex-wrap: wrap;
	gap: 0;
  }
  
  #search-input {
    width: 100%;
  }
}