/*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; }


/*nav*/

/* Nav Header */
.nav-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 12px 24px;
  position: relative;
  z-index: 1000;
}

.nav-header nav {
  display: flex;
  justify-content: center;
  gap: 35px;
  transition: 0.4s ease; 
}


.nav-header nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  padding: 10px 20px;
  border-radius: 6px;
  transition: 0.3s ease;
}

.nav-header nav a:hover {
  color: #FFECC4;
}

/* Login button */
.nav-header nav a.login-btn {
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Style the icon */
.nav-header nav a.login-btn .login-icon {
  width: 98px;
  height: 78px;
  transition: transform 0.2s, filter 0.2s;
}

/* Hover effect */
.nav-header nav a.login-btn:hover .login-icon {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* The Burger Icon Container */
.menu-toggle {
  display: none; 
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.menu-toggle .bar {
  width: 30px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: 0.3s ease;
}





/*body & layout */
body {
  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 {
  display: flex;
  flex: 1;                 
  flex-direction: column;
  justify-content: center;  
  align-items: center;     
  text-align: center;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}



/* Index page top background */
body.home .home-hero {
  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;
  z-index: 1;
}

body.home .header-top {
  background: transparent;
  position: relative;
  z-index: 2;
}

body:not(.home) header {
  background-color: #19421D;
}


.logo, .footer-brand h2 {
  font-family: "Inria Serif", serif;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  justify-self: start;  
  display: flex;
  align-items: center;
  margin-top: -30px;
}

.logo .logo-ani {
  color: #ffffff;
}

.logo .logo-track {
  color: #FF0000;
}



/* Tagline */

.tag {
  position: relative;
  font-family: "Kaisei Decol", serif;
  display: flex;            
  flex-direction: column;
  justify-content: center;  
  gap: 10px;               
  text-align: center; 
  align-items: center;
  z-index: 10;
  font-weight: 400;
  margin-bottom: 120px;
  padding-bottom: 20px;
  z-index: 5;
}

.tag1 h2,
.tag2 h2 {
  margin: 0;
  font-size: 4rem;
}

.tag2 h2 {
  color: #FF0000;
}

/*  identify tag */

.identify-tag h1{
  margin: 30px auto;
  max-width: 700px;
  text-align: center;
  font-size: 1.2rem;
  padding-bottom: 30px;

}

/*container*/
.container {
  display: flex;
  flex-direction: column; 
  justify-content: center; 
  align-items: center;     
  text-align: center;
  position: relative;      
  z-index: 10;             
  width: 100%;             
  padding: 20px;
}



/* detect & call button - href */

.button-group1{
  display: flex;
  flex-direction: column; 
  justify-content: center; 
  align-items: center;     
  text-align: center;
  flex-direction: row;
  padding-top: 10px;
  gap: 15px;
  align-items: center;
  margin-bottom: 100px;
}

/* detect button */
.btn-detect {
    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 20px;
    border-radius: 50px;
    font-size: 25px;
    font-weight: 500;
    text-decoration: none;
}

.btn-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.btn-detect:hover {
  color:#FFECC4;
  border: 3px solid #FFECC4;
  opacity: 1;
}

/* call button */

.call-group{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.btn-call {

    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;

    background: #00875C;
    border: none;
    border-radius: 50%; 

    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-call img {
    width: 40px;
    height: 40px;
}

.btn-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.icon-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}


/* call-tag */

.call-tag h1{

  margin:0;
  font-size: 1.3rem;
  text-align: left;
  
}


/* card */

.card-container{
  padding-top: 130px;
}
.card {
  background: #3C6440;        /* keep your color */
  border-radius: 25px;
  padding: 20px;
  max-width: 900px;
  margin: 50px auto;
  position: relative;
  overflow: visible; 
}

.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;
  color: #ffffff;
  margin-bottom: 10px;
}
.animal-desc h1{
  font-size: 1rem;
}


.text{
  text-align: left;
  padding-right: 370px;
}
.text h3 {
  font-family: "Kaisei Decol", serif;
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff;
  margin: 5px 0;
}

.animal-status {
  background-color: #ff0000; 
  color: #fff;
  padding: 5px 15px;
  display: inline-block;
  border-radius: 5px;
  font-weight: 600;
  margin-bottom: 15px;
}

.text p {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.6;
}

/* card img */
.bird img {
  position: absolute;
  top: -73px;               
  right: 0px;              
  width: 680px;              
  height: auto;
  z-index: 2;
  border-radius: 20px;

}

/* anidex group home */

.anidex-container{
  display:flex;
  flex-direction: row;
  padding-top: 10px;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

/* map stat container */

.map-stats-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  background-color: #00130D;
  padding: 40px;
  box-sizing: border-box;
}

.map-stats-inner {
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 45px;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  min-height: 250px;
}

.map-labels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.m-label {
  padding: 10px 22px;
  border-radius: 10px;
  font-family: "Kaisei Decol", serif;
  font-size: 1.1rem;
  color: #1a1a1a;
  width: fit-content;
  font-weight: 700;
}

.m-yellow { background-color: #E1C15A; }
.m-orange { background-color: #E1925A; }
.m-green  { background-color: #6FB876; }

.map-graphic img {
  height: 250px;
  filter: drop-shadow(4px 4px 0px rgba(255,255,255,0.15)); 
}

/* The "19" Box - this will be connected to the db */ 
.sighting-box {
  position: absolute;
  bottom: -30px;
  right: 10px;
  background-color: #cfd1d0;
  padding: 25px 10px;
  border-radius: 30px;
  text-align: center;
  box-shadow: 15px 15px 30px rgba(0,0,0,0.4);
  min-width: 140px;
}

.sighting-label {
  display: block;
  font-family: "Inria Serif", serif;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 5px;
  font-weight: 700;
}

.sighting-number {
  font-family: "Kaisei Decol", serif;
  font-size: 5rem;
  font-weight: 400;
  color: #000;
  line-height: 0.9;
}


/* anidex tag group */

.anidex-group{
  padding-bottom: 100px;
  text-align: left;
  align-items: flex-start;
  font-family: "Kaisei Decol", serif;
  gap: 10px;
}

.anidex-tag{
  font-size: 5rem;
  font-weight: 400;
}

.anidex-p{
  font-size: 1.1rem;
  margin-bottom: 10px;

}

.btn-anidex{
    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;
    
}

/* divider*/

.white-line-divider {
  width: 70%;  
  height: 2px; 
  background-color: #ffffff; 
  margin: 1em 0; 
  z-index: 3;
  border: 1px white;
  margin-top: 100px;
  margin-bottom: 50px;
}

/* learn-group */

/* learn text */
.learn-text{
  font-family: "Kaisei Decol", serif;
  font-weight: 400;

}
.learn-more-tag{
  font-size: 5rem;
  font-weight: 400;
}

/*learn cards */

.lcontainer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;       
  justify-content: center;
  align-items: flex-start; /* or center */
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px;
}

.learn-card, .learn-card1, .learn-card2 {
  border-radius: 25px;
  padding: 20px;
  width: 250px;
  min-height: 150px;
  position: relative;
  overflow: visible;
  margin: 50px 0 0 0; /* vertical spacing only */
  cursor: pointer;
}

/* individual colors */
.learn-card { background: #2A1008; }
.learn-card1 { background: #A08361; }
.learn-card2 { background: #918D8D; }


/* individual image containers */
.rbird { position: absolute; top: -30px; right: -40px; z-index: 2; }
.cat   { position: absolute; top: -6px;  right: 0px;   z-index: 2; }
.pig   { position: absolute; top: -10px; right: -10px; z-index: 2; }

/* individual image sizes */
.rbird img { width: 330px; height: auto; border-radius: 20px; display: block; }
.cat   img { width: 250px; height: auto; border-radius: 20px; display: block; }
.pig   img { width: 300px; height: auto; border-radius: 20px; display: block; }



/* Card hover effect */
.learn-card, .learn-card1, .learn-card2 {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.learn-card:hover, 
.learn-card1:hover, 
.learn-card2:hover {
  transform: translateY(-10px) scale(1.03); /* lifts and slightly enlarges */
  box-shadow: 0 20px 40px rgba(238, 237, 235, 0.4); /* shadow for depth */
}

.rbird:hover img,
.cat:hover img,
.pig:hover img {
  transition: transform 0.3s ease;
}

/* Help Group */

.help-group{
  display: flex;
  align-items: center; 
  gap: 40px;           
  padding: 20px;
  flex-direction: row;
  margin-top: 30px;
}

.help-tagline {
  flex: 1;
}

.help-tagline h1 {
  font-family: "Kaisei Decol", serif;
  font-size: 5rem;
  font-weight: 400;
  margin: 0;

white-space: nowrap;

}

.help-youtube {
  flex: 1;
  position: relative;
  min-width: 300px;
  aspect-ratio: 16 / 9;
}


.help-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 16px;
}


/*footer */

/* footer */

.main-footer {
  width: 100%;
  background: #19421D;
  color: #cfd8e3;
  margin: 150px 0 0 0;
  box-shadow: 0 -2px 24px #5e3d2c33;
  font-family: "Inria Serif", serif;
}

/* Footer layout */
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 18px 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


/* footer logo */

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-logo .logo-ani {
  color: #ffffff;
}

.footer-logo .logo-track {
  color: #FF0000;
}


.footer-tagline {
  font-size: 1rem;
  color: #ffffff;
  margin: 4px 0 0 0;
  font-family: 'Inria Serif', serif;
  font-weight: 500;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #ffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: color 0.2s;
  opacity: 0.85;
}

.footer-nav a:hover {
  color: #FFECC4;
  opacity: 1;
}


.footer-social-icon img {
  width: 28px;
  height: 28px;
  filter: invert(1) brightness(2);
  opacity: 0.85;
  transition: filter 0.2s, opacity 0.2s, transform 0.2s;
}

.footer-social-icon:hover img {
  filter: invert(1) brightness(2) drop-shadow(0 0 6px #e2b07a);
  opacity: 1;
  transform: scale(1.12) rotate(-6deg);
}

.footer-bottom {
  text-align: center;
  padding: 12px 0 18px 0;
  font-size: 0.98rem;
  color: #fff;
  background: transparent;
  opacity: 0.85;
  border-top: 1px solid #e2b07a22;
  letter-spacing: 0.01em;
}


/* --- MEDIA QUERIES --- */

/* --- COMPREHENSIVE MOBILE OPTIMIZATION --- */

@media (max-width: 768px) {

    /* Burger Menu Toggle visibility */
  .menu-toggle {
    display: flex !important; 
    grid-column: 3;
    justify-self: end;
    z-index: 122;
    position: relative;
  }

  /* Transform Nav into Mobile Drawer */
  .nav-header nav {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 250px;
    height: 100vh;
    background-color: #00130D;
    flex-direction: column !important; 
    justify-content: center;
    gap: 20px;
    transition: 0.4s ease;
    z-index: 121;
  }

  /* When JS adds the .active class */
  .nav-header nav.active {
    right: 0;
  }

  /* Animate the burger bars into an X */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color:#E1C15A;
}
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;

}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color:#E1C15A;

}

  .tag1 h2, .tag2 h2, .anidex-tag, .learn-more-tag, .help-tagline h1 {
    font-size: 2.8rem !important; /* Prevents text from being wider than screen */
    line-height: 1.1;
  }


  body.home .home-hero {
    height: 450px;
    background-position: center top;
  }

  .tag {
    margin-bottom: 60px;
    margin-top: 75px;
  }

  .logo{
    margin-top: 20px;
  }
  /* btn group */

  .button-group1 {
    gap: 10px; /* Tighter gap for smaller screens */
    padding-top: 5px;
  }

  /* 1. Detect Button - Scaled Down */
  .btn-detect {
    padding: 6px 15px; /* Reduced padding */
    font-size: 16px;    /* Smaller text (was 25px) */
    gap: 8px;
  }

  .btn-icon {
    width: 24px;       /* Smaller icon (was 40px) */
    height: 24px;
  }

  /* 2. Call Button - Scaled Down */
  .btn-call {
    width: 45px;       /* Smaller circle (was 62px) */
    height: 45px;
  }

  .btn-call img {
    width: 25px;       /* Smaller phone icon (was 40px) */
    height: 25px;
  }

  /* 3. Call Tag Text */
  .call-tag h1 {
    font-size: 0.9rem; /* Smaller "Call" label */
  }

  .call-group {
    gap: 2px;          /* Tighter vertical spacing */
  }

  /* bird card group */

  
  .card-container {
    padding-top: 50px;
    padding-right: 50px;
    width: 95%;
    margin: 0 auto;
  }

  .card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-bottom: 0; 
    overflow: hidden;   
    position: relative;
    min-height: 450px;  
  }

  .card-content {
    flex-direction: column;
    gap: 0;
  }


  .text {
    padding-right: 0;
    text-align: left;
    z-index: 5;       
    position: relative;
  }

  /* 3. The Bird Image - Pinned to the border */
  .bird img {
    position: absolute;
    top: 374px;        
    right: -10px;      
    width: 200px;      
    height: auto;
    z-index: 1;        
    border-radius: 0; 
    pointer-events: none; 
  }

  /* 4. Adjust description text so it doesn't get buried */
  .text p {
    max-width: 70%;    
    font-size: 0.9rem;
  }


  .anidex-container {
    flex-direction: column;
    gap: 40px;
  }

  .map-stats-container {
    padding: 20px;
  }

  .map-stats-inner {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .map-graphic img {
    height: 180px;
    margin-top: 20px;
  }

  .sighting-box {
    position: relative;
    bottom: 0;
    right: 0;
    margin-top: -20px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  /* 6. Learn More Cards (Grid) */
  .lcontainer {
    flex-direction: column;
    align-items: center;
    gap: 60px;
  }

  .learn-card, .learn-card1, .learn-card2 {
    width: 90%;
    max-width: 240px;
    height: 200px;         /* Uniform height for mobile stacking */
    margin: 50px auto;     /* Spacing between cards */
    position: relative;
    overflow: hidden;      /* Clips the animal to the card's rounded border */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  /* 2. Individual Absolute Positioning for Each Animal */
  
  /* The Red Bird */
  .rbird {
    position: absolute;
    top: auto;             /* Override desktop top: -30px */
    bottom: 0px;          /* Pinned to bottom */
    right: 0px;          /* Slight bleed to the right */
    z-index: 2;
  }
  .rbird img {
    width: 290px;          /* Scaled for mobile */
    height: auto;
  }

  /* The Cat */
  .cat {
    position: absolute;
    top: auto;             /* Override desktop top: -6px */
    bottom: 0;             /* Flush with bottom border */
    right: 0;              /* Flush with right border */
    z-index: 2;
  }
  .cat img {
    width: 260px;
    height: auto;
  }

  /* The Pig */
  .pig {
    position: absolute;
    top: auto;             /* Override desktop top: -10px */
    bottom: -10px;         /* Slight dip below for organic look */
    right: 10px;
    z-index: 2;
  }
  .pig img {
    width: 280px;
    height: auto;
  }

  /* 3. Text Protection */
  .learn-text {
    position: relative;
    z-index: 5;            /* Ensures text stays above animal images */
    max-width: 90%;        /* Keeps text on the left side */
    text-align: center;
    justify-content: center;
    align-items: center;
    pointer-events: none;  /* Makes sure text doesn't interfere with card clicks */
  }

  .learn-more-tag {
    font-size: 2.5rem !important;
    line-height: 1.2;
    margin: 0;
  }

  .learn-p{
    text-align: center;
  }

  /* 7. Help/YouTube Section */
  .help-group {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .help-tagline h1 {
    white-space: normal; /* Allow wrapping on small screens */
  }

  .help-youtube {
    width: 100%;
    min-width: unset;
  }

  /* 8. Divider */
  .white-line-divider {
    width: 90%;
    margin-top: 50px;
  }

}

/* Tablets & medium screens */

@media (max-width: 900px) {
  .footer-content { flex-direction: column; align-items: center; gap: 18px; }
  .footer-nav { gap: 14px; }
  .footer-logo { align-items: center; }

  /* Burger Menu Toggle visibility */
  .menu-toggle {
    display: flex !important; 
    grid-column: 3;
    justify-self: end;
    z-index: 2002;
    position: relative;
  }

  /* Transform Nav into Mobile Drawer */
  .nav-header nav {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 250px;
    height: 100vh;
    background-color: #00130D;
    flex-direction: column !important; 
    justify-content: center;
    gap: 20px;
    transition: 0.4s ease;
    z-index: 2001;
  }

  /* When JS adds the .active class */
  .nav-header nav.active {
    right: 0;
  }

  /* Animate the burger bars into an X */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color:#E1C15A;
}
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;

}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color:#E1C15A;

}

}


/* Mobile phones */
@media (max-width: 600px) {
  .footer-content { padding: 24px 8px 12px 8px; }
  .footer-logo { font-size: 1.1rem; align-items: center; justify-content: center; }
  .footer-tagline { font-size: 0.9rem; }
  .footer-nav a { font-size: 0.95rem; }
  .footer-social-icon img { width: 22px; height: 22px; }
  .identify-tag h1 { font-size: 1rem; max-width: 90%; }
}
