/*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; }


/* Profile Group */


.profile-container {
  display: flex;
  flex-direction: column; 
  justify-content: center; 
  align-items: center;     
  text-align: center;
  position: relative;      
  z-index: 10;             
  width: 100%;             
  padding: 20px;
}

/* profile tag */

.top-profile-group{
  display: flex;
  flex-direction: row;
  gap:220px;
  padding-left: 100px;
  padding-right: 100px;
  padding-top: 50px;
  justify-content: center;
  margin-bottom: 70px;
}

.profile-group{
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 35px;
  padding-left: 10px;
  gap:10px;
  align-items: center;
}

.profile-title {
  position: relative;
  font-family: "Kaisei Decol", serif;
  display: flex;            
  flex-direction: column;
  justify-content: center;                
  text-align: center; 
  align-items: center;
  z-index: 10;
  font-weight: 400;
  padding-bottom: 20px;
  padding-right: 10px;
  z-index: 5;
  margin: 0;
  font-size: 2rem;
}

.profile-avatar {
  position: relative; 
  width: 100px;
  height: 100px;
  cursor: pointer;
  margin-bottom: 20px;
}

.profile-avatar:hover {
  transform: scale(1.1); 
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%; 
  background-color: #E1C15A; 
  object-fit: cover;
}

.camera-badge {
  position: absolute;
  bottom: 5px;    
  right: 5px;     
  background: #ccc;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid #1a1a1a;

}

/* Info */
.info-box {
    background-color: #00130d;
    border: 2px solid #ffffff;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    color: white;
    text-align: left;
}

.info-content strong{
  font-size: 2rem;
}

.info-content p{
  font-size: 2rem;
}
/* medals & badges */

.medals-section {
    display: flex;
    flex-direction: column; /* Stacks text/medals above the button */
    position: relative;     /* Anchor for the button */
    width: 100%;
}


.medals-flex{
    display: flex;
    align-items: center;
    gap:20px;
}

.medal-slot p{
  font-size: 1rem;
}

.medal-slot img{
  display: flex;
  position: relative; 
  width: 100px;
  height: 100px;
  cursor: pointer;
  padding-left: 20px;
}

/* btn edit */

.info-btn{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap:20px;
}
.btn-edit {
    background-color: #ffffff;
    color: #000;
    border: none;
    padding: 5px 20px;
    border-radius: 5px;
    font-family: "Kaisei Decol", serif;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-edit:hover {
    background-color: #E1C15A; /* Gold hover color to match theme */
    transition: 0.3s;
}


.leaderboard-container {
  display: flex;
  justify-content: center;
}

.leaderboard-section {
    background-color: #7DAE83; 
    color: #00130d;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    width: 1250px; 
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 10px;
    text-align: left;
}

.leaderboard-table thead {
    border-bottom: 2px solid #00130d;
}

.leaderboard-table tbody tr {
    border-bottom: 1px solid rgba(0, 19, 13, 0.2);
}

.leaderboard-table tbody tr.highlight {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.leaderboard-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* Service Medals & Badges */

.badge-text{
    text-align: left;
    font-size: 3rem;
    font-family: "Kaisei Decol", serif;
    font-weight: 400;
}

.badges-section {
    display: flex;
    flex-direction: column; /* Stacks text/medals above the button */
    position: relative;     
    width: 100%;
}

.badges-section h3 {
    text-align: left;
    font-size: 1.3rem;
    font-family: "Kaisei Decol", serif;
    font-weight: 400;
}


.badges-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* Keeps icons aligned even if text lengths vary */
    justify-content: flex-start; /* Or 'center' if you want the whole group centered */
    gap: 10rem; /* This creates uniform space between each badge slot */
    flex-wrap: wrap; /* Ensures they wrap to the next line on mobile */
}

.badges-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1; /* Makes all slots take up equal width */
    min-width: 150px; /* Prevents them from getting too squished */
    max-width: 200px; /* Keeps them from getting too wide */
}

.badges-slot p {
    font-size: 1.5rem;
    width: 100%; /* Changed from 70% to 100% for better centering */
    margin-top: 10px;
}

.badges-slot img{
  display: flex;
  position: relative; 
  width: 130px;
  height: 130px;
  cursor: pointer;
}

/* Progress Section */
.progess-badges-section {
    display: flex;
    flex-direction: column; /* Stacks text/medals above the button */
    position: relative;     
    width: 100%;
}

.progess-badges-section h3 {
    text-align: left;
    font-size: 1.3rem;
    font-family: "Kaisei Decol", serif;
    font-weight: 400;
    color:red;
}

.badge-requirement {
    font-size: 0.9rem;
    color: #666; /* Greyish color to differentiate from the title */
    font-family: 'Poppins', sans-serif;
    margin-top: 5px;
    font-style: italic;
}

/* Progress Bar Styling */
.progress-bar {
    width: 80%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50; /* Green for progress */
    border-radius: 10px;
}

/* Grayscale effect for "In Progress" badges (optional) */
.progess-badges-section .badges-slot img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.3s;
}

.progess-badges-section .badges-slot:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Recently Captured */

.recent-container {
    padding: 20px;
}

.recent-container h3 {
    color: #ffffff; /* White title like in the image */
    font-family: "Kaisei Decol", serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 400;
    text-align: left;
}

/* The tan colored card */
.recent-card {
    background-color: #a69677; /* The earthy tan color */
    border-radius: 20px;       /* Rounded corners */
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 800px;         /* Adjust based on your layout */
}

.recent-title {
    font-family: "Kaisei Decol", serif;
    font-size: 2rem;
    font-weight: bold;
    color: #0d1a12;           /* Dark green/black text */
    text-align: left;
}

.recent-date {
    font-family: "Kaisei Decol", serif;
    font-size: 1.1rem;
    color: #0d1a12;
    margin-bottom: 15px;
    text-align: left;
}

/* The image wrapper and the image itself */
.recent-image {
    width: 100%;
}

.recent-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;      /* Slightly smaller radius for the internal image */
    display: block;
    object-fit: cover;
}


/* Certificate */

.certificate-container h3 {
    color: #ffffff; /* White title like in the image */
    font-family: "Kaisei Decol", serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 400;
    text-align: left;
}

.certificate-card {
    border-radius: 20px;       /* Rounded corners */
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 800px;         /* Adjust based on your layout */
}

/* The image wrapper and the image itself */
.certificate-image {
    width: 100%;
}

.certificate-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;      /* Slightly smaller radius for the internal image */
    display: block;
    object-fit: cover;
}

/* Favorite */



.favorite-text{
    text-align: left;
    font-size: 3rem;
    font-family: "Kaisei Decol", serif;
    font-weight: 400;
}

.favorite-card {
  background: #C8A56B;       
  border-radius: 25px;
  padding: 20px;
  max-width: 900px;
  margin: 50px auto;
  position: relative;
  overflow: visible; 
}

.favorite-card-content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}


/* card text */
.text h2 {
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 10px;
  color:#042521;
}
.animal-desc h1{
  font-size: 1rem;
}


.favorite-text-group{
  text-align: left;
  padding-right: 370px;
  color:#042521
}
.text h3 {
  font-family: "Kaisei Decol", serif;
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff;
  margin: 5px 0;
}

.favorite-animal-status {
  background-color: #6FB876; 
  color: #042521;
  padding: 5px 15px;
  display: inline-block;
  border-radius: 5px;
  font-weight: 600;
  margin-bottom: 15px;
}

.text p {
  color: #042521;
  font-size: 1rem;
  line-height: 1.6;
}

/* card img */
.leopard img {
  position: absolute;
  top: -59px;               
  right: 0px;              
  width: 470px;              
  height: auto;
  z-index: 2;
  border-radius: 20px;

}


/* anipic group home */

.anipic-container{
  display:flex;
  flex-direction: row;
  padding-top: 10px;
  gap: 45px;
  align-items: center;
  justify-content: center;
  padding:20px;
  margin-bottom: 30px;
}

/* map stat container */

.anipic-stats-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  background-color: #918D8D;
  padding-left: 300px;
  border-radius: 40px;
  box-sizing: border-box;
  overflow: visible; 
}

.anipic-stats-inner {
  border-radius: 45px;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  min-height: 250px;
}


.anipic-graphic {
  position: relative;
  width: 200px;      
}

.anipic-graphic img {
  height: 250px;
  width: auto;       
  position: absolute;
  top: 155px;
  right: 95px;        
  transform: translateY(-50%); 
  z-index: 5;        
  border-radius: 30px;
}

/* The "19" Box - this will be connected to the db */ 
.saved-box {
  position: absolute;
  bottom: -70px;
  right: -70px;
  background-color: #cfd1d0;
  padding: 25px 5px;
  border-radius: 30px;
  text-align: center;
  box-shadow: 15px 15px 30px rgba(0,0,0,0.4);
  min-width: 140px;
}

.saved-label {
  display: block;
  font-family: "Inria Serif", serif;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 5px;
  font-weight: 700;
}

.saved-number {
  font-family: "Kaisei Decol", serif;
  font-size: 5rem;
  font-weight: 400;
  color: #000;
  line-height: 0.9;
}


/* anidex tag group */

.anipic-group{
  padding-bottom: 100px;
  text-align: left;
  align-items: flex-start;
  font-family: "Kaisei Decol", serif;
  gap: 15px;
}

.anipic-tag{
  font-size: 3rem;
  font-weight: 400;
}

.anipic-p{
  font-size: 1.1rem;
  margin-bottom: 10px;

}


/*anipic button */

.btn-anipic{
    display: inline-block;
    background: #E1C15A;
    color: #00130D;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    font-family: "Kaisei Decol", serif;
    border: none;
    cursor: pointer;
    margin-right: 30px;
    
}

/* detect button */
.btn-detect-pic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    background: rgba(217, 217, 217, 0.2);
    border: 2px solid #ffffff;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 500;
    text-decoration: none;
}

.btn-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.btn-detect-pic:hover {
  color:#FFECC4;
  border: 3px solid #FFECC4;
  opacity: 1;
}

/* Service Award */

.service-card{
    background-color: #00130D;
}

.service-text{
    font-family: "Kaisei Decol", serif;
}

.service-title{
    font-size: 5rem;
    font-weight: 400;
    margin-bottom: 40px;
}

.achievement-title{
    font-size: 1.5rem;
    font-weight: 700;
}


.service-achievement {
  display: flex;
  flex-direction: row; 
  gap: 30px;           
  align-items: center; 
}


.achievement-item {
  display: flex;
  flex-direction: column; 
  align-items: center;    
  text-align: center;
  flex: 1;              
}

.achievement-item img {
  width: 80px;          
  height: auto;
  margin-top: 10px;
}

.icon-download-link {
  display: inline-block;
  transition: transform 0.2s;
  cursor: pointer;
}

.icon-download-link:hover {
  transform: scale(1.01); 
}

.download-icon {
  width: 30px;  
  height: auto;
  justify-content: end;
}


/*media query */


@media (max-width: 768px) {
  /* --- Top Profile Section Adjustments --- */
  
  .top-profile-group {
    flex-direction: column; /* Stacks Avatar and Info Box */
    gap: 40px;
    padding: 20px;
    padding-top: 50px;
    align-items: center;
  }

  .profile-group {
    padding: 0;
    margin-bottom: 20px;
  }

  .profile-title {
    font-size: 2.5rem; /* Matches your previous media query */
    text-align: center;
    padding-right: 0;
  }

  /* --- Info Box Mobile Cleanup --- */
  
  .info-box {
    max-width: 95%;
    padding: 20px;
  }

  .info-content strong, 
  .info-content p {
    font-size: 1.2rem; /* Shrinks the very large 2rem desktop text */
  }

  .medals-flex {
    flex-direction: column; /* Medals stack on small screens */
    gap: 30px;
  }

  .medal-slot{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .medal-slot img {
    width: 80px;
    height: 80px;
    padding-left: 0; /* Center the icon */
  }

  .btn-edit {
    align-self: center; /* Center the edit button on mobile */
    width: 100%;
    margin-top: 20px;
  }

  /* --- Leaderboard Scaling --- */
  
  .leaderboard-section {
    font-size: 0.9rem;
  }

  .leaderboard-header span,
  .leaderboard-row span {
    padding: 5px;
  }


  /* 2. Favorite Card & Leopard */
  .favorite-text {
    font-size: 2.2rem;
    text-align: center;
    padding: 0 20px;
  }

  .favorite-card {
    width: 90%;
    margin: 40px auto;
    overflow: hidden; 
    padding-bottom: 0; 
    position: relative;
    z-index: 12;
  }

  .favorite-card-content {
    flex-direction: column;
  }

  .favorite-text-group {
    padding-right: 0; 
    text-align: center;
    margin-bottom: 20px;
    
  }

  .favorite-text-group p{
    text-align: left;
    line-height: 1.2;
  }

  .leopard img {
    position: absolute;
    bottom: 0; 
    right: -20px; 
    top: auto;
    width: 130px; 
    z-index: 1;
    pointer-events: none;
  }

  /* 3. Stats & Anipic Section */
  .anipic-container {
    flex-direction: column;
    gap: 20px;
  }

  .anipic-stats-container {
    padding-left: 100px; 
    max-width: 100%;
    margin-top: 30px;
  }

  .anipic-stats-inner {
    justify-content: center;
    min-height: 200px;
  }

  .anipic-graphic img {
    height: 180px;
    top: 186px; /* Adjusting the overlap */
    right: 98%;
    transform: translateX(50%); /* Centers the image over the box */
  }

  .saved-box {
    position: relative; 
    bottom: 0;
    right: -35px;
    margin: -30px auto 20px auto;
    width: fit-content;
  }

  .anipic-group {
    padding-bottom: 50px;
    text-align: center;
    align-items: center;
  }

  /* 4. Service Awards / Achievements */
  .service-title {
    font-size: 2.5rem;
    text-align: center;
  }

  .service-achievement {
    flex-direction: column; 
    gap: 40px;
  }

  .achievement-item img {
    width: 100px; /* Make medals a bit bigger since they are stacked */
  }
  
  .btn-anipic {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .download-icon{
    margin-top: 20px;
  }
}