/*font*/
.inria-serif-regular { font-family: "Inria Serif", serif; font-weight: 400; }
.kaisei-decol-regular { font-family: "Kaisei Decol", serif; font-weight: 400; }
.kaisei-decol-bold { font-family: "Kaisei Decol", serif; font-weight: 700; }


/*body & layout */
body.habitat {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #00130D;
  font-family: "Inria Serif", serif;
  color: #ffffff;
}


/* main content */
main.content.habitat-page {
  flex: 1;
  display: block;             
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  max-width: 1320px;
  margin: 0 auto;
  padding: 2px 24px 60px;
}

body.habitat .habitat-hero-bg {
  position: relative;
  height: 600px;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 19, 13, 0.1) 50%,
      rgba(0, 19, 13, 0.65) 70%,
      #00130D 100%
    ),
    url('/img/background.png');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
}

body.habitat .header-top {
  background: transparent;
  position: relative;
  z-index: 2;
}

body.habitat .nav-header {
  background: transparent
}

main.content.habitat-page .habitat-hero {
  margin: 0 0 18px 0;
  max-width: 560px;
}

main.content.habitat-page .habitat-hero h1 {
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-size: 3.4rem;
  margin: 0;
  line-height: 1.1;
}

main.content.habitat-page .habitat-hero p {
  margin: 10px 0 0 0;
  opacity: 0.85;
  line-height: 1.45;
  font-size: 1.3rem;
}

.habitat-layout {
  display: grid;
  grid-template-columns: 1.4fr 380px;
  gap: 16px;
  align-items: stretch;
  margin-top: 6px;
}


/* Map Card */
.map-card {
  background: rgba(113, 108, 108, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 25px;
  padding: 28px;
  backdrop-filter: blur(10px);
}

.map-card h2 {
  font-family: "Kaisei Decol", serif;
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0 0 12px 4px;
  opacity: 0.95;
}

.map-container {
  border-radius: 20px;
  overflow: hidden;
  flex: 1;
  min-height: 380px; 
}

#map {
  width: 100%;
  height: 500px;
  border-radius: 20px;
}

/* Animal Card */
.animal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 93%;
  
  background: rgba(237, 126, 58, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 25px;
  overflow: hidden;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.animal-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
  margin: 0;
}

.animal-card .animal-name {
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #F6811A;
  margin: 8px 0 14px;
  text-align: center;
}

.animal-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.animal-info .label{
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  margin-bottom: 6px;
}

.animal-info .value{
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.70);
  line-height: 1.35;
}

.animal-info .value.status.endangered{
  color: #FFECC4;
  font-weight: 600;
}

/*  Animal Buttons */

.animal-select{
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 58px;
  margin: 54px 0;
  flex-wrap: wrap;
}

.animal.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border-radius: 999px;

  /*  For The design of the button Animal  */
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  text-decoration: none;
  font-family: "Inria Serif", serif;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.animal.btn:hover{
  background: rgba(237, 126, 58, 0.4);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.animal.btn.active{
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* --- media query--- */

@media (max-width: 1310px){
  .animal-select{
     flex-wrap: nowrap;
     overflow-x: auto; 
     gap: 50px;
     padding-bottom: 8px;
     -webkit-overflow-scrolling: touch;
  }

  .animal.btn{
    flex: 0 0 auto;
    white-space: nowrap; 
  }
}

@media (max-width: 980px) {
  main.content.habitat-page {
    padding: 30px 18px 50px;
  }
  
   body.habitat .habitat-hero-bg{
    height: 360px;
   }

   main.content.habitat-page{
     margin-top: 40px;
   }

  .habitat-layout {
    grid-template-columns: 1fr;
  }

  .map-card {
   width: 85%;       
  }  
  
  #map {
    height: 420px;
  }

  .animal-card {
   width: 90%;       
  }  

  .animal-card img{
    height: 60%;
    object-fit: cover;

  }

  .animal-select {
    flex-wrap: wrap;
  }

  .animal.btn{
       flex: 10 1 220px;
       text-align: center;
       gap: 50px;  
  }
}

@media (max-width: 620px){
  body.habitat .habitat-hero-bg{
    height: 300px;
  }
	
  main.content.habitat-page .habitat-hero h1{
       font-size: 2.0rem;
  }

   main.content.habitat-page .habitat-hero p{
     font-size: 1.05rem;
   }
}