/*Google font*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Lato:wght@300;400&display=swap');


/*---Animation when entering page----*/
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
 
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

 
/*----Global Styles-----*/
body {
  font-family: 'Poppins', sans-serif; 
  margin: 0;
  padding: 0;
  background: #e6e6e6;
  color: #333;
  animation: fadeIn 1s ease-in-out;
}


body.details-view header,
body.details-view .container.mb-4 {
  display: none;
}


/*----Base Styles----*/
h1, h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

p {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
}


/*----Header-----*/
header {
  text-align: center;
  margin-bottom: 4rem;
}

header #mainHeader {
  font-size: 6rem;
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  color: rgb(0, 0, 0); 
  padding-top: 5rem; 
  padding-bottom: 0.5rem;
  font-weight: 700; 
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  animation: fadeUp 1s ease-in-out;
  text-shadow: 0 0 2rem #c6c5c5, 0 0 2rem #767676;

}



/*-----Filter Bar-----*/
.container.mb-4 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.form-select {
  border: 0.09rem solid #000000;
  border-radius: 12px;
  padding: .375rem 2.25rem .375rem .75rem;
  font-size: 1rem;
  background-color: #ffffff;
  color: rgb(46, 46, 46);
}

.form-select:hover,
.form-select:focus {
  border-color: rgba(100, 93, 155, 0.808);
  background-color: rgba(139, 117, 193, 0.424);
  box-shadow: 0 0 1rem rgba(88, 88, 88, 0.15)
}

#applyFilters {
  background-color: #837fca;
  border: 1px solid #000000;
  border-radius: 1rem;
  color: white;
  font-family: 'Poppins', sans-serif;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  box-shadow: inset 0 -0.09rem 0 rgba(0,0,0,0.15);
  transition: background-color 0.2s ease-in-out;
  margin-left: 1rem;
}

#applyFilters:hover {
  background-color: #b9a8cd;
}

.form-select.filter-active {
  background-color: #e0d8f0; 
}


/*-----Gallery-----*/
.card {
  position: relative;
  margin-top: 1.2rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.card:hover { 
  transform: translateY(-0.3rem);
}

.card:hover .card-title {
  display: block;
}

.card:hover .card-details {
  display: flex;
}

.card img {
  width: 100%;
  height: 18rem; 
}

.card .card-body {
  padding: 0;
}

.card .card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  display: none; 
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.card .card-text {
  display: none;
}

.card .card-details {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(131, 120, 168, 0.862);
  color: rgb(255, 255, 255);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card .card-details .view-details-btn {
  font-family: 'Poppins';
  font-size: 0.9rem;
  background-color: #ffffff95;
  color: rgb(0, 0, 0);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  text-decoration: none;
  margin-top: 1rem;
  border: 1px solid #000000;
  transition: all 0.3s ease;
}

.card .card-details .view-details-btn:hover {
  background-color: #efefef;
  color: rgb(2, 2, 2);
  transform: scale(1.05);
  border-radius: 1rem;
}

/*----Details Page-----*/
.details-container {
  padding: 2rem;
}
 
.details-container .row {
  display: flex;
  flex-wrap: wrap;
}

.details-container .details-image-col {
  flex: 1 1 40%;
  padding-right: 2rem;
}

.details-container .details-text-col {
  flex: 1 1 60%;
}

.details-container .details-text-col a {
  margin-top: auto;
  color: rgb(89, 122, 201);
}

.details-container .image-container {
  width: 100%;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.details-container .image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.details-container .details-text-col h2 {
  font-size: 2.5rem;
  margin-bottom: 1.3rem;
}

.details-container .details-text-col p {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.details-container .details-text-col .list-group-item {
  padding: 0.5rem 0;
  padding-top: 1rem;
  font-size: 0.9rem;
}

.details-container #backBtn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: auto;
  padding: 0.5rem 1rem;
  background-color: #494949;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  color: #e6e6e6;
}

.details-container #backBtn:hover {
  background-color: rgba(219, 219, 219, 0.862);
  border-color: #000000;
  color: #000000;
}



/*-----Info Panel------*/
#info-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color:rgb(105, 105, 105);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  font-size: 24px;
  cursor: pointer; 
  z-index: 1000;
}


#info-button:hover {
  background-color: #2d0070;
}

#info-panel { 
  position: fixed;
  top: 0;
  right: -350px;
  width: 20rem;
  height: 100%;
  background-color: #f8f9fa;
  padding-left: 2rem;
  padding-top: 2rem;
  padding-right: 2rem;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1001;
}

#info-panel.open { 
  right: 0;
}

#info-panel #close-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  text-decoration: none;
  color: #333;
}

#info-panel h2 { 
  font-size: 2.2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  align-items:center;
}

#info-panel p {
  font-size: 0.9rem; 
  margin-bottom: 2rem; 
}

#info-panel .btn-primary {
  background-color: #ffffff;
  color: rgb(0, 0, 0);
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  padding: 0.5rem 0.2rem;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
}


#info-panel .btn-primary:hover {
  background-color: #3a5196;
  color: #ffffff;
}

#info-panel .credits {
  font-size: 0.8rem;
  color: #6c757d;
  text-align: center;
  margin-top: 18rem;
}



/*----Back to Top Button-----*/
#back-to-top {
  position: fixed;
  bottom: 50%;
  padding-top: 0.1rem;
  right: 1.4rem;
  width: 2.5rem;
  height: 2.4rem;
  background-color: #d9d9d9;
  color: rgb(0, 0, 0);
  border-radius: 50%;
  text-align: center;
  line-height: 2.4rem;
  font-size: 2rem;
  display: none;
  z-index: 1000;
} 

#back-to-top:hover {
 cursor: pointer;
 color: #592dd1;
}

.overlay-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.details-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 80%;
  max-height: 80%;
  overflow-y: auto;
}

body.overlay-active {
  overflow: hidden;
}

body.overlay-active .container, body.overlay-active header {
  filter: blur(5px);
}

/*----Media Queries----*/

/* Desktop */
@media (min-width: 62rem) {
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

/* Tablets */
@media (max-width: 61.9375rem) {
  .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .details-container .row {
    flex-direction: column;
  }

  .details-container .details-image-col,
  .details-container .details-text-col {
    padding-right: 0;
  }
}

/* Mobile */
@media (max-width: 36rem) {
  header #mainHeader {
    font-size: 4rem;
    padding-top: 3rem;
  }

  .container.mb-4 .row {
    flex-direction: column;
  }

  .form-select, #applyFilters {
    width: 100%;
    margin-bottom: 1rem;
  }

  #applyFilters {
    margin-left: 0;
  }

  .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .details-content {
    max-width: 95%;
    padding: 1rem;
  }

  .details-container .details-text-col h2 {
    font-size: 2rem;
  }

  #info-panel {
    width: 100%;
    right: -100%;
  }

  #info-panel.open {
    right: 0;
  }
}